1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.maven.shared.release.policy.version;
20
21 import org.apache.maven.artifact.repository.metadata.Metadata;
22 import org.apache.maven.scm.provider.ScmProvider;
23 import org.apache.maven.scm.repository.ScmRepository;
24
25 /**
26 * <p>VersionPolicyRequest class.</p>
27 *
28 * @since 2.5.1 (MRELEASE-431)
29 */
30 public class VersionPolicyRequest {
31
32 private String version;
33
34 private Metadata metaData;
35
36 private ScmRepository scmRepository;
37 private ScmProvider scmProvider;
38 private String workingDirectory;
39
40 private String config;
41
42 /**
43 * <p>Getter for the field <code>version</code>.</p>
44 *
45 * @return a {@link java.lang.String} object
46 */
47 public String getVersion() {
48 return version;
49 }
50
51 /**
52 * <p>Setter for the field <code>version</code>.</p>
53 *
54 * @param version a {@link java.lang.String} object
55 * @return a {@link org.apache.maven.shared.release.policy.version.VersionPolicyRequest} object
56 */
57 public VersionPolicyRequest setVersion(String version) {
58 this.version = version;
59 return this;
60 }
61
62 /**
63 * <p>Getter for the field <code>metaData</code>.</p>
64 *
65 * @return a {@link org.apache.maven.artifact.repository.metadata.Metadata} object
66 */
67 public Metadata getMetaData() {
68 return metaData;
69 }
70
71 /**
72 * <p>Setter for the field <code>metaData</code>.</p>
73 *
74 * @param metaData a {@link org.apache.maven.artifact.repository.metadata.Metadata} object
75 * @return a {@link org.apache.maven.shared.release.policy.version.VersionPolicyRequest} object
76 */
77 public VersionPolicyRequest setMetaData(Metadata metaData) {
78 this.metaData = metaData;
79 return this;
80 }
81
82 /**
83 * <p>Getter for the field <code>scmRepository</code>.</p>
84 *
85 * @return a {@link ScmRepository} object
86 */
87 public ScmRepository getScmRepository() {
88 return scmRepository;
89 }
90
91 /**
92 * <p>Setter for the field <code>scmRepository</code>.</p>
93 *
94 * @param scmRepository The {@link ScmRepository} where the history can be retrieved.
95 * @return a {@link org.apache.maven.shared.release.policy.version.VersionPolicyRequest} object
96 */
97 public VersionPolicyRequest setScmRepository(ScmRepository scmRepository) {
98 this.scmRepository = scmRepository;
99 return this;
100 }
101
102 /**
103 * <p>Getter for the field <code>scmProvider</code>.</p>
104 *
105 * @return a {@link ScmProvider} object
106 */
107 public ScmProvider getScmProvider() {
108 return scmProvider;
109 }
110
111 /**
112 * <p>Setter for the field <code>scmProvider</code>.</p>
113 *
114 * @param scmProvider The {@link ScmProvider} where the history can be retrieved.
115 * @return a {@link org.apache.maven.shared.release.policy.version.VersionPolicyRequest} object
116 */
117 public VersionPolicyRequest setScmProvider(ScmProvider scmProvider) {
118 this.scmProvider = scmProvider;
119 return this;
120 }
121
122 /**
123 * <p>Getter for the field <code>workingDirectory</code>.</p>
124 *
125 * @return the {@link String} that contains the workingDirectory (can be null or empty).
126 */
127 public String getWorkingDirectory() {
128 return workingDirectory;
129 }
130
131 /**
132 * <p>Setter for the field <code>workingDirectory</code>.</p>
133 *
134 * @param workingDirectory The {@link String} that contains the workingDirectory (can be null or empty).
135 * @return a {@link org.apache.maven.shared.release.policy.version.VersionPolicyRequest} object
136 */
137 public VersionPolicyRequest setWorkingDirectory(String workingDirectory) {
138 this.workingDirectory = workingDirectory;
139 return this;
140 }
141
142 /**
143 * <p>Getter for the field <code>config</code>.</p>
144 *
145 * @return the {@link String} that contains the config (can be null or empty).
146 */
147 public String getConfig() {
148 return config;
149 }
150
151 /**
152 * <p>Setter for the field <code>config</code>.</p>
153 *
154 * @param config The {@link String} that contains the config (can be null or empty).
155 * @return a {@link org.apache.maven.shared.release.policy.version.VersionPolicyRequest} object
156 */
157 public VersionPolicyRequest setConfig(String config) {
158 this.config = config;
159 return this;
160 }
161 }