1 package org.kuali.common.util.project.model;
2
3 import org.kuali.common.util.Assert;
4 import org.kuali.common.util.ObjectUtils;
5 import org.kuali.common.util.identify.Identifiable;
6
7
8
9
10 @Deprecated
11 public final class FeatureIdentifier implements Identifiable {
12
13 private final ProjectIdentifier project;
14 private final String featureId;
15
16 private final String identifier;
17 private final int hashCode;
18
19 public FeatureIdentifier(ProjectIdentifier project, String featureId) {
20
21 Assert.noNulls(project);
22 Assert.noBlanks(featureId);
23
24
25 this.project = project;
26 this.featureId = featureId;
27 this.identifier = project.getIdentifier() + ":" + featureId;
28 this.hashCode = identifier.hashCode();
29 }
30
31 public FeatureIdentifier(String groupId, String artifactId, String featureId) {
32 this(new ProjectIdentifier(groupId, artifactId), featureId);
33 }
34
35 public ProjectIdentifier getProject() {
36 return project;
37 }
38
39 public String getFeatureId() {
40 return featureId;
41 }
42
43 @Override
44 public String getIdentifier() {
45 return identifier;
46 }
47
48 @Override
49 public String toString() {
50 return identifier;
51 }
52
53 @Override
54 public int hashCode() {
55 return hashCode;
56 }
57
58 @Override
59 public boolean equals(Object object) {
60 return ObjectUtils.equalsByToString(this, object);
61 }
62
63 }