Package org.ametys.core.userpref
Class UserPreferencesEnumerator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.core.userpref.UserPreferencesEnumerator
- All Implemented Interfaces:
Enumerator<String>,Contextualizable,LogEnabled,Serviceable
- Direct Known Subclasses:
FOUserPreferencesEnumerator
public class UserPreferencesEnumerator
extends AbstractLogEnabled
implements Enumerator<String>, Contextualizable, Serviceable
Enumerates user preferences.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContextThe avalon contextprotected UserPreferencesExtensionPointThe user preferences extension point. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(Context context) Get the preferences context variables.Provides the enumerated values with their optional label.Retrieves a single label from a value.voidservice(ServiceManager serviceManager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.runtime.model.Enumerator
getConfiguration
-
Field Details
-
_userPrefEP
The user preferences extension point. -
_context
The avalon context
-
-
Constructor Details
-
UserPreferencesEnumerator
public UserPreferencesEnumerator()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getEntries
Description copied from interface:EnumeratorProvides the enumerated values with their optional label.- Specified by:
getEntriesin interfaceEnumerator<String>- Returns:
- the enumerated values and their label.
- Throws:
Exception- if an error occurs.
-
getEntry
Description copied from interface:EnumeratorRetrieves a single label from a value.- Specified by:
getEntryin interfaceEnumerator<String>- Parameters:
value- the value.- Returns:
- the label or
nullif not found. - Throws:
Exception- if an error occurs.
-
getContextVars
Get the preferences context variables.- Returns:
- the preferences context as a Map.
-