1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.saml1.core.impl;
18
19 import org.opensaml.common.impl.AbstractSAMLObjectMarshaller;
20 import org.opensaml.saml1.core.Action;
21 import org.opensaml.xml.XMLObject;
22 import org.opensaml.xml.io.MarshallingException;
23 import org.opensaml.xml.util.XMLHelper;
24 import org.w3c.dom.Element;
25
26
27
28
29 public class ActionMarshaller extends AbstractSAMLObjectMarshaller {
30
31
32 protected void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException {
33
34 Action action = (Action) samlElement;
35
36 if (action.getNamespace() != null) {
37 domElement.setAttributeNS(null, Action.NAMESPACEATTRIB_NAME, action.getNamespace());
38 }
39 }
40
41
42 protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException {
43 Action action = (Action) samlObject;
44
45 if (action.getContents() != null) {
46 XMLHelper.appendTextContent(domElement, action.getContents());
47 }
48 }
49 }