Mercurial > dive4elements > gnv-client
comparison gnv/src/main/java/de/intevation/gnv/action/FetchArtifactFactoriesAction.java @ 36:ad381cc47217
Format Code to max 80 Chars per Row
gnv/trunk@172 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 02 Oct 2009 08:54:13 +0000 |
parents | 25fdec8b4c69 |
children | fccf90761825 |
comparison
equal
deleted
inserted
replaced
35:4405f31bbc30 | 36:ad381cc47217 |
---|---|
18 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClientFactory; | 18 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClientFactory; |
19 import de.intevation.gnv.artifactdatabase.objects.ArtifactObject; | 19 import de.intevation.gnv.artifactdatabase.objects.ArtifactObject; |
20 | 20 |
21 /** | 21 /** |
22 * @author Tim Englich <tim.englich@intevation.de> | 22 * @author Tim Englich <tim.englich@intevation.de> |
23 * | 23 * |
24 */ | 24 */ |
25 public class FetchArtifactFactoriesAction extends ArtifactDatabaseActionBase{ | 25 public class FetchArtifactFactoriesAction extends ArtifactDatabaseActionBase { |
26 /** | 26 /** |
27 * the logger, used to log exceptions and additonaly information | 27 * the logger, used to log exceptions and additonaly information |
28 */ | 28 */ |
29 private static Logger log = Logger.getLogger(FetchArtifactFactoriesAction.class); | 29 private static Logger log = Logger |
30 .getLogger(FetchArtifactFactoriesAction.class); | |
30 | 31 |
31 public FetchArtifactFactoriesAction() { | 32 public FetchArtifactFactoriesAction() { |
32 super(); | 33 super(); |
33 } | 34 } |
34 | 35 |
35 /** | 36 /** |
36 * @see de.intevation.gnv.action.ArtifactDatabaseActionBase#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) | 37 * @see de.intevation.gnv.action.ArtifactDatabaseActionBase#execute(org.apache.struts.action.ActionMapping, |
38 * org.apache.struts.action.ActionForm, | |
39 * javax.servlet.http.HttpServletRequest, | |
40 * javax.servlet.http.HttpServletResponse) | |
37 */ | 41 */ |
38 @Override | 42 @Override |
39 public ActionForward execute(ActionMapping mapping, ActionForm form, | 43 public ActionForward execute(ActionMapping mapping, ActionForm form, |
40 HttpServletRequest request, HttpServletResponse response) | 44 HttpServletRequest request, HttpServletResponse response) |
41 throws Exception { | 45 throws Exception { |
42 log.debug("ArtifactDatabaseActionBase.execute"); | 46 log.debug("ArtifactDatabaseActionBase.execute"); |
43 try { | 47 try { |
44 Collection<ArtifactObject> artifactFactories = ArtifactDatabaseClientFactory.getInstance().getArtifactDatabaseClient().getArtifactFactories(); | 48 Collection<ArtifactObject> artifactFactories = ArtifactDatabaseClientFactory |
45 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); | 49 .getInstance().getArtifactDatabaseClient() |
50 .getArtifactFactories(); | |
51 SessionModel sm = SessionModelFactory.getInstance() | |
52 .getSessionModel(request); | |
46 sm.setArtifacteFactories(artifactFactories); | 53 sm.setArtifacteFactories(artifactFactories); |
47 return super.execute(mapping, form, request, response); | 54 return super.execute(mapping, form, request, response); |
48 } catch (Exception e) { | 55 } catch (Exception e) { |
49 log.error(e,e); | 56 log.error(e, e); |
50 request.setAttribute(CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID, e.getMessage()); | 57 request.setAttribute( |
58 CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID, e | |
59 .getMessage()); | |
51 return super.getExceptionForward(mapping); | 60 return super.getExceptionForward(mapping); |
52 } | 61 } |
53 } | 62 } |
54 } | 63 } |