Package org.ametys.core.userpref
Class UserPreferencesExtensionPoint
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<UserPreferenceProvider>
org.ametys.core.userpref.UserPreferencesExtensionPoint
- All Implemented Interfaces:
LogEnabled,ExtensionPoint<UserPreferenceProvider>,Disposable,Initializable,Component,Contextualizable,Serviceable,ThreadSafe
public class UserPreferencesExtensionPoint
extends AbstractThreadSafeComponentExtensionPoint<UserPreferenceProvider>
Extension point holding all
UserPreference definitions.-
Field Summary
FieldsFields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCategorizedPreferences(Map<String, String> contextVars) Get all the preferences, classified by group and ordered.protected Map<I18nizableText,List<UserPreference>> getCategorizedPreferencesMap(Map<String, String> contextVars) Compute the grouped preferences map.protected Map<String,UserPreference> getPreferencesMap(Map<String, String> contextVars) Compute the preferences map.getUserPreference(Map<String, String> contextVars, String id) Get all the declared user preferences.getUserPreferences(Map<String, String> contextVars) Get all the declared user preferences.voidvoidvalidatePreferences(Map<String, String> contextVars, Map<String, String> values, UserPreferencesErrors errors) Validate preference values.Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, addExtension, contextualize, dispose, getExtension, getExtensionsIds, hasExtension, initializeExtensions, serviceMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role
-
-
Constructor Details
-
UserPreferencesExtensionPoint
public UserPreferencesExtensionPoint()
-
-
Method Details
-
initialize
- Specified by:
initializein interfaceInitializable- Overrides:
initializein classAbstractThreadSafeComponentExtensionPoint<UserPreferenceProvider>- Throws:
Exception
-
getUserPreference
Get all the declared user preferences.- Parameters:
contextVars- The context variables including environment elementsid- The preference id- Returns:
- the user preferences (read-only collection).
-
getUserPreferences
Get all the declared user preferences.- Parameters:
contextVars- The context variables including environment elements- Returns:
- the user preferences (read-only collection).
-
getCategorizedPreferences
public Map<I18nizableText,List<UserPreference>> getCategorizedPreferences(Map<String, String> contextVars) Get all the preferences, classified by group and ordered.- Parameters:
contextVars- The context variables including environment elements- Returns:
- the preferences classified by group and ordered.
-
validatePreferences
public void validatePreferences(Map<String, String> contextVars, Map<String, String> values, UserPreferencesErrors errors) Validate preference values.- Parameters:
contextVars- The context variables including environment elementsvalues- the values.errors- the errors object to fill in.
-
getPreferencesMap
Compute the preferences map.- Parameters:
contextVars- The context variables including environment elements- Returns:
- the preferences map.
-
getCategorizedPreferencesMap
protected Map<I18nizableText,List<UserPreference>> getCategorizedPreferencesMap(Map<String, String> contextVars) Compute the grouped preferences map.- Parameters:
contextVars- The context variables including environment elements- Returns:
- the grouped preferences map.
-