Mercurial > dive4elements > gnv-client
comparison gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java @ 38:fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
gnv/trunk@174 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 02 Oct 2009 09:10:36 +0000 |
parents | ad381cc47217 |
children | 23a4f196d7d6 |
comparison
equal
deleted
inserted
replaced
37:1ea46f542d07 | 38:fccf90761825 |
---|---|
51 * javax.servlet.http.HttpServletRequest, | 51 * javax.servlet.http.HttpServletRequest, |
52 * javax.servlet.http.HttpServletResponse) | 52 * javax.servlet.http.HttpServletResponse) |
53 */ | 53 */ |
54 @Override | 54 @Override |
55 public ActionForward execute(ActionMapping mapping, ActionForm form, | 55 public ActionForward execute(ActionMapping mapping, ActionForm form, |
56 HttpServletRequest request, HttpServletResponse response) | 56 HttpServletRequest request, |
57 throws Exception { | 57 HttpServletResponse response) throws Exception { |
58 try { | 58 try { |
59 log.debug("NextArtifactStepAction.execute"); | 59 log.debug("NextArtifactStepAction.execute"); |
60 SessionModel sm = SessionModelFactory.getInstance() | 60 SessionModel sm = SessionModelFactory.getInstance() |
61 .getSessionModel(request); | 61 .getSessionModel(request); |
62 ArtifactDescription ad = sm.getArtifactDescription(); | 62 ArtifactDescription ad = sm.getArtifactDescription(); |
73 } | 73 } |
74 } | 74 } |
75 ArtifactDatabaseClient adc = ArtifactDatabaseClientFactory | 75 ArtifactDatabaseClient adc = ArtifactDatabaseClientFactory |
76 .getInstance().getArtifactDatabaseClient(); | 76 .getInstance().getArtifactDatabaseClient(); |
77 if (ad.getReachableStates() != null | 77 if (ad.getReachableStates() != null |
78 && !ad.getReachableStates().isEmpty()) { | 78 && !ad.getReachableStates().isEmpty()) { |
79 // TODO: Woher kommt der zu erreichende Status; | 79 // TODO: Woher kommt der zu erreichende Status; |
80 String target = null; | 80 String target = null; |
81 if (ad.getReachableStates().size() > 1) { | 81 if (ad.getReachableStates().size() > 1) { |
82 target = request.getParameter("product"); // TODO HACK for | 82 target = request.getParameter("product"); // TODO HACK for |
83 // Propducts every | 83 // Propducts every |
84 // other Step has | 84 // other Step has |
85 // currently only | 85 // currently only |
86 // one reachable | 86 // one reachable |
87 // state. | 87 // state. |
88 } else { | 88 } else { |
89 target = ad.getReachableStates().iterator().next(); | 89 target = ad.getReachableStates().iterator().next(); |
90 } | 90 } |
91 | 91 |
92 ArtifactDescription artifactDescription = adc.doNextStep(sm | 92 ArtifactDescription artifactDescription = adc.doNextStep(sm |