cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject svn commit: r1561488 - in /cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest: IdpService.java IdpServiceImpl.java
Date Sun, 26 Jan 2014 13:58:07 GMT
Author: owulff
Date: Sun Jan 26 13:58:06 2014
New Revision: 1561488

URL: http://svn.apache.org/r1561488
Log:
Minor fix to REST interface

Modified:
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpService.java
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpServiceImpl.java

Modified: cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpService.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpService.java?rev=1561488&r1=1561487&r2=1561488&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpService.java
(original)
+++ cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpService.java
Sun Jan 26 13:58:06 2014
@@ -72,9 +72,9 @@ public interface IdpService {
                                  Application application);
     
     @DELETE
-    @Path("{realm}/applications")
+    @Path("{realm}/applications/{realmApplication}")
     Response removeApplicationFromIdp(@Context UriInfo ui, @PathParam("realm") String realm,
-                                      Application application);
+                                      @PathParam("realmApplication") String applicationRealm);
     
     @POST
     @Path("{realm}/trusted-idps")
@@ -82,9 +82,9 @@ public interface IdpService {
                                 TrustedIdp trustedIdp);
     
     @DELETE
-    @Path("{realm}/trusted-idps")
+    @Path("{realm}/trusted-idps/{realmTrustedIdp}")
     Response removeTrustedIdpFromIdp(@Context UriInfo ui, @PathParam("realm") String realm,
-                                     TrustedIdp trustedIdp);
+                                     @PathParam("realmTrustedIdp") String trustedIdpRealm);
     
     @POST
     @Path("{realm}/claims")
@@ -92,8 +92,8 @@ public interface IdpService {
                            Claim claim);
     
     @DELETE
-    @Path("{realm}/claims")
+    @Path("{realm}/claims/{claimType}")
     Response removeClaimFromIdp(@Context UriInfo ui, @PathParam("realm") String realm,
-                                Claim claim);    
+                                @PathParam("claimType") String claimType);    
 
 }

Modified: cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpServiceImpl.java?rev=1561488&r1=1561487&r2=1561488&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpServiceImpl.java
(original)
+++ cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IdpServiceImpl.java
Sun Jan 26 13:58:06 2014
@@ -139,18 +139,18 @@ public class IdpServiceImpl implements I
     }
     
     @Override
-    public Response removeApplicationFromIdp(UriInfo ui, String realm,  Application application)
{
+    public Response removeApplicationFromIdp(UriInfo ui, String realm,  String applicationRealm)
{
         Idp idp = idpDAO.getIdp(realm, Arrays.asList("all"));
         
         Application foundItem = null; 
         for (Application item : idp.getApplications()) {
-            if (item.getRealm().equals(application.getRealm())) {
+            if (item.getRealm().equals(applicationRealm)) {
                 foundItem = item;
                 break;
             }
         }
         if (foundItem == null) {
-            LOG.warn("Application '" + application.getRealm() + "' not found");
+            LOG.warn("Application '" + applicationRealm + "' not found");
             throw new WebApplicationException(Status.NOT_FOUND);
         }
         idpDAO.removeApplicationFromIdp(idp, foundItem);
@@ -176,18 +176,18 @@ public class IdpServiceImpl implements I
     }
     
     @Override
-    public Response removeTrustedIdpFromIdp(UriInfo ui, String realm, TrustedIdp trustedIdp)
{
+    public Response removeTrustedIdpFromIdp(UriInfo ui, String realm, String trustedIdpRealm)
{
         Idp idp = idpDAO.getIdp(realm, Arrays.asList("all"));
         
         TrustedIdp foundItem = null; 
         for (TrustedIdp item : idp.getTrustedIdps()) {
-            if (item.getRealm().equals(trustedIdp.getRealm())) {
+            if (item.getRealm().equals(trustedIdpRealm)) {
                 foundItem = item;
                 break;
             }
         }
         if (foundItem == null) {
-            LOG.warn("Trusted IDP '" + trustedIdp.getRealm() + "' not found");
+            LOG.warn("Trusted IDP '" + trustedIdpRealm + "' not found");
             throw new WebApplicationException(Status.NOT_FOUND);
         }
         idpDAO.removeTrustedIdpFromIdp(idp, foundItem);
@@ -209,18 +209,18 @@ public class IdpServiceImpl implements I
     }
     
     @Override
-    public Response removeClaimFromIdp(UriInfo ui, String realm, Claim claim) {
+    public Response removeClaimFromIdp(UriInfo ui, String realm, String claimType) {
         Idp idp = idpDAO.getIdp(realm, Arrays.asList("all"));
         
         Claim foundItem = null; 
         for (Claim item : idp.getClaimTypesOffered()) {
-            if (item.getClaimType().toString().equals(claim.getClaimType().toString())) {
+            if (item.getClaimType().toString().equals(claimType)) {
                 foundItem = item;
                 break;
             }
         }
         if (foundItem == null) {
-            LOG.warn("Claim '" + claim.getClaimType() + "' not found");
+            LOG.warn("Claim '" + claimType + "' not found");
             throw new WebApplicationException(Status.NOT_FOUND);
         }
         idpDAO.removeClaimFromIdp(idp, foundItem);



Mime
View raw message