Class UrlUtil

java.lang.Object
org.alfresco.util.UrlUtil

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

    • PATTERN

      public static final Pattern PATTERN
    • REPO_PATTERN

      public static final Pattern REPO_PATTERN
  • Constructor Details

    • UrlUtil

      public UrlUtil()
  • Method Details

    • 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)
    • 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
    • replaceAlfrescoUrlPlaceholder

      public static String replaceAlfrescoUrlPlaceholder(String value, SysAdminParams sysAdminParams)
    • buildUrl

      protected static String buildUrl(String protocol, String host, int port, String context)