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 Details

    • CreateCollectionServiceImpl

      public CreateCollectionServiceImpl()
      default constructor.
  • Method Details

    • getValidator

      public List<com.skava.core.validation.ValidatorComponent> getValidator()
      This method is used to get the respective validator class for this create collection service.
      Specified by:
      getValidator in interface com.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 interface com.skava.core.EcommService<Collection,CommonCollectionResponse>
      Parameters:
      request - Holds Collection 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.