1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
package org.apache.maven.plugin.registry; |
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
import java.util.Date; |
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | 0 | public class TrackableBase implements java.io.Serializable { |
20 | |
|
21 | |
|
22 | |
public static final String USER_LEVEL = "user-level"; |
23 | |
public static final String GLOBAL_LEVEL = "global-level"; |
24 | |
|
25 | 0 | private String sourceLevel = USER_LEVEL; |
26 | 0 | private boolean sourceLevelSet = false; |
27 | |
|
28 | |
public void setSourceLevel( String sourceLevel ) |
29 | |
{ |
30 | 0 | if ( sourceLevelSet ) |
31 | |
{ |
32 | 0 | throw new IllegalStateException( "Cannot reset sourceLevel attribute; it is already set to: " + sourceLevel ); |
33 | |
} |
34 | 0 | else if ( !( USER_LEVEL.equals( sourceLevel ) || GLOBAL_LEVEL.equals( sourceLevel ) ) ) |
35 | |
{ |
36 | 0 | throw new IllegalArgumentException( "sourceLevel must be one of: {" + USER_LEVEL + "," + GLOBAL_LEVEL + "}" ); |
37 | |
} |
38 | |
else |
39 | |
{ |
40 | 0 | this.sourceLevel = sourceLevel; |
41 | 0 | this.sourceLevelSet = true; |
42 | |
} |
43 | 0 | } |
44 | |
|
45 | |
public String getSourceLevel() |
46 | |
{ |
47 | 0 | return sourceLevel; |
48 | |
} |
49 | |
|
50 | 0 | private String modelEncoding = "UTF-8"; |
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
public void setModelEncoding( String modelEncoding ) |
58 | |
{ |
59 | 0 | this.modelEncoding = modelEncoding; |
60 | 0 | } |
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | |
public String getModelEncoding() |
66 | |
{ |
67 | 0 | return modelEncoding; |
68 | |
} |
69 | |
} |