public class MapServiceHelper extends AbstractLogEnabled implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
private CurrentUserProvider |
_currentUserProvider |
private ObservationManager |
_observationManager |
private AmetysObjectResolver |
_resolver |
private ServiceExtensionPoint |
_serviceExtensionPoint |
Constructor and Description |
---|
MapServiceHelper() |
Modifier and Type | Method and Description |
---|---|
private void |
_getAndSaveParameter(String prefix,
ServiceParameter param,
Map<String,Object> formValues,
ModifiableCompositeMetadata metadataHolder,
Map<String,Errors> allErrors) |
private void |
_setParameterValues(ModifiableCompositeMetadata serviceMetadata,
Service service,
Map<String,Object> values,
Map<String,Errors> allErrors) |
Map<String,Object> |
configureService(String serviceId,
String zoneItemId,
Map<String,Object> parameters)
Configure service
|
Map<String,Object> |
getServiceParameters(String zoneItemId)
Get values of service parameters
|
void |
service(ServiceManager manager) |
Map<String,Object> |
setService(String pageId,
String serviceId,
String zoneName,
Map<String,Object> parameters)
Set service
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private AmetysObjectResolver _resolver
private ServiceExtensionPoint _serviceExtensionPoint
private CurrentUserProvider _currentUserProvider
private ObservationManager _observationManager
public MapServiceHelper()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Map<String,Object> getServiceParameters(String zoneItemId)
zoneItemId
- The zone item idpublic Map<String,Object> setService(String pageId, String serviceId, String zoneName, Map<String,Object> parameters) throws IOException
pageId
- The page idserviceId
- The service idzoneName
- The name of zone of add service intoparameters
- the service parameters. Can be emptyIOException
- if an error occurred while saving parameterspublic Map<String,Object> configureService(String serviceId, String zoneItemId, Map<String,Object> parameters) throws IOException
serviceId
- The service idzoneItemId
- The id of aone item holding this serviceparameters
- the service parameters to updateIOException
- if an error occurred while saving parametersprivate void _setParameterValues(ModifiableCompositeMetadata serviceMetadata, Service service, Map<String,Object> values, Map<String,Errors> allErrors)
private void _getAndSaveParameter(String prefix, ServiceParameter param, Map<String,Object> formValues, ModifiableCompositeMetadata metadataHolder, Map<String,Errors> allErrors)