View Javadoc
1   package org.apache.maven.plugin.dependency.fromConfiguration;
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  /**
23   * @author Olivier Lamy
24   * @since 2.7
25   */
26  public class ProcessArtifactItemsRequest
27  {
28      /**
29       * remove the version from the filename.
30       */
31      private boolean removeVersion;
32  
33      /** 
34       * remove the classifier from the filename.
35       */
36      private boolean removeClassifier;
37      
38      /**
39       * prepend the groupId to the filename.
40       */
41      private boolean prependGroupId;
42  
43      /**
44       * use the baseVersion of the artifact instead of version for the filename.
45       */
46      private boolean useBaseVersion;
47  
48      public ProcessArtifactItemsRequest()
49      {
50          // no op
51      }
52  
53      public ProcessArtifactItemsRequest( boolean removeVersion, boolean prependGroupId, boolean useBaseVersion,
54                                          boolean removeClassifier )
55      {
56          this.removeVersion = removeVersion;
57          this.prependGroupId = prependGroupId;
58          this.useBaseVersion = useBaseVersion;
59          this.removeClassifier = removeClassifier;
60      }
61  
62      public boolean isRemoveVersion()
63      {
64          return removeVersion;
65      }
66  
67      public void setRemoveVersion( boolean removeVersion )
68      {
69          this.removeVersion = removeVersion;
70      }
71  
72      public boolean isRemoveClassifier()
73      {
74          return removeClassifier;
75      }
76  
77      public void setRemoveClassifier( boolean removeClassifier )
78      {
79          this.removeClassifier = removeClassifier;
80      }
81  
82      
83      public ProcessArtifactItemsRequest removeVersion( boolean removeVersion )
84      {
85          this.removeVersion = removeVersion;
86          return this;
87      }
88  
89      public boolean isPrependGroupId()
90      {
91          return prependGroupId;
92      }
93  
94      public void setPrependGroupId( boolean prependGroupId )
95      {
96          this.prependGroupId = prependGroupId;
97      }
98  
99      public ProcessArtifactItemsRequest prependGroupId( boolean prependGroupId )
100     {
101         this.prependGroupId = prependGroupId;
102         return this;
103     }
104 
105     public boolean isUseBaseVersion()
106     {
107         return useBaseVersion;
108     }
109 
110     public void setUseBaseVersion( boolean useBaseVersion )
111     {
112         this.useBaseVersion = useBaseVersion;
113     }
114 
115     public ProcessArtifactItemsRequest useBaseVersion( boolean useBaseVersion )
116     {
117         this.useBaseVersion = useBaseVersion;
118         return this;
119     }
120 }