cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1546564 - in /cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest: IDPServiceConfigs.java IDPServices.java IDPTrustedIdps.java
Date Fri, 29 Nov 2013 13:58:33 GMT
Author: sergeyb
Date: Fri Nov 29 13:58:33 2013
New Revision: 1546564

URL: http://svn.apache.org/r1546564
Log:
Fixing few typos and doing some minor refactoring to IDP rest service

Modified:
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServiceConfigs.java
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServices.java
    cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPTrustedIdps.java

Modified: cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServiceConfigs.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServiceConfigs.java?rev=1546564&r1=1546563&r2=1546564&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServiceConfigs.java
(original)
+++ cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServiceConfigs.java
Fri Nov 29 13:58:33 2013
@@ -21,10 +21,6 @@ package org.apache.cxf.fediz.service.idp
 
 import java.util.Map;
 
-import javax.ws.rs.GET;
-import javax.ws.rs.NotFoundException;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
 import javax.xml.bind.annotation.XmlRootElement;
 
 import org.apache.cxf.fediz.service.idp.model.ServiceConfig;
@@ -49,14 +45,18 @@ public class IDPServiceConfigs {
         this.services = services;
     }
 
-    @GET
-    @Path("wtrealm")
-    public ServiceConfig getServiceConfig(@PathParam("wtrealm") String wtrealm) {
-        ServiceConfig config = services.get(wtrealm);
-        if (config == null) {
-            throw new NotFoundException();
-        }
-        return config;
-    }
-
+//    @GET
+//    @Path("{wtrealm}")
+//    public ServiceConfig getServiceConfig(@PathParam("wtrealm") String wtrealm) {
+//        ServiceConfig config = services.get(wtrealm);
+//        if (config == null) {
+//            throw new NotFoundException();
+//        }
+//        return config;
+//    }
+
+//    @GET
+//    public IDPServiceConfigs getState() {
+//        return this;
+//    }
 }
\ No newline at end of file

Modified: cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServices.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServices.java?rev=1546564&r1=1546563&r2=1546564&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServices.java
(original)
+++ cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPServices.java
Fri Nov 29 13:58:33 2013
@@ -31,6 +31,8 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.Response;
 
 import org.apache.cxf.fediz.service.idp.model.IDPConfig;
+import org.apache.cxf.fediz.service.idp.model.ServiceConfig;
+import org.apache.cxf.fediz.service.idp.model.TrustedIDPConfig;
 import org.apache.cxf.fediz.service.idp.service.ConfigService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -112,13 +114,37 @@ public class IDPServices {
     public IDPServiceConfigs getServices(@PathParam("realm") String realm) {
         return new IDPServiceConfigs(getIDP(realm).getServices());
     }
+    
+    @GET
+    @Path("{realm}/services/{wtrealm}")
+    public ServiceConfig getServiceConfig(@PathParam("realm") String realm, 
+                                          @PathParam("wtrealm") String wtrealm) {
+        return getIDP(realm).getServices().get(wtrealm);
+    }
 
+//    @Path("{realm}/services")
+//    public IDPServiceConfigs getServicesSubresource(@PathParam("realm") String realm) {
+//        return new IDPServiceConfigs(getIDP(realm).getServices());
+//    }
+    
     @GET
     @Path("{realm}/trusted-idps")
     public IDPTrustedIdps getTrustedIdps(@PathParam("realm") String realm) {
         return new IDPTrustedIdps(getIDP(realm).getTrustedIDPs());
     }
+    
+    @GET
+    @Path("{realm}/trusted-idps/{whr}")
+    public TrustedIDPConfig getTrustedIdpConfig(@PathParam("realm") String realm,
+                                                @PathParam("whr") String whr) {
+        return getIDP(realm).getTrustedIDPs().get(whr);
+    }
 
+//    @Path("{realm}/trusted-idps")
+//    public IDPTrustedIdps getTrustedIdpsSubresource(@PathParam("realm") String realm) {
+//        return new IDPTrustedIdps(getIDP(realm).getTrustedIDPs());
+//    }
+    
     public ConfigService getConfigService() {
         return configService;
     }

Modified: cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPTrustedIdps.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPTrustedIdps.java?rev=1546564&r1=1546563&r2=1546564&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPTrustedIdps.java
(original)
+++ cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/rest/IDPTrustedIdps.java
Fri Nov 29 13:58:33 2013
@@ -21,10 +21,6 @@ package org.apache.cxf.fediz.service.idp
 
 import java.util.Map;
 
-import javax.ws.rs.GET;
-import javax.ws.rs.NotFoundException;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
 import javax.xml.bind.annotation.XmlRootElement;
 
 import org.apache.cxf.fediz.service.idp.model.TrustedIDPConfig;
@@ -49,14 +45,19 @@ public class IDPTrustedIdps {
         this.trustedIDPs = trustedIDPs;
     }
 
-    @GET
-    @Path("wtrealm")
-    public TrustedIDPConfig getTrustedIDPConfig(@PathParam("whr") String whr) {
-        TrustedIDPConfig config = trustedIDPs.get(whr);
-        if (config == null) {
-            throw new NotFoundException();
-        }
-        return config;
-    }
-
+//    @GET
+//    @Path("{whr}")
+//    public TrustedIDPConfig getTrustedIDPConfig(@PathParam("whr") String whr) {
+//        TrustedIDPConfig config = trustedIDPs.get(whr);
+//        if (config == null) {
+//            throw new NotFoundException();
+//        }
+//        return config;
+//    }
+
+//    @GET
+//    public IDPTrustedIdps getState() {   
+//        return this;
+//    }
+    
 }
\ No newline at end of file



Mime
View raw message