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 com.onwbp.base.text.UserMessageRefcreateErrorUserMessage(com.onwbp.base.text.Severity severity) Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()protected com.onwbp.base.text.UserMessageRefcreateErrorUserMessage(com.onwbp.base.text.Severity severity, String endPropertiesKey) Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()protected com.onwbp.base.text.UserMessageRefcreateErrorUserMessage(com.onwbp.base.text.Severity severity, String... messageParameters) Allows to create an error message using the defined messages in the error file bundlegetErrorBundleBaseName()protected com.onwbp.base.text.UserMessageRefcreateErrorUserMessage(com.onwbp.base.text.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
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 bundlegetErrorBundleBaseName()- Parameters:
severity- level of error message- Returns:
- an object of type
UserMessageRefcontaining 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 bundlegetErrorBundleBaseName()- Parameters:
severity- level of error messagemessageParameters- message parameters- Returns:
- an object of type
UserMessageRefcontaining 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 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
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 bundlegetErrorBundleBaseName()- Parameters:
severity- level of error messageendPropertiesKey- end of key of the file- Returns:
- an object of type
UserMessageRefcontaining 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- LocalemessageParameters- 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- LocaleendPropertiesKey- StringmessageParameters- 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- LocaleendPropertiesKey- String- Returns:
- documentation String
- Throws:
com.orchestranetworks.schema.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
-