Package org.ametys.core.userpref
Class UserPreference
java.lang.Object
org.ametys.runtime.parameter.Parameter<ParameterHelper.ParameterType>
org.ametys.core.userpref.UserPreference
Definition of a user preference.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected I18nizableTextThe display group.protected StringThe manager role.protected booleanIndicates if the user preference is multiple.protected intThe preference order.protected booleanThe private status. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the display group.Get the storage manager role.intgetOrder()Get the preference order.booleanTest if the preference is multiple-valued.booleanGet whether the preference is private, i.e.voidsetDisplayGroup(I18nizableText displayGroup) Set the parameter display group.voidsetManagerRole(String managerRole) Set the storage manager role.voidsetMultiple(boolean multiple) Set if the preference is multiple-valued.voidsetOrder(int order) Set the preference order.voidsetPrivate(boolean privateStatus) Set the private status of the preferencetoString()Methods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
-
Field Details
-
_displayGroup
The display group. -
_multiple
Indicates if the user preference is multiple. -
_managerRole
The manager role. -
_order
The preference order. -
_private
The private status.
-
-
Constructor Details
-
UserPreference
public UserPreference()
-
-
Method Details
-
getDisplayGroup
Get the display group.- Returns:
- the display group.
-
setDisplayGroup
Set the parameter display group.- Parameters:
displayGroup- the display group to set.
-
getManagerRole
Get the storage manager role.- Returns:
- the manager role. Can be null to use the default storage manager.
-
setManagerRole
Set the storage manager role.- Parameters:
managerRole- the manager role to set. Can be null to use the default storage manager.
-
isMultiple
Test if the preference is multiple-valued.- Returns:
- true if the preference is multiple-valued, false if the preference is single-valued.
-
setMultiple
Set if the preference is multiple-valued.- Parameters:
multiple- true if the preference is multiple-valued, false if the preference is single-valued.
-
getOrder
Get the preference order.- Returns:
- the preference order.
-
setOrder
Set the preference order.- Parameters:
order- the preference order.
-
isPrivate
Get whether the preference is private, i.e. should not be visible by the regular user preferences interface.- Returns:
- true if the preference is private, false if it is public.
-
setPrivate
Set the private status of the preference- Parameters:
privateStatus- true if the preference is private, false if it is public.
-
toString
-