Class InstanceCreateService
- java.lang.Object
-
- com.aquima.interactions.framework.service.instance.InstanceServiceBase
-
- com.aquima.interactions.framework.service.instance.InstanceCreateService
-
- All Implemented Interfaces:
ICacheableParametersObjectService<InstanceCreateParameters>
,IService
public class InstanceCreateService extends InstanceServiceBase implements ICacheableParametersObjectService<InstanceCreateParameters>
AQ_Instance_Create implementation.It is responsible for the following:
- Creates an
IEntityInstance
of typeInstanceServiceParameters.getEntityName()
; - Takes the
InstanceServiceParameters.getAttributes()
List and sets each attribute to the entity instance; - Takes the
InstanceServiceParameters.getRelations()
List and sets each relation to the entity instance.
- Since:
- 9.6
- Author:
- Radu Batori
-
-
Constructor Summary
Constructors Constructor Description InstanceCreateService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Logger
getLogger()
InstanceCreateParameters
getParametersObject(IServiceContext context)
Parse the parameters into a cacheable object.IServiceResult
handle(IServiceContext context)
The handle method of the service is allowed to make changes to the interfaces passed along with the IServiceContext.IServiceResult
handle(IServiceContext context, InstanceCreateParameters parameters)
The handle method of the service is allowed to make changes to the interfaces passed along with the IServiceContext.-
Methods inherited from class com.aquima.interactions.framework.service.instance.InstanceServiceBase
setAttributeRelations, setAttributes, setRelations
-
-
-
-
Method Detail
-
handle
public IServiceResult handle(IServiceContext context) throws Exception
Description copied from interface:IService
The handle method of the service is allowed to make changes to the interfaces passed along with the IServiceContext. This means the service context is changed accordingly.- Specified by:
handle
in interfaceIService
- Parameters:
context
- the context in which the service is called and allowed to make changes.- Returns:
- The result of this service, may be null.
- Throws:
ServiceException
- When an expected exception occurs and the portal should display certain messages.Exception
- When an unexpected exception occurs and the portal should display a standard message.
-
handle
public IServiceResult handle(IServiceContext context, InstanceCreateParameters parameters)
Description copied from interface:ICacheableParametersObjectService
The handle method of the service is allowed to make changes to the interfaces passed along with the IServiceContext. This means the service context is changed accordingly.- Specified by:
handle
in interfaceICacheableParametersObjectService<InstanceCreateParameters>
- Parameters:
context
- the context in which the service is called and allowed to make changes.parameters
- cached object that contain parameters- Returns:
- The result of this service, may be null.
-
getParametersObject
public InstanceCreateParameters getParametersObject(IServiceContext context)
Description copied from interface:ICacheableParametersObjectService
Parse the parameters into a cacheable object. Do NOT parse expressions as these can change in other invocations of the handle- Specified by:
getParametersObject
in interfaceICacheableParametersObjectService<InstanceCreateParameters>
- Parameters:
context
- the context in which the service is called and allowed to make changes.- Returns:
- a cacheable object that is not null
-
getLogger
protected Logger getLogger()
- Specified by:
getLogger
in classInstanceServiceBase
- Returns:
- The Logger instance for the subclass.
-
-