Class ContentFragmentImport

  • All Implemented Interfaces:
    FormProcessor

    public class ContentFragmentImport
    extends ProcessDefinition
    Import a series of content fragments from a spreadsheet
    • Constructor Detail

      • ContentFragmentImport

        public ContentFragmentImport()
    • Method Detail

      • init

        public void init()
                  throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • buildProcess

        public void buildProcess​(ProcessInstance instance,
                                 org.apache.sling.api.resource.ResourceResolver rr)
                          throws org.apache.sling.api.resource.LoginException,
                                 javax.jcr.RepositoryException
        Specified by:
        buildProcess in class ProcessDefinition
        Throws:
        org.apache.sling.api.resource.LoginException
        javax.jcr.RepositoryException
      • storeReport

        public void storeReport​(ProcessInstance instance,
                                org.apache.sling.api.resource.ResourceResolver rr)
                         throws javax.jcr.RepositoryException,
                                org.apache.sling.api.resource.PersistenceException
        Specified by:
        storeReport in class ProcessDefinition
        Throws:
        javax.jcr.RepositoryException
        org.apache.sling.api.resource.PersistenceException
      • createFolderNode

        protected boolean createFolderNode​(String path,
                                           String folderTitle,
                                           org.apache.sling.api.resource.ResourceResolver r)
                                    throws javax.jcr.RepositoryException,
                                           org.apache.sling.api.resource.PersistenceException
        Throws:
        javax.jcr.RepositoryException
        org.apache.sling.api.resource.PersistenceException
      • getOrCreateFragment

        protected com.adobe.cq.dam.cfm.ContentFragment getOrCreateFragment​(org.apache.sling.api.resource.Resource parent,
                                                                           org.apache.sling.api.resource.Resource template,
                                                                           String name,
                                                                           String title)
                                                                    throws com.adobe.cq.dam.cfm.ContentFragmentException
        Throws:
        com.adobe.cq.dam.cfm.ContentFragmentException
      • getFragmentTemplateResource

        protected org.apache.sling.api.resource.Resource getFragmentTemplateResource​(org.apache.sling.api.resource.ResourceResolver rr,
                                                                                     String templatePath)