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
Modifier and TypeFieldDescriptionprotected I18nizableText
The display group.protected String
The manager role.protected boolean
Indicates if the user preference is multiple.protected int
The preference order.protected boolean
The private status. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the display group.Get the storage manager role.int
getOrder()
Get the preference order.boolean
Test if the preference is multiple-valued.boolean
Get whether the preference is private, i.e.void
setDisplayGroup
(I18nizableText displayGroup) Set the parameter display group.void
setManagerRole
(String managerRole) Set the storage manager role.void
setMultiple
(boolean multiple) Set if the preference is multiple-valued.void
setOrder
(int order) Set the preference order.void
setPrivate
(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
-