Class SurveyEnumerator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.survey.repository.SurveyEnumerator
- All Implemented Interfaces:
- Enumerator<String>,- Contextualizable,- LogEnabled,- Serviceable
public class SurveyEnumerator
extends AbstractLogEnabled
implements Enumerator<String>, Serviceable, Contextualizable
Enumerates existing surveys.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected AmetysObjectResolverThe ametys object resolver.protected SiteManagerThe site manager.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcontextualize(Context context) Retrieves a single label from a value.protected ModifiableTraversableAmetysObjectgetSurveyRootNode(String siteName, String lang) Get the root node for surveysProvides the enumerated values with their optional label.voidservice(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabledenableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.runtime.model.EnumeratorgetConfiguration
- 
Field Details- 
_resolverThe ametys object resolver.
- 
_siteManagerThe site manager.
 
- 
- 
Constructor Details- 
SurveyEnumeratorpublic SurveyEnumerator()
 
- 
- 
Method Details- 
contextualize- Specified by:
- contextualizein interface- Contextualizable
- Throws:
- ContextException
 
- 
service- Specified by:
- servicein interface- Serviceable
- Throws:
- ServiceException
 
- 
getTypedEntriesDescription copied from interface:EnumeratorProvides the enumerated values with their optional label.- Specified by:
- getTypedEntriesin interface- Enumerator<String>
- Returns:
- the enumerated values and their label.
- Throws:
- Exception- if an error occurs. TODO NEWATTRIBUTEAPI: rename this method when- Enumeratorwill be removed
 
- 
getEntryDescription copied from interface:EnumeratorRetrieves a single label from a value.- Specified by:
- getEntryin interface- Enumerator<String>
- Parameters:
- value- the value.
- Returns:
- the label or nullif not found.
- Throws:
- Exception- if an error occurs.
 
- 
getSurveyRootNodeprotected ModifiableTraversableAmetysObject getSurveyRootNode(String siteName, String lang) throws javax.jcr.RepositoryException Get the root node for surveys- Parameters:
- siteName- the site name
- lang- the language
- Returns:
- the root node
- Throws:
- javax.jcr.RepositoryException- if an error occurs when retrieving the root node of the survey
 
 
-