[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsrf-commits
Subject:    svn commit: r239431 - in /webservices/wsrf/trunk/src:
From:       ips () apache ! org
Date:       2005-08-23 16:46:02
Message-ID: 20050823164603.7300.qmail () minotaur ! apache ! org
[Download RAW message or body]

Author: ips
Date: Tue Aug 23 09:45:58 2005
New Revision: 239431

URL: http://svn.apache.org/viewcvs?rev=239431&view=rev
Log:
a test JACC provider

Added:
    webservices/wsrf/trunk/src/sandbox/
    webservices/wsrf/trunk/src/sandbox/jacc/
    webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java
    webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java
    webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java
Modified:
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java
  webservices/wsrf/trunk/src/site/content/xdocs/release.xml

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java
                
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java?rev=239431&r1=239430&r2=239431&view=diff
 ==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java \
                (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java \
Tue Aug 23 09:45:58 2005 @@ -276,7 +276,7 @@
          throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
                                    "A WS-Addressing Action SOAP header element is \
required by this endpoint." );  }
-       String action = actionHeaderElem.getValue();      
+       String action = actionHeaderElem.getValue();
        try
        {
            new URI( action );
@@ -352,14 +352,12 @@
    private String getBaseURL( URL serviceURL )
    {
       String s = serviceURL.toString(  );
-      s = s.substring( 0,
-                       s.lastIndexOf( "/" ) );
-      return s;
+      return s.substring( 0, s.lastIndexOf( "/" ) );
    }
 
    private void extractFields( SOAPMessageContext msgContext )
    {
-      m_action         = getAddressingAction( msgContext );
+      m_action         = getAddressingAction( msgContext );  // check for wsa:Action \
first, since it's required by WS-A  m_serviceURL     = getServiceURL( msgContext );
       m_serviceName    = getServiceName( msgContext );
       m_baseURL        = getBaseURL( m_serviceURL );

Added: webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java?rev=239431&view=auto
 ==============================================================================
--- webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java (added)
+++ webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java Tue Aug 23 09:45:58 2005
@@ -0,0 +1,68 @@
+/*=============================================================================*
+ *  Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package jacc;
+
+import javax.security.jacc.PolicyContext;
+import javax.security.jacc.PolicyContextException;
+import javax.servlet.http.HttpServletRequest;
+import java.security.CodeSource;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+
+/**
+ * TODO
+ */
+public class TestPolicy extends Policy
+{
+
+    public TestPolicy()
+    {
+        System.out.println( "***** In TestPolicy() constructor *****" );
+    }
+
+    public void refresh()
+    {
+        return;
+    }
+
+    public PermissionCollection getPermissions( CodeSource codesource )
+    {
+        return new Permissions();
+    }
+
+    public boolean implies( ProtectionDomain domain, Permission perm )
+    {
+        System.out.println( "######################< in TestPolicy#implies() \
>#####################\n" ); +        if ( PolicyContext.getHandlerKeys().contains( \
> "javax.servlet.http.HttpServletRequest" ) )
+        {
+            try
+            {
+                HttpServletRequest servletRequest = (HttpServletRequest) \
PolicyContext.getContext( +                        \
"javax.servlet.http.HttpServletRequest" ); +                System.out.println( \
"Servlet request: " + servletRequest ); +            }
+            catch ( PolicyContextException pce )
+            {
+                pce.printStackTrace();
+            }
+        }
+        return true;
+    }
+
+}

Added: webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java?rev=239431&view=auto
 ==============================================================================
--- webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java (added)
+++ webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java Tue Aug 23 \
09:45:58 2005 @@ -0,0 +1,107 @@
+/*=============================================================================*
+ *  Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package jacc;
+
+import javax.security.jacc.PolicyConfiguration;
+import javax.security.jacc.PolicyContextException;
+import java.security.PermissionCollection;
+import java.security.Permission;
+
+/**
+ * TODO
+ */
+public class TestPolicyConfiguration implements PolicyConfiguration
+{
+
+    private String m_contextID;
+
+    public TestPolicyConfiguration( String contextID )
+    {
+        m_contextID = contextID;
+    }
+
+    public String getContextID() throws PolicyContextException
+    {
+        return m_contextID;
+    }
+
+    public void addToRole( String faultString, PermissionCollection \
permissionCollection ) +            throws PolicyContextException
+    {
+        System.out.println( "addToRole" );
+    }
+
+    public void addToRole( String faultString, Permission permission ) throws \
PolicyContextException +    {
+        System.out.println( "addToRole" );
+    }
+
+    public void addToUncheckedPolicy( PermissionCollection permissionCollection ) \
throws PolicyContextException +    {
+        System.out.println( "addToUncheckedPolicy" );
+    }
+
+    public void addToUncheckedPolicy( Permission permission ) throws \
PolicyContextException +    {
+        System.out.println( "addToUncheckedPolicy" );
+    }
+
+    public void addToExcludedPolicy( PermissionCollection permissionCollection ) \
throws PolicyContextException +    {
+        System.out.println( "addToExcludedPolicy" );
+    }
+
+    public void addToExcludedPolicy( Permission permission ) throws \
PolicyContextException +    {
+        System.out.println( "addToExcludedPolicy" );
+    }
+
+    public void removeRole( String faultString ) throws PolicyContextException
+    {
+        System.out.println( "removeRole" );
+    }
+
+    public void removeUncheckedPolicy() throws PolicyContextException
+    {
+        System.out.println( "removeUncheckedPolicy" );
+    }
+
+    public void removeExcludedPolicy() throws PolicyContextException
+    {
+        System.out.println( "removeExcludedPolicy" );
+    }
+
+    public void linkConfiguration( PolicyConfiguration policyConfiguration ) throws \
PolicyContextException +    {
+        System.out.println( "linkConfiguration" );
+    }
+
+    public void delete() throws PolicyContextException
+    {
+        System.out.println( "delete" );
+    }
+
+    public void commit() throws PolicyContextException
+    {
+        System.out.println( "commit" );
+    }
+
+    public boolean inService() throws PolicyContextException
+    {
+        return true;
+    }
+
+}

Added: webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java?rev=239431&view=auto
 ==============================================================================
--- webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java \
                (added)
+++ webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java Tue \
Aug 23 09:45:58 2005 @@ -0,0 +1,43 @@
+/*=============================================================================*
+ *  Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package jacc;
+
+import javax.security.jacc.PolicyConfiguration;
+import javax.security.jacc.PolicyConfigurationFactory;
+import javax.security.jacc.PolicyContextException;
+
+/**
+ * TODO
+ */
+public class TestPolicyConfigurationFactory extends PolicyConfigurationFactory
+{
+
+    public TestPolicyConfigurationFactory()
+    {
+        System.out.println( "***** In TestPolicyConfigurationFactory() constructor \
*****" ); +    }
+
+    public PolicyConfiguration getPolicyConfiguration( String contextID, boolean \
remove ) throws PolicyContextException +    {
+        return new TestPolicyConfiguration( contextID );
+    }
+
+    public boolean inService( String contextID ) throws PolicyContextException
+    {
+        return true;
+    }
+
+}

Modified: webservices/wsrf/trunk/src/site/content/xdocs/release.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/site/content/xdocs/release.xml?rev=239431&r1=239430&r2=239431&view=diff
 ==============================================================================
--- webservices/wsrf/trunk/src/site/content/xdocs/release.xml (original)
+++ webservices/wsrf/trunk/src/site/content/xdocs/release.xml Tue Aug 23 09:45:58 \
2005 @@ -12,8 +12,8 @@
     <section>
        <title>v1.0</title>
        <ul>
-          <li>Download: <a href="http://www.apache.org/dist/ws/wsrf/1.0/bin/">binary \
                distribution</a>,         
-                        <a href="http://www.apache.org/dist/ws/wsrf/1.0/src/">source \
distribution</a></li> +          <li>Download: <a \
href="http://www.apache.org/dyn/closer.cgi/ws/wsrf/1.0/bin/">binary distribution</a>, \
 +                        <a \
href="http://www.apache.org/dyn/closer.cgi/ws/wsrf/1.0/src/">source \
distribution</a></li>  </ul>
     </section>    
     <section>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic