Package org.xwiki.model.reference
Interface EntityReferenceResolver<T>
-
- Type Parameters:
T
- the object to resolve into an Entity Reference
@Role public interface EntityReferenceResolver<T>
Resolve an Entity reference defined in a given representation into a validatedEntityReference
object, ie with valid values and a valid hierarchy (eg a Document reference must have a parent which is a space reference, reference values must not be null, etc).- Since:
- 2.2M1
- Version:
- $Id: ddc62a5ec683a93d8af79329ed8639b2a44b914b $
-
-
Field Summary
Fields Modifier and Type Field Description static ParameterizedType
TYPE_REFERENCE
Type instance forEntityReferenceResolver<EntityReference>
.static ParameterizedType
TYPE_STRING
Type instance forEntityReferenceResolver<String>
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EntityReference
resolve(T entityReferenceRepresentation, EntityType type, Object... parameters)
-
-
-
Field Detail
-
TYPE_STRING
static final ParameterizedType TYPE_STRING
Type instance forEntityReferenceResolver<String>
.- Since:
- 4.0M1
-
TYPE_REFERENCE
static final ParameterizedType TYPE_REFERENCE
Type instance forEntityReferenceResolver<EntityReference>
.- Since:
- 4.0M1
-
-
Method Detail
-
resolve
EntityReference resolve(T entityReferenceRepresentation, EntityType type, Object... parameters)
- Parameters:
entityReferenceRepresentation
- the representation of an entity reference (eg as a String)type
- the type of the Entity (Document, Space, Attachment, Wiki, etc) to resolve out of the representation, since 14.8 it's possible to pass null if the resolver should extract the type from the representation itselfparameters
- optional parameters. Their meaning depends on the resolver implementation- Returns:
- the valid resolved reference as an Object
-
-