Class ContentUserDataProvider
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.userdirectory.userdataprovider.ContentUserDataProvider
- All Implemented Interfaces:
UserDataProvider,LogEnabled,Prioritizable,Supporter<String>,Initializable,Contextualizable,Serviceable
public class ContentUserDataProvider
extends AbstractLogEnabled
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 TypeMethodDescriptionvoidcontextualize(Context context) intGet the priority for the component.Get the value for a data and a userbooleanCheck if the value is present for this uservoidvoidservice(ServiceManager manager) booleanCheck if an element is supportedMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
USER_CONTENT_IMAGE_PATH
Attribute path for user's image- See Also:
-
-
Constructor Details
-
ContentUserDataProvider
public ContentUserDataProvider()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
getPriority
Description copied from interface:PrioritizableGet the priority for the component. On components usingPrioritizableinterface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriorityin interfacePrioritizable- Returns:
- the priority
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
supports
Description copied from interface:SupporterCheck if an element is supported -
hasValue
Description copied from interface:UserDataProviderCheck if the value is present for this user- Specified by:
hasValuein interfaceUserDataProvider- Parameters:
user- The userdataId- the data requested- Returns:
trueif the user has a value for this data,falseotherwise
-
getValue
Description copied from interface:UserDataProviderGet the value for a data and a user- Specified by:
getValuein interfaceUserDataProvider- Parameters:
user- TheUserdataId- The id of the data wanted- Returns:
- The value of the data for the user, can be null
-