Class CollectionValidatorUtil

java.lang.Object
com.skava.util.CollectionValidatorUtil
All Implemented Interfaces:
Serializable

public class CollectionValidatorUtil extends Object implements Serializable
The utility class CollectionValidatorUtil consists of helper and validator methods for collection entity.
Author:
Infosys Equinox
See Also:
  • Constructor Details

    • CollectionValidatorUtil

      public CollectionValidatorUtil()
  • Method Details

    • validateDescription

      public static void validateDescription(Collection request, org.springframework.context.MessageSource messageSource)
      This method is used to check if the description exceeds a particular length.
      Parameters:
      request - Holds Collection object for checking description minimum and maximum length.
      messageSource - Holds MessageSource object for throwing the response message.
    • checkCollectionNameExists

      public static void checkCollectionNameExists(CollectionRepository collectionRepository, Collection collection, org.springframework.context.MessageSource messageSource, String locale)
      This method is used to check if a collection already exists for the given name.
      Parameters:
      collectionRepository - Holds CollectionRepository object for checking the collection name and businessid
      collection - Holds Collection object for checking collection name.
      messageSource - Holds MessageSource object for response code and message.
      locale - Indicate the locale object for response message.
    • filterCollectionProperties

      public static void filterCollectionProperties(Collection collection, String collectionAllowedProperties)
      filterCollectionProperties - This method is used to filter the collection properties based on the allowed properties.
      Parameters:
      collection - Holds Collection object for filtering the collection properties.
      collectionAllowedProperties - Holds the allowed properties for filtering the collection properties.