Class SearchUtility

java.lang.Object
com.skava.helper.SearchUtility

public final class SearchUtility extends Object

Class SearchUtility

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)

      method isValidPageAndSize

      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)

      method isValidId

      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)

      method isValidCollectionName

      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)

      method validateLocale

      SkuId Validation

      Parameters:
      locale - It contains locale of the item.
    • validateCollectionDescription

      public static String validateCollectionDescription(CollectionDataRequest request)

      method validateCollectionDescription

      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.
    • isCollectionId

      public static boolean isCollectionId(long id)

      method isCollectionId

      Converts given values to appropriate ordinal values

      Parameters:
      id - identifier of the collection to be validated
      Returns:
      returns the boolean value
    • filterForGuestUser

      public static String filterForGuestUser(String filters, String status)

      method filterForGuestUser

      Add filter for the guest user

      Parameters:
      filters - It contains filters.
      status - It contains status.