public class SchemEditErrors
extends java.lang.Object
Constructor and Description |
---|
SchemEditErrors() |
Modifier and Type | Method and Description |
---|---|
static void |
addAnyTypeError(SchemEditActionErrors errors,
InputField field,
java.lang.String errorMsg)
Adds a feature to the AnyTypeError attribute of the SchemEditErrors class
|
static void |
addDuplicateUrlError(SchemEditActionErrors errors,
java.lang.String uniqueUrlPath,
java.lang.String msgKey)
Create a duplicateURL error(s) and attach to provided errors lsit
|
static void |
addDuplicateValueError(SchemEditActionErrors errors,
InputField inputField,
java.lang.String dupRecId)
Creates two ActionErrors signifying a duplicateValue error, one for the top
of page message, and one for the error message that is attached to a
specific field.
|
static void |
addEntityError(SchemEditActionErrors errors,
InputField field,
java.lang.String errorMsg)
Creates two ActionErrors, one for the top of page message, and one for the
error message that is attached to a specific field.
|
static void |
addError(SchemEditActionErrors errors,
InputField field,
java.lang.String msgKey)
Creates two ActionErrors, one for the top of page message, and one for the
error message that is attached to a specific field.
|
static void |
addError(SchemEditActionErrors errors,
java.lang.String fieldProperty,
java.lang.String msgKey,
java.lang.String elementName,
java.lang.String pathArg)
Creates two ActionErrors, one for the top of page message, and one for the
error message that is attached to a specific field.
|
static void |
addGenericError(SchemEditActionErrors errors,
java.lang.String xpath,
java.lang.String msg)
Creates two ActionErrors signifying a Generic error, one for the top of
page message, and one for the error message that is attached to a specific
field.
|
static void |
addInvalidUrlError(SchemEditActionErrors errors,
java.lang.String uniqueUrlPath,
java.lang.String msg)
Creates two ActionErrors signifying an invalidUrlError error, one for the
top of page message, and one for the error message that is attached to a
specific field.
|
static void |
addSimilarUrlError(SchemEditActionErrors errors,
java.lang.String uniqueUrlPath,
java.lang.String msgKey)
Creates two ActionErrors signifying a similarURL, one for the top of page
message, and one for the error message that is attached to a specific
field.
|
static void |
addUniqueUrlError(SchemEditActionErrors errors,
java.lang.String uniqueUrlPath,
java.lang.String msgKey,
java.lang.String msgProperty)
Creates two ActionErrors for a "nonUniqueUrl", one for the top of page
message, and one for the error message that is attached to a specific
field.
|
static void |
addXSDdatatypeError(SchemEditActionErrors errors,
InputField field,
java.lang.String msgKey,
java.lang.String errorMsg)
Adds errors in the case where an invalid value message has been supplied by
the XSDDataType validator.
|
public static void addError(SchemEditActionErrors errors, java.lang.String fieldProperty, java.lang.String msgKey, java.lang.String elementName, java.lang.String pathArg)
Example use: to notify of an element that could not be deleted. Here there is not a specific InputField involved, but rather an branch of the XML document (which is identified by xpath).
Note: both the pathArg and the path component of the fieldProperty contain xpaths that are encoded for jsp (e.g., the indexing notation is converted from "[1]" to "_1_".
errors
- ActionErrors object to which the new errors are addedfieldProperty
- The property to which this error is attached (e.g.,
"valueOf(/itemRecord/general/description_1_)")msgKey
- Reference to a message in the "ApplicationResources"elementName
- The feature to be added to the Error attributepathArg
- xpath (encoded for jsp) to the field in which the
error occurspublic static void addGenericError(SchemEditActionErrors errors, java.lang.String xpath, java.lang.String msg)
errors
- error list to which we addmsg
- error msg contentxpath
- The feature to be added to the GenericError attributepublic static void addInvalidUrlError(SchemEditActionErrors errors, java.lang.String uniqueUrlPath, java.lang.String msg)
errors
- error list to which we adduniqueUrlPath
- path of field that should contain uniqueUrlmsg
- error msg contentpublic static void addSimilarUrlError(SchemEditActionErrors errors, java.lang.String uniqueUrlPath, java.lang.String msgKey)
errors
- error list to which we addmsgKey
- msgKey to select message from applicationResourcesuniqueUrlPath
- path of field that should contain uniqueUrlpublic static void addDuplicateUrlError(SchemEditActionErrors errors, java.lang.String uniqueUrlPath, java.lang.String msgKey)
errors
- error list to which we addmsgKey
- msgKey to select message from applicationResourcesuniqueUrlPath
- path of field that should contain uniqueUrlpublic static void addDuplicateValueError(SchemEditActionErrors errors, InputField inputField, java.lang.String dupRecId)
errors
- the error list to which we addinputField
- the input field containing a dup valuedupRecId
- The Id of a record containing a dup valuepublic static void addUniqueUrlError(SchemEditActionErrors errors, java.lang.String uniqueUrlPath, java.lang.String msgKey, java.lang.String msgProperty)
errors
- error list to which we addmsgKey
- msgKey to select message from applicationResourcesuniqueUrlPath
- path of field that should contain uniqueUrlmsgProperty
- identifies the type of error and how it is displayed
in UIpublic static void addError(SchemEditActionErrors errors, InputField field, java.lang.String msgKey)
errors
- ActionErrors object to which the new errors are addedfield
- The InputField containing an errormsgKey
- Reference to a message in the "ApplicationResources"public static void addEntityError(SchemEditActionErrors errors, InputField field, java.lang.String errorMsg)
errors
- ActionErrors object to which the new errors are addedfield
- The InputField containing an errorerrorMsg
- The feature to be added to the EntityError attributepublic static void addAnyTypeError(SchemEditActionErrors errors, InputField field, java.lang.String errorMsg)
errors
- error list to which we addfield
- inputField that error message is attachederrorMsg
- The text of the error messagepublic static void addXSDdatatypeError(SchemEditActionErrors errors, InputField field, java.lang.String msgKey, java.lang.String errorMsg)
errors
- error list to which we addfield
- inputField that error message is attachedmsgKey
- msgKey to select message from applicationResourceserrorMsg
- The text of the error message