Package com.apgar.common.lib.constraint
Class BundledConstraint
java.lang.Object
com.apgar.common.lib.constraint.BundledConstraint
- Direct Known Subclasses:
GreaterThanConstraint,MandatoryIfOtherFieldEmpty,MandatoryOnOtherFieldValueConstraint,MandatoryOnOtherFieldValueOtherwiseEmptyConstraint,NotMandatoryOnOtherFieldValueConstraint,UniquenessCheckWithConditionConstraintOnTable
Class that allows the use of the messages of file Bundle.
- Author:
- APGAR Consulting
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected UserMessageRefcreateErrorUserMessage(Severity severity) Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()protected UserMessageRefcreateErrorUserMessage(Severity severity, String endPropertiesKey) Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()protected UserMessageRefcreateErrorUserMessage(Severity severity, String... messageParameters) Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()protected UserMessageRefcreateErrorUserMessage(Severity severity, String endPropertiesKey, String... messageParameters) Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()createUserDocumentation(Locale locale) Creates user documentationcreateUserDocumentation(Locale locale, String endPropertiesKey) Creates user documentationcreateUserDocumentation(Locale locale, String... messageParameters) Creates user documentationcreateUserDocumentation(Locale locale, String endPropertiesKey, String... messageParameters) Creates user documentationprotected Stringprotected Stringprotected String
-
Constructor Details
-
BundledConstraint
public BundledConstraint()
-
-
Method Details
-
createErrorUserMessage
Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()- Parameters:
severity- level of error message- Returns:
- an object of type
UserMessageRefcontaining the error messages
-
createErrorUserMessage
Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()- Parameters:
severity- level of error messagemessageParameters- message parameters- Returns:
- an object of type
UserMessageRefcontaining the error messages
-
createErrorUserMessage
protected UserMessageRef createErrorUserMessage(Severity severity, String endPropertiesKey, String... messageParameters) Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()- Parameters:
severity- level of error messageendPropertiesKey- end of key of the filemessageParameters- message parameters- Returns:
- an object of type
UserMessageRefcontaining the error messages
-
createErrorUserMessage
Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()- Parameters:
severity- level of error messageendPropertiesKey- end of key of the file- Returns:
- an object of type
UserMessageRefcontaining the error messages
-
createUserDocumentation
Creates user documentation- Parameters:
locale- Locale- Returns:
- documentation String
- Throws:
InvalidSchemaException- Exception
-
createUserDocumentation
public String createUserDocumentation(Locale locale, String... messageParameters) throws InvalidSchemaException Creates user documentation- Parameters:
locale- LocalemessageParameters- String...- Returns:
- documentation String
- Throws:
InvalidSchemaException- Exception
-
createUserDocumentation
public String createUserDocumentation(Locale locale, String endPropertiesKey, String... messageParameters) throws InvalidSchemaException Creates user documentation- Parameters:
locale- LocaleendPropertiesKey- StringmessageParameters- String...- Returns:
- documentation String
- Throws:
InvalidSchemaException- Exception
-
createUserDocumentation
public String createUserDocumentation(Locale locale, String endPropertiesKey) throws InvalidSchemaException Creates user documentation- Parameters:
locale- LocaleendPropertiesKey- String- Returns:
- documentation String
- Throws:
InvalidSchemaException- Exception
-
getPropertiesBaseKey
- Returns:
- the documentation key of the file bundle
-
getDocumentationBundleBaseName
- Returns:
- the name of the file bundle containing the messages
-
getErrorBundleBaseName
- Returns:
- the name of the file bundle containing the error messages
-