1 package de.matthias_burbach.deputy.core.rule; 2 3 import de.matthias_burbach.deputy.core.project.ProjectQualifier; 4 5 /*** 6 * Is the base class of all exceptional rules used to decide which artifacts and 7 * versions to track in the dependency recursion. 8 * 9 * @author Matthias Burbach 10 */ 11 public class Rule implements ProjectQualifier { 12 13 /*** 14 * The group id of the artifact this rule primarily refers to. 15 */ 16 private String groupId; 17 18 /*** 19 * The id of the artifact this rule primarily refers to. 20 */ 21 private String artifactId; 22 23 /*** 24 * The version of the artifact this rule primarily refers to. 25 */ 26 private String version; 27 28 /*** 29 * Whether this rule was created by some derivation mechanism, like 30 * the import of some project's dependencies as enforcement rules, 31 * for example. 32 */ 33 private boolean derived = false; 34 35 /*** 36 * @return Returns the artifactId. 37 */ 38 public String getArtifactId() { 39 return artifactId; 40 } 41 42 /*** 43 * @param artifactId The artifactId to set. 44 */ 45 public void setArtifactId(final String artifactId) { 46 this.artifactId = artifactId; 47 } 48 49 /*** 50 * @return Returns the groupId. 51 */ 52 public String getGroupId() { 53 return groupId; 54 } 55 56 /*** 57 * @param groupId The groupId to set. 58 */ 59 public void setGroupId(final String groupId) { 60 this.groupId = groupId; 61 } 62 63 /*** 64 * @return Returns the version. 65 */ 66 public String getVersion() { 67 return version; 68 } 69 70 /*** 71 * @param version The version to set. 72 */ 73 public void setVersion(final String version) { 74 this.version = version; 75 } 76 77 /*** 78 * @return Whether this rule was created by some derivation mechanism, like 79 * the import of some project's dependencies as enforcement rules, 80 * for example. 81 */ 82 public boolean isDerived() { 83 return derived; 84 } 85 86 /*** 87 * @param derived Whether this rule was created by some derivation 88 * mechanism, like the import of some project's dependencies 89 * as enforcement rules, for example. 90 */ 91 public void setDerived(final boolean derived) { 92 this.derived = derived; 93 } 94 }