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
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
appendSlash
(String path) int
createMapEntry
(String url, Resource resource, boolean trailingSlash) static MapEntry
createResolveEntry
(String url, Resource resource, boolean trailingSlash) static String
fixUriPath
(String uriPath) String[]
int
static String
Returns 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 String
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.
-
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
null
if the value does not match
-
getPattern
-
getRedirect
-
isInternal
public boolean isInternal() -
getStatus
public int getStatus() -
compareTo
- Specified by:
compareTo
in interfaceComparable<MapEntry>
-
toString
-