comparison gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultArtifact.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultArtifact.java@821a02bbfb4e
children 172338b1407f
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
1 package org.dive4elements.river.client.shared.model;
2
3 import java.util.List;
4
5
6 /**
7 * The default implementation of an artifact that might be used in the client.
8 *
9 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
10 */
11 public class DefaultArtifact implements Artifact {
12
13 /** The artifact's uuid. */
14 protected String uuid;
15
16 /** The artifacts hash value. */
17 protected String hash;
18
19 /** Determines if the artifact is in background mode.*/
20 protected boolean inBackground;
21
22 protected List<CalculationMessage> messages;
23
24 /** The current artifact description. */
25 protected ArtifactDescription artifactDescription;
26
27 /**
28 * This constructor should not be used to create new instances of this
29 * class. An empty artifact without uuid and hash will be the result of
30 * this constructor call.
31 */
32 public DefaultArtifact() {
33 }
34
35
36 public DefaultArtifact(String uuid, String hash) {
37 this(uuid, hash, false, null);
38 }
39
40
41 /**
42 * This constructor creates a new artifact instance with a uuid and a hash.
43 *
44 * @param uuid The artifact's uuid.
45 * @param hash The artifact's hash.
46 */
47 public DefaultArtifact(
48 String uuid,
49 String hash,
50 boolean inBackground,
51 List<CalculationMessage> messages
52 ) {
53 this.uuid = uuid;
54 this.hash = hash;
55 this.inBackground = inBackground;
56 this.messages = messages;
57 }
58
59
60 public String getUuid() {
61 return uuid;
62 }
63
64
65 public String getHash() {
66 return hash;
67 }
68
69
70 public String getName() {
71 return "default";
72 }
73
74
75 public boolean isInBackground() {
76 return inBackground;
77 }
78
79
80 public List<CalculationMessage> getBackgroundMessages() {
81 return messages;
82 }
83
84
85 public ArtifactDescription getArtifactDescription() {
86 return artifactDescription;
87 }
88
89
90 public void setArtifactDescription(ArtifactDescription description) {
91 this.artifactDescription = description;
92 }
93 }
94 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org