Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/FeedServiceImpl.java @ 1518:e8706fec0ee9
Added feedMany() implementation to feed-service.
flys-client/trunk@3671 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 13 Jan 2012 09:50:39 +0000 |
parents | bc06a671ef60 |
children | d0a9acddbea2 |
comparison
equal
deleted
inserted
replaced
1517:a9388fba0b46 | 1518:e8706fec0ee9 |
---|---|
1 package de.intevation.flys.client.server; | 1 package de.intevation.flys.client.server; |
2 | |
3 import java.util.ArrayList; | |
4 import java.util.List; | |
2 | 5 |
3 import org.w3c.dom.Document; | 6 import org.w3c.dom.Document; |
4 | 7 |
5 import org.apache.log4j.Logger; | 8 import org.apache.log4j.Logger; |
6 | 9 |
110 throw new ServerException(ERROR_FEED_DATA); | 113 throw new ServerException(ERROR_FEED_DATA); |
111 } | 114 } |
112 | 115 |
113 | 116 |
114 /** | 117 /** |
118 * Triggers FEED operation, many artifacts, same data item(s). | |
119 * | |
120 * @param artifacts Artifacts that shall be fed. | |
121 * @param data An array of Data objects that contain the information that | |
122 * are used for the FEED operation. | |
123 * | |
124 * @return a new artifact parsed from the description of FEED. | |
125 */ | |
126 public List<Artifact> feedMany( | |
127 String locale, | |
128 List<Artifact> artifacts, | |
129 Data[] data) | |
130 throws ServerException | |
131 { | |
132 logger.info("StepForwardServiceImpl.feedMany"); | |
133 | |
134 String url = getServletContext().getInitParameter("server-url"); | |
135 | |
136 List<Artifact> resultArtifacts = new ArrayList<Artifact>(); | |
137 | |
138 for (Artifact artifact: artifacts) { | |
139 logger.info("feedMany: Relay to StepForwardServiceImpl.feed"); | |
140 Artifact fedArtifact = feed(locale, artifact, data); | |
141 resultArtifacts.add(fedArtifact); | |
142 } | |
143 | |
144 return resultArtifacts; | |
145 } | |
146 | |
147 | |
148 /** | |
115 * This method creates an array of key/value pairs from an array of Data | 149 * This method creates an array of key/value pairs from an array of Data |
116 * objects. The string array is used as parameter for the feed() operation. | 150 * objects. The string array is used as parameter for the feed() operation. |
117 * | 151 * |
118 * @param data The data that should be transformed into the string array. | 152 * @param data The data that should be transformed into the string array. |
119 * | 153 * |