Class OnlyofficeNewDocumentTemplatePlugin

  • All Implemented Interfaces:
    org.exoplatform.container.component.ComponentPlugin, org.exoplatform.services.cms.documents.NewDocumentTemplatePlugin

    public class OnlyofficeNewDocumentTemplatePlugin
    extends org.exoplatform.container.component.BaseComponentPlugin
    implements org.exoplatform.services.cms.documents.NewDocumentTemplatePlugin
    The Class OnlyofficeNewDocumentTemplatePlugin.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.exoplatform.services.cms.documents.DocumentService documentService
      The document service.
      protected static org.exoplatform.services.log.Log LOG
      The Constant LOG.
      protected List<org.exoplatform.services.cms.documents.NewDocumentTemplate> templates
      The document types.
      • Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

        desc, name
    • Constructor Summary

      Constructors 
      Constructor Description
      OnlyofficeNewDocumentTemplatePlugin​(org.exoplatform.services.cms.documents.DocumentService documentService, org.exoplatform.container.xml.InitParams initParams)
      Instantiates a new Onlyoffice new document template plugin.
    • Field Detail

      • LOG

        protected static final org.exoplatform.services.log.Log LOG
        The Constant LOG.
      • templates

        protected List<org.exoplatform.services.cms.documents.NewDocumentTemplate> templates
        The document types.
      • documentService

        protected final org.exoplatform.services.cms.documents.DocumentService documentService
        The document service.
    • Constructor Detail

      • OnlyofficeNewDocumentTemplatePlugin

        public OnlyofficeNewDocumentTemplatePlugin​(org.exoplatform.services.cms.documents.DocumentService documentService,
                                                   org.exoplatform.container.xml.InitParams initParams)
        Instantiates a new Onlyoffice new document template plugin.
        Parameters:
        documentService - the new document service
        initParams - the init params
    • Method Detail

      • getTemplates

        public List<org.exoplatform.services.cms.documents.NewDocumentTemplate> getTemplates()
        Gets the templates.
        Specified by:
        getTemplates in interface org.exoplatform.services.cms.documents.NewDocumentTemplatePlugin
        Returns:
        the templates
      • createDocument

        public javax.jcr.Node createDocument​(javax.jcr.Node parent,
                                             String title,
                                             org.exoplatform.services.cms.documents.NewDocumentTemplate template)
                                      throws Exception
        Creates the document.
        Specified by:
        createDocument in interface org.exoplatform.services.cms.documents.NewDocumentTemplatePlugin
        Parameters:
        parent - the parent
        title - the title
        template - the template
        Returns:
        the node
        Throws:
        Exception - the exception
      • getTemplate

        public org.exoplatform.services.cms.documents.NewDocumentTemplate getTemplate​(String name)
        Specified by:
        getTemplate in interface org.exoplatform.services.cms.documents.NewDocumentTemplatePlugin
      • getEditorClass

        public Class<? extends org.exoplatform.services.cms.documents.DocumentEditor> getEditorClass()
        Specified by:
        getEditorClass in interface org.exoplatform.services.cms.documents.NewDocumentTemplatePlugin