java.lang.Object
com.adobe.acs.commons.indesign.dynamicdeckdynamo.utils.DynamicDeckUtils

public final class DynamicDeckUtils extends Object
  • Method Details

    • createIDSPScriptArg

      public static String createIDSPScriptArg(String name, Object value)
    • 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)