Package org.ametys.web.repository.page
Class ZoneItemManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.repository.page.ZoneItemManager
- All Implemented Interfaces:
LogEnabled
,Component
,Contextualizable
,Serviceable
public class ZoneItemManager
extends AbstractLogEnabled
implements Component, Serviceable, Contextualizable
Class containing callables to retrieve and configure service parameters
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_getServiceViewParametersValues
(ZoneItem zoneItem) Get the service view parameters valuesprotected Map<String,
List<I18nizableText>> _setParameterValues
(Map<String, Object> parameterValues, Service service, ModifiableZoneItem zoneItem) Set the parameter values for the service (with view parameters)Add the service to the given zone on given pagevoid
contextualize
(Context context) Edit the parameter values of the given servicegetServiceParameterDefinitions
(String serviceId, String pageId, String zoneItemId, String zoneName) Retrieves the parameter definitions of the given servicegetServiceParameterValues
(String zoneItemId, String serviceId) Get the service parameter valuesvoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role -
__SERVICE_PARAM_UNTOUCHED_BINARY
Constant for untouched binary metadata.- See Also:
-
-
Constructor Details
-
ZoneItemManager
public ZoneItemManager()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getServiceParameterDefinitions
public Map<String,Object> getServiceParameterDefinitions(String serviceId, String pageId, String zoneItemId, String zoneName) throws ProcessingException Retrieves the parameter definitions of the given service- Parameters:
serviceId
- Identifier of the servicepageId
- the page idzoneItemId
- the zone item idzoneName
- the zone name- Returns:
- the parameter definitions
- Throws:
ProcessingException
- if an error occurs
-
getServiceParameterValues
Get the service parameter values- Parameters:
zoneItemId
- the zone item idserviceId
- the service Id- Returns:
- the values
-
_getServiceViewParametersValues
Get the service view parameters values- Parameters:
zoneItem
- the zone item- Returns:
- the values
-
addService
public Map<String,Object> addService(String pageId, String zoneName, String serviceId, Map<String, Object> parameterValues) throws IOExceptionAdd the service to the given zone on given page- Parameters:
pageId
- The page identifierzoneName
- The zone nameserviceId
- The identifier of the service to addparameterValues
- the service parameter values. Can be empty- Returns:
- The result with the identifiers of updated page, zone and zone item
- Throws:
IOException
- if an error occurred while saving parameters
-
editServiceParameterValues
public Map<String,Object> editServiceParameterValues(String zoneItemId, String serviceId, Map<String, Object> parameterValues) throws IOExceptionEdit the parameter values of the given service- Parameters:
zoneItemId
- The identifier of the zone item holding the serviceserviceId
- The service identifierparameterValues
- the service parameter values to update- Returns:
- The result with the identifiers of updated page, zone and zone item
- Throws:
IOException
- if an error occurs while saving parameters
-
_setParameterValues
protected Map<String,List<I18nizableText>> _setParameterValues(Map<String, Object> parameterValues, Service service, ModifiableZoneItem zoneItem) Set the parameter values for the service (with view parameters)- Parameters:
parameterValues
- the parameter valuesservice
- the servicezoneItem
- the zone item- Returns:
- the map of error
-