Class 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 Detail

      • PublicationUtils

        public PublicationUtils()
    • Method Detail

      • getPublicationParameters

        @Deprecated
        public static java.util.List<KeyValue> getPublicationParameters​(java.lang.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 java.util.List<KeyValue> getDocumentParameters​(java.lang.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 java.util.Map<java.lang.String,​java.lang.String> getSelectedProductsForDocument​(java.lang.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 java.lang.String getRootPublication​(java.lang.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 java.lang.String getRootPublication​(java.lang.String documentId,
                                                          java.lang.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 java.util.List<java.lang.String> getDocumentsForPublication​(java.lang.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 java.util.List<java.lang.String> getActiveDocumentsForPublication​(java.lang.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​(java.lang.String productSelectionId,
                                                         java.lang.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 -