Package com.skava.helper
Class SearchUtility
java.lang.Object
com.skava.helper.SearchUtility
Class SearchUtility
The Class SearchUtility. Provides validation methods.
- Since:
- 8.0
- Author:
- Infosys Equinox
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
filterForGuestUser
(String filters, String status) method filterForGuestUserstatic boolean
isCollectionId
(long id) method isCollectionIdstatic boolean
isValidId
(long id) method isValidIdstatic boolean
isValidPageAndSize
(int page, int size) method isValidPageAndSizestatic String
method validateCollectionDescriptionstatic String
method isValidCollectionNamestatic void
validateLocale
(String locale) method validateLocale
-
Field Details
-
INDEX_NUMBER
INDEX_NUMBER- See Also:
-
INDEX_STRING
INDEX_STRING- See Also:
-
-
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 requestsize
- 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
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
method validateLocale
SkuId Validation
- Parameters:
locale
- It contains locale of the item.
-
validateCollectionDescription
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
method filterForGuestUser
Add filter for the guest user
- Parameters:
filters
- It contains filters.status
- It contains status.
-