This project has retired. For details please refer to its
Attic page.
ManagedRepository 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
22 import javax.xml.bind.annotation.XmlRootElement;
23 import java.io.Serializable;
24
25
26
27
28
29 @XmlRootElement (name = "managedRepository")
30 public class ManagedRepository
31 extends AbstractRepository
32 implements Serializable
33 {
34
35 private String location;
36
37 private boolean snapshots = false;
38
39 private boolean releases = true;
40
41 private boolean blockRedeployments = false;
42
43
44
45
46 private String cronExpression = "0 0 * * * ?";
47
48
49
50
51
52 private ManagedRepository stagingRepository;
53
54 private boolean scanned = true;
55
56
57
58
59
60 private int daysOlder = 100;
61
62
63
64
65 private int retentionCount = 2;
66
67 private boolean deleteReleasedSnapshots;
68
69 private boolean stageRepoNeeded;
70
71 private boolean resetStats;
72
73
74
75
76 private boolean skipPackedIndexCreation;
77
78 public ManagedRepository()
79 {
80
81 }
82
83 public ManagedRepository( String id, String name, String location, String layout, boolean snapshots,
84 boolean releases, boolean blockRedeployments, String cronExpression, String indexDir,
85 boolean scanned, int daysOlder, int retentionCount, boolean deleteReleasedSnapshots,
86 boolean stageRepoNeeded )
87 {
88 super( id, name, layout );
89
90 this.location = location;
91 this.snapshots = snapshots;
92 this.releases = releases;
93 this.blockRedeployments = blockRedeployments;
94 this.setCronExpression( cronExpression );
95 this.setIndexDirectory( indexDir );
96 this.scanned = scanned;
97 this.daysOlder = daysOlder;
98 this.retentionCount = retentionCount;
99 this.deleteReleasedSnapshots = deleteReleasedSnapshots;
100 this.stageRepoNeeded = stageRepoNeeded;
101 }
102
103
104
105
106 public ManagedRepository( String id, String name, String location, String layout, boolean snapshots,
107 boolean releases, boolean blockRedeployments, String cronExpression, String indexDir,
108 boolean scanned, int daysOlder, int retentionCount, boolean deleteReleasedSnapshots,
109 boolean stageRepoNeeded, String description, boolean skipPackedIndexCreation )
110 {
111 this( id, name, location, layout, snapshots, releases, blockRedeployments, cronExpression, indexDir, scanned,
112 daysOlder, retentionCount, deleteReleasedSnapshots, stageRepoNeeded );
113 setDescription( description );
114 setSkipPackedIndexCreation( skipPackedIndexCreation );
115 }
116
117 public String getCronExpression()
118 {
119 return cronExpression;
120 }
121
122 public void setCronExpression( String cronExpression )
123 {
124 this.cronExpression = cronExpression;
125 }
126
127 public String getLocation()
128 {
129 return this.location;
130 }
131
132
133 public boolean isReleases()
134 {
135 return this.releases;
136 }
137
138
139
140
141 public boolean isSnapshots()
142 {
143 return this.snapshots;
144 }
145
146
147 public void setReleases( boolean releases )
148 {
149 this.releases = releases;
150 }
151
152 public void setSnapshots( boolean snapshots )
153 {
154 this.snapshots = snapshots;
155 }
156
157 public void setLocation( String location )
158 {
159 this.location = location;
160 }
161
162 public boolean isBlockRedeployments()
163 {
164 return blockRedeployments;
165 }
166
167 public void setBlockRedeployments( boolean blockRedeployments )
168 {
169 this.blockRedeployments = blockRedeployments;
170 }
171
172
173 public ManagedRepository getStagingRepository()
174 {
175 return stagingRepository;
176 }
177
178
179 public void setStagingRepository( ManagedRepository stagingRepository )
180 {
181 this.stagingRepository = stagingRepository;
182 }
183
184 public boolean isScanned()
185 {
186 return scanned;
187 }
188
189 public void setScanned( boolean scanned )
190 {
191 this.scanned = scanned;
192 }
193
194
195 public int getDaysOlder()
196 {
197 return daysOlder;
198 }
199
200 public void setDaysOlder( int daysOlder )
201 {
202 this.daysOlder = daysOlder;
203 }
204
205 public int getRetentionCount()
206 {
207 return retentionCount;
208 }
209
210 public void setRetentionCount( int retentionCount )
211 {
212 this.retentionCount = retentionCount;
213 }
214
215 public boolean isDeleteReleasedSnapshots()
216 {
217 return deleteReleasedSnapshots;
218 }
219
220 public void setDeleteReleasedSnapshots( boolean deleteReleasedSnapshots )
221 {
222 this.deleteReleasedSnapshots = deleteReleasedSnapshots;
223 }
224
225 public boolean isStageRepoNeeded()
226 {
227 return stageRepoNeeded;
228 }
229
230 public void setStageRepoNeeded( boolean stageRepoNeeded )
231 {
232 this.stageRepoNeeded = stageRepoNeeded;
233 }
234
235 public boolean isResetStats()
236 {
237 return resetStats;
238 }
239
240 public void setResetStats( boolean resetStats )
241 {
242 this.resetStats = resetStats;
243 }
244
245 public boolean isSkipPackedIndexCreation()
246 {
247 return skipPackedIndexCreation;
248 }
249
250 public void setSkipPackedIndexCreation( boolean skipPackedIndexCreation )
251 {
252 this.skipPackedIndexCreation = skipPackedIndexCreation;
253 }
254
255 @Override
256 public String toString()
257 {
258 final StringBuilder sb = new StringBuilder();
259 sb.append( super.toString() );
260 sb.append( "ManagedRepository" );
261 sb.append( "{location='" ).append( location ).append( '\'' );
262 sb.append( ", snapshots=" ).append( snapshots );
263 sb.append( ", releases=" ).append( releases );
264 sb.append( ", blockRedeployments=" ).append( blockRedeployments );
265 sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
266 sb.append( ", stagingRepository=" ).append( stagingRepository );
267 sb.append( ", scanned=" ).append( scanned );
268 sb.append( ", daysOlder=" ).append( daysOlder );
269 sb.append( ", retentionCount=" ).append( retentionCount );
270 sb.append( ", deleteReleasedSnapshots=" ).append( deleteReleasedSnapshots );
271 sb.append( ", stageRepoNeeded=" ).append( stageRepoNeeded );
272 sb.append( ", resetStats=" ).append( resetStats );
273 sb.append( ", skipPackedIndexCreation=" ).append( skipPackedIndexCreation );
274 sb.append( '}' );
275 return sb.toString();
276 }
277
278
279 }