public class FMUtils
extends java.lang.Object
| Constructor and Description |
|---|
FMUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addMetaDataToCQPage(Resource cqPageResource,
ResourceResolver resourceResolver,
java.lang.String cqPagePath,
JSONObject metadataProperties,
FMConstants.CoreAssetType assetType,
java.lang.String templatePath) |
static void |
addMetaDataToGuideContainer(ResourceResolver resourceResolver,
java.lang.String cqPagePath,
JSONObject metadataProperties,
FMConstants.CoreAssetType assetType,
FMConstants.FORM_MODEL form_model) |
static void |
addMixin(Node node,
java.lang.String[] mixinNames)
This utility is to add mixinNames at node
|
static boolean |
canReplicate(java.lang.String path,
Session session) |
static boolean |
checkForExistingForms(java.lang.String assetPath,
Session session,
java.lang.String rootPath)
This API is used to parse through all the nodes in the hierarchy of the provided asset path and to check whether any of those nodes is an asset other than a folder.
|
static void |
cleanUpReplicationInfo(Session session,
java.lang.String path) |
static boolean |
clientlibExists(java.lang.String clientlibCategoryName,
HtmlLibraryManager htmlLibraryManager)
API checks whether given client lib category does exist across aem or not
|
static JSONObject |
convertSetOfFormInfoToJSONObject(java.util.Set<AssetInfo> formInfoList) |
static Node |
createCQPageNode(ResourceResolver resourceResolver,
JSONObject paramsJson,
FMConstants.CoreAssetType assetType,
FMConstants.FORM_MODEL form_model,
java.lang.String templatePath)
Create the Node hierarchy under FM_AF_ROOT and delete all the rootPanel item nodes.
|
static Resource |
createCQPageResource(ResourceResolver resourceResolver,
java.lang.String cqPagePath,
JSONObject metadataProperties,
FMConstants.CoreAssetType assetType,
FMConstants.FORM_MODEL form_model,
java.lang.String templatePath) |
static java.util.Map<java.lang.String,java.lang.String> |
createFormsetRenderURLParams(Node formNode,
java.lang.String type,
java.lang.String submitUrl,
java.lang.String profile,
java.lang.String sampleDataId,
Session session) |
static java.util.Map<java.lang.String,java.lang.String> |
createGuideRenderURL(Node guideNode,
java.lang.String sampleDataId,
Session session) |
static java.util.Map<java.lang.String,java.lang.String> |
createMulichannelDocumentRenderURL(Node assetNode,
java.lang.String sampleDataId,
Session session,
java.lang.String channelType) |
static void |
deleteTempArchives(Session session)
Deletes temp archives created in CRX during uploadForm.
|
static Node |
getAnalyticsDataNode(Node formNode,
boolean create) |
static java.lang.String |
getAssetPathFromPage(java.lang.String pagePath)
This function returns Asset path from Page path for Adaptive Pages
ie : Guide, AF Fragment, Adaptive Document
|
static FMConstants.CoreAssetType |
getAssetType(Session session,
java.lang.String nodePath) |
static byte[] |
getBytesFromInputStream(java.io.InputStream oInpStream) |
static java.lang.String |
getCategoryNameFromClientLibPath(java.lang.String clientLibPath)
This API generates Category name from the theme clientlib path by appending relative path directory names separated by '.'
|
static java.lang.String |
getClientlibPath(Node resourceNode)
getClientlibPath
This API is used to fetch client lib path by appending client lib location and asset name
|
static Resource |
getClosestNodeUpInHierarchy(ResourceResolver resolver,
java.lang.String path,
java.lang.String inputPropertyName,
java.lang.String inputPropertyValue,
boolean includeCurrentNode)
This function returns first node resource encountered up in the hierarchy that has given property value of the given property name.
|
static Node |
getContentNode(Node formNode,
boolean create) |
static java.lang.String |
getDescription(Resource resource)
This API returns description of an Asset.
|
static java.lang.String |
getDisplayType(Resource resource)
This API returns display type of an Asset.
|
static java.lang.String |
getDocumentPagePath(java.lang.String channelPath)
Returns the Document page path
|
static java.lang.String |
getDORRefPath(Session session,
java.lang.String guidePath) |
static ResourceResolver |
getFnDServiceUserResourceResolver(ResourceResolverFactory resourceResolverFactory)
This function returns the resource resolver for fd-service system user.
|
static Session |
getFnDServiceUserSession(SlingRepository repository)
This function returns the session for fd-service system user.
|
static Node |
getFolderNode(Session session,
java.lang.String rootNodePath,
boolean create,
java.lang.String folderType) |
static FormsAssetType |
getFormsFoundationAssetType(FMConstants.CoreAssetType coreAssetType)
This utility is to return Forms Foundation Asset Type deduced from Forms Manager Asset Type.
|
static com.adobe.aemforms.fm.exception.FormsMgrException |
getFormsMgrException(java.lang.Exception e) |
static java.lang.String |
getFormType(FMConstants.CoreAssetType assetType) |
static long |
getLastModified(Resource resource)
This API returns last modified time of an Asset.
|
static long |
getLastModifiedOrCreated(Session session,
java.lang.String assetPath) |
static Node |
getMetadataNode(Node formNode,
boolean create) |
static Node |
getMetadataNode(Session session,
java.lang.String formPath,
boolean create) |
static java.lang.String |
getMetaTemplateRefPath(Session session,
java.lang.String guidePath) |
static java.lang.String |
getNameFromPath(java.lang.String path) |
static Property |
getNodeProperty(java.lang.String propertyName,
Node node) |
static java.lang.String |
getPagePathFromAsset(java.lang.String assetPath)
This function returns Page path from Asset path for Adaptive Assets
ie : Guide, AF Fragment, Adaptive Document, Multichannel Document
|
static Resource |
getPrintChannelResource(Resource resource) |
static java.lang.String |
getPropertyAsString(Session session,
java.lang.String nodePath,
java.lang.String propertyName) |
static Node |
getRenditionNode(Node formNode,
boolean create) |
static java.lang.String |
getRequestParamValue(RequestParameterMap paramMap,
java.lang.String param)
This function retrieves string value of a request parameter.
|
static ResourceResolver |
getResourceResolver(ResourceResolverFactory resourceResolverFactory,
Session session) |
static java.lang.String |
getResourceTitle(Resource resource) |
static java.lang.String |
getRootLevelAssetType(Session session,
java.lang.String assetPath)
This method is used to deduce the type of the root level folder in which the asset with the specified asset path lies.
|
static java.lang.String |
getSchemaRefPath(Session session,
java.lang.String guidePath) |
static long |
getSize(Resource resource)
This API returns size of Asset.
|
static java.lang.String |
getStatus(Resource resource)
This API returns current status of an Asset.
|
static java.lang.String |
getThemeRef(Session session,
java.lang.String path) |
static java.lang.String |
getTitle(Resource resource)
This API returns title of an asset.
|
static com.day.cq.wcm.api.Template |
getValidAFTemplate(ResourceResolver resourceResolver,
java.lang.String afTemplatePath,
java.lang.String assetPathSuffix)
Returns a Template object for the AF template path provided.
|
static java.lang.String |
getXDPRefPath(Session session,
java.lang.String guidePath) |
static java.lang.String |
getXSDRefPath(Session session,
java.lang.String guidePath) |
static void |
handleViewPrintNodeForDOR(java.lang.String dorType,
Resource guideContainerResource) |
static boolean |
hasDORTemplate(Session session,
java.lang.String path) |
static boolean |
hasMetaTemplate(Session session,
java.lang.String path) |
static boolean |
hasMixin(Node node,
java.lang.String mixinName)
This utility is to check whether mixinName exists at node or not
|
static boolean |
hasProperty(Session session,
java.lang.String path,
java.lang.String propertyName) |
static boolean |
hasSchemaRef(Session session,
java.lang.String path) |
static boolean |
hasXSDRef(Session session,
java.lang.String path) |
static boolean |
isAdaptiveDocument(Session session,
java.lang.String path) |
static boolean |
isAFFragment(Session session,
java.lang.String path) |
static boolean |
isApplication(Session session,
java.lang.String path) |
static boolean |
isDocumentChannel(ResourceResolver resourceResolver,
java.lang.String path)
Returns whether a cq:Page is a Document channel or not
|
static boolean |
isFDM(Session session,
java.lang.String path) |
static boolean |
isFolder(Session session,
java.lang.String path) |
static boolean |
isForm(FMConstants.CoreAssetType assetType) |
static boolean |
isFormset(Session session,
java.lang.String path) |
static boolean |
isGuide(Session session,
java.lang.String path) |
static boolean |
isMultichannelDocument(Session session,
java.lang.String path) |
static boolean |
isPDFForm(Session session,
java.lang.String path) |
static boolean |
isPrintForm(Session session,
java.lang.String path) |
static boolean |
isResource(Session session,
java.lang.String path) |
static boolean |
isTheme(Session session,
java.lang.String path) |
static boolean |
isThemeClientLib(Node assetNode) |
static boolean |
isUserPartOfGroup(java.security.Principal userPrincipal,
UserManager um,
java.lang.String groupId)
Returns true if given userPrincipal is part of group
|
static boolean |
isValidAssetName(java.lang.String assetName,
java.lang.String pattern) |
static boolean |
isValidFolderName(java.lang.String folderName) |
static boolean |
isXDPForm(Session session,
java.lang.String path) |
static boolean |
isXFABasedForm(Session session,
java.lang.String path) |
static void |
JsonToJcrNode(Node node,
JSONObject jsonObject)
Method to create jcr nodes from json.
|
static void |
moveNode(ResourceResolver resolver,
java.lang.String sourceLocation,
java.lang.String destinationLocation)
This API is used to move node from source location to destination location
|
static <T> T |
notNulOrDefault(T getValue,
T defaultValue) |
static void |
prepareJsonToCreateDAMAsset(ResourceResolver resourceResolver,
JSONObject inOutAssetJSON,
FMConstants.CoreAssetType assetType,
java.lang.String formPath,
java.lang.String formName)
Method to return DAM Asset json structure.
|
static void |
setAssetIdentifier(Node node,
java.lang.String assetType,
int validOrdinal)
This API sets the identifier at node.
|
static void |
setLastModifiedTime(java.lang.String formPath,
ResourceResolver resolver) |
static void |
unscheduleJob(org.apache.sling.event.jobs.JobManager jobManager,
java.lang.String formPath,
java.lang.String replicationAtribute) |
static void |
writeRequestStatusSuccess(SlingHttpServletResponse resp,
boolean isIE) |
public static Node getMetadataNode(Node formNode, boolean create) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static Node getMetadataNode(Session session, java.lang.String formPath, boolean create) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static Node getAnalyticsDataNode(Node formNode, boolean create) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static Node getContentNode(Node formNode, boolean create) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isFolder(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isApplication(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isXDPForm(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isResource(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isGuide(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isPDFForm(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isPrintForm(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isFormset(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isAFFragment(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isAdaptiveDocument(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isTheme(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isThemeClientLib(Node assetNode) throws com.adobe.aemforms.fm.exception.FormsMgrException
assetNode - a non null nodecom.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isFDM(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isMultichannelDocument(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isDocumentChannel(@Nonnull
ResourceResolver resourceResolver,
java.lang.String path)
resourceResolver - path - Path to the Channel cq:Pagepublic static java.lang.String getDocumentPagePath(java.lang.String channelPath)
channelPath - Path to the Channel cq:Pagepublic static boolean isXFABasedForm(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean hasDORTemplate(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean hasMetaTemplate(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean hasXSDRef(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean hasSchemaRef(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean hasProperty(Session session, java.lang.String path, java.lang.String propertyName) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static Property getNodeProperty(java.lang.String propertyName, Node node) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getXDPRefPath(Session session, java.lang.String guidePath) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getDORRefPath(Session session, java.lang.String guidePath) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getMetaTemplateRefPath(Session session, java.lang.String guidePath) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getXSDRefPath(Session session, java.lang.String guidePath) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getSchemaRefPath(Session session, java.lang.String guidePath) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.util.Map<java.lang.String,java.lang.String> createGuideRenderURL(Node guideNode, java.lang.String sampleDataId, Session session) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.util.Map<java.lang.String,java.lang.String> createMulichannelDocumentRenderURL(Node assetNode, java.lang.String sampleDataId, Session session, java.lang.String channelType) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.util.Map<java.lang.String,java.lang.String> createFormsetRenderURLParams(Node formNode, java.lang.String type, java.lang.String submitUrl, java.lang.String profile, java.lang.String sampleDataId, Session session) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isForm(FMConstants.CoreAssetType assetType)
public static java.lang.String getFormType(FMConstants.CoreAssetType assetType)
public static void deleteTempArchives(Session session) throws com.adobe.aemforms.fm.exception.FormsMgrException
session - - Session sessioncom.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static ResourceResolver getResourceResolver(ResourceResolverFactory resourceResolverFactory, Session session) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static void writeRequestStatusSuccess(SlingHttpServletResponse resp, boolean isIE) throws java.io.IOException, JSONException
java.io.IOExceptionJSONExceptionpublic static Node getFolderNode(Session session, java.lang.String rootNodePath, boolean create, java.lang.String folderType) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getPagePathFromAsset(java.lang.String assetPath)
assetPath - path of the assetpublic static java.lang.String getAssetPathFromPage(java.lang.String pagePath)
pagePath - path of the assetpublic static Resource getClosestNodeUpInHierarchy(ResourceResolver resolver, java.lang.String path, java.lang.String inputPropertyName, java.lang.String inputPropertyValue, boolean includeCurrentNode) throws com.adobe.aemforms.fm.exception.FormsMgrException
resolver - path - inputPropertyName - inputPropertyValue - includeCurrentNode - com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static long getLastModifiedOrCreated(Session session, java.lang.String assetPath) throws com.adobe.aemforms.fm.exception.FormsMgrException
session - assetPath - com.adobe.aemforms.fm.exception.FormsMgrException - if cant get nodepublic static java.lang.String getNameFromPath(java.lang.String path)
throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static FMConstants.CoreAssetType getAssetType(Session session, java.lang.String nodePath) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static com.adobe.aemforms.fm.exception.FormsMgrException getFormsMgrException(java.lang.Exception e)
public static void unscheduleJob(org.apache.sling.event.jobs.JobManager jobManager,
java.lang.String formPath,
java.lang.String replicationAtribute)
public static java.lang.String getRootLevelAssetType(Session session, java.lang.String assetPath) throws RepositoryException
session - CRX session to be usedassetPath - Path of the asset for which to deduce which type of root folder it belongs to.RepositoryExceptionpublic static byte[] getBytesFromInputStream(java.io.InputStream oInpStream)
throws java.io.IOException
java.io.IOExceptionpublic static Session getFnDServiceUserSession(SlingRepository repository) throws RepositoryException
repository - RepositoryExceptionpublic static ResourceResolver getFnDServiceUserResourceResolver(ResourceResolverFactory resourceResolverFactory) throws LoginException
resourceResolverFactory - RepositoryExceptionLoginExceptionpublic static JSONObject convertSetOfFormInfoToJSONObject(java.util.Set<AssetInfo> formInfoList) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean canReplicate(java.lang.String path,
Session session)
throws RepositoryException
RepositoryExceptionpublic static void prepareJsonToCreateDAMAsset(ResourceResolver resourceResolver, JSONObject inOutAssetJSON, FMConstants.CoreAssetType assetType, java.lang.String formPath, java.lang.String formName) throws com.adobe.aemforms.fm.exception.FormsMgrException
resourceResolver - inOutAssetJSON - assetType - formPath - formName - com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static Resource createCQPageResource(ResourceResolver resourceResolver, java.lang.String cqPagePath, JSONObject metadataProperties, FMConstants.CoreAssetType assetType, FMConstants.FORM_MODEL form_model, java.lang.String templatePath) throws com.adobe.aemforms.fm.exception.FormsMgrException, RepositoryException, PersistenceException, JSONException
com.adobe.aemforms.fm.exception.FormsMgrExceptionRepositoryExceptionPersistenceExceptionJSONExceptionpublic static void addMetaDataToCQPage(Resource cqPageResource, ResourceResolver resourceResolver, java.lang.String cqPagePath, JSONObject metadataProperties, FMConstants.CoreAssetType assetType, java.lang.String templatePath) throws JSONException
JSONExceptionpublic static void handleViewPrintNodeForDOR(java.lang.String dorType,
Resource guideContainerResource)
public static void addMetaDataToGuideContainer(ResourceResolver resourceResolver, java.lang.String cqPagePath, JSONObject metadataProperties, FMConstants.CoreAssetType assetType, FMConstants.FORM_MODEL form_model) throws JSONException
JSONExceptionpublic static Node createCQPageNode(ResourceResolver resourceResolver, JSONObject paramsJson, FMConstants.CoreAssetType assetType, FMConstants.FORM_MODEL form_model, java.lang.String templatePath) throws com.adobe.aemforms.fm.exception.FormsMgrException
resourceResolver - paramsJson - assetType - form_model - templatePath - com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static com.day.cq.wcm.api.Template getValidAFTemplate(ResourceResolver resourceResolver, java.lang.String afTemplatePath, java.lang.String assetPathSuffix) throws RepositoryException
resourceResolver - afTemplatePath - RepositoryExceptionpublic static void JsonToJcrNode(Node node, JSONObject jsonObject) throws JSONException, RepositoryException
node - - Json structure will be mapped under this node.jsonObject - com.adobe.aemforms.fm.exception.FormsMgrExceptionJSONExceptionRepositoryExceptionpublic static void moveNode(ResourceResolver resolver, java.lang.String sourceLocation, java.lang.String destinationLocation) throws com.adobe.aemforms.fm.exception.FormsMgrException
resolver - sourceLocation - - it contains the location of node which is to be moveddestinationLocation - - it contains the location where node is to be movedcom.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getClientlibPath(Node resourceNode) throws com.adobe.aemforms.fm.exception.FormsMgrException
resourceNode - com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getThemeRef(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getPropertyAsString(Session session, java.lang.String nodePath, java.lang.String propertyName) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getCategoryNameFromClientLibPath(java.lang.String clientLibPath)
clientLibPath - public static Node getRenditionNode(Node formNode, boolean create) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static java.lang.String getResourceTitle(Resource resource) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static FormsAssetType getFormsFoundationAssetType(FMConstants.CoreAssetType coreAssetType) throws com.adobe.aemforms.fm.exception.FormsMgrException
coreAssetType - com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean hasMixin(Node node, java.lang.String mixinName) throws RepositoryException
node - mixinName - RepositoryExceptionpublic static void addMixin(Node node, java.lang.String[] mixinNames) throws com.adobe.aemforms.fm.exception.FormsMgrException
node - mixinNames - com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static void cleanUpReplicationInfo(Session session, java.lang.String path) throws com.adobe.aemforms.fm.exception.FormsMgrException
com.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean isValidAssetName(java.lang.String assetName,
java.lang.String pattern)
public static boolean isValidFolderName(java.lang.String folderName)
public static boolean checkForExistingForms(java.lang.String assetPath,
Session session,
java.lang.String rootPath)
throws com.adobe.aemforms.fm.exception.FormsMgrException,
RepositoryException
assetPath - session - rootPath - com.adobe.aemforms.fm.exception.FormsMgrExceptionRepositoryExceptionpublic static boolean isUserPartOfGroup(java.security.Principal userPrincipal,
UserManager um,
java.lang.String groupId)
throws RepositoryException
userPrincipal - um - reference to UserManager serviceRepositoryExceptionpublic static void setLastModifiedTime(java.lang.String formPath,
ResourceResolver resolver)
formPath - dam asset path is expectedresolver - resource resolverpublic static <T> T notNulOrDefault(T getValue,
T defaultValue)
public static void setAssetIdentifier(Node node, java.lang.String assetType, int validOrdinal) throws com.adobe.aemforms.fm.exception.FormsMgrException
node - at which identifier is to be setassetType - to be set as an identifiercom.adobe.aemforms.fm.exception.FormsMgrExceptionpublic static boolean clientlibExists(java.lang.String clientlibCategoryName,
HtmlLibraryManager htmlLibraryManager)
clientlibCategoryName - htmlLibraryManager - public static java.lang.String getRequestParamValue(RequestParameterMap paramMap, java.lang.String param)
paramMap - param - public static java.lang.String getTitle(Resource resource)
resource - public static java.lang.String getDisplayType(Resource resource)
resource - public static long getSize(Resource resource)
resource - public static java.lang.String getDescription(Resource resource)
resource - public static java.lang.String getStatus(Resource resource)
resource - public static long getLastModified(Resource resource)
resource - public static Resource getPrintChannelResource(Resource resource) throws com.adobe.aemforms.fm.exception.FormsMgrException
resource - a multichhanel document asset resource residing under /content/dam/formsanddocuments/
It's the responsibility of the caller to make sure that the resource refers to a valid multichannel documentcom.adobe.aemforms.fm.exception.FormsMgrException - if any exception occurs while trying to load the resource and its hierarchyCopyright © 2010 - 2019 Adobe. All Rights Reserved