Package com.skava.accounts.util
Class ContractsValidateUtil
java.lang.Object
com.skava.accounts.util.ContractsValidateUtil
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkIfStartDateIsGreaterThanEndDate
(long startDate, long endDate, String locale, org.springframework.context.MessageSource messageSource) check If Start Date Is Greater Than End Datestatic Object
isValidateAttributeValue
(String value, String validationData, AttributeFieldType dataType, org.springframework.context.MessageSource messageSource, String locale) Validate Attribute Valuestatic void
isValidateStartAndEndDate
(long startDate, long endDate, long accountId, String locale, AccountCommonServices accountCommonService, boolean update, ContractsEntity updateContractEntity) Checks if is validate start and end date.static void
validateMandatoryFieldsForPaymentMethod
(Contracts contract, org.springframework.context.MessageSource messageSource, String locale) static void
validateRequiredUpdateContractAttributes
(ContractRequestInternal request, AccountCommonServices accountCommonService) Validate Required update Contract Properties are available in the request
-
Constructor Details
-
ContractsValidateUtil
public ContractsValidateUtil()
-
-
Method Details
-
validateMandatoryFieldsForPaymentMethod
public static void validateMandatoryFieldsForPaymentMethod(Contracts contract, org.springframework.context.MessageSource messageSource, String locale) - Parameters:
contract
- the contract ObjectmessageSource
- the messageSourcelocale
- the locale
-
isValidateStartAndEndDate
public static void isValidateStartAndEndDate(long startDate, long endDate, long accountId, String locale, AccountCommonServices accountCommonService, boolean update, ContractsEntity updateContractEntity) Checks if is validate start and end date.- Parameters:
startDate
- the start dateendDate
- the end dateaccountId
- the unique identifier of an account.locale
- API Response and error messages will be responded in the locale mentioned in this parameter.accountCommonService
- the accountCommonServiceupdate
- the boolean value to check if the check is for update or create.updateContractEntity
- the object of typeContractsEntity
-
checkIfStartDateIsGreaterThanEndDate
public static void checkIfStartDateIsGreaterThanEndDate(long startDate, long endDate, String locale, org.springframework.context.MessageSource messageSource) check If Start Date Is Greater Than End Date- Parameters:
startDate
- the start dateendDate
- the end datelocale
- API Response and error messages will be responded in the locale mentioned in this parameter.messageSource
- the message source
-
isValidateAttributeValue
public static Object isValidateAttributeValue(String value, String validationData, AttributeFieldType dataType, org.springframework.context.MessageSource messageSource, String locale) Validate Attribute Value- Parameters:
value
- the value to validatevalidationData
- the validationDatadataType
- the AttributeFieldTypemessageSource
- the messageSourcelocale
- API Response and error messages will be responded in the locale mentioned in this parameter.- Returns:
- It returns Object
-
validateRequiredUpdateContractAttributes
public static void validateRequiredUpdateContractAttributes(ContractRequestInternal request, AccountCommonServices accountCommonService) Validate Required update Contract Properties are available in the request- Parameters:
request
- the ContractRequestInternalaccountCommonService
- the accountCommonService
-