1 package de.matthias_burbach.deputy.core.repository;
2
3 /***
4 * Holds configuration about a Maven repository to be used by Deputy.
5 *
6 * @author Matthias Burbach
7 */
8 public class RepositoryConfig {
9 /***
10 * The name of the repository for display purposes.
11 * Defaults to the {@link #path}.
12 */
13 private String displayName;
14
15 /***
16 * The absolute file system path to the repository.
17 */
18 private String path;
19
20 /***
21 * Whether to scan this repository for all available versions when
22 * applying the rules. If set to <code>false</code> the versions
23 * to consider for an artifact will be restricted to what is reachable
24 * in the dependency graph that roots in the current top project.
25 */
26 private boolean toBeScannedForVersions = true;
27
28 /***
29 * Constructs a repository config.
30 *
31 * @param path The absolute file system path to the repository.
32 */
33 public RepositoryConfig(final String path) {
34 this.path = path;
35 this.displayName = path;
36 }
37
38 /***
39 * @return The name of the repository for display purposes.
40 */
41 public String getDisplayName() {
42 return displayName;
43 }
44
45 /***
46 * @param displayName The name of the repository for display purposes.
47 */
48 public void setDisplayName(final String displayName) {
49 this.displayName = displayName;
50 }
51
52 /***
53 * @return The absolute file system path to the repository.
54 */
55 public String getPath() {
56 return path;
57 }
58
59 /***
60 * @param path The absolute file system path to the repository.
61 */
62 public void setPath(final String path) {
63 this.path = path;
64 }
65
66 /***
67 * @return Whether to scan this repository for all available versions when
68 * applying the rules. If set to <code>false</code> the versions
69 * to consider for an artifact will be restricted to what is
70 * reachable in the dependency graph that roots in the current top
71 * project.
72 */
73 public boolean isToBeScannedForVersions() {
74 return toBeScannedForVersions;
75 }
76
77 /***
78 * @param toBeScannedForVersions Whether to scan this repository for all
79 * available versions when applying the rules.
80 * If set to <code>false</code> the versions
81 * to consider for an artifact will be
82 * restricted to what is reachable in the
83 * dependency graph that roots in the current
84 * top project.
85 */
86 public void setToBeScannedForVersions(
87 final boolean toBeScannedForVersions) {
88 this.toBeScannedForVersions = toBeScannedForVersions;
89 }
90 }