Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RepositoryGroupConfiguration |
|
| 0.0;0 |
1 | /* | |
2 | * $Id$ | |
3 | */ | |
4 | ||
5 | package org.apache.maven.archiva.configuration; | |
6 | ||
7 | //---------------------------------/ | |
8 | //- Imported classes and packages -/ | |
9 | //---------------------------------/ | |
10 | ||
11 | import java.util.Date; | |
12 | ||
13 | /** | |
14 | * Class RepositoryGroupConfiguration. | |
15 | * | |
16 | * @version $Revision$ $Date$ | |
17 | */ | |
18 | 0 | public class RepositoryGroupConfiguration |
19 | implements java.io.Serializable | |
20 | { | |
21 | ||
22 | //--------------------------/ | |
23 | //- Class/Member Variables -/ | |
24 | //--------------------------/ | |
25 | ||
26 | /** | |
27 | * The id of the repository group. | |
28 | */ | |
29 | private String id; | |
30 | ||
31 | /** | |
32 | * Field repositories. | |
33 | */ | |
34 | private java.util.List<String> repositories; | |
35 | ||
36 | ||
37 | //-----------/ | |
38 | //- Methods -/ | |
39 | //-----------/ | |
40 | ||
41 | /** | |
42 | * Method addRepository. | |
43 | * | |
44 | * @param string | |
45 | */ | |
46 | public void addRepository( String string ) | |
47 | { | |
48 | 0 | if ( !(string instanceof String) ) |
49 | { | |
50 | 0 | throw new ClassCastException( "RepositoryGroupConfiguration.addRepositories(string) parameter must be instanceof " + String.class.getName() ); |
51 | } | |
52 | 0 | getRepositories().add( string ); |
53 | 0 | } //-- void addRepository( String ) |
54 | ||
55 | /** | |
56 | * Get the id of the repository group. | |
57 | * | |
58 | * @return String | |
59 | */ | |
60 | public String getId() | |
61 | { | |
62 | 0 | return this.id; |
63 | } //-- String getId() | |
64 | ||
65 | /** | |
66 | * Method getRepositories. | |
67 | * | |
68 | * @return List | |
69 | */ | |
70 | public java.util.List<String> getRepositories() | |
71 | { | |
72 | 0 | if ( this.repositories == null ) |
73 | { | |
74 | 0 | this.repositories = new java.util.ArrayList<String>(); |
75 | } | |
76 | ||
77 | 0 | return this.repositories; |
78 | } //-- java.util.List<String> getRepositories() | |
79 | ||
80 | /** | |
81 | * Method removeRepository. | |
82 | * | |
83 | * @param string | |
84 | */ | |
85 | public void removeRepository( String string ) | |
86 | { | |
87 | 0 | if ( !(string instanceof String) ) |
88 | { | |
89 | 0 | throw new ClassCastException( "RepositoryGroupConfiguration.removeRepositories(string) parameter must be instanceof " + String.class.getName() ); |
90 | } | |
91 | 0 | getRepositories().remove( string ); |
92 | 0 | } //-- void removeRepository( String ) |
93 | ||
94 | /** | |
95 | * Set the id of the repository group. | |
96 | * | |
97 | * @param id | |
98 | */ | |
99 | public void setId( String id ) | |
100 | { | |
101 | 0 | this.id = id; |
102 | 0 | } //-- void setId( String ) |
103 | ||
104 | /** | |
105 | * Set the list of repository ids under the group. | |
106 | * | |
107 | * @param repositories | |
108 | */ | |
109 | public void setRepositories( java.util.List<String> repositories ) | |
110 | { | |
111 | 0 | this.repositories = repositories; |
112 | 0 | } //-- void setRepositories( java.util.List ) |
113 | ||
114 | ||
115 | } |