org.htmlcleaner.audit
Enum ErrorType

java.lang.Object
  extended by java.lang.Enum<ErrorType>
      extended by org.htmlcleaner.audit.ErrorType
All Implemented Interfaces:
Serializable, Comparable<ErrorType>

public enum ErrorType
extends Enum<ErrorType>

Possible error codes (read messages) that cleaner uses to inform clients about reasons/actions that modification involves.

Author:
Konstantin Burov (aectann@gmail.com)

Enum Constant Summary
Deprecated
          The tag was deprecated and current cleaner mode doesn't allows this.
FatalTagMissing
          Tag which existence is critical for the current is missing.
NotAllowedTag
          The tag wasn't found on list of allowed tags, thus it was removed.
RequiredParentMissing
          Missing parent tag was added for current (i.e.
UnclosedTag
          No matching close token was found for the open tag.
UniqueTagDuplicated
          Second instance of an unique tag was found, most likely it was removed.
Unknown
          The tag is unknown and current cleaner mode doesn't allows this.
UnpermittedChild
          This tag have bad child that shouldn't be here.
 
Method Summary
static ErrorType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ErrorType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FatalTagMissing

public static final ErrorType FatalTagMissing
Tag which existence is critical for the current is missing. Most likely, current tag was pruned. Unlike the RequiredParentMissing this reports the problem when cleaner removed the tag instead of creating as parent. See TagInfo for more detailed description of fatal and required tags.

Example:


NotAllowedTag

public static final ErrorType NotAllowedTag
The tag wasn't found on list of allowed tags, thus it was removed.


RequiredParentMissing

public static final ErrorType RequiredParentMissing
Missing parent tag was added for current (i.e. tbody for tr).


UnclosedTag

public static final ErrorType UnclosedTag
No matching close token was found for the open tag. Tag was closed automatically.

Example:

<p>Some text..

Unclosed <p> tag.


UniqueTagDuplicated

public static final ErrorType UniqueTagDuplicated
Second instance of an unique tag was found, most likely it was removed.

Example:

 <head>
    <title>Some text</title>
    <title>Some more text</title>
 </head>
 


Deprecated

public static final ErrorType Deprecated
The tag was deprecated and current cleaner mode doesn't allows this. The tag was removed.

Example:


UnpermittedChild

public static final ErrorType UnpermittedChild
This tag have bad child that shouldn't be here. Thus the tag is closed automatically to avoid such inclusion.

Example:

<p>Some text <table>...</table><p>

<table> is not allowed to be child of <p>, thus <p> is closed before the <table>


Unknown

public static final ErrorType Unknown
The tag is unknown and current cleaner mode doesn't allows this. The tag was removed.

Example:

Method Detail

values

public static ErrorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ErrorType c : ErrorType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ErrorType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2006-2014. All Rights Reserved.