Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
UnpackOptions |
|
| 1.1666666666666667;1.167 |
1 | /* | |
2 | * $Id$ | |
3 | */ | |
4 | ||
5 | package org.apache.maven.plugins.assembly.model; | |
6 | ||
7 | /** | |
8 | * | |
9 | * Specifies options for including/excluding/filtering items | |
10 | * extracted from an archive. | |
11 | * | |
12 | * | |
13 | * @version $Revision$ $Date$ | |
14 | */ | |
15 | 0 | public class UnpackOptions implements java.io.Serializable { |
16 | ||
17 | ||
18 | //--------------------------/ | |
19 | //- Class/Member Variables -/ | |
20 | //--------------------------/ | |
21 | ||
22 | /** | |
23 | * Field includes | |
24 | */ | |
25 | private java.util.List includes; | |
26 | ||
27 | /** | |
28 | * Field excludes | |
29 | */ | |
30 | private java.util.List excludes; | |
31 | ||
32 | /** | |
33 | * Field filtered | |
34 | */ | |
35 | 0 | private boolean filtered = false; |
36 | ||
37 | ||
38 | //-----------/ | |
39 | //- Methods -/ | |
40 | //-----------/ | |
41 | ||
42 | /** | |
43 | * Method addExclude | |
44 | * | |
45 | * @param string | |
46 | */ | |
47 | public void addExclude(String string) | |
48 | { | |
49 | 0 | getExcludes().add( string ); |
50 | 0 | } //-- void addExclude(String) |
51 | ||
52 | /** | |
53 | * Method addInclude | |
54 | * | |
55 | * @param string | |
56 | */ | |
57 | public void addInclude(String string) | |
58 | { | |
59 | 0 | getIncludes().add( string ); |
60 | 0 | } //-- void addInclude(String) |
61 | ||
62 | /** | |
63 | * Method getExcludes | |
64 | */ | |
65 | public java.util.List getExcludes() | |
66 | { | |
67 | 0 | if ( this.excludes == null ) |
68 | { | |
69 | 0 | this.excludes = new java.util.ArrayList(); |
70 | } | |
71 | ||
72 | 0 | return this.excludes; |
73 | } //-- java.util.List getExcludes() | |
74 | ||
75 | /** | |
76 | * Method getIncludes | |
77 | */ | |
78 | public java.util.List getIncludes() | |
79 | { | |
80 | 0 | if ( this.includes == null ) |
81 | { | |
82 | 0 | this.includes = new java.util.ArrayList(); |
83 | } | |
84 | ||
85 | 0 | return this.includes; |
86 | } //-- java.util.List getIncludes() | |
87 | ||
88 | /** | |
89 | * Get | |
90 | * Whether to filter symbols in the files as they are | |
91 | * unpacked from the archive, using | |
92 | * properties from the build configuration. | |
93 | * | |
94 | */ | |
95 | public boolean isFiltered() | |
96 | { | |
97 | 0 | return this.filtered; |
98 | } //-- boolean isFiltered() | |
99 | ||
100 | /** | |
101 | * Method removeExclude | |
102 | * | |
103 | * @param string | |
104 | */ | |
105 | public void removeExclude(String string) | |
106 | { | |
107 | 0 | getExcludes().remove( string ); |
108 | 0 | } //-- void removeExclude(String) |
109 | ||
110 | /** | |
111 | * Method removeInclude | |
112 | * | |
113 | * @param string | |
114 | */ | |
115 | public void removeInclude(String string) | |
116 | { | |
117 | 0 | getIncludes().remove( string ); |
118 | 0 | } //-- void removeInclude(String) |
119 | ||
120 | /** | |
121 | * Set | |
122 | * Set of patterns for matching items to be excluded | |
123 | * from an archive as it is unpacked. | |
124 | * | |
125 | * | |
126 | * @param excludes | |
127 | */ | |
128 | public void setExcludes(java.util.List excludes) | |
129 | { | |
130 | 0 | this.excludes = excludes; |
131 | 0 | } //-- void setExcludes(java.util.List) |
132 | ||
133 | /** | |
134 | * Set | |
135 | * Whether to filter symbols in the files as they are | |
136 | * unpacked from the archive, using | |
137 | * properties from the build configuration. | |
138 | * | |
139 | * | |
140 | * @param filtered | |
141 | */ | |
142 | public void setFiltered(boolean filtered) | |
143 | { | |
144 | 0 | this.filtered = filtered; |
145 | 0 | } //-- void setFiltered(boolean) |
146 | ||
147 | /** | |
148 | * Set | |
149 | * Set of patterns for matching items to be included | |
150 | * from an archive as it is unpacked. | |
151 | * | |
152 | * | |
153 | * @param includes | |
154 | */ | |
155 | public void setIncludes(java.util.List includes) | |
156 | { | |
157 | 0 | this.includes = includes; |
158 | 0 | } //-- void setIncludes(java.util.List) |
159 | ||
160 | ||
161 | 0 | private String modelEncoding = "UTF-8"; |
162 | ||
163 | public void setModelEncoding( String modelEncoding ) | |
164 | { | |
165 | 0 | this.modelEncoding = modelEncoding; |
166 | 0 | } |
167 | ||
168 | public String getModelEncoding() | |
169 | { | |
170 | 0 | return modelEncoding; |
171 | }} |