Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/utils/FLYSUtils.java @ 2017:e384d78ff78b
Cosmetics.
flys-artifacts/trunk@3472 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 20 Dec 2011 06:26:25 +0000 |
parents | 06c157848c8f |
children | 3ebbe497d7f7 |
comparison
equal
deleted
inserted
replaced
2016:796dfe96b6b2 | 2017:e384d78ff78b |
---|---|
63 | 63 |
64 private FLYSUtils() { | 64 private FLYSUtils() { |
65 } | 65 } |
66 | 66 |
67 | 67 |
68 /** | |
69 * Pulls Artifact with given UUID fromm database. | |
70 * @return FLYSArtifact with given UUID or null (in case of errors). | |
71 */ | |
68 public static FLYSArtifact getArtifact(String uuid, CallContext context) { | 72 public static FLYSArtifact getArtifact(String uuid, CallContext context) { |
69 try { | 73 try { |
70 Artifact artifact = context.getDatabase().getRawArtifact(uuid); | 74 Artifact artifact = context.getDatabase().getRawArtifact(uuid); |
71 | 75 |
72 if (artifact == null) { | 76 if (artifact == null) { |
81 | 85 |
82 return (FLYSArtifact) artifact; | 86 return (FLYSArtifact) artifact; |
83 } | 87 } |
84 // TODO: catch more selective | 88 // TODO: catch more selective |
85 catch (Exception e) { | 89 catch (Exception e) { |
86 logger.error("Cannot get FLYSArtifact " + uuid + " from database (" + e.getMessage() + ")."); | 90 logger.error("Cannot get FLYSArtifact " + uuid |
91 + " from database (" + e.getMessage() + ")."); | |
87 return null; | 92 return null; |
88 } | 93 } |
89 } | 94 } |
90 | 95 |
91 | 96 |