View Javadoc

1   package org.apache.continuum.release.config;
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.maven.shared.release.config.ReleaseDescriptor;
23  
24  import java.util.HashMap;
25  import java.util.Map;
26  
27  /**
28   * @author <a href="mailto:ctan@apache.org">Maria Catherine Tan</a>
29   */
30  public class ContinuumReleaseDescriptor
31      extends ReleaseDescriptor
32  {
33      private Map<String, String> environments;
34  
35      private String executable;
36  
37      private String releaseBy;
38  
39      public void addEnvironment( String name, String value )
40      {
41          getEnvironments().put( name, value );
42      }
43  
44      public Map<String, String> getEnvironments()
45      {
46          if ( environments == null )
47          {
48              environments = new HashMap<String, String>();
49          }
50  
51          return environments;
52      }
53  
54      public void mapEnvironments( String name, String value )
55      {
56          if ( environments == null )
57          {
58              environments = new HashMap<String, String>();
59          }
60          else
61          {
62              assert !environments.containsKey( name );
63          }
64  
65          environments.put( name, value );
66      }
67  
68      public void setEnvironments( Map<String, String> environments )
69      {
70          this.environments = environments;
71      }
72  
73      public String getExecutable()
74      {
75          return executable;
76      }
77  
78      public void setExecutable( String executable )
79      {
80          this.executable = executable;
81      }
82  
83      public String getReleaseBy()
84      {
85          return releaseBy;
86      }
87  
88      public void setReleaseBy( String releaseBy )
89      {
90          this.releaseBy = releaseBy;
91      }
92  }