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.utils;
20
21 import java.util.LinkedHashSet;
22 import java.util.Set;
23 import org.apache.maven.artifact.Artifact;
24
25 /**
26 * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
27 */
28 public class DependencyStatusSets {
29 Set<Artifact> resolvedDependencies = null;
30
31 Set<Artifact> unResolvedDependencies = null;
32
33 Set<Artifact> skippedDependencies = null;
34
35 /**
36 * Default ctor.
37 */
38 public DependencyStatusSets() {}
39
40 /**
41 * @param resolved set of {@link Artifact}
42 * @param unResolved set of {@link Artifact}
43 * @param skipped set of {@link Artifact}
44 */
45 public DependencyStatusSets(Set<Artifact> resolved, Set<Artifact> unResolved, Set<Artifact> skipped) {
46 if (resolved != null) {
47 this.resolvedDependencies = new LinkedHashSet<>(resolved);
48 }
49 if (unResolved != null) {
50 this.unResolvedDependencies = new LinkedHashSet<>(unResolved);
51 }
52 if (skipped != null) {
53 this.skippedDependencies = new LinkedHashSet<>(skipped);
54 }
55 }
56
57 /**
58 * @return Returns the resolvedDependencies.
59 */
60 public Set<Artifact> getResolvedDependencies() {
61 return this.resolvedDependencies;
62 }
63
64 /**
65 * @param resolvedDependencies The resolvedDependencies to set.
66 */
67 public void setResolvedDependencies(Set<Artifact> resolvedDependencies) {
68 if (resolvedDependencies != null) {
69 this.resolvedDependencies = new LinkedHashSet<>(resolvedDependencies);
70 } else {
71 this.resolvedDependencies = null;
72 }
73 }
74
75 /**
76 * @return Returns the skippedDependencies.
77 */
78 public Set<Artifact> getSkippedDependencies() {
79 return this.skippedDependencies;
80 }
81
82 /**
83 * @param skippedDependencies The skippedDependencies to set.
84 */
85 public void setSkippedDependencies(Set<Artifact> skippedDependencies) {
86 if (skippedDependencies != null) {
87 this.skippedDependencies = new LinkedHashSet<>(skippedDependencies);
88 } else {
89 this.skippedDependencies = null;
90 }
91 }
92
93 /**
94 * @return Returns the unResolvedDependencies.
95 */
96 public Set<Artifact> getUnResolvedDependencies() {
97 return this.unResolvedDependencies;
98 }
99
100 /**
101 * @param unResolvedDependencies The unResolvedDependencies to set.
102 */
103 public void setUnResolvedDependencies(Set<Artifact> unResolvedDependencies) {
104 if (unResolvedDependencies != null) {
105 this.unResolvedDependencies = new LinkedHashSet<>(unResolvedDependencies);
106 } else {
107 this.unResolvedDependencies = null;
108 }
109 }
110 }