public class OrgUnitEnumerator extends Object implements Enumerator<String>, Serviceable, Configurable, Enumerator
OrgUnits| Modifier and Type | Field and Description |
|---|---|
protected String |
_allOption
All option : 'disabled' to disable the 'all' option,
'blank' to use a blank value for 'all' option,
or 'concat' to concat all content types' ids for 'all' option
|
protected boolean |
_mandatory
True if a value must be selected, false to allow the empty value.
|
protected RootOrgUnitProvider |
_orgUnitProvider
The OrgUnit root provider
|
protected AmetysObjectResolver |
_resolver
The Ametys object resolver
|
| Constructor and Description |
|---|
OrgUnitEnumerator() |
| Modifier and Type | Method and Description |
|---|---|
private Map<String,I18nizableText> |
_getSubOrgUnits(OrgUnit orgUnit) |
void |
configure(Configuration configuration) |
Map<String,Object> |
getConfiguration()
Get the configuration of this enumerator
|
Map<Object,I18nizableText> |
getEntries()
Provides the enumerated values with their optional label.
|
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 smanager) |
protected AmetysObjectResolver _resolver
protected RootOrgUnitProvider _orgUnitProvider
protected boolean _mandatory
protected String _allOption
public OrgUnitEnumerator()
public void configure(Configuration configuration) throws ConfigurationException
configure in interface ConfigurableConfigurationExceptionpublic void service(ServiceManager smanager) throws ServiceException
service in interface ServiceableServiceExceptionpublic Map<Object,I18nizableText> getEntries() throws Exception
EnumeratorgetEntries in interface EnumeratorException - if an error occurs.public Map<String,I18nizableText> getTypedEntries() throws Exception
EnumeratorException - if an error occurs.
TODO NEWATTRIBUTEAPI: rename this method when Enumerator will be removedprivate Map<String,I18nizableText> _getSubOrgUnits(OrgUnit orgUnit)
public I18nizableText getEntry(String value) throws Exception
EnumeratorgetEntry in interface Enumeratorvalue - the value.null if not found.Exception - if an error occurs.public Map<String,Object> getConfiguration()
EnumeratorgetConfiguration in interface Enumerator