/** {@inheritDoc} */ protected void processElementContent(XMLObject samlObject, String elementContent) { Action action = (Action) samlObject; action.setContents(elementContent); } }
/** {@inheritDoc} */ protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException { Action action = (Action) samlObject; if (action.getContents() != null) { XMLHelper.appendTextContent(domElement, action.getContents()); } } }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { Action action = (Action) samlElement; if (action.getNamespace() != null) { domElement.setAttributeNS(null, Action.NAMESPACEATTRIB_NAME, action.getNamespace()); } }
/** * Create an Action object * * @param actionBean of type SamlAction * @return an Action object */ @SuppressWarnings("unchecked") public static Action createSamlv1Action(ActionBean actionBean) { if (actionElementV1Builder == null) { actionElementV1Builder = (SAMLObjectBuilder<Action>) builderFactory.getBuilder(Action.DEFAULT_ELEMENT_NAME); } Action actionElement = actionElementV1Builder.buildObject(); actionElement.setNamespace(actionBean.getActionNamespace()); actionElement.setContents(actionBean.getContents()); return actionElement; }
/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { if (Action.NAMESPACEATTRIB_NAME.equals(attribute.getLocalName())) { Action action = (Action) samlObject; action.setNamespace(attribute.getValue()); } else { super.processAttribute(samlObject, attribute); } }
/** * Create an Action object * * @param actionBean of type SamlAction * @return an Action object */ @SuppressWarnings("unchecked") public static Action createSamlv1Action(ActionBean actionBean) { if (actionElementV1Builder == null) { actionElementV1Builder = (SAMLObjectBuilder<Action>) builderFactory.getBuilder(Action.DEFAULT_ELEMENT_NAME); } Action actionElement = actionElementV1Builder.buildObject(); actionElement.setNamespace(actionBean.getActionNamespace()); actionElement.setContents(actionBean.getContents()); return actionElement; }
/** {@inheritDoc} */ public void validate(Action action) throws ValidationException { if (DatatypeHelper.isEmpty(action.getContents())) { throw new ValidationException("Action label must be specified"); } } }