Class CommonProcess
The CommonProcess Class.
This class implements the interface CommonProcess
- Since:
- 2019-07-22
- Version:
- 8.4.0
- Author:
- Infosys Equinox
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.skava.core.auth.AuthTokenHandler
auth token handler - holds the infromation about the auth token.common components - holds the infromation about the commoncomponents.static final String
IS_PREVIOUS_OR_SKIPPEDstatic final String
VALIDATE_SUBSCRIPTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCollectionPropertyMap
(CollectionDomain collectionDomain) method getCollectionPropertyMapgetCollectionPropertyValue
(long collectionId, String key) method getCollectionPropertyValueboolean
isInstanceExists
(long instanceSeq, long subscriptionId) IsInstanceExistboolean
isPreviousOrderSkipped
(long collectionId, long subscriptionId) isPreviousOrderSkippedboolean
isPreviousOrderSkipped
(long collectionId, long subscriptionId, long id) isPreviousOrderSkippedboolean
isSubscriptionIntervalExists
(long subscriptionId) method isSubscriptionIntervalExistsvoid
reduceInterval
(long collectionId, long subscriptionId, String userId, String authToken) method reduceIntervalvalidateCollection
(long collectionId) Validate Colectionvoid
validateEditFreeze
(long collectionId, long subscriptionId) validateEditFreezevalidateInstance
(long collectionId, long subscriptionId, long id) Validates instancevalidateSubscription
(long subscriptionId, long collectionId) methodvalidateSubscriptionvalidateSubscription
(long subscriptionId, long collectionId, String userId) ValidationSubscriptionvalidateSubscriptionInterval
(long subscriptionId, long collectionId, String userId) validateSubscriptionIntervalvoid
validateUser
(SubscriptionEntity subscriptionEntity, String userId, long collectionId) Validate User
-
Field Details
-
commonComponents
common components - holds the infromation about the commoncomponents. -
authTokenHandler
@Autowired protected com.skava.core.auth.AuthTokenHandler authTokenHandlerauth token handler - holds the infromation about the auth token. -
VALIDATE_SUBSCRIPTION
VALIDATE_SUBSCRIPTION- See Also:
-
IS_PREVIOUS_OR_SKIPPED
IS_PREVIOUS_OR_SKIPPED- See Also:
-
-
Constructor Details
-
CommonProcess
public CommonProcess()
-
-
Method Details
-
validateCollection
Validate Colection
validateCollection validates the collection by it's id
- Parameters:
collectionId
- - holds the collection identifier- Returns:
- returns the {CollectionDomain} if collection is valid
-
validateSubscription
public SubscriptionDomain validateSubscription(long subscriptionId, long collectionId, String userId) ValidationSubscription
validateSubscription validates the subscription by it's id
- Parameters:
subscriptionId
- - Holds the information about the identifier of the subscription.collectionId
- - Holds the information about the collection.userId
- - Holds the information about the user.- Returns:
- SubscriptionDomain returns the {SubscriptionDomain} if subscription is validtion
-
validateUser
Validate User
validateUser validates the user by its id
- Parameters:
subscriptionEntity
- The Subscription EntityuserId
- The User IdentifiercollectionId
- The Collection Identifier
-
getCollectionPropertyValue
method getCollectionPropertyValue
holds the infromation about the ggetCollectionPropertyValue
- Parameters:
collectionId
- The collection id.key
- a string key to get collection property.- Returns:
String
value of the collection property.
-
getCollectionPropertyMap
public Map<String,CollectionPropertyEntity> getCollectionPropertyMap(CollectionDomain collectionDomain) method getCollectionPropertyMap
used to get the informaton about the colelctionProperty
- Parameters:
collectionDomain
- Used to get the information about the CollectionDOmain.- Returns:
- Map gives the output response in the form of Map.
-
isInstanceExists
public boolean isInstanceExists(long instanceSeq, long subscriptionId) IsInstanceExist
Validates the instance is exist or not.
- Parameters:
instanceSeq
- The instance sequence number.subscriptionId
- The subscription-id of the instance.- Returns:
- true while instance is exists, otherwise it will return false.
-
isSubscriptionIntervalExists
public boolean isSubscriptionIntervalExists(long subscriptionId) method isSubscriptionIntervalExists
used to validate whether SubscriptionIntervalExists
- Parameters:
subscriptionId
- Identifier of the subscription- Returns:
- boolean value
-
validateEditFreeze
public void validateEditFreeze(long collectionId, long subscriptionId) validateEditFreeze
Validates edit freeze date of the subscription order, throws error if edit freeze date crossed.
- Parameters:
collectionId
- Identifier of the collectionsubscriptionId
- Identifier of the subscription
-
validateSubscription
methodvalidateSubscription
validateSubscription validates the subscription by it's id
- Parameters:
subscriptionId
- The subscription id to be validated.collectionId
- The collection-id of the subscription.- Returns:
- returns the
SubscriptionEntity
if subscription is valid.
-
isPreviousOrderSkipped
public boolean isPreviousOrderSkipped(long collectionId, long subscriptionId, long id) isPreviousOrderSkipped
Validates and gives true if previous instance is skipped, otherwise it will return false
- Parameters:
collectionId
- The collection-id of the subscriptionid
- The identifier of the instancesubscriptionId
- the subscription-id of the instance- Returns:
- boolean value
-
isPreviousOrderSkipped
public boolean isPreviousOrderSkipped(long collectionId, long subscriptionId) isPreviousOrderSkipped
Validates and gives true if previous instance is skipped, otherwise it will return false
- Parameters:
collectionId
- The collection-id of the subscriptionsubscriptionId
- the subscription-id of the instance- Returns:
- boolean value
-
validateInstance
Validates instance
ised to validation for the instance
- Parameters:
collectionId
- The collection-id of the subscriptionid
- The identifier of the instancesubscriptionId
- the subscription-id of the instance- Returns:
InstanceEntity
-
validateSubscriptionInterval
public SubscriptionIntervalEntity validateSubscriptionInterval(long subscriptionId, long collectionId, String userId) validateSubscriptionInterval
used to validate the SubscriptionInterval
- Parameters:
subscriptionId
- the subscription-id of the instancecollectionId
- collectionuserId
- user info- Returns:
InstanceEntity
-
reduceInterval
method reduceInterval
method used to reduce the inyerval
Reduces the Subscription Interval
- Parameters:
collectionId
- The Collection IdsubscriptionId
- The Subscription IduserId
- user idauthToken
- authToken
-