Package org.xwiki.annotation.reference
Interface TypedStringEntityReferenceResolver
-
@Role public interface TypedStringEntityReferenceResolver
Typed version of the entity reference resolver from string representations which gets its type from the string serialization, in the formtype://
and, if no such type specification is found, it uses the default passed type.
For example, something like:DOCUMENT://XWiki.TagClass[0]#tags
will result in parsingXWiki.TagClass[0]#tags
as a document reference, while {OBJECT_PROPERTY://XWiki.TagClass[0]#tags} will result in parsingXWiki.TagClass[0]#tags
as an object property reference.
Note that, although it roughly does the same thing, this is a different hierarchy than EntityReferenceResolver because it's a different strategy, different interpretation of the type parameter and resolvers and serializers of this type should be used together.- Since:
- 2.3M1
- Version:
- $Id: 4c96f30cee65ce7182abe75449e3ad8cff6e1a2d $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EntityReference
resolve(String entityReferenceRepresentation, EntityType type)
-
-
-
Method Detail
-
resolve
EntityReference resolve(String entityReferenceRepresentation, EntityType type)
- Parameters:
entityReferenceRepresentation
- representation of the entity, with or without a type (e.g.DOCUMENT://wiki:Space.Page
orwiki:Space.WebHome
)type
- the default type to be used if none is specified in the serialization- Returns:
- the resolved entity reference
-
-