Package org.mycore.user2
Class MCRUserAttributeMapper
java.lang.Object
org.mycore.user2.MCRUserAttributeMapper
This class is used to map attributes on
You can configure the mapping within
MCRUser
or MCRUserInformation
to annotated properties or methods.
You can configure the mapping within
realms.xml
like this:
<realms local="local">
...
<realm ...>
...
<attributeMapping>
<attribute name="userName" mapping="eduPersonPrincipalName" />
<attribute name="realName" mapping="displayName" />
<attribute name="eMail" mapping="mail" />
<attribute name="roles" mapping="eduPersonAffiliation" separator=","
converter="org.mycore.user2.utils.MCRRolesConverter">
<valueMapping name="employee">editor</valueMapping>
</attribute>
</attributeMapping>
...
</realm>
...
</realms>
- Author:
- René Adler (eagle)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a collection of mapped attribute names.static MCRUserAttributeMapper
boolean
mapAttributes
(Object object, Map<String, ?> attributes) Maps configured attributes toObject
.
-
Constructor Details
-
MCRUserAttributeMapper
public MCRUserAttributeMapper()
-
-
Method Details
-
instance
-
mapAttributes
Maps configured attributes toObject
. -
getAttributeNames
Returns a collection of mapped attribute names.- Returns:
- a collection of mapped attribute names
-