Matches an asset interaction only while the asset is newly instantiated, ie created in memory but not yet persisted. Configured on an AssetViewMapping as the matcher for a view, so that view is used for the "create new" case and a different view applies once the asset has been saved. Persisted to XML under the alias "new-asset-matcher".

Group: Content

Implements: AssetInteractionMatcher


Properties

PropertyReturnsDescription
descriptionStringHuman-readable description of when this matcher applies, used when building the descriptive text for a view mapping (for example "... when Matches unsaved assets"). Always returns the fixed string "Matches unsaved assets" for this matcher.

Methods

isMatched(Asset asset)

Returns: boolean

Checks whether the given asset is still unsaved, by asking the AssetManager whether it is new.

ParameterDescription
assetthe asset the interaction applies to

getHrefSuffix(Asset asset)

Returns: String

Query string suffix to append to the asset's href for links to this view. Always null, because an unsaved asset needs no extra parameter to select it.

ParameterDescription
assetthe asset the interaction applies to (not used by this matcher)

getDescription()

Returns: String

Human-readable description of when this matcher applies, used when building the descriptive text for a view mapping (for example "... when Matches unsaved assets"). Always returns the fixed string "Matches unsaved assets" for this matcher.

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