Class AmetysUserDataSource
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.question.computing.user.AbstractStaticUserDataSource
org.ametys.plugins.forms.question.computing.user.AmetysUserDataSource
- All Implemented Interfaces:
UserDataSource,LogEnabled,PluginAware,Configurable,Serviceable
Class for the ametys user data source
-
Field Summary
FieldsModifier and TypeFieldDescriptionMap of ModelItems specific to theAmetysUserDataSourceprotected UserManagerThe users managerstatic final StringThe user info attributestatic final StringName of email userInfoStaticEnumerator entrystatic final StringName of firstName userInfoStaticEnumerator entrystatic final StringName of fullname userInfoStaticEnumerator entrystatic final StringName of id userInfoStaticEnumerator entrystatic final StringName of lastName userInfoStaticEnumerator entryFields inherited from class org.ametys.plugins.forms.question.computing.user.AbstractStaticUserDataSource
_description, _formElementDefinitionHelper, _id, _label, _pluginName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String_getUserInfoValue(FormQuestion question, User user) Get user valuegetFieldToDisableIfFormPublished(FormQuestion question) Get field to disable if form is publishedGet the type model items If the return value is null there won't be any processing on the server sidegetStorageType(FormQuestion question) Get the storage type of the user data source valuegetValue(FormQuestion question, UserIdentity currentUser) Get the user data source valueGet the view items for the main tabvoidservice(ServiceManager manager) Methods inherited from class org.ametys.plugins.forms.question.computing.user.AbstractStaticUserDataSource
configure, getDescription, getId, getLabel, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ATTRIBUTE_USER_INFO
The user info attribute- See Also:
-
EMAIL_USER_VALUE
Name of email userInfoStaticEnumerator entry- See Also:
-
ID_USER_VALUE
Name of id userInfoStaticEnumerator entry- See Also:
-
FULLNAME_USER_VALUE
Name of fullname userInfoStaticEnumerator entry- See Also:
-
FIRSTNAME_USER_VALUE
Name of firstName userInfoStaticEnumerator entry- See Also:
-
LASTNAME_USER_VALUE
Name of lastName userInfoStaticEnumerator entry- See Also:
-
_ametysUserDataSourceModelItems
Map of ModelItems specific to theAmetysUserDataSource -
_userManager
The users manager
-
-
Constructor Details
-
AmetysUserDataSource
public AmetysUserDataSource()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractStaticUserDataSource- Throws:
ServiceException
-
getValue
Description copied from interface:UserDataSourceGet the user data source value- Parameters:
question- the questioncurrentUser- the current user- Returns:
- the user data source value.
-
_getUserInfoValue
Get user value- Parameters:
question- the questionuser- the user- Returns:
- the user value.
nullif there is not user value
-
getStorageType
Description copied from interface:UserDataSourceGet the storage type of the user data source value- Parameters:
question- the question- Returns:
- the storage type for the question
-
getModelItems
Description copied from interface:UserDataSourceGet the type model items If the return value is null there won't be any processing on the server side- Returns:
- a list of the model items
-
getViewElements
Description copied from interface:UserDataSourceGet the view items for the main tab- Returns:
- a list of view items
-
getFieldToDisableIfFormPublished
Description copied from interface:UserDataSourceGet field to disable if form is published- Specified by:
getFieldToDisableIfFormPublishedin interfaceUserDataSource- Overrides:
getFieldToDisableIfFormPublishedin classAbstractStaticUserDataSource- Parameters:
question- the question- Returns:
- the list of field name
-