Class BundledConstraint

java.lang.Object
com.apgar.common.lib.constraint.BundledConstraint
Direct Known Subclasses:
GreaterThanConstraint, MandatoryIfOtherFieldEmpty, MandatoryOnOtherFieldValueConstraint, MandatoryOnOtherFieldValueOtherwiseEmptyConstraint, NotMandatoryOnOtherFieldValueConstraint, UniquenessCheckWithConditionConstraintOnTable

public abstract class BundledConstraint extends Object
Class that allows the use of the messages of file Bundle.
Author:
APGAR Consulting
  • Constructor Details

    • BundledConstraint

      public BundledConstraint()
  • Method Details

    • createErrorUserMessage

      protected com.onwbp.base.text.UserMessageRef createErrorUserMessage(com.onwbp.base.text.Severity severity)
      Allows to create an error message using the defined messages in the error file bundle getErrorBundleBaseName()
      Parameters:
      severity - level of error message
      Returns:
      an object of type UserMessageRef containing the error messages
    • createErrorUserMessage

      protected com.onwbp.base.text.UserMessageRef createErrorUserMessage(com.onwbp.base.text.Severity severity, String... messageParameters)
      Allows to create an error message using the defined messages in the error file bundle getErrorBundleBaseName()
      Parameters:
      severity - level of error message
      messageParameters - message parameters
      Returns:
      an object of type UserMessageRef containing the error messages
    • createErrorUserMessage

      protected com.onwbp.base.text.UserMessageRef createErrorUserMessage(com.onwbp.base.text.Severity severity, String endPropertiesKey, String... messageParameters)
      Allows to create an error message using the defined messages in the error file bundle getErrorBundleBaseName()
      Parameters:
      severity - level of error message
      endPropertiesKey - end of key of the file
      messageParameters - message parameters
      Returns:
      an object of type UserMessageRef containing the error messages
    • createErrorUserMessage

      protected com.onwbp.base.text.UserMessageRef createErrorUserMessage(com.onwbp.base.text.Severity severity, String endPropertiesKey)
      Allows to create an error message using the defined messages in the error file bundle getErrorBundleBaseName()
      Parameters:
      severity - level of error message
      endPropertiesKey - end of key of the file
      Returns:
      an object of type UserMessageRef containing the error messages
    • createUserDocumentation

      public String createUserDocumentation(Locale locale) throws com.orchestranetworks.schema.InvalidSchemaException
      Creates user documentation
      Parameters:
      locale - Locale
      Returns:
      documentation String
      Throws:
      com.orchestranetworks.schema.InvalidSchemaException - Exception
    • createUserDocumentation

      public String createUserDocumentation(Locale locale, String... messageParameters) throws com.orchestranetworks.schema.InvalidSchemaException
      Creates user documentation
      Parameters:
      locale - Locale
      messageParameters - String...
      Returns:
      documentation String
      Throws:
      com.orchestranetworks.schema.InvalidSchemaException - Exception
    • createUserDocumentation

      public String createUserDocumentation(Locale locale, String endPropertiesKey, String... messageParameters) throws com.orchestranetworks.schema.InvalidSchemaException
      Creates user documentation
      Parameters:
      locale - Locale
      endPropertiesKey - String
      messageParameters - String...
      Returns:
      documentation String
      Throws:
      com.orchestranetworks.schema.InvalidSchemaException - Exception
    • createUserDocumentation

      public String createUserDocumentation(Locale locale, String endPropertiesKey) throws com.orchestranetworks.schema.InvalidSchemaException
      Creates user documentation
      Parameters:
      locale - Locale
      endPropertiesKey - String
      Returns:
      documentation String
      Throws:
      com.orchestranetworks.schema.InvalidSchemaException - Exception
    • getPropertiesBaseKey

      protected String getPropertiesBaseKey()
      Returns:
      the documentation key of the file bundle
    • getDocumentationBundleBaseName

      protected String getDocumentationBundleBaseName()
      Returns:
      the name of the file bundle containing the messages
    • getErrorBundleBaseName

      protected String getErrorBundleBaseName()
      Returns:
      the name of the file bundle containing the error messages