View Javadoc

1   package org.apache.continuum.configuration;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.commons.lang.builder.ReflectionToStringBuilder;
23  
24  import java.io.File;
25  import java.util.List;
26  
27  /**
28   * @author <a href="mailto:olamy@apache.org">olamy</a>
29   * @version $Id: GeneralConfiguration.java 1412760 2012-11-23 06:28:56Z brett $
30   * @since 17 juin 2008
31   */
32  public class GeneralConfiguration
33  {
34      private boolean initialized = false;
35  
36      private File workingDirectory;
37  
38      private File buildOutputDirectory;
39  
40      private File deploymentRepositoryDirectory;
41  
42      private String baseUrl;
43  
44      private ProxyConfiguration proxyConfiguration;
45  
46      private File releaseOutputDirectory;
47  
48      private int numberOfBuildsInParallel = 1;
49  
50      private List<BuildAgentConfiguration> buildAgents;
51  
52      private List<BuildAgentGroupConfiguration> buildAgentGroups;
53  
54      private boolean distributedBuildEnabled;
55  
56      private String sharedSecretPassword;
57  
58      public GeneralConfiguration()
59      {
60          // nothing here
61      }
62  
63      public File getWorkingDirectory()
64      {
65          return workingDirectory;
66      }
67  
68      public void setWorkingDirectory( File workingDirectory )
69      {
70          this.workingDirectory = workingDirectory;
71      }
72  
73      public File getBuildOutputDirectory()
74      {
75          return buildOutputDirectory;
76      }
77  
78      public void setBuildOutputDirectory( File buildOutputDirectory )
79      {
80          this.buildOutputDirectory = buildOutputDirectory;
81      }
82  
83      public File getDeploymentRepositoryDirectory()
84      {
85          return deploymentRepositoryDirectory;
86      }
87  
88      public void setDeploymentRepositoryDirectory( File deploymentRepositoryDirectory )
89      {
90          this.deploymentRepositoryDirectory = deploymentRepositoryDirectory;
91      }
92  
93      public String getBaseUrl()
94      {
95          return baseUrl;
96      }
97  
98      public void setBaseUrl( String baseUrl )
99      {
100         this.baseUrl = baseUrl;
101     }
102 
103     public ProxyConfiguration getProxyConfiguration()
104     {
105         return proxyConfiguration;
106     }
107 
108     public void setProxyConfiguration( ProxyConfiguration proxyConfiguration )
109     {
110         this.proxyConfiguration = proxyConfiguration;
111     }
112 
113     @Override
114     public String toString()
115     {
116         return ReflectionToStringBuilder.toString( this );
117     }
118 
119     public File getReleaseOutputDirectory()
120     {
121         return releaseOutputDirectory;
122     }
123 
124     public void setReleaseOutputDirectory( File releaseOutputDirectory )
125     {
126         this.releaseOutputDirectory = releaseOutputDirectory;
127     }
128 
129     public int getNumberOfBuildsInParallel()
130     {
131         return numberOfBuildsInParallel;
132     }
133 
134     public void setNumberOfBuildsInParallel( int numberOfBuildsInParallel )
135     {
136         this.numberOfBuildsInParallel = numberOfBuildsInParallel;
137     }
138 
139     public List<BuildAgentConfiguration> getBuildAgents()
140     {
141         return buildAgents;
142     }
143 
144     public void setBuildAgents( List<BuildAgentConfiguration> buildAgents )
145     {
146         this.buildAgents = buildAgents;
147     }
148 
149     public List<BuildAgentGroupConfiguration> getBuildAgentGroups()
150     {
151         return buildAgentGroups;
152     }
153 
154     public void setBuildAgentGroups( List<BuildAgentGroupConfiguration> buildAgentGroups )
155     {
156         this.buildAgentGroups = buildAgentGroups;
157     }
158 
159     public boolean isDistributedBuildEnabled()
160     {
161         return distributedBuildEnabled;
162     }
163 
164     public void setDistributedBuildEnabled( boolean distributedBuildEnabled )
165     {
166         this.distributedBuildEnabled = distributedBuildEnabled;
167     }
168 
169     public void setSharedSecretPassword( String sharedSecretPassword )
170     {
171         this.sharedSecretPassword = sharedSecretPassword;
172     }
173 
174     public String getSharedSecretPassword()
175     {
176         return sharedSecretPassword;
177     }
178 
179     public boolean isInitialized()
180     {
181         return initialized;
182     }
183 
184     public void setInitialized( boolean initialized )
185     {
186         this.initialized = initialized;
187     }
188 }