summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/servlet/base
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-01-12 12:24:24 -0500
committerAde Lee <alee@redhat.com>2012-01-16 13:04:26 -0500
commit8ff3cae8509bf5527d49166f818776cfc618555c (patch)
treea7cf488310c08e68daa529f4f016dbae2592d4b8 /pki/base/common/src/com/netscape/cms/servlet/base
parent0491736b2570447391835bc2e5282d809f0de4f1 (diff)
downloadpki-8ff3cae8509bf5527d49166f818776cfc618555c.tar.gz
pki-8ff3cae8509bf5527d49166f818776cfc618555c.tar.xz
pki-8ff3cae8509bf5527d49166f818776cfc618555c.zip
Enhanced new REST search interface for keys and key requests
Defined parameters that can be searched for in key and keyrequest searches. Searches for KeyRequests and Keys will perform VLV searches if those searches are defined. The results will include links to next and previous pages in the results. Also added maxTime and maxResults parameters for regular searches. These will be operational unless they exceed server defined limits - which are enforced at the repo level. Modified link URL from "link" to "Link"
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/servlet/base')
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/base/model/Link.java88
1 files changed, 88 insertions, 0 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/base/model/Link.java b/pki/base/common/src/com/netscape/cms/servlet/base/model/Link.java
new file mode 100644
index 000000000..7fd850a22
--- /dev/null
+++ b/pki/base/common/src/com/netscape/cms/servlet/base/model/Link.java
@@ -0,0 +1,88 @@
+// --- BEGIN COPYRIGHT BLOCK ---
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// (C) 2011 Red Hat, Inc.
+// All rights reserved.
+// --- END COPYRIGHT BLOCK ---/**
+package com.netscape.cms.servlet.base.model;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @author alee
+ *
+ */
+@XmlRootElement(name = "Link")
+public class Link {
+ protected String relationship;
+ protected String href;
+ protected String type;
+
+ public Link() {
+ // required for jaxb
+ }
+
+ public Link(String relationship, String href, String type) {
+ this.relationship = relationship;
+ this.href = href;
+ this.type = type;
+ }
+
+ /**
+ * @return the relationship
+ */
+ @XmlAttribute(name = "rel")
+ public String getRelationship() {
+ return relationship;
+ }
+
+ /**
+ * @param relationship the relationship to set
+ */
+ public void setRelationship(String relationship) {
+ this.relationship = relationship;
+ }
+
+ /**
+ * @return the href
+ */
+ @XmlAttribute
+ public String getHref() {
+ return href;
+ }
+
+ /**
+ * @param href the href to set
+ */
+ public void setHref(String href) {
+ this.href = href;
+ }
+
+ /**
+ * @return the type
+ */
+ @XmlAttribute
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * @param type the type to set
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+}