Package org.ametys.web.site
Class SiteEnumerator
- java.lang.Object
-
- org.ametys.web.site.SiteEnumerator
-
- All Implemented Interfaces:
Enumerator
,Serviceable
public class SiteEnumerator extends Object implements Enumerator, Serviceable
Enumerates all sites. The code is the site name, the label is the site title.
-
-
Constructor Summary
Constructors Constructor Description SiteEnumerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Object,I18nizableText>
getEntries()
Provides the enumerated values with their optional label.I18nizableText
getEntry(String value)
Retrieves a single label from a value.void
service(ServiceManager manager)
-
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.parameter.Enumerator
getConfiguration
-
-
-
-
Constructor Detail
-
SiteEnumerator
public SiteEnumerator()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getEntries
public Map<Object,I18nizableText> getEntries() throws Exception
Description copied from interface:Enumerator
Provides the enumerated values with their optional label.- Specified by:
getEntries
in interfaceEnumerator
- Returns:
- the enumerated values and their label.
- Throws:
Exception
- if an error occurs.
-
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
- Parameters:
value
- the value.- Returns:
- the label or
null
if not found. - Throws:
Exception
- if an error occurs.
-
-