]>
git.argeo.org Git - gpl/argeo-slc.git/blob - cms/org.argeo.slc.repo/src/org/eclipse/aether/collection/DependencyManagement.java
1 /*******************************************************************************
2 * Copyright (c) 2010, 2013 Sonatype, Inc.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * Sonatype, Inc. - initial API and implementation
10 *******************************************************************************/
11 package org
.eclipse
.aether
.collection
;
13 import java
.util
.Collection
;
16 import org
.eclipse
.aether
.graph
.Dependency
;
17 import org
.eclipse
.aether
.graph
.Exclusion
;
20 * The management updates to apply to a dependency.
22 * @see DependencyManager#manageDependency(Dependency)
24 public final class DependencyManagement
27 private String version
;
31 private Boolean optional
;
33 private Collection
<Exclusion
> exclusions
;
35 private Map
<String
, String
> properties
;
38 * Creates an empty management update.
40 public DependencyManagement()
42 // enables default constructor
46 * Gets the new version to apply to the dependency.
48 * @return The new version or {@code null} if the version is not managed and the existing dependency version should
51 public String
getVersion()
57 * Sets the new version to apply to the dependency.
59 * @param version The new version, may be {@code null} if the version is not managed.
60 * @return This management update for chaining, never {@code null}.
62 public DependencyManagement
setVersion( String version
)
64 this.version
= version
;
69 * Gets the new scope to apply to the dependency.
71 * @return The new scope or {@code null} if the scope is not managed and the existing dependency scope should remain
74 public String
getScope()
80 * Sets the new scope to apply to the dependency.
82 * @param scope The new scope, may be {@code null} if the scope is not managed.
83 * @return This management update for chaining, never {@code null}.
85 public DependencyManagement
setScope( String scope
)
92 * Gets the new optional flag to apply to the dependency.
94 * @return The new optional flag or {@code null} if the flag is not managed and the existing optional flag of the
95 * dependency should remain unchanged.
97 public Boolean
getOptional()
103 * Sets the new optional flag to apply to the dependency.
105 * @param optional The optional flag, may be {@code null} if the flag is not managed.
106 * @return This management update for chaining, never {@code null}.
108 public DependencyManagement
setOptional( Boolean optional
)
110 this.optional
= optional
;
115 * Gets the new exclusions to apply to the dependency. Note that this collection denotes the complete set of
116 * exclusions for the dependency, i.e. the dependency manager controls whether any existing exclusions get merged
117 * with information from dependency management or overridden by it.
119 * @return The new exclusions or {@code null} if the exclusions are not managed and the existing dependency
120 * exclusions should remain unchanged.
122 public Collection
<Exclusion
> getExclusions()
128 * Sets the new exclusions to apply to the dependency. Note that this collection denotes the complete set of
129 * exclusions for the dependency, i.e. the dependency manager controls whether any existing exclusions get merged
130 * with information from dependency management or overridden by it.
132 * @param exclusions The new exclusions, may be {@code null} if the exclusions are not managed.
133 * @return This management update for chaining, never {@code null}.
135 public DependencyManagement
setExclusions( Collection
<Exclusion
> exclusions
)
137 this.exclusions
= exclusions
;
142 * Gets the new properties to apply to the dependency. Note that this map denotes the complete set of properties,
143 * i.e. the dependency manager controls whether any existing properties get merged with the information from
144 * dependency management or overridden by it.
146 * @return The new artifact properties or {@code null} if the properties are not managed and the existing properties
147 * should remain unchanged.
149 public Map
<String
, String
> getProperties()
155 * Sets the new properties to apply to the dependency. Note that this map denotes the complete set of properties,
156 * i.e. the dependency manager controls whether any existing properties get merged with the information from
157 * dependency management or overridden by it.
159 * @param properties The new artifact properties, may be {@code null} if the properties are not managed.
160 * @return This management update for chaining, never {@code null}.
162 public DependencyManagement
setProperties( Map
<String
, String
> properties
)
164 this.properties
= properties
;