public class StatusDetail extends Object
Constructor and Description |
---|
StatusDetail(List attributes)
Constructor that uses a
List of Attribute s
to define the status detail. |
StatusDetail(String encoded)
Constructor that takes the text-encoded form of the XML to use as
the status data.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Node |
getDetail()
Returns the StatusDetailType DOM root node.
|
String |
getEncoded()
Returns the text-encoded version of this data, if possible.
|
static StatusDetail |
getInstance(Node root)
Creates an instance of a
StatusDetail object based on
the given DOM root node. |
int |
hashCode() |
public StatusDetail(List attributes) throws IllegalArgumentException
List
of Attribute
s
to define the status detail. This is a common form of detail data,
and can be used for things like providing the information included
with the missing-attribute status code.attributes
- a List
of Attribute
sIllegalArgumentException
- if there is a problem encoding the
Attribute
spublic StatusDetail(String encoded) throws ParsingException
StatusDetail
XML tag, and the resulting text must
be valid XML or a ParsingException
will be thrown.encoded
- a non-null String
that encodes the
status detailParsingException
- if the encoded text is invalid XMLpublic static StatusDetail getInstance(Node root) throws ParsingException
StatusDetail
object based on
the given DOM root node. The node must be a valid StatusDetailType
root, or else a ParsingException
is thrown.root
- the DOM root of the StatusDetailType XML typeStatusDetail
objectParsingException
- if the root node is invalidpublic Node getDetail()
Attribute
s, which can be created from their
root DOM nodes using their getInstance
method.public String getEncoded() throws IllegalStateException
String
form constructor was used, this will just be the
original text wrapped with the StatusData tag. If the List
form constructor was used, it will be the encoded attribute data.
If this was created using the getInstance
method, then
getEncoded
will throw an exception.IllegalStateException
- if this object was created using the
getInstance
methodCopyright © 2023 JBoss by Red Hat. All rights reserved.