Interface CometBridgeLocal
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe constant getInclude.static final StringThe constant getJavaPluginHeaders.static final StringThe constant getJavaPluginIncludes.static final StringThe constant getLibraryIncludes.static final StringThe constant includeExists.static final StringJNDI name of the local interfacestatic final StringThe mapped name of the CometBridge Pluginstatic final StringThe constant setSessionClient.static final StringThe constant setSessionProject. -
Method Summary
Modifier and TypeMethodDescriptionCall a method on the server and retrieve a list of string values in return.createAnonymousSession(String name, long maxIdleTimeInMillis) Create a new and anonymous sessionvoiddeletePageTemplate(int pageTemplateId) Delete a page templatefindProducts(int statementId, String searchValue1, String searchValue2, String searchValue3, String searchValue4) Deprecated.findProducts(int statementId, String searchValue1, String searchValue2, String searchValue3, String searchValue4, String documentID) Find products using a find statements and 1 ..Gets actions.byte[]Get all c script headers byte [ ].byte[]Get all c script includes byte [ ].getAvailableSearchMethods(String client, String projectIdentifier) Gets available search methods.byte[]getBinaryData(ConfigurationData.FileID fileId, int id) Get binary data byte [ ].getChildBuckets(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.Gets condition menues.Gets conditions.Gets data files.Gets domains.byte[]getEntityIcon(String fileId) Get entity icon byte [ ].Gets entity result filter.Gets find statements.Gets font data base.Gets frame rules.getGrids()Gets grids.Gets grid types.byte[]getInclude(String includePath) Get include byte [ ].Gets java plugin headers.Gets java plugin includes.Gets library includes.intgetLinkScriptId(String scriptName) Gets the ID of a CometPreviewLinkScript by it's name.Call a method on the server an retrieve a list of string-lists in return (e.g.Gets general information for this comet project.getMessages(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.getMetadataOfPageTemplate(int pageTemplateId) Get metadata for page template that are stored in /pagetemplate/metadata in repository.getMetadataOfPageTemplateElement(int uid, int pageTemplateId) Get metadata for page template element that are stored in /pagetemplate/metadata in repository.byte[]getPageItemData(int pageItemId) Get binary (i.e.byte[]getPageItemDocumentMetadata(int pageItemId) Get document metadata (i.e.byte[]getPageItemIDML(int pageItemId) Get IDML data of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGEITEM_IDML, pageItemId);byte[]getPageItemMarkup(int pageItemId) Get markup (i.e.byte[]getPageItemPreview(int pageItemId) Get preview (i.e.Gets page items.byte[]getPageItemShapes(int pageItemId) Get shapes of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGEITEM_SHAPES, pageItemId);Gets page item states.Gets page item types.byte[]getPageTemplateData(int pageTemplateId) Get binary (i.e.byte[]getPageTemplateDocumentMetadata(int pageTemplateId) Get document metadata (i.e.byte[]getPageTemplatePreview(int pageTemplateId) Get preview (i.e.Gets page templates.Gets panel statements.Gets placeholder groups.Gets placeholders.Gets the placeholder variants configurationbyte[]getPluginCScriptHeader(String pluginName) Get plugin c script header byte [ ].byte[]getPluginCScriptLibrary(String pluginName) Get plugin cscript client stub.byte[]getPluginCScriptLibrary(String pluginName, ConfigurationData.FileID fileID) Get plugin cscript or python client stub.Gets preview statements.Gets product data mapping.Get the configuration for the product panelgetProjectClientName(String sessionID, String projectIdentifier) Gets project client name.getProjectModelIdentifier(String sessionID, String projectIdentifier) Gets project model identifier.Gets related tos.getRootBuckets(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.intgetScriptIdByName(String scriptName, Class<? extends CometScript> scriptClass) Gets the ID of a script by it's class and name (label).byte[]getScriptLibrary(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"Get the session attributeGet the mode for this session.org.apache.shiro.subject.SubjectgetShiroSubject(String sessionId) Returns shiro subjectGets translations for the current sessionGets ui fallback language.Gets x entities.Gets x indexes.booleanincludeExists(String includePath) Include exists boolean.login (i.e.loginFromPriintSuite(String login, String passwd, String configurationName, String language) login (i.e.loginFromRemote(String login, String passwd, String projectIdentifier, String language) Login from remote string.loginLocalFromPriintSuite(String login, String token, String projectIdentifier, String language) Login local from priint suite string.loginWithSession(String sessionId) Login using a session IDvoidlogout()logout (i.e.voidProcess 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 documentsbyte[]readSnippetData(String fileId) Read snippet data byte [ ].byte[]readSnippetPreview(String fileId) Read snippet preview byte [ ].byte[]readSnippetPreviewById(int snippetId) Read snippet preview by id byte [ ].voidReset the applicationvoidsavePageItemPreview(int pageTemplateId, byte[] data) Save preview (i.e.intsavePageTemplate(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(int pageTemplateId, byte[] data) Save binary (i.e.voidsavePageTemplatePreview(int pageTemplateId, byte[] data) Save preview (i.e.voidsetActions(Actions actions) Sets actions.voidsetBinaryData(ConfigurationData.FileID fileId, int id, byte[] data) Sets binary data.voidSets colors.voidsetConditionMenues(ConditionMenues menues) Sets condition menues.voidsetConditions(Conditions conditions) Sets conditions.voidsetDataFiles(DataFiles datafiles) Sets data files.voidsetDomains(Domains domains) Sets domains.voidsetFindStatements(FindStatements findStatements) Sets find statements.voidsetFrameRules(FrameRules frameRules) Sets frame rules.voidSets grids.voidsetGridTypes(GridTypes gridTypes) Sets grid types.voidsetPageItems(PageItems pageItems) Sets page items.voidsetPageItemStates(PageItemStates pageItemStates) Sets page item states.voidsetPageItemTypes(PageItemTypes pageItemTypes) Sets page item types.voidsetPageTemplates(PageTemplates pageTemplates) Sets page templates.voidsetPanelStatements(PanelStatements panelstatements) Sets panel statements.voidSets placeholder groups.voidsetPlaceholders(Placeholders placeholders) Sets placeholders.voidsetPlaceholderVariants(PlaceholderVariants variants) Sets (persists) the placeholder variants configurationvoidsetPreviewStatements(PreviewStatements previewStatements) Sets preview statements.voidsetRelatedTos(RelatedTos relatedTos) Sets related tos.voidsetSessionAttribute(String key, Object object) Set the session attributevoidsetSessionClient(String client) Sets session client.voidSet the mode for this session.voidsetSessionMode(String sessionId, CometBridgeRemote.SessionMode mode) Sets session mode.voidsetSessionProject(String projectIdentifier) Sets session project.voidsetSessionProperties(String sessionId, String login, String passwd, String projectIdentifier, String language, boolean initSessionInfo) Sets session properties.voidsetXEntities(XEntities xentities) Sets x entities.voidsetXIndexes(XIndexes xindexes) Sets x indexes.voidvalidateUser(String sessionId, String login, String projectIdentifier) Checks whether the user is assigned to the project.
-
Field Details
-
JNDINAME
JNDI name of the local interface
Usually you acquire an instance of the local bean via the Plugin manager.
If for any reason you want to access the CometBridge via JNDI lookup, use this name for the InitialContext.lookup call.- See Also:
-
MAPPED_NAME
The mapped name of the CometBridge Plugin
Use this name when requesting a Plugin instance from the PluginManager
- See Also:
-
getInclude
The constant getInclude.- See Also:
-
getJavaPluginIncludes
The constant getJavaPluginIncludes.- See Also:
-
getLibraryIncludes
The constant getLibraryIncludes.- See Also:
-
getJavaPluginHeaders
The constant getJavaPluginHeaders.- See Also:
-
setSessionProject
The constant setSessionProject.- See Also:
-
setSessionClient
The constant setSessionClient.- See Also:
-
includeExists
The constant includeExists.- See Also:
-
-
Method Details
-
createAnonymousSession
Create a new and anonymous session- Parameters:
name- - login namemaxIdleTimeInMillis- new session will expire after this time- Returns:
- session id of anonymous session
- Throws:
CometException- the comet exception
-
loginFromPriintSuite
String loginFromPriintSuite(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, TODO: specify language codes- Returns:
- new session id
- Throws:
CometException- the comet exception
-
loginWithSession
Login using a session ID
The method returns a Map containing all relevant properties defined for this sessions, i.e.
- login name
- which comet project is this session connected to
- ... etc.
- Parameters:
sessionId- the session id- Returns:
- Map containing all relevant session properties
- Throws:
CometException- the comet exception
-
call
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:
method- the methodarguments- the arguments- Returns:
- list of strings processed by this command
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
deletePageTemplate
Delete a page template- Parameters:
pageTemplateId- the page template id- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
findProducts
@Deprecated List<Product> findProducts(int statementId, String searchValue1, String searchValue2, String searchValue3, String searchValue4) throws CometException, InvalidSessionException Deprecated.Find products using a find statements and 1 .. 4 search values.
Find statements must have been fetched from CometBridge using the
getFindStatements()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:
statementId- the statement idsearchValue1- the search value 1searchValue2- the search value 2searchValue3- the search value 3searchValue4- the search value 4- Returns:
- list of products matching the given search criteria
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
findProducts
List<Product> findProducts(int statementId, String searchValue1, String searchValue2, String searchValue3, String searchValue4, String documentID) 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()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:
statementId- the statement idsearchValue1- the search value 1searchValue2- the search value 2searchValue3- the search value 3searchValue4- the search value 4documentID- the document id- Returns:
- list of products matching the given search criteria
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getActions
Gets actions.- Returns:
- list of actions configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getBinaryData
byte[] getBinaryData(ConfigurationData.FileID fileId, int id) throws CometException, InvalidSessionException Get binary data byte [ ].- Parameters:
fileId- the file idid- the id- Returns:
- binary data with the given fileId (i.e. file type) and item id
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getChildBuckets
List<Product> getChildBuckets(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:
productStringId- the product string idsearchString- the search string- Returns:
- child buckets of a bucket referred by productStringId
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getColors
Gets colors.- Returns:
- colors configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getConditionMenues
Gets condition menues.- Returns:
- list of condition menues conofigured on this server
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getConditions
Gets conditions.- Returns:
- list of conditions configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getDataFiles
Gets data files.- Returns:
- list of data files (i.e. file aliases)
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getDomains
Gets domains.- Returns:
- domains configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getEntityIcon
Get entity icon byte [ ].- Parameters:
fileId- the file id- Returns:
- icon data
- Throws:
InvalidSessionException- the invalid session exceptionCometException- the comet exception
-
getFindStatements
Gets find statements.- Returns:
- list of find statements configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getFontDataBase
Gets font data base.- Returns:
- the font database configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getFrameRules
Gets frame rules.- Returns:
- list of frame rules configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getGrids
Gets grids.- Returns:
- list of grids configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getGridTypes
Gets grid types.- Returns:
- list of grid types configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getList
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:
method- qualified Java class and method name, e.g. com.priint.arguments- the arguments- Returns:
- list of rows processed by this command
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getManifest
Gets general information for this comet project.
The manifest document contains general information for the current session's comet project, such as name, identifier and last configuration change.
- Returns:
- project Manifest document
- Throws:
CometExceptionInvalidSessionException
-
getMessages
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:
locale- the locale- Returns:
- list of messages / translations available on this server
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemData
Get binary (i.e. INDD) data of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGEITEM_DATA, pageItemId);- Parameters:
pageItemId- the page item id- Returns:
- INDD document of this pageitem (i.e. template) or null, if no document exists for this template
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemIDML
Get IDML data of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGEITEM_IDML, pageItemId);- Parameters:
pageItemId- the page item id- Returns:
- IDML document of this pageitem (i.e. template) or null, if no IDML exists for this template
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemMarkup
Get markup (i.e. Werk II XML) of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGEITEM_MARKUP, pageItemId);- Parameters:
pageItemId- the page item id- Returns:
- w2ml document of this page item (i.e. template) or null, if no w2ml document exists for this template
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemPreview
Get preview (i.e. JPEG image) of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGEITEM_PREVIEW, pageItemId);- Parameters:
pageItemId- the page item id- Returns:
- preview of this pageitem (i.e. template) or null, if no preview exists for this template
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemDocumentMetadata
Get document metadata (i.e. zipped folder) of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGEITEM_METADATA, pageItemId);- Parameters:
pageItemId- the page item id- Returns:
- document metadata of this pageitem (i.e. template) as zipped folder or null, if no document metadata exists for this template
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItems
Gets page items.- Returns:
- list of page items (i.e. templates) configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemShapes
Get shapes of a page item (aka "Template").
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGEITEM_SHAPES, pageItemId);- Parameters:
pageItemId- the page item id- Returns:
- shapes of this pageitem (i.e. template) or null, if no shapes exist for this template
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemStates
Gets page item states.- Returns:
- list of page item states configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageItemTypes
Gets page item types.- Returns:
- list of page item types configured on this server in the current project context
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageTemplateData
Get binary (i.e. INDD) data of a page template.
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGETEMPLATE_DATA, pageTemplateId);- Parameters:
pageTemplateId- the page template id- Returns:
- pagetemplate document data or null, if no document data exists for this pagetemplate
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageTemplatePreview
Get preview (i.e. JPEG image) of a page template.
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGETEMPLATE_PREVIEW, pageTemplateId);- Parameters:
pageTemplateId- the page template id- Returns:
- pagetemplate preview or null, if no preview exists for this pagetemplate
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageTemplateDocumentMetadata
byte[] getPageTemplateDocumentMetadata(int pageTemplateId) throws CometException, InvalidSessionException Get document metadata (i.e. zipped folder) of a page template.
Calling this method is equivalent toCometBridgeRemote.getBinaryData(ConfigurationData.FileID.PAGETEMPLATE_METADATA, pageTemplateId);- Parameters:
pageTemplateId- the page template id- Returns:
- pagetemplate document metadata as zipped folder or null, if no document metadata exists for this pagetemplate
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPageTemplates
Gets page templates.- Returns:
- page templates
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getMetadataOfPageTemplate
Get metadata for page template that are stored in /pagetemplate/metadata in repository.- Parameters:
pageTemplateId- ID of the page template- Returns:
- list of ContentMetaData
- Throws:
CometException- the comet exception
-
getMetadataOfPageTemplateElement
List<ContentMetaData> getMetadataOfPageTemplateElement(int uid, int pageTemplateId) throws CometException Get metadata for page template element that are stored in /pagetemplate/metadata in repository.- Parameters:
uid- uid of elementpageTemplateId- ID of the page template- Returns:
- list of ContentMetaData
- Throws:
CometException- the comet exception
-
getPanelStatements
Gets panel statements.- Returns:
- panel statements
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPlaceholderGroups
Gets placeholder groups.- Returns:
- placeholder groups
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPlaceholderVariants
Gets the placeholder variants configuration
- Returns:
- list of placeholder variants
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPlaceholders
Gets placeholders.- Returns:
- placeholders
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPreviewStatements
Gets preview statements.- Returns:
- preview statements
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getProductPanelConfig
Get the configuration for the product panel- Returns:
- product panel config
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getRelatedTos
Gets related tos.- Returns:
- related tos
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getRootBuckets
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:
searchString- the search string- Returns:
- root buckets
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getScriptLibrary
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:
libraryName- the library name- Returns:
- byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getSessionAttribute
Get the session attribute- Parameters:
key- the key- Returns:
- session attribute
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getSessionMode
Get the mode for this session.- Returns:
- session mode
- 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
-
getXEntities
Gets x entities.- Returns:
- x entities
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getXIndexes
Gets x indexes.- Returns:
- x indexes
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
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)- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
processTocUpdate
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:
toc- the toc- 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.
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
savePageItemPreview
void savePageItemPreview(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(ConfigurationData.FileID.PAGEITEM_PREVIEW, pageTemplateId, data);- Parameters:
pageTemplateId- the page template iddata- the data- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
savePageTemplate
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:
pageTemplate- the page template- Returns:
- ID of the newly created or updated page template
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
savePageTemplateData
void savePageTemplateData(int pageTemplateId, byte[] data) throws CometException, InvalidSessionException Save binary (i.e. INDD) data of a page template.
Calling this method is equivalent toCometBridgeRemote.setBinaryData(ConfigurationData.FileID.PAGETEMPLATE_DATA, pageTemplateId, data);- Parameters:
pageTemplateId- the page template iddata- the data- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
savePageTemplatePreview
void savePageTemplatePreview(int pageTemplateId, byte[] data) throws CometException, InvalidSessionException Save preview (i.e. JPEG image) of a page template.
Calling this method is equivalent toCometBridgeRemote.setBinaryData(ConfigurationData.FileID.PAGETEMPLATE_PREVIEW, pageTemplateId, data);- Parameters:
pageTemplateId- the page template iddata- the data- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setActions
Sets actions.- Parameters:
actions- the actions- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setBinaryData
void setBinaryData(ConfigurationData.FileID fileId, int id, byte[] data) throws CometException, InvalidSessionException Sets binary data.- Parameters:
fileId- the file idid- the iddata- the data- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setColors
Sets colors.- Parameters:
colors- the colors- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setConditionMenues
Sets condition menues.- Parameters:
menues- the menues- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setConditions
Sets conditions.- Parameters:
conditions- the conditions- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setDataFiles
Sets data files.- Parameters:
datafiles- the datafiles- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setDomains
Sets domains.- Parameters:
domains- the domains- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setFindStatements
void setFindStatements(FindStatements findStatements) throws CometException, InvalidSessionException Sets find statements.- Parameters:
findStatements- the find statements- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setFrameRules
Sets frame rules.- Parameters:
frameRules- the frame rules- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setGrids
Sets grids.- Parameters:
grids- the grids- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setGridTypes
Sets grid types.- Parameters:
gridTypes- the grid types- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageItems
Sets page items.- Parameters:
pageItems- the page items- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageItemStates
void setPageItemStates(PageItemStates pageItemStates) throws CometException, InvalidSessionException Sets page item states.- Parameters:
pageItemStates- the page item states- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageItemTypes
Sets page item types.- Parameters:
pageItemTypes- the page item types- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPageTemplates
Sets page templates.- Parameters:
pageTemplates- the page templates- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPanelStatements
void setPanelStatements(PanelStatements panelstatements) throws CometException, InvalidSessionException Sets panel statements.- Parameters:
panelstatements- the panelstatements- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPlaceholderGroups
Sets placeholder groups.- Parameters:
groups- the groups- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPlaceholderVariants
void setPlaceholderVariants(PlaceholderVariants variants) throws CometException, InvalidSessionException Sets (persists) the placeholder variants configuration
- Parameters:
variants- the variants to set- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPlaceholders
Sets placeholders.- Parameters:
placeholders- the placeholders- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setPreviewStatements
void setPreviewStatements(PreviewStatements previewStatements) throws CometException, InvalidSessionException Sets preview statements.- Parameters:
previewStatements- the preview statements- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setRelatedTos
Sets related tos.- Parameters:
relatedTos- the related tos- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setSessionAttribute
Set the session attribute- Parameters:
key- the keyobject- the object- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setSessionMode
void setSessionMode(CometBridgeRemote.SessionMode mode) throws CometException, InvalidSessionException Set the mode for this session. See description above for the different session modes.- Parameters:
mode- the mode- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setXEntities
Sets x entities.- Parameters:
xentities- the xentities- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setXIndexes
Sets x indexes.- Parameters:
xindexes- the xindexes- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
loginFromRemote
String loginFromRemote(String login, String passwd, String projectIdentifier, String language) throws CometException Login from remote string.- Parameters:
login- the loginpasswd- the passwdprojectIdentifier- the project identifierlanguage- the language- Returns:
- the string
- Throws:
CometException- the comet exception
-
validateUser
Checks whether the user is assigned to the project. If not throws CometException
- Parameters:
sessionId- the session idlogin- the loginprojectIdentifier- name of the configuration, such as "demo"- Throws:
CometException- the comet exception
-
setSessionProperties
void setSessionProperties(String sessionId, String login, String passwd, String projectIdentifier, String language, boolean initSessionInfo) throws CometException, InvalidSessionException Sets session properties.- Parameters:
sessionId- the session idlogin- the loginpasswd- the passwdprojectIdentifier- the project identifierlanguage- the languageinitSessionInfo- the init session info- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getScriptIdByName
int getScriptIdByName(String scriptName, Class<? extends CometScript> scriptClass) throws CometException, InvalidSessionException Gets the ID of a script by it's class and name (label).
Gets the ID of a script by it's class and name (label).
If such a script cannot be found, 0 is returned.- Parameters:
scriptName- the script namescriptClass- the script class- Returns:
- the script ID or 0, if such a script cannot be found.
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getLinkScriptId
Gets the ID of a CometPreviewLinkScript by it's name.
Gets the ID of a CometPreviewLinkScript by it's name.
This is equivalent forgetScriptByName (scriptName, CometLinkScript.class);- Parameters:
scriptName- the script name- Returns:
- the ID of this CometPreviewLinkScript or 0, if it cannot be found.
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPluginCScriptLibrary
Get plugin cscript client stub.- Parameters:
pluginName- the plugin name- Returns:
- byte []
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPluginCScriptLibrary
byte[] getPluginCScriptLibrary(String pluginName, ConfigurationData.FileID fileID) throws CometException, InvalidSessionException Get plugin cscript or python client stub. The generation style is determined from the fileID, e.g. for PLUGIN_LIBRARY, cscript stub code is generated, for PLUGIN_PYTHON_LIBRARY Python code is generated.- Parameters:
pluginName- the plugin namefileID- the ID of the file, such as PLUGIN_LIBRARY, PLUGIN_PYTHON_LIBRARY- Returns:
- byte []
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getPluginCScriptHeader
Get plugin c script header byte [ ].- Parameters:
pluginName- the plugin name- Returns:
- byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getAllCScriptIncludes
Get all c script includes byte [ ].- Returns:
- byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getAllCScriptHeaders
Get all c script headers byte [ ].- Returns:
- byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getProjectClientName
Gets project client name.- Parameters:
sessionID- the session idprojectIdentifier- the project identifier- Returns:
- the project client name
- Throws:
CometException- the comet exception
-
getProjectModelIdentifier
Gets project model identifier.- Parameters:
sessionID- the session idprojectIdentifier- the project identifier- Returns:
- the project model identifier
- Throws:
CometException- the comet exception
-
loginLocalFromPriintSuite
String loginLocalFromPriintSuite(String login, String token, String projectIdentifier, String language) throws CometException Login local from priint suite string.- Parameters:
login- the logintoken- the tokenprojectIdentifier- the project identifierlanguage- the language- Returns:
- the string
- Throws:
CometException- the comet exception
-
setSessionMode
void setSessionMode(String sessionId, CometBridgeRemote.SessionMode mode) throws CometException, InvalidSessionException Sets session mode.- Parameters:
sessionId- the session idmode- the mode- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getInclude
Get include byte [ ].- Parameters:
includePath- the include path- Returns:
- the byte [ ]
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getJavaPluginIncludes
Gets java plugin includes.- Returns:
- the java plugin includes
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getLibraryIncludes
Gets library includes.- Returns:
- the library includes
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getJavaPluginHeaders
Gets java plugin headers.- Returns:
- the java plugin headers
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
setSessionProject
Sets session project.- Parameters:
projectIdentifier- the project identifier- Throws:
InvalidSessionException- the invalid session exception
-
setSessionClient
Sets session client.- Parameters:
client- the client- Throws:
InvalidSessionException- the invalid session exception
-
includeExists
Include exists boolean.- Parameters:
includePath- the include path- Returns:
- the boolean
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getProductDataMapping
Gets product data mapping.- Returns:
- the product data mapping
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getEntityResultFilter
Gets entity result filter.- Returns:
- the entity result filter
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getAvailableSearchMethods
List<CometSearchMethod> getAvailableSearchMethods(String client, String projectIdentifier) throws CometException, InvalidSessionException Gets available search methods.- Parameters:
client- the clientprojectIdentifier- the project identifier- Returns:
- the available search methods
- Throws:
CometException- the comet exceptionInvalidSessionException- the invalid session exception
-
getUiFallbackLanguage
String getUiFallbackLanguage()Gets ui fallback language.- Returns:
- the ui fallback language
-
readSnippetData
Read snippet data byte [ ].- Parameters:
fileId- the file id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exception
-
readSnippetPreview
Read snippet preview byte [ ].- Parameters:
fileId- the file id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exception
-
readSnippetPreviewById
Read snippet preview by id byte [ ].- Parameters:
snippetId- the snippet id- Returns:
- the byte [ ]
- Throws:
CometException- the comet exception
-
getTranslations
Gets translations for the current session- Returns:
- translations for this session / UI language
- Throws:
CometException
-
findProducts(int, String, String, String, String, String)