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
InstanceServiceParameters.getAttributeRelations()
List and sets each attribute/relation to the entity instance. - If the
InstanceCreateParameters.getInstanceActivationType()
is set to BEFORE, the newly created instance is pushed as active instance - When the
InstanceServiceParameters.getAttributeRelations()
is empty it takes theInstanceServiceParameters.getAttributes()
List and sets each attribute to the entity instance. - When the
InstanceServiceParameters.getAttributeRelations()
is empty it takes theInstanceServiceParameters.getRelations()
List and sets each relation to the entity instance. - If the
InstanceCreateParameters.getInstanceActivationType()
is set to AFTER, the newly created instance is pushed as active instance
- Since:
- 9.6
- Author:
- Radu Batori
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Logger
protected String
getName()
getParametersObject
(IServiceContext context) Parse the parameters into a cacheable object.handle
(IServiceContext context) The handle method of the service is allowed to make changes to the interfaces passed along with the IServiceContext.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
getServiceNameLogPrefix, setAttributeRelations, setAttributes, setRelations
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
InstanceCreateService
public InstanceCreateService()
-
-
Method Details
-
handle
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. -
handle
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
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
- Specified by:
getLogger
in classInstanceServiceBase
- Returns:
- The Logger instance for the subclass.
-
getName
- Specified by:
getName
in classInstanceServiceBase
-