summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/user/UserMembershipData.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/common/src/com/netscape/certsrv/user/UserMembershipData.java')
-rw-r--r--base/common/src/com/netscape/certsrv/user/UserMembershipData.java37
1 files changed, 26 insertions, 11 deletions
diff --git a/base/common/src/com/netscape/certsrv/user/UserMembershipData.java b/base/common/src/com/netscape/certsrv/user/UserMembershipData.java
index 6d5a51ebe..c7d75719c 100644
--- a/base/common/src/com/netscape/certsrv/user/UserMembershipData.java
+++ b/base/common/src/com/netscape/certsrv/user/UserMembershipData.java
@@ -19,7 +19,6 @@
package com.netscape.certsrv.user;
import javax.ws.rs.FormParam;
-import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -33,18 +32,28 @@ import com.netscape.certsrv.common.Constants;
@XmlRootElement(name="UserMembership")
public class UserMembershipData {
- String id;
+ String userID;
+ String groupID;
Link link;
+ @XmlElement(name="UserID")
+ public String getUserID() {
+ return userID;
+ }
+
+ public void setUserID(String userID) {
+ this.userID = userID;
+ }
+
+ @XmlElement(name="GroupID")
@FormParam(Constants.PR_GROUP_USER)
- @XmlAttribute(name="id")
- public String getID() {
- return id;
+ public String getGroupID() {
+ return groupID;
}
- public void setID(String id) {
- this.id = id;
+ public void setGroupID(String groupID) {
+ this.groupID = groupID;
}
@XmlElement(name="Link")
@@ -60,7 +69,8 @@ public class UserMembershipData {
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((groupID == null) ? 0 : groupID.hashCode());
+ result = prime * result + ((userID == null) ? 0 : userID.hashCode());
return result;
}
@@ -73,10 +83,15 @@ public class UserMembershipData {
if (getClass() != obj.getClass())
return false;
UserMembershipData other = (UserMembershipData) obj;
- if (id == null) {
- if (other.id != null)
+ if (groupID == null) {
+ if (other.groupID != null)
+ return false;
+ } else if (!groupID.equals(other.groupID))
+ return false;
+ if (userID == null) {
+ if (other.userID != null)
return false;
- } else if (!id.equals(other.id))
+ } else if (!userID.equals(other.userID))
return false;
return true;
}