diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2016-10-20 00:54:47 +0200 |
|---|---|---|
| committer | Endi S. Dewata <edewata@redhat.com> | 2016-11-22 18:33:09 +0100 |
| commit | 6d5d15edebeb1ba113e4f3d5b2bb1ba93a92ce1d (patch) | |
| tree | 1ac8b0fb19e3db44ce87be19148a6819227541fa /base/common/src | |
| parent | 0a6289f5d94ec238e66d05782b9fdd2207ac7e9a (diff) | |
Updated AccountInfo.
The AccountInfo has been changed to extend the ResourceMessage
such that it can be used to pass the list of accessible
components as an attribute.
https://fedorahosted.org/pki/ticket/2523
Diffstat (limited to 'base/common/src')
| -rw-r--r-- | base/common/src/com/netscape/certsrv/account/AccountInfo.java | 8 | ||||
| -rw-r--r-- | base/common/src/com/netscape/certsrv/base/ResourceMessage.java | 11 |
2 files changed, 14 insertions, 5 deletions
diff --git a/base/common/src/com/netscape/certsrv/account/AccountInfo.java b/base/common/src/com/netscape/certsrv/account/AccountInfo.java index 7943d229a..3310bf0d0 100644 --- a/base/common/src/com/netscape/certsrv/account/AccountInfo.java +++ b/base/common/src/com/netscape/certsrv/account/AccountInfo.java @@ -33,11 +33,13 @@ import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import com.netscape.certsrv.base.ResourceMessage; + /** * @author Endi S. Dewata */ @XmlRootElement(name="Account") -public class AccountInfo { +public class AccountInfo extends ResourceMessage { public static Marshaller marshaller; public static Unmarshaller unmarshaller; @@ -98,7 +100,7 @@ public class AccountInfo { @Override public int hashCode() { final int prime = 31; - int result = 1; + int result = super.hashCode(); result = prime * result + ((email == null) ? 0 : email.hashCode()); result = prime * result + ((fullName == null) ? 0 : fullName.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); @@ -110,7 +112,7 @@ public class AccountInfo { public boolean equals(Object obj) { if (this == obj) return true; - if (obj == null) + if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; diff --git a/base/common/src/com/netscape/certsrv/base/ResourceMessage.java b/base/common/src/com/netscape/certsrv/base/ResourceMessage.java index 1214b45fb..85d0d07a4 100644 --- a/base/common/src/com/netscape/certsrv/base/ResourceMessage.java +++ b/base/common/src/com/netscape/certsrv/base/ResourceMessage.java @@ -26,6 +26,7 @@ import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.adapters.XmlAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import com.netscape.certsrv.account.AccountInfo; import com.netscape.certsrv.key.AsymKeyGenerationRequest; import com.netscape.certsrv.key.KeyArchivalRequest; import com.netscape.certsrv.key.KeyRecoveryRequest; @@ -35,8 +36,14 @@ import com.netscape.certsrv.key.SymKeyGenerationRequest; * @author Ade Lee */ @XmlRootElement(name = "ResourceMessage") -@XmlSeeAlso({ KeyArchivalRequest.class, KeyRecoveryRequest.class, SymKeyGenerationRequest.class, - PKIException.Data.class, AsymKeyGenerationRequest.class }) +@XmlSeeAlso({ + AccountInfo.class, + KeyArchivalRequest.class, + KeyRecoveryRequest.class, + SymKeyGenerationRequest.class, + PKIException.Data.class, + AsymKeyGenerationRequest.class +}) @XmlAccessorType(XmlAccessType.NONE) public class ResourceMessage { |
