Class MapEntry
java.lang.Object
org.apache.sling.resourceresolver.impl.mapping.MapEntry
- All Implemented Interfaces:
Comparable<MapEntry>
The
MapEntry class represents a mapping entry in the mapping
configuration tree at /etc/map.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringappendSlash(String path) intcreateMapEntry(String url, Resource resource, boolean trailingSlash) static MapEntrycreateResolveEntry(String url, Resource resource, boolean trailingSlash) static StringfixUriPath(String uriPath) String[]intstatic StringReturns a string used for matching map entries against the given request or URI parts.boolean@Nullable String[]Replaces the specified value according to the rules of this entrytoString()static StringConverts the resolution path of the form http/host.77/the/path into an URI of the form http://host:77/the/path where any potential default port (80 for http and 443 for https) is actually removed.
-
Constructor Details
-
MapEntry
-
-
Method Details
-
appendSlash
-
getURI
Returns a string used for matching map entries against the given request or URI parts.- Parameters:
scheme- The URI schemehost- The host nameport- The port number. If this is negative, the default value used is 80 unless the scheme is "https" in which case the default value is 443.path- The (absolute) path- Returns:
- The request path string {scheme}://{host}:{port}{path}.
-
fixUriPath
-
toURI
Converts the resolution path of the form http/host.77/the/path into an URI of the form http://host:77/the/path where any potential default port (80 for http and 443 for https) is actually removed. If the path is just a regular path such as /the/path, this method returnsnull.- Parameters:
uriPath- the uripath- Returns:
- the cleaned URI string
-
createResolveEntry
-
createMapEntry
-
replace
Replaces the specified value according to the rules of this entry- Parameters:
value- the value to replace- Returns:
- a replaced value of
nullif the value does not match
-
getPattern
-
getRedirect
-
isInternal
public boolean isInternal() -
getStatus
public int getStatus() -
compareTo
- Specified by:
compareToin interfaceComparable<MapEntry>
-
toString
-