View Javadoc
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.plugins.dependency.fromConfiguration;
20  
21  /**
22   * @author Olivier Lamy
23   * @since 2.7
24   */
25  public class ProcessArtifactItemsRequest {
26      /**
27       * remove the version from the filename.
28       */
29      private boolean removeVersion;
30  
31      /**
32       * remove the classifier from the filename.
33       */
34      private boolean removeClassifier;
35  
36      /**
37       * prepend the groupId to the filename.
38       */
39      private boolean prependGroupId;
40  
41      /**
42       * use the baseVersion of the artifact instead of version for the filename.
43       */
44      private boolean useBaseVersion;
45  
46      /**
47       * Default ctor.
48       */
49      public ProcessArtifactItemsRequest() {
50          // no op
51      }
52  
53      /**
54       * @param removeVersion {@link #removeVersion}
55       * @param prependGroupId {@link #prependGroupId}
56       * @param useBaseVersion {@link #useBaseVersion}
57       * @param removeClassifier {@link #removeClassifier}
58       */
59      public ProcessArtifactItemsRequest(
60              boolean removeVersion, boolean prependGroupId, boolean useBaseVersion, boolean removeClassifier) {
61          this.removeVersion = removeVersion;
62          this.prependGroupId = prependGroupId;
63          this.useBaseVersion = useBaseVersion;
64          this.removeClassifier = removeClassifier;
65      }
66  
67      /**
68       * @return {@link #removeVersion}
69       */
70      public boolean isRemoveVersion() {
71          return removeVersion;
72      }
73  
74      /**
75       * @param removeVersion {@link #removeVersion}
76       */
77      public void setRemoveVersion(boolean removeVersion) {
78          this.removeVersion = removeVersion;
79      }
80  
81      /**
82       * @return {@link #removeClassifier}
83       */
84      public boolean isRemoveClassifier() {
85          return removeClassifier;
86      }
87  
88      /**
89       * @param removeClassifier {@link #removeClassifier}
90       */
91      public void setRemoveClassifier(boolean removeClassifier) {
92          this.removeClassifier = removeClassifier;
93      }
94  
95      /**
96       * @param theRemoveVersion {@link #removeVersion}
97       * @return {@link ProcessArtifactItemsRequest}
98       */
99      public ProcessArtifactItemsRequest removeVersion(boolean theRemoveVersion) {
100         this.removeVersion = theRemoveVersion;
101         return this;
102     }
103 
104     /**
105      * @return {@link #prependGroupId}
106      */
107     public boolean isPrependGroupId() {
108         return prependGroupId;
109     }
110 
111     /**
112      * @param prependGroupId {@link #prependGroupId}
113      */
114     public void setPrependGroupId(boolean prependGroupId) {
115         this.prependGroupId = prependGroupId;
116     }
117 
118     /**
119      * @param thePrependGroupId {@link #prependGroupId}
120      * @return {@link ProcessArtifactItemsRequest}
121      */
122     public ProcessArtifactItemsRequest prependGroupId(boolean thePrependGroupId) {
123         this.prependGroupId = thePrependGroupId;
124         return this;
125     }
126 
127     /**
128      * @return {@link #useBaseVersion}
129      */
130     public boolean isUseBaseVersion() {
131         return useBaseVersion;
132     }
133 
134     /**
135      * @param useBaseVersion {@link #useBaseVersion}
136      */
137     public void setUseBaseVersion(boolean useBaseVersion) {
138         this.useBaseVersion = useBaseVersion;
139     }
140 
141     /**
142      * @param theUseBaseVersion {@link #useBaseVersion}
143      * @return {@link ProcessArtifactItemsRequest}
144      */
145     public ProcessArtifactItemsRequest useBaseVersion(boolean theUseBaseVersion) {
146         this.useBaseVersion = theUseBaseVersion;
147         return this;
148     }
149 }