View Javadoc

1   /*
2    * $Id$
3    */
4   
5   package org.apache.maven.profiles;
6   
7     //---------------------------------/
8    //- Imported classes and packages -/
9   //---------------------------------/
10  
11  import java.util.Date;
12  
13  /**
14   * 
15   *         This is an activator which will detect an operating
16   * system's attributes in order to activate
17   *         its profile.
18   *       
19   * 
20   * @version $Revision$ $Date$
21   */
22  public class ActivationOS implements java.io.Serializable {
23  
24  
25        //--------------------------/
26       //- Class/Member Variables -/
27      //--------------------------/
28  
29      /**
30       * The name of the OS to be used to activate a profile.
31       */
32      private String name;
33  
34      /**
35       * The general family of the OS to be used to activate a
36       * profile (e.g. 'windows').
37       */
38      private String family;
39  
40      /**
41       * The architecture of the OS to be used to activate a profile.
42       */
43      private String arch;
44  
45      /**
46       * The version of the OS to be used to activate a profile.
47       */
48      private String version;
49  
50  
51        //-----------/
52       //- Methods -/
53      //-----------/
54  
55      /**
56       * Get the architecture of the OS to be used to activate a
57       * profile.
58       * 
59       * @return String
60       */
61      public String getArch()
62      {
63          return this.arch;
64      } //-- String getArch() 
65  
66      /**
67       * Get the general family of the OS to be used to activate a
68       * profile (e.g. 'windows').
69       * 
70       * @return String
71       */
72      public String getFamily()
73      {
74          return this.family;
75      } //-- String getFamily() 
76  
77      /**
78       * Get the name of the OS to be used to activate a profile.
79       * 
80       * @return String
81       */
82      public String getName()
83      {
84          return this.name;
85      } //-- String getName() 
86  
87      /**
88       * Get the version of the OS to be used to activate a profile.
89       * 
90       * @return String
91       */
92      public String getVersion()
93      {
94          return this.version;
95      } //-- String getVersion() 
96  
97      /**
98       * Set the architecture of the OS to be used to activate a
99       * profile.
100      * 
101      * @param arch
102      */
103     public void setArch( String arch )
104     {
105         this.arch = arch;
106     } //-- void setArch( String ) 
107 
108     /**
109      * Set the general family of the OS to be used to activate a
110      * profile (e.g. 'windows').
111      * 
112      * @param family
113      */
114     public void setFamily( String family )
115     {
116         this.family = family;
117     } //-- void setFamily( String ) 
118 
119     /**
120      * Set the name of the OS to be used to activate a profile.
121      * 
122      * @param name
123      */
124     public void setName( String name )
125     {
126         this.name = name;
127     } //-- void setName( String ) 
128 
129     /**
130      * Set the version of the OS to be used to activate a profile.
131      * 
132      * @param version
133      */
134     public void setVersion( String version )
135     {
136         this.version = version;
137     } //-- void setVersion( String ) 
138 
139 
140     private String modelEncoding = "UTF-8";
141 
142     /**
143      * Set an encoding used for reading/writing the model.
144      *
145      * @param modelEncoding the encoding used when reading/writing the model.
146      */
147     public void setModelEncoding( String modelEncoding )
148     {
149         this.modelEncoding = modelEncoding;
150     }
151 
152     /**
153      * @return the current encoding used when reading/writing this model.
154      */
155     public String getModelEncoding()
156     {
157         return modelEncoding;
158     }
159 }