Class ContentUserDataProvider
java.lang.Object
org.ametys.plugins.userdirectory.userdataprovider.ContentUserDataProvider
- All Implemented Interfaces:
UserDataProvider
,Prioritizable
,Supporter<String>
,Initializable
,Contextualizable
,Serviceable
public class ContentUserDataProvider
extends Object
implements UserDataProvider, Serviceable, Initializable, Contextualizable
A
UserDataProvider
that finds data from the ContentUser associated to the User or UserIdentity given-
Field Summary
FieldsFields inherited from interface org.ametys.core.user.dataprovider.UserDataProvider
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) int
Get the priority for the component.Get the value for a data and a userboolean
Check if the value is present for this uservoid
void
service
(ServiceManager manager) boolean
Check if an element is supported
-
Field Details
-
USER_CONTENT_IMAGE_PATH
Attribute path for user's image- See Also:
-
-
Constructor Details
-
ContentUserDataProvider
public ContentUserDataProvider()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getPriority
Description copied from interface:Prioritizable
Get the priority for the component. On components usingPrioritizable
interface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriority
in interfacePrioritizable
- Returns:
- the priority
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
supports
Description copied from interface:Supporter
Check if an element is supported -
hasValue
Description copied from interface:UserDataProvider
Check if the value is present for this user- Specified by:
hasValue
in interfaceUserDataProvider
- Parameters:
user
- The userdataId
- the data requested- Returns:
true
if the user has a value for this data,false
otherwise
-
getValue
Description copied from interface:UserDataProvider
Get the value for a data and a user- Specified by:
getValue
in interfaceUserDataProvider
- Parameters:
user
- TheUser
dataId
- The id of the data wanted- Returns:
- The value of the data for the user, can be null
-