public class SurveyEnumerator extends AbstractLogEnabled implements Enumerator, Serviceable, Contextualizable
Modifier and Type | Field and Description |
---|---|
private Context |
_context |
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
protected SiteManager |
_siteManager
The site manager.
|
Constructor and Description |
---|
SurveyEnumerator() |
Modifier and Type | Method and Description |
---|---|
void |
contextualize(Context context) |
Map<Object,I18nizableText> |
getEntries()
Provides the enumerated values with their optional label.
|
I18nizableText |
getEntry(String value)
Retrieves a single label from a value.
|
protected ModifiableTraversableAmetysObject |
getSurveyRootNode(String siteName,
String lang)
Get the root node for surveys
|
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration
protected AmetysObjectResolver _resolver
protected SiteManager _siteManager
public SurveyEnumerator()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Map<Object,I18nizableText> getEntries() throws Exception
Enumerator
getEntries
in interface Enumerator
Exception
- if an error occurs.public I18nizableText getEntry(String value) throws Exception
Enumerator
getEntry
in interface Enumerator
value
- the value.null
if not found.Exception
- if an error occurs.protected ModifiableTraversableAmetysObject getSurveyRootNode(String siteName, String lang) throws RepositoryException
siteName
- the site namelang
- the languageRepositoryException
- if an error occurs when retrieving the root node of the survey