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