Class ContentFragmentImport
- java.lang.Object
-
- com.adobe.acs.commons.mcp.ProcessDefinition
-
- com.adobe.acs.commons.mcp.impl.processes.cfi.ContentFragmentImport
-
- All Implemented Interfaces:
FormProcessor
public class ContentFragmentImport extends ProcessDefinition
Import a series of content fragments from a spreadsheet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classContentFragmentImport.ReportColumns
-
Constructor Summary
Constructors Constructor Description ContentFragmentImport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildProcess(ProcessInstance instance, org.apache.sling.api.resource.ResourceResolver rr)protected booleancreateFolderNode(String path, String folderTitle, org.apache.sling.api.resource.ResourceResolver r)protected voidcreateFolders(ActionManager manager)protected org.apache.sling.api.resource.ResourcegetFragmentTemplateResource(org.apache.sling.api.resource.ResourceResolver rr, String templatePath)protected com.adobe.cq.dam.cfm.ContentFragmentgetOrCreateFragment(org.apache.sling.api.resource.Resource parent, org.apache.sling.api.resource.Resource template, String name, String title)protected voidimportFragments(ActionManager manager)protected voidincrementCount(EnumMap<ContentFragmentImport.ReportColumns,Object> row, long amt)voidinit()voidstoreReport(ProcessInstance instance, org.apache.sling.api.resource.ResourceResolver rr)protected EnumMap<ContentFragmentImport.ReportColumns,Object>trackDetailedActivity(String item, String action, String description, Long bytes)-
Methods inherited from class com.adobe.acs.commons.mcp.ProcessDefinition
getName, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adobe.acs.commons.mcp.form.FormProcessor
parseInputs
-
-
-
-
Field Detail
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
FOLDER_TITLE
public static final String FOLDER_TITLE
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
TITLE
public static final String TITLE
- See Also:
- Constant Field Values
-
TEMPLATE
public static final String TEMPLATE
- See Also:
- Constant Field Values
-
DEFAULT_FOLDER_TYPE
public static final String DEFAULT_FOLDER_TYPE
- See Also:
- Constant Field Values
-
-
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:
buildProcessin classProcessDefinition- Throws:
org.apache.sling.api.resource.LoginExceptionjavax.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:
storeReportin classProcessDefinition- Throws:
javax.jcr.RepositoryExceptionorg.apache.sling.api.resource.PersistenceException
-
trackDetailedActivity
protected EnumMap<ContentFragmentImport.ReportColumns,Object> trackDetailedActivity(String item, String action, String description, Long bytes)
-
incrementCount
protected void incrementCount(EnumMap<ContentFragmentImport.ReportColumns,Object> row, long amt)
-
createFolders
protected void createFolders(ActionManager manager) throws IOException
- Throws:
IOException
-
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.RepositoryExceptionorg.apache.sling.api.resource.PersistenceException
-
importFragments
protected void importFragments(ActionManager manager) throws IOException
- Throws:
IOException
-
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)
-
-