Class ContractsValidateUtil

java.lang.Object
com.skava.accounts.util.ContractsValidateUtil
All Implemented Interfaces:
Serializable

public final class ContractsValidateUtil extends Object implements Serializable
See Also:
  • 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 Object
      messageSource - the messageSource
      locale - 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 date
      endDate - the end date
      accountId - the unique identifier of an account.
      locale - API Response and error messages will be responded in the locale mentioned in this parameter.
      accountCommonService - the accountCommonService
      update - the boolean value to check if the check is for update or create.
      updateContractEntity - the object of type ContractsEntity
    • 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 date
      endDate - the end date
      locale - 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 validate
      validationData - the validationData
      dataType - the AttributeFieldType
      messageSource - the messageSource
      locale - 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 ContractRequestInternal
      accountCommonService - the accountCommonService