Package org.alfresco.util
Class UrlUtil
- java.lang.Object
-
- org.alfresco.util.UrlUtil
-
public class UrlUtil extends Object
Alfresco URL related utility functions.- Since:
- 3.5
-
-
Constructor Summary
Constructors Constructor Description UrlUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static StringbuildUrl(String protocol, String host, int port, String context)static StringgetAlfrescoUrl(SysAdminParams sysAdminParams)Builds up the Url to Alfresco based on the settings in theSysAdminParams.static StringgetShareUrl(SysAdminParams sysAdminParams)Builds up the Url to Share based on the settings in theSysAdminParams.static StringreplaceShareUrlPlaceholder(String value, SysAdminParams sysAdminParams)Replaces the share url placeholder, namely ${shareUrl}, with share url.
-
-
-
Field Detail
-
PATTERN
public static final Pattern PATTERN
-
-
Method Detail
-
getAlfrescoUrl
public static String getAlfrescoUrl(SysAdminParams sysAdminParams)
Builds up the Url to Alfresco based on the settings in theSysAdminParams.- 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 theSysAdminParams.- Returns:
- Alfresco Url such as https://col.ab.or.ate/share/ or http://localhost:8081/share/
-
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 placeholdersysAdminParams- theSysAdminParamsobject- Returns:
- if the given
valuecontains share url placeholder, the placeholder is replaced with share url; otherwise, the givenvalueis simply returned
-
-