Package com.skava.accounts.util
Class CollectionUtil
java.lang.Object
com.skava.accounts.util.CollectionUtil
- All Implemented Interfaces:
Serializable
The utility class AccountsUtil consists of helper and validator methods for collection entity.
- Author:
- Infosys Equinox
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
createAccountTypeForThisCollection
(CollectionsEntity collectionEntity, AccountTypesRepository accountTypeRepository) This method is used to created Default accountypes for each newly created Collectionstatic void
createPaymentTermForThisCollection
(CollectionsEntity collectionEntity, PaymentTermRepository paymentTermRepository) This method is used to created Default paymentTerm for each newly created Collectionstatic Collections
getCollectionProperties
(Collections collection, List<Properties> requestProperties, Iterable<CollectionAttributesEntity> attributesEntities, Set<String> ignoredPropertiesList, String locale, org.springframework.context.MessageSource messageSource) Gets the collection properties.getPropertiesNameFromRequest
(List<Properties> requestProperties) Gets the properties name from request.static CollectionsEntity
updateCollectionProperties
(CollectionsEntity collectionEntity, CollectionsDO collectionDO, PropertiesRepository propertyRepository, CollectionsRepository collectionRepository)
-
Constructor Details
-
CollectionUtil
public CollectionUtil()
-
-
Method Details
-
createAccountTypeForThisCollection
public static void createAccountTypeForThisCollection(CollectionsEntity collectionEntity, AccountTypesRepository accountTypeRepository) This method is used to created Default accountypes for each newly created Collection- Parameters:
collectionEntity
- the collectionEntityaccountTypeRepository
- the accountTypeRepository
-
createPaymentTermForThisCollection
public static void createPaymentTermForThisCollection(CollectionsEntity collectionEntity, PaymentTermRepository paymentTermRepository) This method is used to created Default paymentTerm for each newly created Collection- Parameters:
collectionEntity
- the collectionEntitypaymentTermRepository
- the paymentTermRepository
-
getCollectionProperties
public static Collections getCollectionProperties(Collections collection, List<Properties> requestProperties, Iterable<CollectionAttributesEntity> attributesEntities, Set<String> ignoredPropertiesList, String locale, org.springframework.context.MessageSource messageSource) Gets the collection properties.- Parameters:
collection
- the collectionrequestProperties
- the request propertiesattributesEntities
- the attributes entitiesignoredPropertiesList
- the ignored properties listlocale
- API Response and error messages will be responded in the locale mentioned in this parameter.messageSource
- the message source- Returns:
- the collection properties
-
getPropertiesNameFromRequest
Gets the properties name from request.- Parameters:
requestProperties
- the request properties- Returns:
- the properties name from request
-
updateCollectionProperties
public static CollectionsEntity updateCollectionProperties(CollectionsEntity collectionEntity, CollectionsDO collectionDO, PropertiesRepository propertyRepository, CollectionsRepository collectionRepository)
-