Class FormQuestionUDHelper
java.lang.Object
org.ametys.plugins.userdirectory.forms.FormQuestionUDHelper
- All Implemented Interfaces:
Component
,Serviceable
Helper for adding UD attributes to form questions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentTypeExtensionPoint
The content type extension pointprotected FormDAO
The form DAOprotected UserDirectoryHelper
The user directory helperstatic final String
The user info attributestatic final String
The content type attributestatic final String
The avalon role. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUDModelItems
(List<String> acceptedTypes) Get the list of model items for selecting a user directory attributegetUserContentAttributeValue
(FormQuestion question, UserIdentity user) Get user valuevoid
service
(ServiceManager manager)
-
Field Details
-
ROLE
The avalon role. -
ATTRIBUTE_USER_CONTENT_TYPE
The content type attribute- See Also:
-
ATTRIBUTE_UD_USER_ATTRIBUTE_NAME
The user info attribute- See Also:
-
_contentTypeEP
The content type extension point -
_udHelper
The user directory helper -
_formDAO
The form DAO
-
-
Constructor Details
-
FormQuestionUDHelper
public FormQuestionUDHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getUserContentAttributeValue
Get user value- Parameters:
question
- the questionuser
- the user- Returns:
- the user value.
null
if there is not user value
-
getUDModelItems
Get the list of model items for selecting a user directory attribute- Parameters:
acceptedTypes
- accepted stockage type of the attributes- Returns:
- the list of model items
-