Class DocumentTemplateWebManager

    • Constructor Detail

      • DocumentTemplateWebManager

        protected DocumentTemplateWebManager()
    • Method Detail

      • getDocumentTemplate

        public DocumentTemplate getDocumentTemplate​(String id)
        Gets the document template data from its identifier.
        Parameters:
        id - the identifier of a document template.
        Returns:
        a DocumentTemplate instance or throws exception if not found is unknown.
      • createDocumentTemplate

        public DocumentTemplate createDocumentTemplate​(DocumentTemplate newDocumentTemplate,
                                                       UploadedFile content)
        Creates a category into Silverpeas's context.
        Parameters:
        newDocumentTemplate - data of a new document template.
        content - the document template content (mandatory).
        Returns:
        the new document template instance.
      • updateDocumentTemplate

        public DocumentTemplate updateDocumentTemplate​(DocumentTemplate updatedDocumentTemplate,
                                                       UploadedFile content)
        Updates a document template into Silverpeas's context.
        Parameters:
        updatedDocumentTemplate - data of an updated document template.
        content - the document template content (mandatory).
        Returns:
        the saved data.
      • deleteDocumentTemplates

        public void deleteDocumentTemplates​(List<String> documentTemplateIds)
        Deletes document templates from their identifier.
        Parameters:
        documentTemplateIds - list of document template identifier.
      • sortDocumentTemplates

        public void sortDocumentTemplates​(List<String> sortedDocumentTemplateIds)
        Sorts the document templates against the given sorted list of document template identifier.
        Parameters:
        sortedDocumentTemplateIds - list of identifier as string.
      • clearCachedList

        public void clearCachedList()
        Clears the cached list of document template.
      • getAllDocumentTemplates

        public List<DocumentTemplate> getAllDocumentTemplates()
        Gets all the sorted list of document templates.

        No filtering rule is performed.

        Returns:
        a list of DocumentTemplate instance.
      • existsDocumentTemplate

        public boolean existsDocumentTemplate()
        Indicates if it exists at least one document template.
        Returns:
        true if exists, false otherwise.