Class CommonUtil

java.lang.Object
com.skava.helper.CommonUtil

public final class CommonUtil extends Object
The Class SearchUtility. Provides validation methods.
Since:
8.0
Author:
Infosys Equinox
  • Field Details

  • Method Details

    • isValidPageAndSize

      public static boolean isValidPageAndSize(int page, int size)
      Checks whether the page and size are valid
      Parameters:
      page - Requested page no from the request
      size - Size of the page
      Returns:
      it returns boolean true/false
    • isValidId

      public static boolean isValidId(long id)
      Converts given values to appropriate ordinal values
      Parameters:
      id - identifier of the collection to be validated
      Returns:
      returns the boolean value
    • validateCollectionName

      public static String validateCollectionName(CollectionDataRequest request)
      Checks the collection name whether its non-empty and valid
      Parameters:
      request - for name of the collection to be validated
      Returns:
      returns the error code for validation.
    • validateLocale

      public static void validateLocale(String locale)
      SkuId Validation
      Parameters:
      locale - It contains locale of the item.
    • validateCollectionDescription

      public static String validateCollectionDescription(CollectionDataRequest request)
      Checks the collection description whether its non-empty and valid
      Parameters:
      request - description of the collection to be validated
      Returns:
      returns the error code for validation.
    • setResponseModel

      public static com.skava.core.ResponseModel setResponseModel(String responseCode, org.springframework.context.MessageSource messageSource)
      Delete Response
      Parameters:
      responseCode -
      Returns:
      returns the responseModel.