Package com.skava.helper
Class CommonUtil
java.lang.Object
com.skava.helper.CommonUtil
The Class SearchUtility. Provides validation methods.
- Since:
- 8.0
- Author:
- Infosys Equinox
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isValidId
(long id) Converts given values to appropriate ordinal valuesstatic boolean
isValidPageAndSize
(int page, int size) Checks whether the page and size are validstatic com.skava.core.ResponseModel
setResponseModel
(String responseCode, org.springframework.context.MessageSource messageSource) Delete Responsestatic String
Checks the collection description whether its non-empty and validstatic String
Checks the collection name whether its non-empty and validstatic void
validateLocale
(String locale) SkuId Validation
-
Field Details
-
INDEX_NUMBER
- See Also:
-
INDEX_STRING
- See Also:
-
-
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 requestsize
- 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
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
SkuId Validation- Parameters:
locale
- It contains locale of the item.
-
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.
-
setResponseModel
public static com.skava.core.ResponseModel setResponseModel(String responseCode, org.springframework.context.MessageSource messageSource) Delete Response- Parameters:
responseCode
-- Returns:
- returns the responseModel.
-