1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
package org.apache.maven.archiva.configuration; |
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
import java.util.Date; |
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | 0 | public class RepositoryScanningConfiguration |
19 | |
implements java.io.Serializable |
20 | |
{ |
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
private java.util.List<FileType> fileTypes; |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
private java.util.List<String> knownContentConsumers; |
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
private java.util.List<String> invalidContentConsumers; |
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
public void addFileType( FileType fileType ) |
52 | |
{ |
53 | 0 | if ( !(fileType instanceof FileType) ) |
54 | |
{ |
55 | 0 | throw new ClassCastException( "RepositoryScanningConfiguration.addFileTypes(fileType) parameter must be instanceof " + FileType.class.getName() ); |
56 | |
} |
57 | 0 | getFileTypes().add( fileType ); |
58 | 0 | } |
59 | |
|
60 | |
|
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | |
public void addInvalidContentConsumer( String string ) |
66 | |
{ |
67 | 0 | if ( !(string instanceof String) ) |
68 | |
{ |
69 | 0 | throw new ClassCastException( "RepositoryScanningConfiguration.addInvalidContentConsumers(string) parameter must be instanceof " + String.class.getName() ); |
70 | |
} |
71 | 0 | getInvalidContentConsumers().add( string ); |
72 | 0 | } |
73 | |
|
74 | |
|
75 | |
|
76 | |
|
77 | |
|
78 | |
|
79 | |
public void addKnownContentConsumer( String string ) |
80 | |
{ |
81 | 0 | if ( !(string instanceof String) ) |
82 | |
{ |
83 | 0 | throw new ClassCastException( "RepositoryScanningConfiguration.addKnownContentConsumers(string) parameter must be instanceof " + String.class.getName() ); |
84 | |
} |
85 | 0 | getKnownContentConsumers().add( string ); |
86 | 0 | } |
87 | |
|
88 | |
|
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | |
public java.util.List<FileType> getFileTypes() |
94 | |
{ |
95 | 0 | if ( this.fileTypes == null ) |
96 | |
{ |
97 | 0 | this.fileTypes = new java.util.ArrayList<FileType>(); |
98 | |
} |
99 | |
|
100 | 0 | return this.fileTypes; |
101 | |
} |
102 | |
|
103 | |
|
104 | |
|
105 | |
|
106 | |
|
107 | |
|
108 | |
public java.util.List<String> getInvalidContentConsumers() |
109 | |
{ |
110 | 0 | if ( this.invalidContentConsumers == null ) |
111 | |
{ |
112 | 0 | this.invalidContentConsumers = new java.util.ArrayList<String>(); |
113 | |
} |
114 | |
|
115 | 0 | return this.invalidContentConsumers; |
116 | |
} |
117 | |
|
118 | |
|
119 | |
|
120 | |
|
121 | |
|
122 | |
|
123 | |
public java.util.List<String> getKnownContentConsumers() |
124 | |
{ |
125 | 0 | if ( this.knownContentConsumers == null ) |
126 | |
{ |
127 | 0 | this.knownContentConsumers = new java.util.ArrayList<String>(); |
128 | |
} |
129 | |
|
130 | 0 | return this.knownContentConsumers; |
131 | |
} |
132 | |
|
133 | |
|
134 | |
|
135 | |
|
136 | |
|
137 | |
|
138 | |
public void removeFileType( FileType fileType ) |
139 | |
{ |
140 | 0 | if ( !(fileType instanceof FileType) ) |
141 | |
{ |
142 | 0 | throw new ClassCastException( "RepositoryScanningConfiguration.removeFileTypes(fileType) parameter must be instanceof " + FileType.class.getName() ); |
143 | |
} |
144 | 0 | getFileTypes().remove( fileType ); |
145 | 0 | } |
146 | |
|
147 | |
|
148 | |
|
149 | |
|
150 | |
|
151 | |
|
152 | |
public void removeInvalidContentConsumer( String string ) |
153 | |
{ |
154 | 0 | if ( !(string instanceof String) ) |
155 | |
{ |
156 | 0 | throw new ClassCastException( "RepositoryScanningConfiguration.removeInvalidContentConsumers(string) parameter must be instanceof " + String.class.getName() ); |
157 | |
} |
158 | 0 | getInvalidContentConsumers().remove( string ); |
159 | 0 | } |
160 | |
|
161 | |
|
162 | |
|
163 | |
|
164 | |
|
165 | |
|
166 | |
public void removeKnownContentConsumer( String string ) |
167 | |
{ |
168 | 0 | if ( !(string instanceof String) ) |
169 | |
{ |
170 | 0 | throw new ClassCastException( "RepositoryScanningConfiguration.removeKnownContentConsumers(string) parameter must be instanceof " + String.class.getName() ); |
171 | |
} |
172 | 0 | getKnownContentConsumers().remove( string ); |
173 | 0 | } |
174 | |
|
175 | |
|
176 | |
|
177 | |
|
178 | |
|
179 | |
|
180 | |
|
181 | |
|
182 | |
|
183 | |
public void setFileTypes( java.util.List<FileType> fileTypes ) |
184 | |
{ |
185 | 0 | this.fileTypes = fileTypes; |
186 | 0 | } |
187 | |
|
188 | |
|
189 | |
|
190 | |
|
191 | |
|
192 | |
|
193 | |
|
194 | |
|
195 | |
|
196 | |
public void setInvalidContentConsumers( java.util.List<String> invalidContentConsumers ) |
197 | |
{ |
198 | 0 | this.invalidContentConsumers = invalidContentConsumers; |
199 | 0 | } |
200 | |
|
201 | |
|
202 | |
|
203 | |
|
204 | |
|
205 | |
|
206 | |
|
207 | |
|
208 | |
|
209 | |
public void setKnownContentConsumers( java.util.List<String> knownContentConsumers ) |
210 | |
{ |
211 | 0 | this.knownContentConsumers = knownContentConsumers; |
212 | 0 | } |
213 | |
|
214 | |
|
215 | |
} |