View Javadoc
1   package org.apache.maven.plugins.dependency.utils;
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.LinkedHashSet;
23  import java.util.Set;
24  
25  import org.apache.maven.artifact.Artifact;
26  
27  /**
28   * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
29   * @version $Id: DependencyStatusSets.java 1807877 2017-09-09 10:35:59Z khmarbaise $
30   */
31  public class DependencyStatusSets
32  {
33      Set<Artifact> resolvedDependencies = null;
34  
35      Set<Artifact> unResolvedDependencies = null;
36  
37      Set<Artifact> skippedDependencies = null;
38  
39      public DependencyStatusSets()
40      {
41  
42      }
43  
44      public DependencyStatusSets( Set<Artifact> resolved, Set<Artifact> unResolved, Set<Artifact> skipped )
45      {
46          if ( resolved != null )
47          {
48              this.resolvedDependencies = new LinkedHashSet<Artifact>( resolved );
49          }
50          if ( unResolved != null )
51          {
52              this.unResolvedDependencies = new LinkedHashSet<Artifact>( unResolved );
53          }
54          if ( skipped != null )
55          {
56              this.skippedDependencies = new LinkedHashSet<Artifact>( skipped );
57          }
58      }
59  
60      /**
61       * @return Returns the resolvedDependencies.
62       */
63      public Set<Artifact> getResolvedDependencies()
64      {
65          return this.resolvedDependencies;
66      }
67  
68      /**
69       * @param resolvedDependencies The resolvedDependencies to set.
70       */
71      public void setResolvedDependencies( Set<Artifact> resolvedDependencies )
72      {
73          if ( resolvedDependencies != null )
74          {
75              this.resolvedDependencies = new LinkedHashSet<Artifact>( resolvedDependencies );
76          }
77          else
78          {
79              this.resolvedDependencies = null;
80          }
81      }
82  
83      /**
84       * @return Returns the skippedDependencies.
85       */
86      public Set<Artifact> getSkippedDependencies()
87      {
88          return this.skippedDependencies;
89      }
90  
91      /**
92       * @param skippedDependencies The skippedDependencies to set.
93       */
94      public void setSkippedDependencies( Set<Artifact> skippedDependencies )
95      {
96          if ( skippedDependencies != null )
97          {
98              this.skippedDependencies = new LinkedHashSet<Artifact>( skippedDependencies );
99          }
100         else
101         {
102             this.skippedDependencies = null;
103         }
104     }
105 
106     /**
107      * @return Returns the unResolvedDependencies.
108      */
109     public Set<Artifact> getUnResolvedDependencies()
110     {
111         return this.unResolvedDependencies;
112     }
113 
114     /**
115      * @param unResolvedDependencies The unResolvedDependencies to set.
116      */
117     public void setUnResolvedDependencies( Set<Artifact> unResolvedDependencies )
118     {
119         if ( unResolvedDependencies != null )
120         {
121             this.unResolvedDependencies = new LinkedHashSet<Artifact>( unResolvedDependencies );
122         }
123         else
124         {
125             this.unResolvedDependencies = null;
126         }
127     }
128 }