Mercurial > dive4elements > framework
comparison artifacts-common/src/main/java/org/dive4elements/artifacts/common/utils/ClientProtocolUtils.java @ 489:665613c35cab 3.0.7
Add newCreateDocument call that accepts targetOut parameter
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 31 May 2013 15:00:08 +0200 |
parents | 415df0fc4fa1 |
children |
comparison
equal
deleted
inserted
replaced
488:83ee2c6a53b6 | 489:665613c35cab |
---|---|
112 String factory, | 112 String factory, |
113 String uuid, | 113 String uuid, |
114 String ids, | 114 String ids, |
115 CreationFilter filter | 115 CreationFilter filter |
116 ) { | 116 ) { |
117 return newCreateDocument(factory, uuid, ids, filter, null); | |
118 } | |
119 | |
120 public static Document newCreateDocument( | |
121 String factory, | |
122 String uuid, | |
123 String ids, | |
124 CreationFilter filter, | |
125 String targetOut | |
126 ) { | |
117 Document doc = XMLUtils.newDocument(); | 127 Document doc = XMLUtils.newDocument(); |
118 | 128 |
119 XMLUtils.ElementCreator cr = new XMLUtils.ElementCreator( | 129 XMLUtils.ElementCreator cr = new XMLUtils.ElementCreator( |
120 doc, | 130 doc, |
121 ArtifactNamespaceContext.NAMESPACE_URI, | 131 ArtifactNamespaceContext.NAMESPACE_URI, |
143 action.appendChild(id); | 153 action.appendChild(id); |
144 } | 154 } |
145 | 155 |
146 if (filter != null) { | 156 if (filter != null) { |
147 action.appendChild(filter.toXML(cr)); | 157 action.appendChild(filter.toXML(cr)); |
158 } | |
159 | |
160 if (targetOut != null) { | |
161 Element to = cr.create("target_out"); | |
162 to.setAttribute("value", targetOut); | |
163 action.appendChild(to); | |
148 } | 164 } |
149 | 165 |
150 doc.appendChild(action); | 166 doc.appendChild(action); |
151 | 167 |
152 return doc; | 168 return doc; |