|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.xml.content.CmsXmlContentErrorHandler
public class CmsXmlContentErrorHandler
Handler for issues found during XML content validation.
Constructor Summary | |
---|---|
CmsXmlContentErrorHandler()
Create a new instance of the validation handler. |
Method Summary | |
---|---|
void |
addError(I_CmsXmlContentValue value,
java.lang.String message)
Adds an error message to the internal list of errors, also raised the "has errors" flag. |
void |
addWarning(I_CmsXmlContentValue value,
java.lang.String message)
Adds an warning message to the internal list of errors, also raised the "has warning" flag. |
java.util.Map<java.util.Locale,java.util.Map<java.lang.String,java.lang.String>> |
getErrors()
Returns the map of validation errors. |
java.util.Map<java.lang.String,java.lang.String> |
getErrors(java.util.Locale locale)
Returns the Map of errors for the selected locale. |
java.util.Map<java.util.Locale,java.util.Map<java.lang.String,java.lang.String>> |
getWarnings()
Returns the map of validation warnings. |
java.util.Map<java.lang.String,java.lang.String> |
getWarnings(java.util.Locale locale)
Returns the Map of warnings for the selected locale. |
boolean |
hasErrors()
Returns true if the validated content had errors. |
boolean |
hasErrors(java.util.Locale locale)
Returns true if there is at last one error in the selected locale. |
boolean |
hasWarnings()
Returns true if the validated content has warnings. |
boolean |
hasWarnings(java.util.Locale locale)
Returns true if there is at last one warning in the selected locale. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsXmlContentErrorHandler()
Method Detail |
---|
public void addError(I_CmsXmlContentValue value, java.lang.String message)
value
- the value that contains the errormessage
- the error message to addpublic void addWarning(I_CmsXmlContentValue value, java.lang.String message)
value
- the value that contians the warningmessage
- the warning message to addpublic java.util.Map<java.util.Locale,java.util.Map<java.lang.String,java.lang.String>> getErrors()
The map contains further maps. The key of the "first" map is the
Locale
of the language where issues where found. The key of the "second" map
is a mapping from the element node name obtained with I_CmsXmlContentValue.getPath()
to the error message
which is a String.
public java.util.Map<java.lang.String,java.lang.String> getErrors(java.util.Locale locale)
locale
- the locale to get the errors for
public java.util.Map<java.util.Locale,java.util.Map<java.lang.String,java.lang.String>> getWarnings()
The map contains further maps. The key of the "first" map is the
Locale
of the language where issues where found. The key of the "second" map
is a mapping from the element node name obtained with I_CmsXmlContentValue.getPath()
to the error message
which is a String.
public java.util.Map<java.lang.String,java.lang.String> getWarnings(java.util.Locale locale)
locale
- the locale to get the warnings for
public boolean hasErrors()
public boolean hasErrors(java.util.Locale locale)
true
if there is at last one error in the selected locale.
locale
- the locale to check
true
if there is at last one error in the selected localepublic boolean hasWarnings()
public boolean hasWarnings(java.util.Locale locale)
true
if there is at last one warning in the selected locale.
locale
- the locale to check
true
if there is at last one warning in the selected locale
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |