Class WorkflowEnumerator
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.ugc.enumerator.WorkflowEnumerator
-
- All Implemented Interfaces:
Enumerator<String>
,Contextualizable
,LogEnabled
,Serviceable
public class WorkflowEnumerator extends AbstractLogEnabled implements Enumerator<String>, Contextualizable, Serviceable
Enumerator
for workflow enumeration
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__PREFIX_FILE
protected Context
_context
The cocoon contextprotected SourceResolver
_srcResolver
the source resolverprotected WorkflowHelper
_workflowHelper
The workflow helper
-
Constructor Summary
Constructors Constructor Description WorkflowEnumerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Map<String,I18nizableText>
_getThemes()
protected Map<String,I18nizableText>
_getWorkflows()
Retrieves the workflows begin by 'workflow-ugc'void
contextualize(Context context)
I18nizableText
getEntry(String value)
Retrieves a single label from a value.Map<String,I18nizableText>
getTypedEntries()
Provides the enumerated values with their optional label.void
service(ServiceManager manager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.runtime.model.Enumerator
getConfiguration
-
-
-
-
Field Detail
-
__PREFIX_FILE
private static final String __PREFIX_FILE
- See Also:
- Constant Field Values
-
_srcResolver
protected SourceResolver _srcResolver
the source resolver
-
_workflowHelper
protected WorkflowHelper _workflowHelper
The workflow helper
-
-
Constructor Detail
-
WorkflowEnumerator
public WorkflowEnumerator()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getTypedEntries
public Map<String,I18nizableText> getTypedEntries() throws Exception
Description copied from interface:Enumerator
Provides the enumerated values with their optional label.- Specified by:
getTypedEntries
in interfaceEnumerator<String>
- Returns:
- the enumerated values and their label.
- Throws:
Exception
- if an error occurs. TODO NEWATTRIBUTEAPI: rename this method whenEnumerator
will be removed
-
getEntry
public I18nizableText getEntry(String value) throws Exception
Description copied from interface:Enumerator
Retrieves a single label from a value.- Specified by:
getEntry
in interfaceEnumerator<String>
- Parameters:
value
- the value.- Returns:
- the label or
null
if not found. - Throws:
Exception
- if an error occurs.
-
_getThemes
private Map<String,I18nizableText> _getThemes()
-
_getWorkflows
protected Map<String,I18nizableText> _getWorkflows()
Retrieves the workflows begin by 'workflow-ugc'- Returns:
- The map of workflows
-
-