|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.metadata.dom.AbstractXSLProcessingStage.StatusInfoAppendingErrorListener
public class AbstractXSLProcessingStage.StatusInfoAppendingErrorListener
Transformer ErrorListener that sets an ErrorStatus or WarningStatus on its
Item depending on the TransformerException message. If the message begins with
"[ERROR]" the remainder of the error message is used as the message for the added
ErrorStatus. If the message begins with "[WARN]" the remainder of the error message is used
as the message for the added WarningStatus. If the message begins with "[INFO]" the
remainder of the error message is used as the message for the added InfoStatus. If the message does not
begin with either prefix the exception is re-thrown to be handed by the Transformer.
This listener works well in conjunction with <xsl:message>
| Field Summary | |
|---|---|
static String |
ERROR_PREFIX
Prefix used by messages that result in an ErrorStatus. |
static String |
INFO_PREFIX
Prefix used by messages that result in an InfoStatus. |
private Item<?> |
item
Item to which the status info will be appended. |
static String |
WARN_PREFIX
Prefix used by messages that result in an WarningStatus. |
| Constructor Summary | |
|---|---|
AbstractXSLProcessingStage.StatusInfoAppendingErrorListener(Item<?> receivingItem)
Constructor. |
|
| Method Summary | |
|---|---|
void |
error(TransformerException e)
|
void |
fatalError(TransformerException e)
|
private void |
parseAndAppendStatusInfo(TransformerException e)
Parses the error message and appends the appropriate status info to the Item. |
void |
warning(TransformerException e)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ERROR_PREFIX
ErrorStatus.
public static final String WARN_PREFIX
WarningStatus.
public static final String INFO_PREFIX
InfoStatus.
private Item<?> item
| Constructor Detail |
|---|
public AbstractXSLProcessingStage.StatusInfoAppendingErrorListener(Item<?> receivingItem)
receivingItem - that Item to which the status info will be appended| Method Detail |
|---|
public void error(TransformerException e)
throws TransformerException
error in interface ErrorListenerTransformerException
public void fatalError(TransformerException e)
throws TransformerException
fatalError in interface ErrorListenerTransformerException
public void warning(TransformerException e)
throws TransformerException
warning in interface ErrorListenerTransformerException
private void parseAndAppendStatusInfo(TransformerException e)
throws TransformerException
e - the error to parse
TransformerException - thrown if the error does not contain the appropriate message prefix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||