Package com.skava.oms.util
Class CollectionUtil
java.lang.Object
com.skava.oms.service.EcommCoreServices
com.skava.oms.service.collection.CollectionHelperServices
com.skava.oms.util.CollectionUtil
The class checks for the collection attribute validations
- Since:
- 04-Oct-2018
- Author:
- Infosys Equinox
-
Field Summary
Fields inherited from class com.skava.oms.service.collection.CollectionHelperServices
authHelper, bpmService, collectionAssembler, collectionAttributeAssembler, collectionAttributeRepository, collectionPropertiesAssembler, collectionRepository
Fields inherited from class com.skava.oms.service.EcommCoreServices
context, messageSource, orderService, redissonClient, validator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CollectionProperties[]
checkCollectionProperties
(CollectionProperties[] collectionProperties, CollectionAttributeRepository collectionAttributeRepository) This method will check the collection properties length and the attribute nullable checkstatic CollectionProperties[]
checkCollectionProperty
(CollectionProperties[] collectionProperties, List<CollectionAttribute> collectionAttributes) The method checks for all the collection properties while creating the collectionstatic void
checkPatchCollectionProperty
(CollectionProperties[] collectionProperties, List<CollectionAttribute> collectionAttributes) This method check the collection properties one by onestatic void
checkPatchCollectionPropertyByPropertyName
(CollectionProperties property, List<CollectionAttribute> collectionAttributes) This method checks for the request of the updation of collection propertyboolean
getOrderMetricflag
(Collection collection) Methods inherited from class com.skava.oms.service.collection.CollectionHelperServices
checkForDuplicateName
Methods inherited from class com.skava.oms.service.EcommCoreServices
createOrderNotes, getItemIds, getItemIdsStr, updateOrderNotification
-
Constructor Details
-
CollectionUtil
public CollectionUtil()
-
-
Method Details
-
checkCollectionProperties
public static CollectionProperties[] checkCollectionProperties(CollectionProperties[] collectionProperties, CollectionAttributeRepository collectionAttributeRepository) This method will check the collection properties length and the attribute nullable check- Parameters:
collectionProperties
- - properties to be checkedcollectionAttributeRepository
- - contains the collection attribute repository for mongo operations- Returns:
- the collection properties Debug logger has been added to this method.
-
checkCollectionProperty
public static CollectionProperties[] checkCollectionProperty(CollectionProperties[] collectionProperties, List<CollectionAttribute> collectionAttributes) The method checks for all the collection properties while creating the collection- Parameters:
collectionProperties
- - properties to be checkedcollectionAttributes
- - contains the collection attribute repository for mongo operations- Returns:
- the collection properties Debug logger has been added to this method.
-
checkPatchCollectionProperty
public static void checkPatchCollectionProperty(CollectionProperties[] collectionProperties, List<CollectionAttribute> collectionAttributes) This method check the collection properties one by one- Parameters:
collectionProperties
- contains the properties in collectioncollectionAttributes
- contains the attributes defined
-
checkPatchCollectionPropertyByPropertyName
public static void checkPatchCollectionPropertyByPropertyName(CollectionProperties property, List<CollectionAttribute> collectionAttributes) This method checks for the request of the updation of collection property- Parameters:
property
- contains the property to be checkedcollectionAttributes
- contains the defoned attributes
-
getOrderMetricflag
- Parameters:
collection
-- Returns:
- boolean
-