Maps a URL path pattern to an asset view within an asset type, used to route content delivery requests to the right view or to a new-instance form. The path pattern is a regular expression matched against the incoming request path. If it defines a "name" or "id" named group, the matched value is used to look up the asset by name or by ID; if newInstance is true, the mapping instead creates a new asset delivery resource using the default view rather than looking one up.

Group: Asset Types


Properties

PropertyReturnsDescription
defaultViewAssetViewThe view used to render the matched asset, or to render a new asset when newInstance is true. May be null.
newInstancebooleanWhether a matching request should create a new asset delivery resource using the default view, rather than looking up an existing asset by a named group in the path pattern. Defaults to false.
pathPatternStringThe regular expression matched against the request path, including any named groups (typically "name" or "id") used to look up the target asset. May be null if no pattern has been configured.
pathRegexPatternThe compiled regular expression for pathPattern, matching an empty pattern if none has been set. The pattern is compiled on first access and cached, so only the first call pays the compilation cost.

Methods

getPathPattern()

Returns: String

The regular expression matched against the request path, including any named groups (typically "name" or "id") used to look up the target asset. May be null if no pattern has been configured.

isNewInstance()

Returns: boolean

Whether a matching request should create a new asset delivery resource using the default view, rather than looking up an existing asset by a named group in the path pattern. Defaults to false.

getDefaultView()

Returns: AssetView

The view used to render the matched asset, or to render a new asset when newInstance is true. May be null.

getPathRegex()

Returns: Pattern

The compiled regular expression for pathPattern, matching an empty pattern if none has been set. The pattern is compiled on first access and cached, so only the first call pays the compilation cost.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.