// processing phase rules (order)
OMElement order_element = handler_element
.getFirstChildWithName(new QName(TAG_ORDER));
PhaseRule rules = handler.getRules();
if (order_element == null) {
if (containingPhase == null) {
// TODO : Include more information (which handler?) in message!
throw new DeploymentException((Messages.getMessage(
DeploymentErrorMsgs.INVALID_HANDLER, name_attribute.getAttributeValue(),
"phase rule has not been specified")));
}
rules.setPhaseName(containingPhase);
} else {
Iterator order_itr = order_element.getAllAttributes();
while (order_itr.hasNext()) {
OMAttribute orderAttribute = (OMAttribute) order_itr.next();
String name = orderAttribute.getQName().getLocalPart();
String value = orderAttribute.getAttributeValue();
if (TAG_AFTER.equals(name)) {
rules.setAfter(value);
} else if (TAG_BEFORE.equals(name)) {
rules.setBefore(value);
} else if (TAG_PHASE.equals(name)) {
rules.setPhaseName(value);
} else if (TAG_PHASE_FIRST.equals(name)) {
String boolval = getValue(value);
if (boolval.equals(BOOLEAN_TRUE)) {
rules.setPhaseFirst(true);
} else if (boolval.equals(BOOLEAN_FALSE)) {
rules.setPhaseFirst(false);
}
} else if (TAG_PHASE_LAST.equals(name)) {
String boolval = getValue(value);
if (boolval.equals(BOOLEAN_TRUE)) {
rules.setPhaseLast(true);
} else if (boolval.equals(BOOLEAN_FALSE)) {
rules.setPhaseLast(false);
}
}
}
Iterator parameters = handler_element