Interface CometSnippetPluginLocal
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteSnippetById(int id) Delete snippet by id.voiddeleteSnippets(FileRequestParameters parameters) Delete snippets.voiddeleteSnippetsByCriteria(FileRequestParameters parameters) Deletes snippets using the search criteria as defined in FileRequestParametersfindSnippets(FileRequestParameters parameters) Gets a list of snippets matching the criteria provided with FileRequestParametersgetSnippets(FileRequestParameters parameters) Gets snippets according to the criteria provided with FileRequestParametersgetSnippets(String objectId, String objectEntityIdentifier, String objectClassName) Gets snippets.getSnippets(String document, String path, String publication, String publicationPlannerId, String publicationType, List<String> entityIdentifiers, List<String> recordIdentifiers, List<String> recordGroupIds, List<String> entityClasses, List<String> parentEntityIdentifiers, List<String> parentRecordIdentifiers, List<String> parentRecordGroupIds, List<String> parentEntityClasses, List<String> recordStringIds, Context context, List<Integer> templateIds) Deprecated.getSnippets(String projectIdentifier, Map<CometSnippet.QueryParameter, Object> parameters) Gets snippets.getSnippetsByBucketIdAndContext(String projectIdentifier, String itemId, String snippetContext) Gets snippets by bucket id and context.getSnippetsByDocumentId(String projectIdentifier, String documentId) Gets snippets by document id.getSnippetsById(int id) Gets snippets by id.getSnippetsByObjectId(String projectIdentifier, String objectId) Gets snippets by object id.getSnippetsByProject(String projectName) Gets snippets by project.getSnippetsByProjectNameAndTemplateId(String projectIdentifier, int templateId) Gets snippets by project name and template id.getSnippetsByProjectPaging(String projectName, String searchQueryByDatabaseDialect, int startPage, int pageSize, String sort) Gets snippets by project with paging.getSnippetsByRecordStringId(String projectIdentifier, String recordStringId) Gets snippets by record string id.getSnippetsByRootPublicationType(String projectIdentifier, String rootPublicationType) Gets snippets by root publication type.voidinsertUpdateSnippets(List<CometSnippet> snippets) Deprecated.voidinsertUpdateSnippets(List<CometSnippet> snippets, FileRequestParameters parameters) Insert update snippets.voidupdateDocumentLabel(String snippetId, String documentLabel) Update document label.
-
Field Details
-
JNDINAME
The constant JNDINAME.- See Also:
-
MAPPED_NAME
The constant MAPPED_NAME.- See Also:
-
-
Method Details
-
insertUpdateSnippets
Deprecated.Insert update snippets.- Parameters:
snippets- the snippets- Throws:
CometException- the comet exception
-
getSnippets
@Deprecated List<CometSnippet> getSnippets(String document, String path, String publication, String publicationPlannerId, String publicationType, List<String> entityIdentifiers, List<String> recordIdentifiers, List<String> recordGroupIds, List<String> entityClasses, List<String> parentEntityIdentifiers, List<String> parentRecordIdentifiers, List<String> parentRecordGroupIds, List<String> parentEntityClasses, List<String> recordStringIds, Context context, List<Integer> templateIds) throws PubServerException Deprecated.Replaced bygetSnippets(FileRequestParameters)Gets snippets.- Parameters:
document- the documentpath- the pathpublication- the publicationpublicationPlannerId- the publication planner idpublicationType- the publication typeentityIdentifiers- the entity identifiersrecordIdentifiers- the record identifiersrecordGroupIds- the record group idsentityClasses- the entity classesparentEntityIdentifiers- the parent entity identifiersparentRecordIdentifiers- the parent record identifiersparentRecordGroupIds- the parent record group idsparentEntityClasses- the parent entity classesrecordStringIds- the record string idscontext- the contexttemplateIds- the template ids- Returns:
- snippets
- Throws:
PubServerException- the pub server exception
-
getSnippets
Gets snippets according to the criteria provided with FileRequestParameters
This method is based on the predefined NamedQueries in
CometSnippetclass, thus search criteria is limited to the ones supported by the respective queries.- Parameters:
parameters- request parameters encapsulated in FileRequestParameters object- Returns:
- list of snippets matching the criteria
- Throws:
CometException- the comet exception
-
findSnippets
Gets a list of snippets matching the criteria provided with FileRequestParameters
Unlinke the
getSnippets(FileRequestParameters)method, the query is assembled dynamically according to the given criteria and search flags.
Any combination of search criteria is supported, or no criteria, which results in all snippets:- Parameters:
parameters- request parameters encapsulated in FileRequestParameters object- Returns:
- list of snippets matching the criteria
- Throws:
CometException- the comet exception
-
deleteSnippetsByCriteria
Deletes snippets using the search criteria as defined in FileRequestParameters
This method uses
findSnippets(FileRequestParameters)to identify snippets to be deleted and removes them from the EntityManager.- Parameters:
parameters- the parameters- Throws:
CometException- the comet exception
-
insertUpdateSnippets
void insertUpdateSnippets(List<CometSnippet> snippets, FileRequestParameters parameters) throws CometException Insert update snippets.- Parameters:
snippets- the snippetsparameters- the parameters- Throws:
CometException- the comet exception
-
deleteSnippets
Delete snippets.- Parameters:
parameters- the parameters- Throws:
CometException- the comet exception
-
getSnippetsById
Gets snippets by id.- Parameters:
id- the id- Returns:
- the snippets by id
- Throws:
CometException- the comet exception
-
getSnippetsByProjectNameAndTemplateId
List<CometSnippet> getSnippetsByProjectNameAndTemplateId(String projectIdentifier, int templateId) throws CometException Gets snippets by project name and template id.- Parameters:
projectIdentifier- the project identifiertemplateId- the template id- Returns:
- the snippets by project name and template id
- Throws:
CometException- the comet exception
-
getSnippetsByDocumentId
List<CometSnippet> getSnippetsByDocumentId(String projectIdentifier, String documentId) throws CometException Gets snippets by document id.- Parameters:
projectIdentifier- the project identifierdocumentId- the document id- Returns:
- the snippets by document id
- Throws:
CometException- the comet exception
-
getSnippetsByRecordStringId
List<CometSnippet> getSnippetsByRecordStringId(String projectIdentifier, String recordStringId) throws CometException Gets snippets by record string id.- Parameters:
projectIdentifier- the project identifierrecordStringId- the record string id- Returns:
- the snippets by record string id
- Throws:
CometException- the comet exception
-
getSnippetsByObjectId
List<CometSnippet> getSnippetsByObjectId(String projectIdentifier, String objectId) throws CometException Gets snippets by object id.- Parameters:
projectIdentifier- the project identifierobjectId- the object id- Returns:
- the snippets by object id
- Throws:
CometException- the comet exception
-
getSnippetsByRootPublicationType
List<CometSnippet> getSnippetsByRootPublicationType(String projectIdentifier, String rootPublicationType) throws CometException Gets snippets by root publication type.- Parameters:
projectIdentifier- the project identifierrootPublicationType- the root publication type- Returns:
- the snippets by root publication type
- Throws:
CometException- the comet exception
-
getSnippets
List<CometSnippet> getSnippets(String objectId, String objectEntityIdentifier, String objectClassName) throws CometException Gets snippets.- Parameters:
objectId- the object idobjectEntityIdentifier- the object entity identifierobjectClassName- the object class name- Returns:
- the snippets
- Throws:
CometException- the comet exception
-
getSnippets
List<CometSnippet> getSnippets(String projectIdentifier, Map<CometSnippet.QueryParameter, Object> parameters) throws CometExceptionGets snippets.- Parameters:
projectIdentifier- the project identifierparameters- the parameters- Returns:
- the snippets
- Throws:
CometException- the comet exception
-
deleteSnippetById
Delete snippet by id.- Parameters:
id- the id- Throws:
CometException- the comet exception
-
getSnippetsByProject
Gets snippets by project.- Parameters:
projectName- the project name- Returns:
- the snippets by project
- Throws:
CometException- the comet exception
-
getSnippetsByBucketIdAndContext
List<CometSnippet> getSnippetsByBucketIdAndContext(String projectIdentifier, String itemId, String snippetContext) throws CometException Gets snippets by bucket id and context.- Parameters:
projectIdentifier- the project identifieritemId- the item idsnippetContext- the snippet context- Returns:
- the snippets by bucket id and context
- Throws:
CometException- the comet exception
-
getSnippetsByProjectPaging
CometSnippetPagingDTO<CometSnippet> getSnippetsByProjectPaging(String projectName, String searchQueryByDatabaseDialect, int startPage, int pageSize, String sort) throws CometException Gets snippets by project with paging.- Parameters:
projectName- the project namesearchQueryByDatabaseDialect- the search query by database dialectstartPage- the start pagepageSize- the page sizesort- the sort- Returns:
- the snippets by project with paging
- Throws:
CometException
-
updateDocumentLabel
Update document label.- Parameters:
snippetId-documentLabel-- Throws:
CometException
-
getSnippets(FileRequestParameters)