Class UrlUtil


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

      Fields 
      Modifier and Type Field Description
      static java.util.regex.Pattern PATTERN  
    • Constructor Summary

      Constructors 
      Constructor Description
      UrlUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String buildUrl​(java.lang.String protocol, java.lang.String host, int port, java.lang.String context)  
      static java.lang.String getAlfrescoUrl​(SysAdminParams sysAdminParams)
      Builds up the Url to Alfresco based on the settings in the SysAdminParams.
      static java.lang.String getShareUrl​(SysAdminParams sysAdminParams)
      Builds up the Url to Share based on the settings in the SysAdminParams.
      static java.lang.String replaceShareUrlPlaceholder​(java.lang.String value, SysAdminParams sysAdminParams)
      Replaces the share url placeholder, namely ${shareUrl}, with share url.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PATTERN

        public static final java.util.regex.Pattern PATTERN
    • Constructor Detail

      • UrlUtil

        public UrlUtil()
    • Method Detail

      • getAlfrescoUrl

        public static java.lang.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 java.lang.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/
      • replaceShareUrlPlaceholder

        public static java.lang.String replaceShareUrlPlaceholder​(java.lang.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
      • buildUrl

        protected static java.lang.String buildUrl​(java.lang.String protocol,
                                                   java.lang.String host,
                                                   int port,
                                                   java.lang.String context)