Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java @ 325:3eff9241ea1e
Refactoring of the Transitionmodel.
Now each Transition is responsible to allocate the Data which is required to describe or feed it.
gnv-artifacts/trunk@390 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 01 Dec 2009 15:58:02 +0000 |
parents | 3e82b4f1c455 |
children | e964a3d8f7bc |
comparison
equal
deleted
inserted
replaced
324:e6e172a4915e | 325:3eff9241ea1e |
---|---|
89 "action/uuid/@value"); | 89 "action/uuid/@value"); |
90 String hash = Config.getStringXPath(target, | 90 String hash = Config.getStringXPath(target, |
91 "action/hash/@value"); | 91 "action/hash/@value"); |
92 this.productArtifact = this.current.getArtifactFactory() | 92 this.productArtifact = this.current.getArtifactFactory() |
93 .createArtifact(uuid, context); | 93 .createArtifact(uuid, context); |
94 | |
94 Document feedDocument = xmlUtilities.reInitDocument(this | 95 Document feedDocument = xmlUtilities.reInitDocument(this |
95 .createFeedProductArtifactDocument(uuid, hash)); | 96 .createFeedProductArtifactDocument(uuid, hash)); |
96 log.debug("Feed ==> " | 97 log.debug("Feed ==> " |
97 + this.xmlUtilities | 98 + this.xmlUtilities |
98 .writeDocument2String(feedDocument)); | 99 .writeDocument2String(feedDocument)); |
99 Document descibeDocument = xmlUtilities | |
100 .reInitDocument(this. | |
101 productArtifact. | |
102 describe(xmlUtilities. | |
103 reInitDocument(this. | |
104 createDescribeRequestBody(uuid, | |
105 hash, | |
106 false)), | |
107 context)); | |
108 log.debug("Descibe ==> " | |
109 + this.xmlUtilities | |
110 .writeDocument2String(descibeDocument)); | |
111 this.productArtifact.feed(feedDocument, context); | 100 this.productArtifact.feed(feedDocument, context); |
112 String targetName = Config.getStringXPath(descibeDocument, | 101 result = ((GNVArtifactBase)this.productArtifact).initialize(context); |
113 "result/reachable-states/state/@name"); | |
114 Document advanceDocument = xmlUtilities.reInitDocument(this | |
115 .createAdvanceProductArtifactDocument(uuid, hash, | |
116 targetName)); | |
117 log.debug("Advance ==> " | |
118 + this.xmlUtilities | |
119 .writeDocument2String(advanceDocument)); | |
120 result = this.productArtifact.advance(advanceDocument, context); | |
121 } else { | 102 } else { |
122 String msg = "Artifact is not configured properly. Call feed first."; | 103 String msg = "Artifact is not configured properly. Call feed first."; |
123 log.error(msg); | 104 log.error(msg); |
124 result = new ArtifactXMLUtilities().createExceptionReport(msg, | 105 result = new ArtifactXMLUtilities().createExceptionReport(msg, |
125 XMLUtils.newDocument()); | 106 XMLUtils.newDocument()); |