/** * Check that there is at least one Action element * @param statement the AuthorizationDecisionStatement under question * @throws ValidationException */ protected void validateActions(AuthorizationDecisionStatement statement) throws ValidationException { if (statement.getActions().size() == 0) { throw new ValidationException("No Action elements present"); } } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { AuthorizationDecisionStatement authorizationDecisionStatement; authorizationDecisionStatement = (AuthorizationDecisionStatement) parentSAMLObject; if (childSAMLObject instanceof Action) { authorizationDecisionStatement.getActions().add((Action) childSAMLObject); } else if (childSAMLObject instanceof Evidence) { authorizationDecisionStatement.setEvidence((Evidence) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
authDecision.getActions().add(actionElement);
authDecision.getActions().add(actionElement);