Interface CometBridgeRemote
-
public interface CometBridgeRemoteRemote interface to access the comet bridge bean from external JVM.This is intended for testing purposes only and maybe removed or changed without notice.
For all normal work please use
CometBridgeLocalinterface instead.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCometBridgeRemote.InternalCallThe enum Internal call.static interfaceCometBridgeRemote.NamedSessionModeThe interface Named session mode.static classCometBridgeRemote.SessionModeThe enum Session mode.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringJNDINAMEJNDI name for the remote interfacestatic java.lang.StringMAPPED_NAMEThe mapped name of the CometBridge Pluginstatic java.lang.StringSESSION_PREFIXThe constant SESSION_PREFIX.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.lang.String>call(java.lang.String sessionId, java.lang.String method, java.lang.String arguments)Call a method on the server and retrieve a list of string values in return.voiddeletePageTemplate(java.lang.String sessionId, int pageTemplateId)Delete a page templatejava.util.List<Product>findProducts(java.lang.String sessionId, int statementId, java.lang.String searchValue1, java.lang.String searchValue2, java.lang.String searchValue3, java.lang.String searchValue4)Find products using a find statements and 1 ..ActionsgetActions(java.lang.String sessionId)Gets actions.byte[]getBinaryData(java.lang.String sessionId, ConfigurationData.FileID fileId, int id)Get binary data byte [ ].java.util.List<Product>getChildBuckets(java.lang.String sessionId, java.lang.String productStringId, java.lang.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();ColorsgetColors(java.lang.String sessionId)Gets colors.ConditionMenuesgetConditionMenues(java.lang.String sessionId)Gets condition menues.ConditionsgetConditions(java.lang.String sessionId)Gets conditions.DataFilesgetDataFiles(java.lang.String sessionId)Gets data files.DomainsgetDomains(java.lang.String sessionId)Gets domains.byte[]getEntityIcon(java.lang.String sessionId, java.lang.String fileId)Get entity icon byte [ ].FindStatementsgetFindStatements(java.lang.String sessionId)Gets find statements.FrameRulesgetFrameRules(java.lang.String sessionId)Gets frame rules.GridsgetGrids(java.lang.String sessionId)Gets grids.GridTypesgetGridTypes(java.lang.String sessionId)Gets grid types.java.util.List<Row>getList(java.lang.String sessionId, java.lang.String method, java.lang.String arguments)Call a method on the server an retrieve a list of string-lists in return (e.g.MessagesgetMessages(java.lang.String sessionId, java.lang.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(java.lang.String sessionId, int pageItemId)Get binary (i.e.byte[]getPageItemIDML(java.lang.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(java.lang.String sessionId, int pageItemId)Get markup (i.e.byte[]getPageItemPreview(java.lang.String sessionId, int pageItemId)Get preview (i.e.PageItemsgetPageItems(java.lang.String sessionId)Gets page items.byte[]getPageItemShapes(java.lang.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);PageItemStatesgetPageItemStates(java.lang.String sessionId)Gets page item states.PageItemTypesgetPageItemTypes(java.lang.String sessionId)Gets page item types.byte[]getPageTemplateData(java.lang.String sessionId, int pageTemplateId)Get binary (i.e.byte[]getPageTemplatePreview(java.lang.String sessionId, int pageTemplateId)Get preview (i.e.PageTemplatesgetPageTemplates(java.lang.String sessionId)Gets page templates.PanelStatementsgetPanelStatements(java.lang.String sessionId)Gets panel statements.PlaceholderGroupsgetPlaceholderGroups(java.lang.String sessionId)Gets placeholder groups.PlaceholdersgetPlaceholders(java.lang.String sessionId)Gets placeholders.byte[]getPluginLibrary(java.lang.String sessionId, java.lang.String pluginName)Get plugin library byte [ ].PreviewStatementsgetPreviewStatements(java.lang.String sessionId)Gets preview statements.CometProductPanelConfiggetProductPanelConfig(java.lang.String sessionId)Get the configuration for the product panelRelatedTosgetRelatedTos(java.lang.String sessionId)Gets related tos.java.util.List<Product>getRootBuckets(java.lang.String sessionId, java.lang.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(java.lang.String sessionId, java.lang.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"java.lang.ObjectgetSessionAttribute(java.lang.String sessionId, java.lang.String key)Get the session attributeCometBridgeRemote.SessionModegetSessionMode(java.lang.String sessionId)Get the mode for this session.org.apache.shiro.subject.SubjectgetShiroSubject(java.lang.String sessionID)Returns shiro subjectXEntitiesgetXEntities(java.lang.String sessionId)Gets x entities.XIndexesgetXIndexes(java.lang.String sessionId)Gets x indexes.java.lang.Stringlogin(java.lang.String login, java.lang.String passwd, java.lang.String configurationName, java.lang.String language)login (i.e.voidlogout(java.lang.String sessionId)logout (i.e.voidprocessTocUpdate(java.lang.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(java.lang.String sessionId)Reset the applicationvoidsavePageItemPreview(java.lang.String sessionId, int pageTemplateId, byte[] data)Save preview (i.e.intsavePageTemplate(java.lang.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(java.lang.String sessionId, int pageTemplateId, byte[] data)Save binary (i.e.voidsavePageTemplatePreview(java.lang.String sessionId, int pageTemplateId, byte[] data)Save preview (i.e.voidsetActions(java.lang.String sessionId, Actions actions)Sets actions.voidsetBinaryData(java.lang.String sessionId, ConfigurationData.FileID fileId, int id, byte[] data)Sets binary data.voidsetColors(java.lang.String sessionId, Colors colors)Sets colors.voidsetConditionMenues(java.lang.String sessionId, ConditionMenues menues)Sets condition menues.voidsetConditions(java.lang.String sessionId, Conditions conditions)Sets conditions.voidsetDataFiles(java.lang.String sessionId, DataFiles datafiles)Sets data files.voidsetDomains(java.lang.String sessionId, Domains domains)Sets domains.voidsetFindStatements(java.lang.String sessionId, FindStatements findStatements)Sets find statements.voidsetFrameRules(java.lang.String sessionId, FrameRules frameRules)Sets frame rules.voidsetGrids(java.lang.String sessionId, Grids grids)Sets grids.voidsetGridTypes(java.lang.String sessionId, GridTypes gridTypes)Sets grid types.voidsetPageItems(java.lang.String sessionId, PageItems pageItems)Sets page items.voidsetPageItemStates(java.lang.String sessionId, PageItemStates pageItemStates)Sets page item states.voidsetPageItemTypes(java.lang.String sessionId, PageItemTypes pageItemTypes)Sets page item types.voidsetPageTemplates(java.lang.String sessionId, PageTemplates pageTemplates)Sets page templates.voidsetPanelStatements(java.lang.String sessionId, PanelStatements panelstatements)Sets panel statements.voidsetPlaceholderGroups(java.lang.String sessionId, PlaceholderGroups groups)Sets placeholder groups.voidsetPlaceholders(java.lang.String sessionId, Placeholders placeholders)Sets placeholders.voidsetPreviewStatements(java.lang.String sessionId, PreviewStatements previewStatements)Sets preview statements.voidsetRelatedTos(java.lang.String sessionId, RelatedTos relatedTos)Sets related tos.voidsetSessionAttribute(java.lang.String sessionId, java.lang.String key, java.lang.Object object)Set the session attributevoidsetSessionMode(java.lang.String sessionId, CometBridgeRemote.SessionMode mode)Set the mode for this session.voidsetXEntities(java.lang.String sessionId, XEntities xentities)Sets x entities.voidsetXIndexes(java.lang.String sessionId, XIndexes xindexes)Sets x indexes.
-
-
-
Field Detail
-
MAPPED_NAME
static final java.lang.String MAPPED_NAME
The mapped name of the CometBridge Plugin
Use this name when requesting a Plugin instance from the PluginManager
- See Also:
- Constant Field Values
-
JNDINAME
static final java.lang.String 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:
- Constant Field Values
-
SESSION_PREFIX
static final java.lang.String SESSION_PREFIX
The constant SESSION_PREFIX.- See Also:
- Constant Field Values
-
-
Method Detail
-
login
java.lang.String login(java.lang.String login, java.lang.String passwd, java.lang.String configurationName, java.lang.String language) throws CometExceptionlogin (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
void logout(java.lang.String sessionId) throws CometException, InvalidSessionExceptionlogout (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(java.lang.String sessionId, CometBridgeRemote.SessionMode mode) throws CometException, InvalidSessionExceptionSet 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(java.lang.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
java.util.List<java.lang.String> call(java.lang.String sessionId, java.lang.String method, java.lang.String arguments) throws CometException, InvalidSessionExceptionCall 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
java.util.List<Row> getList(java.lang.String sessionId, java.lang.String method, java.lang.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
Actions getActions(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets actions.- Parameters:
sessionId- the session id- Returns:
- actions
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setActions
void setActions(java.lang.String sessionId, Actions actions) throws CometException, InvalidSessionExceptionSets actions.- Parameters:
sessionId- the session idactions- the actions- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPanelStatements
PanelStatements getPanelStatements(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets panel statements.- Parameters:
sessionId- the session id- Returns:
- panel statements
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPanelStatements
void setPanelStatements(java.lang.String sessionId, PanelStatements panelstatements) throws CometException, InvalidSessionExceptionSets panel statements.- Parameters:
sessionId- the session idpanelstatements- the panelstatements- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPlaceholders
Placeholders getPlaceholders(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets placeholders.- Parameters:
sessionId- the session id- Returns:
- placeholders
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPlaceholders
void setPlaceholders(java.lang.String sessionId, Placeholders placeholders) throws CometException, InvalidSessionExceptionSets placeholders.- Parameters:
sessionId- the session idplaceholders- the placeholders- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPlaceholderGroups
PlaceholderGroups getPlaceholderGroups(java.lang.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(java.lang.String sessionId, PlaceholderGroups groups) throws CometException, InvalidSessionExceptionSets placeholder groups.- Parameters:
sessionId- the session idgroups- the groups- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setConditionMenues
void setConditionMenues(java.lang.String sessionId, ConditionMenues menues) throws CometException, InvalidSessionExceptionSets condition menues.- Parameters:
sessionId- the session idmenues- the menues- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getConditionMenues
ConditionMenues getConditionMenues(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets condition menues.- Parameters:
sessionId- the session id- Returns:
- condition menues
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setConditions
void setConditions(java.lang.String sessionId, Conditions conditions) throws CometException, InvalidSessionExceptionSets conditions.- Parameters:
sessionId- the session idconditions- the conditions- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getConditions
Conditions getConditions(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets conditions.- Parameters:
sessionId- the session id- Returns:
- conditions
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setColors
void setColors(java.lang.String sessionId, Colors colors) throws CometException, InvalidSessionExceptionSets colors.- Parameters:
sessionId- the session idcolors- the colors- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getColors
Colors getColors(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets colors.- Parameters:
sessionId- the session id- Returns:
- colors
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setDataFiles
void setDataFiles(java.lang.String sessionId, DataFiles datafiles) throws CometException, InvalidSessionExceptionSets data files.- Parameters:
sessionId- the session iddatafiles- the datafiles- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getDataFiles
DataFiles getDataFiles(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets data files.- Parameters:
sessionId- the session id- Returns:
- data files
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setDomains
void setDomains(java.lang.String sessionId, Domains domains) throws CometException, InvalidSessionExceptionSets domains.- Parameters:
sessionId- the session iddomains- the domains- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getDomains
Domains getDomains(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets domains.- Parameters:
sessionId- the session id- Returns:
- domains
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setFindStatements
void setFindStatements(java.lang.String sessionId, FindStatements findStatements) throws CometException, InvalidSessionExceptionSets find statements.- Parameters:
sessionId- the session idfindStatements- the find statements- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getFindStatements
FindStatements getFindStatements(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets find statements.- Parameters:
sessionId- the session id- Returns:
- find statements
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setFrameRules
void setFrameRules(java.lang.String sessionId, FrameRules frameRules) throws CometException, InvalidSessionExceptionSets frame rules.- Parameters:
sessionId- the session idframeRules- the frame rules- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getFrameRules
FrameRules getFrameRules(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets frame rules.- Parameters:
sessionId- the session id- Returns:
- frame rules
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setGrids
void setGrids(java.lang.String sessionId, Grids grids) throws CometException, InvalidSessionExceptionSets grids.- Parameters:
sessionId- the session idgrids- the grids- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getGrids
Grids getGrids(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets grids.- Parameters:
sessionId- the session id- Returns:
- grids
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setGridTypes
void setGridTypes(java.lang.String sessionId, GridTypes gridTypes) throws CometException, InvalidSessionExceptionSets grid types.- Parameters:
sessionId- the session idgridTypes- the grid types- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getGridTypes
GridTypes getGridTypes(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets grid types.- Parameters:
sessionId- the session id- Returns:
- grid types
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageItems
void setPageItems(java.lang.String sessionId, PageItems pageItems) throws CometException, InvalidSessionExceptionSets page items.- Parameters:
sessionId- the session idpageItems- the page items- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItems
PageItems getPageItems(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets page items.- Parameters:
sessionId- the session id- Returns:
- page items
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageItemStates
void setPageItemStates(java.lang.String sessionId, PageItemStates pageItemStates) throws CometException, InvalidSessionExceptionSets page item states.- Parameters:
sessionId- the session idpageItemStates- the page item states- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemStates
PageItemStates getPageItemStates(java.lang.String sessionId) throws CometException, InvalidSessionException
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(java.lang.String sessionId, PageItemTypes pageItemTypes) throws CometException, InvalidSessionExceptionSets page item types.- Parameters:
sessionId- the session idpageItemTypes- the page item types- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemTypes
PageItemTypes getPageItemTypes(java.lang.String sessionId) throws CometException, InvalidSessionException
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(java.lang.String sessionId, PageTemplates pageTemplates) throws CometException, InvalidSessionExceptionSets page templates.- Parameters:
sessionId- the session idpageTemplates- the page templates- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageTemplates
PageTemplates getPageTemplates(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets page templates.- Parameters:
sessionId- the session id- Returns:
- page templates
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPreviewStatements
void setPreviewStatements(java.lang.String sessionId, PreviewStatements previewStatements) throws CometException, InvalidSessionExceptionSets preview statements.- Parameters:
sessionId- the session idpreviewStatements- the preview statements- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPreviewStatements
PreviewStatements getPreviewStatements(java.lang.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(java.lang.String sessionId, RelatedTos relatedTos) throws CometException, InvalidSessionExceptionSets related tos.- Parameters:
sessionId- the session idrelatedTos- the related tos- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getRelatedTos
RelatedTos getRelatedTos(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets related tos.- Parameters:
sessionId- the session id- Returns:
- related tos
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setXEntities
void setXEntities(java.lang.String sessionId, XEntities xentities) throws CometException, InvalidSessionExceptionSets x entities.- Parameters:
sessionId- the session idxentities- the xentities- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getXEntities
XEntities getXEntities(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets x entities.- Parameters:
sessionId- the session id- Returns:
- x entities
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setXIndexes
void setXIndexes(java.lang.String sessionId, XIndexes xindexes) throws CometException, InvalidSessionExceptionSets x indexes.- Parameters:
sessionId- the session idxindexes- the xindexes- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getXIndexes
XIndexes getXIndexes(java.lang.String sessionId) throws CometException, InvalidSessionException
Gets x indexes.- Parameters:
sessionId- the session id- Returns:
- x indexes
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setBinaryData
void setBinaryData(java.lang.String sessionId, ConfigurationData.FileID fileId, int id, byte[] data) throws CometException, InvalidSessionExceptionSets 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(java.lang.String sessionId, ConfigurationData.FileID fileId, int id) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, java.lang.String fileId) throws InvalidSessionException, CometExceptionGet entity icon byte [ ].- Parameters:
sessionId- the session idfileId- the file id- Returns:
- byte [ ]
- Throws:
InvalidSessionException- the invalid session exceptionCometException- the comet exception
-
getRootBuckets
java.util.List<Product> getRootBuckets(java.lang.String sessionId, java.lang.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
java.util.List<Product> getChildBuckets(java.lang.String sessionId, java.lang.String productStringId, java.lang.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(java.lang.String sessionId, int pageTemplateId, byte[] data) throws CometException, InvalidSessionExceptionSave 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(java.lang.String sessionId, int pageItemId) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, int pageItemId) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, int pageItemId) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, int pageItemId) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, int pageItemId) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, int pageTemplateId) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, int pageTemplateId) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, PageTemplate pageTemplate) throws CometException, InvalidSessionExceptionSave 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(java.lang.String sessionId, int pageTemplateId) throws CometException, InvalidSessionExceptionDelete a page template- Parameters:
sessionId- the session idpageTemplateId- the page template id- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
savePageTemplateData
void savePageTemplateData(java.lang.String sessionId, int pageTemplateId, byte[] data) throws CometException, InvalidSessionExceptionSave 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(java.lang.String sessionId, int pageTemplateId, byte[] data) throws CometException, InvalidSessionExceptionSave 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(java.lang.String sessionId, CometTocUpdate toc) throws CometException, InvalidSessionExceptionProcess 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(java.lang.String sessionId, java.lang.String libraryName) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, java.lang.String pluginName) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionId, java.lang.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(java.lang.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(java.lang.String sessionId, java.lang.String key, java.lang.Object object) throws CometException, InvalidSessionExceptionSet the session attribute- Parameters:
sessionId- the session idkey- the keyobject- the object- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getSessionAttribute
java.lang.Object getSessionAttribute(java.lang.String sessionId, java.lang.String key) throws CometException, InvalidSessionExceptionGet 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(java.lang.String sessionID) throws CometException, InvalidSessionExceptionReturns shiro subject- Parameters:
sessionID- the session id- Returns:
- shiro subject
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
findProducts
java.util.List<Product> findProducts(java.lang.String sessionId, int statementId, java.lang.String searchValue1, java.lang.String searchValue2, java.lang.String searchValue3, java.lang.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
void resetApplication(java.lang.String sessionId) throws CometException, InvalidSessionExceptionReset 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
-
-