Package org.ametys.core.userpref
Class UserPreference
- java.lang.Object
-
- org.ametys.runtime.parameter.Parameter<ParameterHelper.ParameterType>
-
- org.ametys.core.userpref.UserPreference
-
- Direct Known Subclasses:
StaticUserPreferenceProvider.StaticUserPreference
public class UserPreference extends Parameter<ParameterHelper.ParameterType>
Definition of a user preference.
-
-
Field Summary
Fields Modifier and Type Field Description protected I18nizableText
_displayGroup
The display group.protected String
_managerRole
The manager role.protected boolean
_multiple
Indicates if the user preference is multiple.protected int
_order
The preference order.protected boolean
_private
The private status.
-
Constructor Summary
Constructors Constructor Description UserPreference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description I18nizableText
getDisplayGroup()
Get the display group.String
getManagerRole()
Get the storage manager role.int
getOrder()
Get the preference order.boolean
isMultiple()
Test if the preference is multiple-valued.boolean
isPrivate()
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 preferenceString
toString()
-
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 Detail
-
_displayGroup
protected I18nizableText _displayGroup
The display group.
-
_multiple
protected boolean _multiple
Indicates if the user preference is multiple.
-
_managerRole
protected String _managerRole
The manager role.
-
_order
protected int _order
The preference order.
-
_private
protected boolean _private
The private status.
-
-
Constructor Detail
-
UserPreference
public UserPreference()
-
-
Method Detail
-
getDisplayGroup
public I18nizableText getDisplayGroup()
Get the display group.- Returns:
- the display group.
-
setDisplayGroup
public void setDisplayGroup(I18nizableText displayGroup)
Set the parameter display group.- Parameters:
displayGroup
- the display group to set.
-
getManagerRole
public String getManagerRole()
Get the storage manager role.- Returns:
- the manager role. Can be null to use the default storage manager.
-
setManagerRole
public void setManagerRole(String managerRole)
Set the storage manager role.- Parameters:
managerRole
- the manager role to set. Can be null to use the default storage manager.
-
isMultiple
public boolean isMultiple()
Test if the preference is multiple-valued.- Returns:
- true if the preference is multiple-valued, false if the preference is single-valued.
-
setMultiple
public void setMultiple(boolean multiple)
Set if the preference is multiple-valued.- Parameters:
multiple
- true if the preference is multiple-valued, false if the preference is single-valued.
-
getOrder
public int getOrder()
Get the preference order.- Returns:
- the preference order.
-
setOrder
public void setOrder(int order)
Set the preference order.- Parameters:
order
- the preference order.
-
isPrivate
public boolean 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
public void setPrivate(boolean privateStatus)
Set the private status of the preference- Parameters:
privateStatus
- true if the preference is private, false if it is public.
-
-