diff options
Diffstat (limited to 'base/common/src/com/netscape/certsrv/profile/ProfileDataInfos.java')
-rw-r--r-- | base/common/src/com/netscape/certsrv/profile/ProfileDataInfos.java | 58 |
1 files changed, 13 insertions, 45 deletions
diff --git a/base/common/src/com/netscape/certsrv/profile/ProfileDataInfos.java b/base/common/src/com/netscape/certsrv/profile/ProfileDataInfos.java index ed2c11cf7..a323491b4 100644 --- a/base/common/src/com/netscape/certsrv/profile/ProfileDataInfos.java +++ b/base/common/src/com/netscape/certsrv/profile/ProfileDataInfos.java @@ -18,58 +18,29 @@ package com.netscape.certsrv.profile; import java.util.Collection; -import java.util.List; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; -import com.netscape.certsrv.base.Link; +import org.jboss.resteasy.plugins.providers.atom.Link; -@XmlRootElement(name = "ProfileDataInfos") -public class ProfileDataInfos { - - protected Collection<ProfileDataInfo> profileInfos; - protected List<Link> links; - - /** - * @return the ProfileInfos - */ - @XmlElementRef - public Collection<ProfileDataInfo> getProfileInfos() { - return profileInfos; - } +import com.netscape.certsrv.base.DataCollection; +//import com.netscape.certsrv.base.Link; - /** - * @param ProfileInfos theProfileInfos to set - */ - public void setProfileInfos(Collection<ProfileDataInfo> profileInfos) { - this.profileInfos = profileInfos; - } +@XmlRootElement(name = "ProfileDataInfos") +public class ProfileDataInfos extends DataCollection<ProfileDataInfo> { - /** - * @return the links - */ @XmlElementRef - public List<Link> getLinks() { - return links; - } - - /** - * @param links the links to set - */ - public void setLinks(List<Link> links) { - this.links = links; + public Collection<ProfileDataInfo> getEntries() { + return super.getEntries(); } @XmlTransient public String getNext() { - if (links == null) { - return null; - } - for (Link link : links) { - if ("next".equals(link.getRelationship())) { - return link.getHref(); + for (Link link : getLinks()) { + if ("next".equals(link. getRel())) { + return link.getHref().toString(); } } return null; @@ -77,12 +48,9 @@ public class ProfileDataInfos { @XmlTransient public String getPrevious() { - if (links == null) { - return null; - } - for (Link link : links) { - if ("previous".equals(link.getRelationship())) { - return link.getHref(); + for (Link link : getLinks()) { + if ("previous".equals(link.getRel())) { + return link.getHref().toString(); } } return null; |