Interface CometBridgeRemote
This is intended for testing purposes only and maybe removed or changed without notice.
For all normal work please use CometBridgeLocal interface instead.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe enum Internal call.static interfaceThe interface Named session mode.static enumThe enum Session mode. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionCall a method on the server and retrieve a list of string values in return.voiddeletePageTemplate(String sessionId, int pageTemplateId) Delete a page templatefindProducts(String sessionId, int statementId, String searchValue1, String searchValue2, String searchValue3, String searchValue4) Find products using a find statements and 1 ..getActions(String sessionId) Gets actions.byte[]getBinaryData(String sessionId, ConfigurationData.FileID fileId, int id) Get binary data byte [ ].getChildBuckets(String sessionId, String productStringId, String searchString) Get children of a bucket.
productStringId is the compound ID used in the Comet3 context, in other words: just the value you get from the parent product by callingproduct.getStringId();Gets colors.getConditionMenues(String sessionId) Gets condition menues.getConditions(String sessionId) Gets conditions.getDataFiles(String sessionId) Gets data files.getDomains(String sessionId) Gets domains.byte[]getEntityIcon(String sessionId, String fileId) Get entity icon byte [ ].getFindStatements(String sessionId) Gets find statements.getFrameRules(String sessionId) Gets frame rules.Gets grids.getGridTypes(String sessionId) Gets grid types.Call a method on the server an retrieve a list of string-lists in return (e.g.getMessages(String sessionId, String locale) Get messages / translations for this comet project.
Currently there is no support for user defined tranlations, so this method just returns an empty (beside of the root element) XML document.byte[]getPageItemData(String sessionId, int pageItemId) Get binary (i.e.byte[]getPageItemIDML(String sessionId, int pageItemId) Get IDML data of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(sessionId, ConfigurationData.FileID.PAGEITEM_IDML, pageItemId);byte[]getPageItemMarkup(String sessionId, int pageItemId) Get markup (i.e.byte[]getPageItemPreview(String sessionId, int pageItemId) Get preview (i.e.getPageItems(String sessionId) Gets page items.byte[]getPageItemShapes(String sessionId, int pageItemId) Get shapes of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(sessionId, ConfigurationData.FileID.PAGEITEM_SHAPES, pageItemId);getPageItemStates(String sessionId) Gets page item states.getPageItemTypes(String sessionId) Gets page item types.byte[]getPageTemplateData(String sessionId, int pageTemplateId) Get binary (i.e.byte[]getPageTemplatePreview(String sessionId, int pageTemplateId) Get preview (i.e.getPageTemplates(String sessionId) Gets page templates.getPanelStatements(String sessionId) Gets panel statements.getPlaceholderGroups(String sessionId) Gets placeholder groups.getPlaceholders(String sessionId) Gets placeholders.byte[]getPluginLibrary(String sessionId, String pluginName) Get plugin library byte [ ].getPreviewStatements(String sessionId) Gets preview statements.getProductPanelConfig(String sessionId) Get the configuration for the product panelgetRelatedTos(String sessionId) Gets related tos.getRootBuckets(String sessionId, String searchString) Get the root buckets from the data source of the current comet project.
Calling this method requires a valid Comet Bridge session, i.e.: you must login using CometBridgeRemote.login or CometBridgeRemote.loginWithSession before.byte[]getScriptLibrary(String sessionId, String libraryName) Get the cscript library with the given name.
These are "actions" (speaking in Comet3 terms), which can be included in other scripts using this scheme:#include "[pubserver]/libraryName.h"getSessionAttribute(String sessionId, String key) Get the session attributegetSessionMode(String sessionId) Get the mode for this session.org.apache.shiro.subject.SubjectgetShiroSubject(String sessionID) Returns shiro subjectgetXEntities(String sessionId) Gets x entities.getXIndexes(String sessionId) Gets x indexes.login (i.e.voidlogout (i.e.voidprocessTocUpdate(String sessionId, CometTocUpdate toc) Process a "table of contents" update.
All data required to process this update is encapsulated in the toc object, such as document name, path, publication ID, the actual toc entries, scope of this command etc.
SeeCometTocUpdatefor more information.
Usually this method is only called from rendering clients (such as InDesign / Comet or the pdf renderer) while generating or analyzing documentsvoidresetApplication(String sessionId) Reset the applicationvoidsavePageItemPreview(String sessionId, int pageTemplateId, byte[] data) Save preview (i.e.intsavePageTemplate(String sessionId, PageTemplate pageTemplate) Save a PageTemplate.
Depending on the pageTemplate data, this method either updates an existing page template, if the ID of this template is defined and denote an existing / valid page template creates a new page template, if the ID is 0 or does not denote a page template In the latter case, the ID of the newly created page template is returned.voidsavePageTemplateData(String sessionId, int pageTemplateId, byte[] data) Save binary (i.e.voidsavePageTemplatePreview(String sessionId, int pageTemplateId, byte[] data) Save preview (i.e.voidsetActions(String sessionId, Actions actions) Sets actions.voidsetBinaryData(String sessionId, ConfigurationData.FileID fileId, int id, byte[] data) Sets binary data.voidSets colors.voidsetConditionMenues(String sessionId, ConditionMenues menues) Sets condition menues.voidsetConditions(String sessionId, Conditions conditions) Sets conditions.voidsetDataFiles(String sessionId, DataFiles datafiles) Sets data files.voidsetDomains(String sessionId, Domains domains) Sets domains.voidsetFindStatements(String sessionId, FindStatements findStatements) Sets find statements.voidsetFrameRules(String sessionId, FrameRules frameRules) Sets frame rules.voidSets grids.voidsetGridTypes(String sessionId, GridTypes gridTypes) Sets grid types.voidsetPageItems(String sessionId, PageItems pageItems) Sets page items.voidsetPageItemStates(String sessionId, PageItemStates pageItemStates) Sets page item states.voidsetPageItemTypes(String sessionId, PageItemTypes pageItemTypes) Sets page item types.voidsetPageTemplates(String sessionId, PageTemplates pageTemplates) Sets page templates.voidsetPanelStatements(String sessionId, PanelStatements panelstatements) Sets panel statements.voidsetPlaceholderGroups(String sessionId, PlaceholderGroups groups) Sets placeholder groups.voidsetPlaceholders(String sessionId, Placeholders placeholders) Sets placeholders.voidsetPreviewStatements(String sessionId, PreviewStatements previewStatements) Sets preview statements.voidsetRelatedTos(String sessionId, RelatedTos relatedTos) Sets related tos.voidsetSessionAttribute(String sessionId, String key, Object object) Set the session attributevoidsetSessionMode(String sessionId, CometBridgeRemote.SessionMode mode) Set the mode for this session.voidsetXEntities(String sessionId, XEntities xentities) Sets x entities.voidsetXIndexes(String sessionId, XIndexes xindexes) Sets x indexes.
-
Field Details
-
MAPPED_NAME
The mapped name of the CometBridge Plugin
Use this name when requesting a Plugin instance from the PluginManager
- See Also:
-
JNDINAME
JNDI name for the remote interface
Use this name when connecting to the server via a remote EJB client, e.g.
Properties properties = new Properties(); properties.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory"); properties.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming"); properties.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl"); properties.setProperty("org.omg.CORBA.ORBInitialHost", "<your server name>"); properties.setProperty("org.omg.CORBA.ORBInitialPort", "<your server's ORB port>"); InitialContext initialContext = new InitialContext(properties); CometBridgeRemote bridge = (CometBridgeRemote)initialContext.lookup(com.priint.pubserver.comet.bridge.CometBridgeRemote.JNDINAME);- See Also:
-
SESSION_PREFIX
The constant SESSION_PREFIX.- See Also:
-
-
Method Details
-
login
String login(String login, String passwd, String configurationName, String language) throws CometException login (i.e. start a session).- Parameters:
login- the loginpasswd- the passwdconfigurationName- name of the configuration, such as "demo"language- language,: specify language codes- Returns:
- string
- Throws:
CometException- the comet exception
-
logout
logout (i.e. close a session)- Parameters:
sessionId- ID of the session as obtained with login- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setSessionMode
void setSessionMode(String sessionId, CometBridgeRemote.SessionMode mode) throws CometException, InvalidSessionException Set the mode for this session. See description above for the different session modes.- Parameters:
sessionId- the session idmode- the mode- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getSessionMode
CometBridgeRemote.SessionMode getSessionMode(String sessionId) throws CometException, InvalidSessionException Get the mode for this session.- Parameters:
sessionId- the session id- Returns:
- session mode
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
call
List<String> call(String sessionId, String method, String arguments) throws CometException, InvalidSessionException Call a method on the server and retrieve a list of string values in return. Typically this method is called for simple placeholder operations (such as load, sync, store...)- Parameters:
sessionId- the session idmethod- the methodarguments- the arguments- Returns:
- list
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getList
List<Row> getList(String sessionId, String method, String arguments) throws CometException, InvalidSessionException Call a method on the server an retrieve a list of string-lists in return (e.g. tabular data). This method is used for complex operations (product or publication hierarchy) or to get structured data of any kind in one go.- Parameters:
sessionId- the session idmethod- qualified Java class and method name, e.g. com.priint.arguments- the arguments- Returns:
- list
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getActions
Gets actions.- Parameters:
sessionId- the session id- Returns:
- actions
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setActions
Sets actions.- Parameters:
sessionId- the session idactions- the actions- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPanelStatements
Gets panel statements.- Parameters:
sessionId- the session id- Returns:
- panel statements
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPanelStatements
void setPanelStatements(String sessionId, PanelStatements panelstatements) throws CometException, InvalidSessionException Sets panel statements.- Parameters:
sessionId- the session idpanelstatements- the panelstatements- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPlaceholders
Gets placeholders.- Parameters:
sessionId- the session id- Returns:
- placeholders
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPlaceholders
void setPlaceholders(String sessionId, Placeholders placeholders) throws CometException, InvalidSessionException Sets placeholders.- Parameters:
sessionId- the session idplaceholders- the placeholders- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPlaceholderGroups
PlaceholderGroups getPlaceholderGroups(String sessionId) throws CometException, InvalidSessionException Gets placeholder groups.- Parameters:
sessionId- the session id- Returns:
- placeholder groups
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPlaceholderGroups
void setPlaceholderGroups(String sessionId, PlaceholderGroups groups) throws CometException, InvalidSessionException Sets placeholder groups.- Parameters:
sessionId- the session idgroups- the groups- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setConditionMenues
void setConditionMenues(String sessionId, ConditionMenues menues) throws CometException, InvalidSessionException Sets condition menues.- Parameters:
sessionId- the session idmenues- the menues- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getConditionMenues
Gets condition menues.- Parameters:
sessionId- the session id- Returns:
- condition menues
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setConditions
void setConditions(String sessionId, Conditions conditions) throws CometException, InvalidSessionException Sets conditions.- Parameters:
sessionId- the session idconditions- the conditions- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getConditions
Gets conditions.- Parameters:
sessionId- the session id- Returns:
- conditions
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setColors
Sets colors.- Parameters:
sessionId- the session idcolors- the colors- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getColors
Gets colors.- Parameters:
sessionId- the session id- Returns:
- colors
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setDataFiles
void setDataFiles(String sessionId, DataFiles datafiles) throws CometException, InvalidSessionException Sets data files.- Parameters:
sessionId- the session iddatafiles- the datafiles- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getDataFiles
Gets data files.- Parameters:
sessionId- the session id- Returns:
- data files
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setDomains
Sets domains.- Parameters:
sessionId- the session iddomains- the domains- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getDomains
Gets domains.- Parameters:
sessionId- the session id- Returns:
- domains
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setFindStatements
void setFindStatements(String sessionId, FindStatements findStatements) throws CometException, InvalidSessionException Sets find statements.- Parameters:
sessionId- the session idfindStatements- the find statements- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getFindStatements
Gets find statements.- Parameters:
sessionId- the session id- Returns:
- find statements
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setFrameRules
void setFrameRules(String sessionId, FrameRules frameRules) throws CometException, InvalidSessionException Sets frame rules.- Parameters:
sessionId- the session idframeRules- the frame rules- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getFrameRules
Gets frame rules.- Parameters:
sessionId- the session id- Returns:
- frame rules
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setGrids
Sets grids.- Parameters:
sessionId- the session idgrids- the grids- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getGrids
Gets grids.- Parameters:
sessionId- the session id- Returns:
- grids
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setGridTypes
void setGridTypes(String sessionId, GridTypes gridTypes) throws CometException, InvalidSessionException Sets grid types.- Parameters:
sessionId- the session idgridTypes- the grid types- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getGridTypes
Gets grid types.- Parameters:
sessionId- the session id- Returns:
- grid types
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageItems
void setPageItems(String sessionId, PageItems pageItems) throws CometException, InvalidSessionException Sets page items.- Parameters:
sessionId- the session idpageItems- the page items- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItems
Gets page items.- Parameters:
sessionId- the session id- Returns:
- page items
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageItemStates
void setPageItemStates(String sessionId, PageItemStates pageItemStates) throws CometException, InvalidSessionException Sets page item states.- Parameters:
sessionId- the session idpageItemStates- the page item states- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemStates
Gets page item states.- Parameters:
sessionId- the session id- Returns:
- page item states
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageItemTypes
void setPageItemTypes(String sessionId, PageItemTypes pageItemTypes) throws CometException, InvalidSessionException Sets page item types.- Parameters:
sessionId- the session idpageItemTypes- the page item types- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemTypes
Gets page item types.- Parameters:
sessionId- the session id- Returns:
- page item types
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageTemplates
void setPageTemplates(String sessionId, PageTemplates pageTemplates) throws CometException, InvalidSessionException Sets page templates.- Parameters:
sessionId- the session idpageTemplates- the page templates- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageTemplates
Gets page templates.- Parameters:
sessionId- the session id- Returns:
- page templates
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPreviewStatements
void setPreviewStatements(String sessionId, PreviewStatements previewStatements) throws CometException, InvalidSessionException Sets preview statements.- Parameters:
sessionId- the session idpreviewStatements- the preview statements- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPreviewStatements
PreviewStatements getPreviewStatements(String sessionId) throws CometException, InvalidSessionException Gets preview statements.- Parameters:
sessionId- the session id- Returns:
- preview statements
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setRelatedTos
void setRelatedTos(String sessionId, RelatedTos relatedTos) throws CometException, InvalidSessionException Sets related tos.- Parameters:
sessionId- the session idrelatedTos- the related tos- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getRelatedTos
Gets related tos.- Parameters:
sessionId- the session id- Returns:
- related tos
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setXEntities
void setXEntities(String sessionId, XEntities xentities) throws CometException, InvalidSessionException Sets x entities.- Parameters:
sessionId- the session idxentities- the xentities- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getXEntities
Gets x entities.- Parameters:
sessionId- the session id- Returns:
- x entities
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setXIndexes
void setXIndexes(String sessionId, XIndexes xindexes) throws CometException, InvalidSessionException Sets x indexes.- Parameters:
sessionId- the session idxindexes- the xindexes- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getXIndexes
Gets x indexes.- Parameters:
sessionId- the session id- Returns:
- x indexes
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setBinaryData
void setBinaryData(String sessionId, ConfigurationData.FileID fileId, int id, byte[] data) throws CometException, InvalidSessionException Sets binary data.- Parameters:
sessionId- the session idfileId- the file idid- the iddata- the data- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getBinaryData
byte[] getBinaryData(String sessionId, ConfigurationData.FileID fileId, int id) throws CometException, InvalidSessionException Get binary data byte [ ].- Parameters:
sessionId- the session idfileId- the file idid- the id- Returns:
- byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getEntityIcon
byte[] getEntityIcon(String sessionId, String fileId) throws InvalidSessionException, CometException Get entity icon byte [ ].- Parameters:
sessionId- the session idfileId- the file id- Returns:
- byte [ ]
- Throws:
InvalidSessionException- the invalid session exceptionCometException- the comet exception
-
getRootBuckets
List<Product> getRootBuckets(String sessionId, String searchString) throws CometException, InvalidSessionException Get the root buckets from the data source of the current comet project.
Calling this method requires a valid Comet Bridge session, i.e.: you must login using CometBridgeRemote.login or CometBridgeRemote.loginWithSession before.- Parameters:
sessionId- the session idsearchString- the search string- Returns:
- root buckets
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getChildBuckets
List<Product> getChildBuckets(String sessionId, String productStringId, String searchString) throws CometException, InvalidSessionException Get children of a bucket.
productStringId is the compound ID used in the Comet3 context, in other words: just the value you get from the parent product by callingproduct.getStringId();- Parameters:
sessionId- the session idproductStringId- the product string idsearchString- the search string- Returns:
- child buckets
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
savePageItemPreview
void savePageItemPreview(String sessionId, int pageTemplateId, byte[] data) throws CometException, InvalidSessionException Save preview (i.e. JPEG image) of a page item (aka. "Template").
Calling this method is equivalent toCometBridgeRemote.setBinaryData(sessionId, ConfigurationData.FileID.PAGEITEM_PREVIEW, pageTemplateId, data);- Parameters:
sessionId- the session idpageTemplateId- the page template iddata- the data- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemPreview
byte[] getPageItemPreview(String sessionId, int pageItemId) throws CometException, InvalidSessionException Get preview (i.e. JPEG image) of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(sessionId, ConfigurationData.FileID.PAGEITEM_PREVIEW, pageItemId);- Parameters:
sessionId- the session idpageItemId- the page item id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemData
byte[] getPageItemData(String sessionId, int pageItemId) throws CometException, InvalidSessionException Get binary (i.e. INDD) data of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(sessionId, ConfigurationData.FileID.PAGEITEM_DATA, pageItemId);- Parameters:
sessionId- the session idpageItemId- the page item id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemMarkup
byte[] getPageItemMarkup(String sessionId, int pageItemId) throws CometException, InvalidSessionException Get markup (i.e. Werk II XML) of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(sessionId, ConfigurationData.FileID.PAGEITEM_MARKUP, pageItemId);- Parameters:
sessionId- the session idpageItemId- the page item id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemIDML
byte[] getPageItemIDML(String sessionId, int pageItemId) throws CometException, InvalidSessionException Get IDML data of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(sessionId, ConfigurationData.FileID.PAGEITEM_IDML, pageItemId);- Parameters:
sessionId- the session idpageItemId- the page item id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemShapes
byte[] getPageItemShapes(String sessionId, int pageItemId) throws CometException, InvalidSessionException Get shapes of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(sessionId, ConfigurationData.FileID.PAGEITEM_SHAPES, pageItemId);- Parameters:
sessionId- the session idpageItemId- the page item id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageTemplatePreview
byte[] getPageTemplatePreview(String sessionId, int pageTemplateId) throws CometException, InvalidSessionException Get preview (i.e. JPEG image) of a page template.
Calling this method is equivalent toCometBridgeRemote.getBinaryData(sessionId, ConfigurationData.FileID.PAGETEMPLATE_PREVIEW, pageTemplateId);- Parameters:
sessionId- the session idpageTemplateId- the page template id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageTemplateData
byte[] getPageTemplateData(String sessionId, int pageTemplateId) throws CometException, InvalidSessionException Get binary (i.e. INDD) data of a page template.
Calling this method is equivalent toCometBridgeRemote.getBinaryData(sessionId, ConfigurationData.FileID.PAGETEMPLATE_DATA, pageTemplateId);- Parameters:
sessionId- the session idpageTemplateId- the page template id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
savePageTemplate
int savePageTemplate(String sessionId, PageTemplate pageTemplate) throws CometException, InvalidSessionException Save a PageTemplate.
Depending on the pageTemplate data, this method either- updates an existing page template, if the ID of this template is defined and denote an existing / valid page template
- creates a new page template, if the ID is 0 or does not denote a page template
- Parameters:
sessionId- the session idpageTemplate- the page template- Returns:
- ID of the newly created or updated page template
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
deletePageTemplate
void deletePageTemplate(String sessionId, int pageTemplateId) throws CometException, InvalidSessionException Delete a page template- Parameters:
sessionId- the session idpageTemplateId- the page template id- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
savePageTemplateData
void savePageTemplateData(String sessionId, int pageTemplateId, byte[] data) throws CometException, InvalidSessionException Save binary (i.e. INDD) data of a page template.
Calling this method is equivalent toCometBridgeRemote.setBinaryData(sessionId, ConfigurationData.FileID.PAGETEMPLATE_DATA, pageTemplateId, data);- Parameters:
sessionId- the session idpageTemplateId- the page template iddata- the data- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
savePageTemplatePreview
void savePageTemplatePreview(String sessionId, int pageTemplateId, byte[] data) throws CometException, InvalidSessionException Save preview (i.e. JPEG image) of a page template.
Calling this method is equivalent toCometBridgeRemote.setBinaryData(sessionId, ConfigurationData.FileID.PAGETEMPLATE_PREVIEW, pageTemplateId, data);- Parameters:
sessionId- the session idpageTemplateId- the page template iddata- the data- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
processTocUpdate
void processTocUpdate(String sessionId, CometTocUpdate toc) throws CometException, InvalidSessionException Process a "table of contents" update.
All data required to process this update is encapsulated in the toc object, such as document name, path, publication ID, the actual toc entries, scope of this command etc.
SeeCometTocUpdatefor more information.
Usually this method is only called from rendering clients (such as InDesign / Comet or the pdf renderer) while generating or analyzing documents- Parameters:
sessionId- the session idtoc- the toc- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getScriptLibrary
byte[] getScriptLibrary(String sessionId, String libraryName) throws CometException, InvalidSessionException Get the cscript library with the given name.
These are "actions" (speaking in Comet3 terms), which can be included in other scripts using this scheme:#include "[pubserver]/libraryName.h"- Parameters:
sessionId- the session idlibraryName- the library name- Returns:
- byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPluginLibrary
byte[] getPluginLibrary(String sessionId, String pluginName) throws CometException, InvalidSessionException Get plugin library byte [ ].- Parameters:
sessionId- the session idpluginName- the plugin name- Returns:
- byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getMessages
Messages getMessages(String sessionId, String locale) throws CometException, InvalidSessionException Get messages / translations for this comet project.
Currently there is no support for user defined tranlations, so this method just returns an empty (beside of the root element) XML document.- Parameters:
sessionId- the session idlocale- TODO- Returns:
- messages
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getProductPanelConfig
CometProductPanelConfig getProductPanelConfig(String sessionId) throws CometException, InvalidSessionException Get the configuration for the product panel- Parameters:
sessionId- the session id- Returns:
- product panel config
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setSessionAttribute
void setSessionAttribute(String sessionId, String key, Object object) throws CometException, InvalidSessionException Set the session attribute- Parameters:
sessionId- the session idkey- the keyobject- the object- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getSessionAttribute
Object getSessionAttribute(String sessionId, String key) throws CometException, InvalidSessionException Get the session attribute- Parameters:
sessionId- the session idkey- the key- Returns:
- session attribute
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getShiroSubject
org.apache.shiro.subject.Subject getShiroSubject(String sessionID) throws CometException, InvalidSessionException Returns shiro subject- Parameters:
sessionID- the session id- Returns:
- shiro subject
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
findProducts
List<Product> findProducts(String sessionId, int statementId, String searchValue1, String searchValue2, String searchValue3, String searchValue4) throws CometException, InvalidSessionException Find products using a find statements and 1 .. 4 search values.
Find statements must have been fetched from CometBridge using the
getFindStatements(String)method before.
Clients are not supposed to cache or store find statements across several sessions, because they are generated dynamically on Runtime and the statementId may change after reconnecting.- Parameters:
sessionId- the session idstatementId- the statement idsearchValue1- the search value 1searchValue2- the search value 2searchValue3- the search value 3searchValue4- the search value 4- Returns:
- list
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
resetApplication
Reset the application
This method is mainly intended for testing purposes. In regular operation there should be no need to reset the application. All caches are cleared and startup procedures are executed.
- Parameters:
sessionId- the session id- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-