Class UrlUtil


  • public class UrlUtil
    extends Object
    Alfresco URL related utility functions.
    Since:
    3.5
    • Field Detail

      • PATTERN

        public static final Pattern PATTERN
    • Constructor Detail

      • UrlUtil

        public UrlUtil()
    • Method Detail

      • getAlfrescoUrl

        public static String getAlfrescoUrl​(SysAdminParams sysAdminParams)
        Builds up the Url to Alfresco based on the settings in the SysAdminParams.
        Returns:
        Alfresco Url such as https://col.ab.or.ate/alfresco/ or http://localhost:8080/alfresco/
      • getShareUrl

        public static String getShareUrl​(SysAdminParams sysAdminParams)
        Builds up the Url to Share based on the settings in the SysAdminParams.
        Returns:
        Alfresco Url such as https://col.ab.or.ate/share/ or http://localhost:8081/share/
      • getApiExplorerUrl

        public static String getApiExplorerUrl​(SysAdminParams sysAdminParams,
                                               String requestURL,
                                               String requestURI)
        Builds URL to Api-Explorer based on the request only if the URL property is not provided SysAdminParams.
        Returns:
        Rest-Api Url such as https://col.ab.or.ate/api-explorer/ or http://localhost:8082/api-explorer/
      • replaceShareUrlPlaceholder

        public static String replaceShareUrlPlaceholder​(String value,
                                                        SysAdminParams sysAdminParams)
        Replaces the share url placeholder, namely ${shareUrl}, with share url.
        Parameters:
        value - the string value which contains the share url placeholder
        sysAdminParams - the SysAdminParams object
        Returns:
        if the given value contains share url placeholder, the placeholder is replaced with share url; otherwise, the given value is simply returned