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