Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/state/ArtifactAndFacet.java @ 377:1ffc09fec1c8 2.6
Added a method ArtifactAndFacet.setFacetDescription().
artifacts/trunk@4008 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 09 Feb 2012 15:53:03 +0000 |
parents | 33176e6e3c37 |
children | 71ff234713a6 |
comparison
equal
deleted
inserted
replaced
376:87c0393749f0 | 377:1ffc09fec1c8 |
---|---|
15 protected Artifact artifact; | 15 protected Artifact artifact; |
16 | 16 |
17 /** The (native) facet. */ | 17 /** The (native) facet. */ |
18 protected Facet facet; | 18 protected Facet facet; |
19 | 19 |
20 | 20 /** An alternative facet description that might be set from outside. */ |
21 protected String facetDescription; | |
22 | |
23 | |
21 /** Trivial constructor. */ | 24 /** Trivial constructor. */ |
22 public ArtifactAndFacet( | 25 public ArtifactAndFacet( |
23 Artifact a, | 26 Artifact a, |
24 Facet f | 27 Facet f |
25 ) { | 28 ) { |
70 public String getFacetName() { | 73 public String getFacetName() { |
71 return facet.getName(); | 74 return facet.getName(); |
72 } | 75 } |
73 | 76 |
74 | 77 |
75 /** Shortcut to facets name. */ | 78 /** |
79 * Returns the description for a facet. The return value depends on the | |
80 * internal <i>facetDescription</i> instance variable. If this has been set | |
81 * by setFacetDescription, this value is returned, otherwise the return | |
82 * value of facet.getDescription(). | |
83 */ | |
76 public String getFacetDescription() { | 84 public String getFacetDescription() { |
77 return facet.getDescription(); | 85 if (facetDescription == null) { |
86 return facet.getDescription(); | |
87 } | |
88 | |
89 return facetDescription; | |
90 } | |
91 | |
92 | |
93 public void setFacetDescription(String facetDescription) { | |
94 this.facetDescription = facetDescription; | |
78 } | 95 } |
79 } | 96 } |
80 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : | 97 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |