Class PortalUtils


  • public class PortalUtils
    extends java.lang.Object
    • Field Detail

      • attachment_Url_Prefix_List

        public static final java.util.List<java.lang.String> attachment_Url_Prefix_List
    • Constructor Detail

      • PortalUtils

        public PortalUtils()
    • 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.LoginException
        javax.jcr.RepositoryException
      • 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)
      • 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