Get the absolute file path based on the rootFilepath.
The relative file path.
Absolute path of the file.
Determines the content type from the document identifier.
The input identifier.
The content-type provided with the request.
The content type of the document.
Gets the relative path as though the subdomain url is the base, and then prepends it with the subdomain.
Examples assuming http://test.com/ is the base url and www
the base subdomain:
Maps the given file path to a URL and determines its content type.
The input file path.
If the path corresponds to a file.
A ResourceLink with all the necessary metadata.
Maps the given container identifier to a file path, possibly making alterations to the direct translation.
The input identifier.
The direct translation of the identifier onto the file path.
A ResourceLink with all the necessary metadata.
Maps the given resource identifier / URL to a file path. Determines the content type if none was provided. For containers the content-type input is ignored.
The input identifier.
The content-type provided with the request.
A ResourceLink with all the necessary metadata.
Converts a relative path to a URL.
Examples assuming http://test.com/ is the base url and www
the base subdomain:
Helper function that removes the internal extension, one starting with $., from the given path. Nothing happens if no such extension is present.
Check if the given relative path is valid.
A relative path, as generated by getRelativePath.
A resource identifier.
Extends the functionality of an ExtensionBasedMapper to support identifiers containing subdomains. This is mostly only relevant in case you want to support multiple pods with subdomain identifiers in a single ResourceStore.
When converting to/from file paths, the subdomain is interpreted as a folder in the rootFilePath. The rest of the path is then interpreted relative to that folder. E.g.
http://alice.test.com/foo
results in the relative path/alice/foo
.In case there is no subdomain in the URL, the
baseSubdomain
parameter is used instead. E.g., if thebaseSubdomain
is "www",http://test.com/foo
would result in the relative path/www/foo
. This means that there is no identifier that maps to therootFilePath
itself. To prevent the possibility of 2 identifiers linking to the same file, identifiers containing the default subdomain are rejected. E.g.,http://www.test.com/foo
would result in a 403, even ifhttp://test.com/foo
exists.