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 java.util.HashMap; |
23 | import java.util.Map; |
24 | |
25 | import org.apache.maven.shared.release.config.ReleaseDescriptor; |
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 | public void addEnvironment( String name, String value ) |
38 | { |
39 | getEnvironments().put( name, value ); |
40 | } |
41 | |
42 | public Map<String, String> getEnvironments() |
43 | { |
44 | if ( environments == null ) |
45 | { |
46 | environments = new HashMap<String, String>(); |
47 | } |
48 | |
49 | return environments; |
50 | } |
51 | |
52 | public void mapEnvironments( String name, String value) |
53 | { |
54 | if ( environments == null ) |
55 | { |
56 | environments = new HashMap<String, String>(); |
57 | } |
58 | else |
59 | { |
60 | assert !environments.containsKey( name ); |
61 | } |
62 | |
63 | environments.put( name, value ); |
64 | } |
65 | |
66 | public void setEnvironments( Map<String, String> environments ) |
67 | { |
68 | this.environments = environments; |
69 | } |
70 | |
71 | public String getExecutable() |
72 | { |
73 | return executable; |
74 | } |
75 | |
76 | public void setExecutable( String executable ) |
77 | { |
78 | this.executable = executable; |
79 | } |
80 | } |