This project has retired. For details please refer to its
Attic page.
RepositoryGroup xref
1 package org.apache.archiva.admin.model.beans;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import javax.xml.bind.annotation.XmlRootElement;
22 import java.io.Serializable;
23 import java.util.ArrayList;
24 import java.util.List;
25
26
27
28
29
30 @XmlRootElement(name = "repositoryGroup")
31 public class RepositoryGroup
32 implements Serializable
33 {
34
35
36
37 private String id;
38
39
40
41
42 private List<String> repositories;
43
44
45
46
47 private String mergedIndexPath = "/.indexer";
48
49
50
51
52 private int mergedIndexTtl = 30;
53
54
55
56
57
58 private String cronExpression;
59
60 public RepositoryGroup()
61 {
62
63 }
64
65 public RepositoryGroup( String id, List<String> repositories )
66 {
67 this.id = id;
68 this.repositories = repositories;
69 }
70
71
72
73
74
75
76 public void addRepository( String string )
77 {
78 getRepositories().add( string );
79 }
80
81
82
83
84
85
86 public String getId()
87 {
88 return this.id;
89 }
90
91
92
93
94
95
96 public List<String> getRepositories()
97 {
98 if ( this.repositories == null )
99 {
100 this.repositories = new ArrayList<>( 0 );
101 }
102
103 return this.repositories;
104 }
105
106
107
108
109
110
111 public void removeRepository( String string )
112 {
113 getRepositories().remove( string );
114 }
115
116
117
118
119
120
121 public void setId( String id )
122 {
123 this.id = id;
124 }
125
126
127
128
129
130
131 public void setRepositories( List<String> repositories )
132 {
133 this.repositories = repositories;
134 }
135
136 public String getMergedIndexPath()
137 {
138 return mergedIndexPath;
139 }
140
141 public void setMergedIndexPath( String mergedIndexPath )
142 {
143 this.mergedIndexPath = mergedIndexPath;
144 }
145
146 public int getMergedIndexTtl() {
147 return mergedIndexTtl;
148 }
149
150
151
152
153
154
155 public void setMergedIndexTtl(int mergedIndexTtl) {
156 this.mergedIndexTtl = mergedIndexTtl;
157 }
158
159 public RepositoryGroup mergedIndexPath( String mergedIndexPath ) {
160 this.mergedIndexPath = mergedIndexPath;
161 return this;
162 }
163
164 public RepositoryGroup mergedIndexTtl( int mergedIndexTtl ) {
165 this.mergedIndexTtl = mergedIndexTtl;
166 return this;
167 }
168
169 public String getCronExpression()
170 {
171 return cronExpression;
172 }
173
174 public void setCronExpression( String cronExpression )
175 {
176 this.cronExpression = cronExpression;
177 }
178
179 public RepositoryGroup cronExpression( String mergedIndexCronExpression )
180 {
181 this.cronExpression = mergedIndexCronExpression;
182 return this;
183 }
184
185 @Override
186 public boolean equals( Object other )
187 {
188 if ( this == other )
189 {
190 return true;
191 }
192
193 if ( !( other instanceof RepositoryGroup ) )
194 {
195 return false;
196 }
197
198 RepositoryGroup that = (RepositoryGroup) other;
199 boolean result = true;
200 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
201 return result;
202 }
203
204 @Override
205 public int hashCode()
206 {
207 int result = 17;
208 result = 37 * result + ( id != null ? id.hashCode() : 0 );
209 return result;
210 }
211
212 @Override
213 public String toString()
214 {
215 final StringBuilder sb = new StringBuilder( "RepositoryGroup{" );
216 sb.append( "id='" ).append( id ).append( '\'' );
217 sb.append( ", repositories=" ).append( repositories );
218 sb.append( ", mergedIndexPath='" ).append( mergedIndexPath ).append( '\'' );
219 sb.append( ", mergedIndexTtl=" ).append( mergedIndexTtl );
220 sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
221 sb.append( '}' );
222 return sb.toString();
223 }
224 }