Interface CometSnippetPluginLocal


public interface CometSnippetPluginLocal
The interface Comet snippet plugin local.
  • Field Details

  • Method Details

    • insertUpdateSnippets

      @Deprecated void insertUpdateSnippets(List<CometSnippet> snippets) throws CometException
      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.
      Gets snippets.
      Parameters:
      document - the document
      path - the path
      publication - the publication
      publicationPlannerId - the publication planner id
      publicationType - the publication type
      entityIdentifiers - the entity identifiers
      recordIdentifiers - the record identifiers
      recordGroupIds - the record group ids
      entityClasses - the entity classes
      parentEntityIdentifiers - the parent entity identifiers
      parentRecordIdentifiers - the parent record identifiers
      parentRecordGroupIds - the parent record group ids
      parentEntityClasses - the parent entity classes
      recordStringIds - the record string ids
      context - the context
      templateIds - the template ids
      Returns:
      snippets
      Throws:
      PubServerException - the pub server exception
    • getSnippets

      List<CometSnippet> getSnippets(FileRequestParameters parameters) throws CometException

      Gets snippets according to the criteria provided with FileRequestParameters

      This method is based on the predefined NamedQueries in CometSnippet class, 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

      List<CometSnippet> findSnippets(FileRequestParameters parameters) throws CometException

      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

      void deleteSnippetsByCriteria(FileRequestParameters parameters) throws CometException

      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 snippets
      parameters - the parameters
      Throws:
      CometException - the comet exception
    • deleteSnippets

      void deleteSnippets(FileRequestParameters parameters) throws CometException
      Delete snippets.
      Parameters:
      parameters - the parameters
      Throws:
      CometException - the comet exception
    • getSnippetsById

      CometSnippet getSnippetsById(int id) throws CometException
      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 identifier
      templateId - 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 identifier
      documentId - 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 identifier
      recordStringId - 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 identifier
      objectId - 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 identifier
      rootPublicationType - 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 id
      objectEntityIdentifier - the object entity identifier
      objectClassName - the object class name
      Returns:
      the snippets
      Throws:
      CometException - the comet exception
    • getSnippets

      List<CometSnippet> getSnippets(String projectIdentifier, Map<CometSnippet.QueryParameter,Object> parameters) throws CometException
      Gets snippets.
      Parameters:
      projectIdentifier - the project identifier
      parameters - the parameters
      Returns:
      the snippets
      Throws:
      CometException - the comet exception
    • deleteSnippetById

      void deleteSnippetById(int id) throws CometException
      Delete snippet by id.
      Parameters:
      id - the id
      Throws:
      CometException - the comet exception
    • getSnippetsByProject

      List<CometSnippet> getSnippetsByProject(String projectName) throws CometException
      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 identifier
      itemId - the item id
      snippetContext - 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 name
      searchQueryByDatabaseDialect - the search query by database dialect
      startPage - the start page
      pageSize - the page size
      sort - the sort
      Returns:
      the snippets by project with paging
      Throws:
      CometException
    • updateDocumentLabel

      void updateDocumentLabel(String snippetId, String documentLabel) throws CometException
      Update document label.
      Parameters:
      snippetId -
      documentLabel -
      Throws:
      CometException