Class DynamicDeckUtils
- java.lang.Object
-
- com.adobe.acs.commons.indesign.dynamicdeckdynamo.utils.DynamicDeckUtils
-
public final class DynamicDeckUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringBuilderaddExportFormat(com.day.cq.dam.api.Asset master, List<com.adobe.dam.print.ids.PrintFormat> formats)static voidcommit(org.apache.sling.api.resource.ResourceResolver resourceResolver)This method commit resourceResolver object after session refreshstatic org.apache.sling.api.resource.ResourcecreateFolder(org.apache.sling.api.resource.ResourceResolver resolver, String folderName, org.apache.sling.api.resource.Resource resource)static StringcreateIDSPScriptArg(String name, Object value)static com.day.cq.dam.api.AssetcreateUniqueAsset(org.apache.sling.api.resource.Resource parent, String name, org.apache.sling.api.resource.ResourceResolver resolver)static List<org.apache.sling.api.resource.Resource>fetchSmartCollectionResourceList(org.apache.sling.api.resource.Resource smartCollectionResource)Fetches all Resources which are there in a smart collectionstatic org.apache.sling.api.resource.ResourcefindFileUnderFolderByExtension(org.apache.sling.api.resource.Resource templateFolderResource, String extension)This method is used to find files under specific folder by file extension.static InputStreamgetAssetOriginalInputStream(org.apache.sling.api.resource.Resource annotatedXmlResource)static org.apache.sling.api.resource.ResourcegetAssetResourceFromPayload(com.adobe.granite.workflow.exec.WorkItem workItem, org.apache.sling.api.resource.ResourceResolver resourceResolver)Get asset resource path from the payload.static Map<String,String>getCollectionsListForLoggedInUser(String collectionQuery, org.apache.sling.api.resource.ResourceResolver resourceResolver)static StringBuildergetImagePaths(List<String> assetPathList, String placeholderImagePath)static InputStreamgetInddXmlRenditionInputStream(org.apache.sling.api.resource.Resource assetResource)This method will return asset Input stream for indd filestatic StringgetOrCreateFolder(org.apache.sling.api.resource.ResourceResolver resolver, String folderName, org.apache.sling.api.resource.Resource folderParentResource)static voidupdateUserData(javax.jcr.Session jcrSession)
-
-
-
Method Detail
-
getImagePaths
public static StringBuilder getImagePaths(List<String> assetPathList, String placeholderImagePath)
-
addExportFormat
public static StringBuilder addExportFormat(com.day.cq.dam.api.Asset master, List<com.adobe.dam.print.ids.PrintFormat> formats)
-
getCollectionsListForLoggedInUser
public static Map<String,String> getCollectionsListForLoggedInUser(String collectionQuery, org.apache.sling.api.resource.ResourceResolver resourceResolver)
-
getInddXmlRenditionInputStream
public static InputStream getInddXmlRenditionInputStream(org.apache.sling.api.resource.Resource assetResource) throws DynamicDeckDynamoException
This method will return asset Input stream for indd file- Parameters:
assetResource-- Returns:
- Throws:
DynamicDeckDynamoException
-
getAssetOriginalInputStream
public static InputStream getAssetOriginalInputStream(org.apache.sling.api.resource.Resource annotatedXmlResource) throws DynamicDeckDynamoException
- Throws:
DynamicDeckDynamoException
-
commit
public static void commit(org.apache.sling.api.resource.ResourceResolver resourceResolver)
This method commit resourceResolver object after session refresh- Parameters:
resourceResolver-
-
fetchSmartCollectionResourceList
public static List<org.apache.sling.api.resource.Resource> fetchSmartCollectionResourceList(org.apache.sling.api.resource.Resource smartCollectionResource) throws DynamicDeckDynamoException
Fetches all Resources which are there in a smart collection- Parameters:
smartCollectionResource-- Returns:
- Throws:
DynamicDeckDynamoException
-
getOrCreateFolder
public static String getOrCreateFolder(org.apache.sling.api.resource.ResourceResolver resolver, String folderName, org.apache.sling.api.resource.Resource folderParentResource) throws org.apache.sling.api.resource.PersistenceException
- Parameters:
resolver-folderName-folderParentResource-- Returns:
- Throws:
org.apache.sling.api.resource.PersistenceException
-
createFolder
public static org.apache.sling.api.resource.Resource createFolder(org.apache.sling.api.resource.ResourceResolver resolver, String folderName, org.apache.sling.api.resource.Resource resource) throws org.apache.sling.api.resource.PersistenceException- Parameters:
resolver-folderName-resource-- Returns:
- Throws:
org.apache.sling.api.resource.PersistenceException
-
findFileUnderFolderByExtension
public static org.apache.sling.api.resource.Resource findFileUnderFolderByExtension(org.apache.sling.api.resource.Resource templateFolderResource, String extension)This method is used to find files under specific folder by file extension.- Parameters:
templateFolderResource-extension-- Returns:
-
getAssetResourceFromPayload
public static org.apache.sling.api.resource.Resource getAssetResourceFromPayload(com.adobe.granite.workflow.exec.WorkItem workItem, org.apache.sling.api.resource.ResourceResolver resourceResolver)Get asset resource path from the payload.- Parameters:
workItem-resourceResolver-- Returns:
-
updateUserData
public static void updateUserData(javax.jcr.Session jcrSession)
-
createUniqueAsset
public static com.day.cq.dam.api.Asset createUniqueAsset(org.apache.sling.api.resource.Resource parent, String name, org.apache.sling.api.resource.ResourceResolver resolver)
-
-