Class PublicationUtils

java.lang.Object
com.priint.pubserver.plugin.PluginControlDefault
com.priint.pubserver.comet4utils.PublicationUtils
All Implemented Interfaces:
PluginControl

public class PublicationUtils extends PluginControlDefault
Utilities for Publication

It is recommended to use PlannerRESTService for similar functionality. PlannerRESTService can be called via RESTful interface but also locally using pubserver ParameterInterpreter.

  • Constructor Details

    • PublicationUtils

      public PublicationUtils()
  • Method Details

    • getPublicationParameters

      @Deprecated public static List<KeyValue> getPublicationParameters(String publicationId)
      Deprecated.
      It is recommended to use ParametersService EJB (within PlannerRESTService) for similar functionality.
      Get the parameters of a publication from publication:planner
      Parameters:
      publicationId - id of the publication
      Returns:
      Parameters as a list of KeyValues
    • getDocumentParameters

      public static List<KeyValue> getDocumentParameters(String documentId)
      Deprecated.
      It is recommended to use ParametersService EJB (within PlannerRESTService) for similar functionality.
      Get the parameters of a document from publication:planner
      Parameters:
      documentId - id of document
      Returns:
      Parameters as a list of KeyValues
    • getSelectedProductsForDocument

      public static Map<String,String> getSelectedProductsForDocument(String documentId)
      Get the selected products for a document from publication:planner
      Parameters:
      documentId - id of document
      Returns:
      Map of selections. Entry key is ProductSelectionId, entry value is RecordStringId.
    • getRootPublication

      public static String getRootPublication(String documentId)
      Deprecated.
      It is recommended to use DocumentsService EJB and PublicationsService EJB (within PlannerRESTService) for similar functionality.
      Get the ID of the root publication for a document from publication:planner.
      Parameters:
      documentId - id of document
      Returns:
      ID of the root publication
    • getRootPublication

      public static String getRootPublication(String documentId, String publicationType)
      Deprecated.
      It is recommended to use DocumentsService EJB and PublicationsService EJB (within PlannerRESTService) for similar functionality.
      Get the ID of the root publication for a document from publication:planner.
      Parameters:
      documentId - id of document
      publicationType -
      Returns:
      ID of the root publication
    • getDocumentsForPublication

      public static List<String> getDocumentsForPublication(String publicationId, boolean withSubPublications)
      Deprecated.
      It is recommended to use DocumentsService EJB and PublicationsService EJB (within PlannerRESTService) for similar functionality.
      Retrieves IDs for all documents of a publication. This will also return inactive or deleted documents.

      Important Note:
      This function does not support pubserver installation with more than one comet_data database, i.e. the function only supports "resource1".

      Parameters:
      publicationId -
      withSubPublications - Scan all sub-publications recursively.
      Returns:
    • getActiveDocumentsForPublication

      public static List<String> getActiveDocumentsForPublication(String publicationId, boolean withSubPublications)
      Deprecated.
      It is recommended to use DocumentsService EJB and PublicationsService EJB (within PlannerRESTService) for similar functionality.
      Retrieves IDs for all active (and not deleted) documents of a publication.

      Important Note:
      This function does not support pubserver installation with more than one comet_data database, i.e. the function only supports "resource1".

      Parameters:
      publicationId -
      withSubPublications - Scan all active and not deleted sub-publications recursively.
      Returns:
    • updateSelectedProductStringId

      public static void updateSelectedProductStringId(String productSelectionId, String recordStringId)
      Update the record string ID of a product selection.

      Important Note:
      This function does not support pubserver installation with more than one comet_data database, i.e. the function only supports "resource1".

      Parameters:
      productSelectionId -
      recordStringId -