summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/tps
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2014-04-01 15:28:16 -0400
committerEndi S. Dewata <edewata@redhat.com>2014-04-08 16:06:34 -0400
commitd90b04486c52833e085a1dd728cfc2210fd1b03f (patch)
tree3bf363e849aad31fa8392d539bf988488c3efc79 /base/common/src/com/netscape/certsrv/tps
parent6b50a563730467a419fe42800ad33b5f5eb385a0 (diff)
downloadpki-d90b04486c52833e085a1dd728cfc2210fd1b03f.tar.gz
pki-d90b04486c52833e085a1dd728cfc2210fd1b03f.tar.xz
pki-d90b04486c52833e085a1dd728cfc2210fd1b03f.zip
Added profile mapping page.
A new profile mapping page has been added to TPS UI. The page is fully functional like other existing pages. The REST service for profile mappings has been updated to be more consistent with other resources. Ticket #654
Diffstat (limited to 'base/common/src/com/netscape/certsrv/tps')
-rw-r--r--base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingData.java29
-rw-r--r--base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java4
2 files changed, 9 insertions, 24 deletions
diff --git a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingData.java b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingData.java
index 2ca955b4e..96ec4e078 100644
--- a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingData.java
+++ b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingData.java
@@ -21,7 +21,6 @@ package com.netscape.certsrv.tps.profile;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -59,7 +58,7 @@ public class ProfileMappingData {
String id;
String status;
- Map<String, String> properties = new LinkedHashMap<String, String>();
+ Map<String, String> properties;
Link link;
@@ -88,24 +87,7 @@ public class ProfileMappingData {
}
public void setProperties(Map<String, String> properties) {
- this.properties.clear();
- this.properties.putAll(properties);
- }
-
- public Collection<String> getPropertyNames() {
- return properties.keySet();
- }
-
- public String getProperty(String name) {
- return properties.get(name);
- }
-
- public void setProperty(String name, String value) {
- properties.put(name, value);
- }
-
- public String removeProperty(String name) {
- return properties.remove(name);
+ this.properties = properties;
}
public static class MapAdapter extends XmlAdapter<PropertyList, Map<String, String>> {
@@ -220,8 +202,11 @@ public class ProfileMappingData {
ProfileMappingData before = new ProfileMappingData();
before.setID("profileMapping1");
before.setStatus("ENABLED");
- before.setProperty("param1", "value1");
- before.setProperty("param2", "value2");
+
+ Map<String, String> properties = new LinkedHashMap<String, String>();
+ properties.put("param1", "value1");
+ properties.put("param2", "value2");
+ before.setProperties(properties);
String string = before.toString();
System.out.println(string);
diff --git a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java
index 5828a3317..5b819b899 100644
--- a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java
+++ b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingResource.java
@@ -20,7 +20,6 @@ package com.netscape.certsrv.tps.profile;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
@@ -30,6 +29,7 @@ import org.jboss.resteasy.annotations.ClientResponseType;
import com.netscape.certsrv.acls.ACLMapping;
import com.netscape.certsrv.authentication.AuthMethodMapping;
+import com.netscape.certsrv.base.PATCH;
/**
@@ -57,7 +57,7 @@ public interface ProfileMappingResource {
@ClientResponseType(entityType=ProfileMappingData.class)
public Response addProfileMapping(ProfileMappingData profileMappingData);
- @PUT
+ @PATCH
@Path("{profileMappingID}")
@ACLMapping("profile-mappings.modify")
@ClientResponseType(entityType=ProfileMappingData.class)