Package com.adobe.fd.fp.util
Class PortalUtils
- java.lang.Object
 - 
- com.adobe.fd.fp.util.PortalUtils
 
 
- 
public class PortalUtils extends java.lang.Object 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>attachment_Url_Prefix_List 
- 
Constructor Summary
Constructors Constructor Description PortalUtils() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.Object>convertJsonToMap(JSONObject json)static java.lang.StringcreateUrlFromParams(java.lang.String url, java.util.Map<java.lang.String,java.lang.String> params)static java.lang.String[]getArrayFromJsonArray(JSONArray jsonArray)static java.lang.StringgetAttachmentContentTypeKey(java.lang.String attachmentKey)static org.osgi.framework.BundleContextgetBundleContext()static ResourceResolvergetFnDServiceResolver(ResourceResolverFactory resolverFactory)static javax.jcr.SessiongetFnDServiceUserSession(SlingRepository repository)static java.lang.StringgetGuideContainerPathFromFormPath(java.lang.String formPath)static java.lang.StringgetRequestParamValue(SlingHttpServletRequest req, java.lang.String param)static java.lang.ObjectgetService(java.lang.Class<?> c, java.lang.String filter)static java.lang.StringgetSignConfigFromGuideContainer(java.lang.String guideContainerPath, javax.jcr.Session session)static booleanisDorAssociated(java.lang.String formType, javax.jcr.Node metadataNode)static voidreplicate(javax.jcr.Session session, java.lang.String path, ReplicationActionType replAction, Replicator replicator)static voidreverseReplicate(javax.jcr.Session session, java.lang.String path, ReplicationActionType replAction, Replicator replicator, java.lang.String[] outBoxIDs)static voidsetBundleContext(org.osgi.framework.BundleContext context)static java.lang.StringBufferupdateAttachmentListUrl(java.lang.String[] attachmentUrlArray, java.lang.String type, java.lang.String currentId)The below method has been extracted out to fix the attachment url for draft,submission and Pending Sign, also handles and fixes url for the new instance submissionstatic JSONObjectupdateAttachmentMap(java.lang.String id, java.lang.String fileAttachmentMap, java.lang.String type)This method updates the obselete map in case of draft/submission and pending Sign instancesstatic voidupdatePropertiesOnNode(java.util.Map<java.lang.String,java.lang.Object> propertiesMap, javax.jcr.Node node) 
 - 
 
- 
- 
Method Detail
- 
getBundleContext
public static org.osgi.framework.BundleContext getBundleContext()
 
- 
setBundleContext
public static void setBundleContext(org.osgi.framework.BundleContext context)
 
- 
getFnDServiceUserSession
public static javax.jcr.Session getFnDServiceUserSession(SlingRepository repository) throws javax.jcr.LoginException, javax.jcr.RepositoryException
- Throws:
 javax.jcr.LoginExceptionjavax.jcr.RepositoryException
 
- 
getFnDServiceResolver
public static ResourceResolver getFnDServiceResolver(ResourceResolverFactory resolverFactory) throws LoginException
- Throws:
 LoginException
 
- 
reverseReplicate
public static void reverseReplicate(javax.jcr.Session session, java.lang.String path, ReplicationActionType replAction, Replicator replicator, java.lang.String[] outBoxIDs) throws FormsPortalException, javax.jcr.LoginException, ReplicationException- Throws:
 FormsPortalExceptionjavax.jcr.LoginExceptionReplicationException
 
- 
replicate
public static void replicate(javax.jcr.Session session, java.lang.String path, ReplicationActionType replAction, Replicator replicator) throws FormsPortalException, javax.jcr.LoginException, ReplicationException- Throws:
 FormsPortalExceptionjavax.jcr.LoginExceptionReplicationException
 
- 
getService
public static java.lang.Object getService(java.lang.Class<?> c, java.lang.String filter) throws java.lang.Exception- Throws:
 java.lang.Exception
 
- 
getRequestParamValue
public static java.lang.String getRequestParamValue(SlingHttpServletRequest req, java.lang.String param)
 
- 
createUrlFromParams
public static java.lang.String createUrlFromParams(java.lang.String url, java.util.Map<java.lang.String,java.lang.String> params) 
- 
updateAttachmentMap
public static JSONObject updateAttachmentMap(java.lang.String id, java.lang.String fileAttachmentMap, java.lang.String type)
This method updates the obselete map in case of draft/submission and pending Sign instances- Parameters:
 id-fileAttachmentMap-type-- Returns:
 - updated json map
 
 
- 
getGuideContainerPathFromFormPath
public static java.lang.String getGuideContainerPathFromFormPath(java.lang.String formPath)
 
- 
updatePropertiesOnNode
public static void updatePropertiesOnNode(java.util.Map<java.lang.String,java.lang.Object> propertiesMap, javax.jcr.Node node) throws javax.jcr.RepositoryException- Throws:
 javax.jcr.RepositoryException
 
- 
isDorAssociated
public static boolean isDorAssociated(java.lang.String formType, javax.jcr.Node metadataNode) throws java.lang.Exception- Throws:
 java.lang.Exception
 
- 
getAttachmentContentTypeKey
public static java.lang.String getAttachmentContentTypeKey(java.lang.String attachmentKey)
 
- 
convertJsonToMap
public static java.util.Map<java.lang.String,java.lang.Object> convertJsonToMap(JSONObject json) throws JSONException
- Throws:
 JSONException
 
- 
getSignConfigFromGuideContainer
public static java.lang.String getSignConfigFromGuideContainer(java.lang.String guideContainerPath, javax.jcr.Session session) throws javax.jcr.RepositoryException- Throws:
 javax.jcr.RepositoryException
 
- 
updateAttachmentListUrl
public static java.lang.StringBuffer updateAttachmentListUrl(java.lang.String[] attachmentUrlArray, java.lang.String type, java.lang.String currentId)The below method has been extracted out to fix the attachment url for draft,submission and Pending Sign, also handles and fixes url for the new instance submission- Parameters:
 attachmentUrlArray-type-currentId-- Returns:
 - updated new line seperated attachment list Buffer
 
 
- 
getArrayFromJsonArray
public static java.lang.String[] getArrayFromJsonArray(JSONArray jsonArray) throws JSONException
- Throws:
 JSONException
 
 - 
 
 -