Class CurrentUserAutoFillSource
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.question.autofill.AbstractStaticAutoFillSource
org.ametys.plugins.forms.question.autofill.CurrentUserAutoFillSource
- All Implemented Interfaces:
AutofillSource
,LogEnabled
,PluginAware
,Configurable
,Serviceable
Class for using common User attributes as default value
-
Field Summary
FieldsModifier and TypeFieldDescriptionMap of ModelItems specific to DefaultStaticAutoFillSourcestatic final String
Constant for autofill attribute.static final String
Name of email autofillStaticEnumerator entrystatic final String
Name of firstName autofillStaticEnumerator entrystatic final String
Name of fullname autofillStaticEnumerator entrystatic final String
Name of id autofillStaticEnumerator entrystatic final String
Name of lastName autofillStaticEnumerator entryFields inherited from class org.ametys.plugins.forms.question.autofill.AbstractStaticAutoFillSource
_autoFillSourceExtensionPoint, _currentUserProvider, _description, _id, _label, _pluginName, _userManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAutofillValue
(FormQuestion question) Get autofill valueGet the type model items If the return value is null there won't be any processing on the server sideGet the view items for the main tabboolean
isCacheable
(FormQuestion question) Returntrue
if the question can be cacheable with this source.Methods inherited from class org.ametys.plugins.forms.question.autofill.AbstractStaticAutoFillSource
configure, getDescription, getId, getLabel, saxAdditionalInfos, service, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ATTRIBUTE_AUTOFILL
Constant for autofill attribute.- See Also:
-
EMAIL_AUTOFILL_VALUE
Name of email autofillStaticEnumerator entry- See Also:
-
ID_AUTOFILL_VALUE
Name of id autofillStaticEnumerator entry- See Also:
-
FULLNAME_AUTOFILL_VALUE
Name of fullname autofillStaticEnumerator entry- See Also:
-
FIRSTNAME_AUTOFILL_VALUE
Name of firstName autofillStaticEnumerator entry- See Also:
-
LASTNAME_AUTOFILL_VALUE
Name of lastName autofillStaticEnumerator entry- See Also:
-
_defaultAutoFillItems
Map of ModelItems specific to DefaultStaticAutoFillSource
-
-
Constructor Details
-
CurrentUserAutoFillSource
public CurrentUserAutoFillSource()
-
-
Method Details
-
getAutofillValue
Description copied from interface:AutofillSource
Get autofill value- Parameters:
question
- the question- Returns:
- the autofill value.
-
getModelItems
Description copied from interface:AutofillSource
Get 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:AutofillSource
Get the view items for the main tab- Returns:
- a list of view items
-
isCacheable
Description copied from interface:AutofillSource
Returntrue
if the question can be cacheable with this source.- Parameters:
question
- the question- Returns:
true
if the question can be cacheable.
-