Package org.xwiki.user
Interface UserReferenceSerializer<T>
-
- Type Parameters:
T
- the type into which to serialize the user reference (e.g. String)
@Role public interface UserReferenceSerializer<T>
Converts aUserReference
into a serialized form (e.g. into a String representation).- Since:
- 12.2
- Version:
- $Id: 14c2cd8c4056e036ab8c6b66bf93deca96a7d1ca $
-
-
Field Summary
Fields Modifier and Type Field Description static ParameterizedType
TYPE_DOCUMENT_REFERENCE
Type instance forUserReferenceSerializer<DocumentReference>
.static ParameterizedType
TYPE_STRING
Type instance forUserReferenceSerializer<String>
.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description T
serialize(UserReference userReference)
default T
serialize(UserReference userReference, Object... parameters)
-
-
-
Field Detail
-
TYPE_STRING
static final ParameterizedType TYPE_STRING
Type instance forUserReferenceSerializer<String>
.- Since:
- 14.1RC1
-
TYPE_DOCUMENT_REFERENCE
static final ParameterizedType TYPE_DOCUMENT_REFERENCE
Type instance forUserReferenceSerializer<DocumentReference>
.- Since:
- 14.1RC1
-
-
Method Detail
-
serialize
T serialize(UserReference userReference)
- Parameters:
userReference
- the user reference to serialize- Returns:
- the serialized representation
-
serialize
default T serialize(UserReference userReference, Object... parameters)
- Parameters:
userReference
- the user reference to serializeparameters
- optional parameters that have a meaning only for the specific serializer implementation used (for example a Document User Reference serializer might want to serialize the user reference relative to another entity reference passed as parameter)- Returns:
- the serialized representation
- Since:
- 14.1RC1
-
-