Package com.skava.service.impl
Class CreateCollectionServiceImpl
java.lang.Object
com.skava.service.impl.CreateCollectionServiceImpl
- All Implemented Interfaces:
com.skava.core.EcommService<Collection,
,CommonCollectionResponse> CreateCollectionService
@Service
@Transactional(propagation=REQUIRED,
readOnly=false,
noRollbackFor=java.lang.Exception.class)
public class CreateCollectionServiceImpl
extends Object
implements CreateCollectionService
This service class implements CreateCollectionService and handles the create collection service request, process
it and save the details in DB. It also implements business logic required to create collection.
- Author:
- Infosys Equinox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.skava.core.validation.ValidatorComponent>
This method is used to get the respective validator class for this create collection service.process
(Collection request) This method process the create collection service request.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.skava.core.EcommService
getValidateException, getValidator
-
Constructor Details
-
CreateCollectionServiceImpl
public CreateCollectionServiceImpl()default constructor.
-
-
Method Details
-
getValidator
This method is used to get the respective validator class for this create collection service.- Specified by:
getValidator
in interfacecom.skava.core.EcommService<Collection,
CommonCollectionResponse> - Returns:
- The list of
ValidatorComponent
object.
-
process
@SendEvent(eventType="userservice/collection/create", identifier="response_id") public CommonCollectionResponse process(Collection request) This method process the create collection service request. When a collection is created all the attributes defined will be carried as properties for that collection. Based on the default value and nullable properties the user values will be merged in the collection properties. All the business logic required for creating a collection is implemented in this method.- Specified by:
process
in interfacecom.skava.core.EcommService<Collection,
CommonCollectionResponse> - Parameters:
request
- HoldsCollection
object for collection creation. If collection properties is not present in collection attributes table, then the collection properties will be added in ignored properties.- Returns:
- The
CommonCollectionResponse
object which returns the success response code and message and if any validations fails, throws an validate exception.
-