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 form type:// 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 parsing XWiki.TagClass[0]#tags as a document reference, while {OBJECT_PROPERTY://XWiki.TagClass[0]#tags} will result in
parsing XWiki.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 & serializers of this
type should be used together.
- Since:
- 2.3M1
- Version:
- $Id: 987f0437e53195fccacf0e23ddb76b17cad5bf56 $
resolve
EntityReference resolve(String entityReferenceRepresentation,
EntityType type)
- Parameters:
entityReferenceRepresentation - representation of the entity, with or without a type (e.g. DOCUMENT://wiki:Space.Page or wiki:Space.WebHome)type - the default type to be used if none is specified in the serialization
- Returns:
- the resolved entity reference
Copyright © 2004-2013 XWiki. All Rights Reserved.