This project has retired. For details please refer to its
Attic page.
VersionedReference xref
1
2
3
4
5
6 package org.apache.archiva.model;
7
8
9
10
11
12
13 @SuppressWarnings( "all" )
14 public class VersionedReference
15 implements java.io.Serializable
16 {
17
18
19
20
21
22
23
24
25
26
27 private String groupId;
28
29
30
31
32
33
34 private String artifactId;
35
36
37
38
39
40
41 private String version;
42
43
44
45
46
47
48
49
50
51
52
53 public String getArtifactId()
54 {
55 return this.artifactId;
56 }
57
58
59
60
61
62
63 public String getGroupId()
64 {
65 return this.groupId;
66 }
67
68
69
70
71
72
73 public String getVersion()
74 {
75 return this.version;
76 }
77
78
79
80
81
82
83 public void setArtifactId( String artifactId )
84 {
85 this.artifactId = artifactId;
86 }
87
88
89
90
91
92
93 public void setGroupId( String groupId )
94 {
95 this.groupId = groupId;
96 }
97
98
99
100
101
102
103 public void setVersion( String version )
104 {
105 this.version = version;
106 }
107
108
109 private static final long serialVersionUID = -6990353165677563113L;
110
111
112 private static String defaultString( String value )
113 {
114 if ( value == null )
115 {
116 return "";
117 }
118
119 return value.trim();
120 }
121
122 public static String toKey( VersionedReference reference )
123 {
124 StringBuilder key = new StringBuilder();
125
126 key.append( defaultString( reference.getGroupId() ) ).append( ":" );
127 key.append( defaultString( reference.getArtifactId() ) ).append( ":" );
128 key.append( defaultString( reference.getVersion() ) );
129
130 return key.toString();
131 }
132
133 }