This project has retired. For details please refer to its
Attic page.
ProjectReference xref
1
2
3
4
5
6 package org.apache.archiva.model;
7
8
9
10
11
12
13 @SuppressWarnings( "all" )
14 public class ProjectReference
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
42
43
44
45
46 public String getArtifactId()
47 {
48 return this.artifactId;
49 }
50
51
52
53
54
55
56 public String getGroupId()
57 {
58 return this.groupId;
59 }
60
61
62
63
64
65
66 public void setArtifactId( String artifactId )
67 {
68 this.artifactId = artifactId;
69 }
70
71
72
73
74
75
76 public void setGroupId( String groupId )
77 {
78 this.groupId = groupId;
79 }
80
81
82 private static final long serialVersionUID = 8947981859537138991L;
83
84
85 private static String defaultString( String value )
86 {
87 if ( value == null )
88 {
89 return "";
90 }
91
92 return value.trim();
93 }
94
95 public static String toKey( ProjectReference reference )
96 {
97 StringBuilder key = new StringBuilder();
98
99 key.append( defaultString( reference.getGroupId() ) ).append( ":" );
100 key.append( defaultString( reference.getArtifactId() ) );
101
102 return key.toString();
103 }
104
105 }