You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by mm...@apache.org on 2004/11/20 02:08:07 UTC

svn commit: r105908 - incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model

Author: mmerz
Date: Fri Nov 19 17:08:06 2004
New Revision: 105908

Modified:
   incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/AnnotationMetadata.java
   incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/AnnotationModel.java
   incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181MethodMetadata.java
   incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181MethodMetadataImpl.java
   incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181ParameterMetadata.java
   incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181TypeMetadata.java
Log:
- Cleaned up interfaces.
- Minor bug fixes.



Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/AnnotationMetadata.java
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/AnnotationMetadata.java	(original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/AnnotationMetadata.java	Fri Nov 19 17:08:06 2004
@@ -1,17 +1,27 @@
+package org.apache.beehive.wsm.jsr181.model;
+
 /*
- * Created on Nov 15, 2004
+ * Copyright 2004 The Apache Software Foundation
  *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
+ * 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.
+ *
+ * $Header:$Factory
  */
-package org.apache.beehive.wsm.jsr181.model;
 
 /**
  * @author Daryoush
  *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
  */
 public interface AnnotationMetadata {
-	public abstract void validate() throws ValidationException;
+    void validate() throws ValidationException;
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/AnnotationModel.java
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/AnnotationModel.java	(original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/AnnotationModel.java	Fri Nov 19 17:08:06 2004
@@ -45,6 +45,4 @@
         }
         return null;
     }
-
-    public abstract void validate() throws ValidationException;
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181MethodMetadata.java
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181MethodMetadata.java	(original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181MethodMetadata.java	Fri Nov 19 17:08:06 2004
@@ -1,3 +1,5 @@
+package org.apache.beehive.wsm.jsr181.model;
+
 /*
  * Copyright 2004 The Apache Software Foundation
  *
@@ -16,50 +18,36 @@
  * $Header:$Factory
  */
 
-package org.apache.beehive.wsm.jsr181.model;
-
-import java.util.Collection;
 import java.util.List;
 
 /**
  * @author Daryoush
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
  */
 public interface Jsr181MethodMetadata extends AnnotationMetadata {
-	public abstract boolean isOneWay();
-
-	public abstract void setOneWay(boolean oneway);
-
-	public abstract SecurityRolesInfo getSecurityRoles();
-
-	public abstract void setSecurityRoles(SecurityRolesInfo securityRoles);
-
-	public abstract String getWmAction();
-
-	public abstract void setWmAction(String wmAction);
-
-	public abstract String getWmOperationName();
-
-	public abstract void setWmOperationName(String wmOperationName);
-
-	public abstract String getWrName();
-
-	public abstract void setWrName(String wrName);
-
-	public abstract String getWrTargetNamespace();
-
-	public abstract void setWrTargetNamespace(String wrTargetNamespace);
-
-	public abstract List<Jsr181ParameterMetadata> getParams();
-
-	public abstract void addParams(
-			Collection< ? extends Jsr181ParameterMetadata> parameters);
-
-	public abstract void addParam(Jsr181ParameterMetadata parameter);
-
-	public abstract String getJavaMethodName();
-
-	public abstract Class getJavaReturnType();
+    
+    boolean isOneWay();
+    void setOneWay(boolean oneway);
+    
+    SecurityRolesInfo getSecurityRoles();
+    void setSecurityRoles(SecurityRolesInfo securityRoles);
+    
+    String getWmAction();
+    void setWmAction(String wmAction);
+    
+    String getWmOperationName();
+    void setWmOperationName(String wmOperationName);
+    
+    String getWrName();
+    void setWrName(String wrName);
+    
+    String getWrTargetNamespace();
+    void setWrTargetNamespace(String wrTargetNamespace);
+    
+    List<Jsr181ParameterMetadata> getParams();
+    void addParam(Jsr181ParameterMetadata parameter);
+    void addParams(List<? extends Jsr181ParameterMetadata> parameters);
+
+    String getJavaMethodName();
+    
+    Class getJavaReturnType();
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181MethodMetadataImpl.java
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181MethodMetadataImpl.java	(original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181MethodMetadataImpl.java	Fri Nov 19 17:08:06 2004
@@ -52,11 +52,15 @@
         javaReturnType = returnType;
     }
 
-    public Jsr181MethodMetadataImpl(String javaMethodName,
-                                    Class javaReturnType,
-                                    boolean throwsExceptions,
-                                    Collection<Annotation> annotations,
-                                    List<? extends Jsr181ParameterMetadata> webParams) throws Exception {
+    public Jsr181MethodMetadataImpl(
+        String javaMethodName,
+        Class javaReturnType,
+        boolean throwsExceptions,
+        Collection<Annotation> annotations,
+        List<? extends Jsr181ParameterMetadata> webParams
+    )
+        throws Exception
+    {
         super();
 
         // check parameters
@@ -70,9 +74,9 @@
         //       All methods defined in a service endpoint interface are automatically
         //       considered @WebMethods -- whether they are annotated or not.
         // check required parameters
-        //if (null == methodAnnotation) {
-        //    throw new IllegalArgumentException("@WebMethod is required");
-        //}
+        // if (null == methodAnnotation) {
+        //     throw new IllegalArgumentException("@WebMethod is required");
+        // }
 
         setWrName("result");
         
@@ -122,7 +126,7 @@
                 } else if (a.annotationType() == javax.jws.WebResult.class) {
                     initFromAnnotation((javax.jws.WebResult) a);
                 } else {
-                    // todo: warning -- unknown annotation
+                    // unknown annotation
                 }
             }
         }
@@ -215,7 +219,7 @@
         return Collections.unmodifiableList(params);
     }
 
-    public void addParams(Collection<? extends Jsr181ParameterMetadata> parameters) {
+    public void addParams(List<? extends Jsr181ParameterMetadata> parameters) {
         if (null != parameters) {
             params.addAll(parameters);
         }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181ParameterMetadata.java
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181ParameterMetadata.java	(original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181ParameterMetadata.java	Fri Nov 19 17:08:06 2004
@@ -1,3 +1,5 @@
+package org.apache.beehive.wsm.jsr181.model;
+
 /*
  * Copyright 2004 The Apache Software Foundation
  *
@@ -15,35 +17,26 @@
  *
  * $Header:$Factory
  */
-package org.apache.beehive.wsm.jsr181.model;
-
 
 import javax.jws.WebParam;
 
 /**
  * @author Daryoush
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
  */
 public interface Jsr181ParameterMetadata extends AnnotationMetadata {
-	public abstract boolean isWpHeader();
-
-	public abstract void setWpHeader(boolean wpHeader);
-
-	public abstract WebParam.Mode getWpMode();
-
-	public abstract void setWpMode(WebParam.Mode wpMode);
-
-	public abstract String getWpName();
-
-	public abstract void setWpName(String wpName);
-
-	public abstract String getWpTargetNamespace();
-
-	public abstract void setWpTargetNamespace(String wpTargetNamespace);
-
-	public abstract Class getJavaType();
-
-	public abstract void setJavaType(Class javaType);
+    
+    boolean isWpHeader();
+    void setWpHeader(boolean wpHeader);
+    
+    WebParam.Mode getWpMode();
+    void setWpMode(WebParam.Mode wpMode);
+    
+    String getWpName();
+    void setWpName(String wpName);
+    
+    String getWpTargetNamespace();
+    void setWpTargetNamespace(String wpTargetNamespace);
+    
+    Class getJavaType();
+    void setJavaType(Class javaType);
 }

Modified: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181TypeMetadata.java
==============================================================================
--- incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181TypeMetadata.java	(original)
+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/jsr181/model/Jsr181TypeMetadata.java	Fri Nov 19 17:08:06 2004
@@ -1,3 +1,5 @@
+package org.apache.beehive.wsm.jsr181.model;
+
 /*
  * Copyright 2004 The Apache Software Foundation
  *
@@ -15,14 +17,13 @@
  *
  * $Header:$Factory
  */
-package org.apache.beehive.wsm.jsr181.model;
 
 import java.io.IOException;
 import java.net.URL;
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.xmlbeans.XmlException;import javax.jws.HandlerChain;
+import javax.jws.HandlerChain;
 import javax.jws.WebService;
 import javax.jws.security.SecurityIdentity;
 import javax.jws.security.SecurityRoles;
@@ -32,139 +33,56 @@
 
 import org.xmlsoap.schemas.wsdl.DefinitionsDocument;
 
+import org.apache.xmlbeans.XmlException;
 
 /**
  * @author Daryoush
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
  */
 public interface Jsr181TypeMetadata extends AnnotationMetadata {
-	/**
-	 * Made public so specific implementations can configure handlers relevant
-	 * to their own environment.  Calls to this are ignored if SOAPHandlers are
-	 * already configured.
-	 * e.g. in case the config file is located next to the .jws source file in
-	 * the context root of an axis webapp rather than in the classpath
-	 */
-	public abstract void initHandlersFromChainConfig(URL chainConfigURL,
-			String chainName) throws Exception;
-
-	public abstract DefinitionsDocument getWSDLAsDocument() throws IOException,
-			XmlException;
-
-	/**
-	 * @return Returns the hcFileName.
-	 */
-	public abstract String getHcFileName();
-
-	/**
-	 * @param hcFileName The hcFileName to set.
-	 */
-	public abstract void setHcFileName(String hcFileName);
-
-	/**
-	 * @return Returns the hcName.
-	 */
-	public abstract String getHcName();
-
-	/**
-	 * @param hcName The hcName to set.
-	 */
-	public abstract void setHcName(String hcName);
-
-	/**
-	 * @return Returns the securityRoles.
-	 */
-	public abstract SecurityRolesInfo getSecurityRoles();
-
-	/**
-	 * @param securityRoles The securityRoles to set.
-	 */
-	public abstract void setSecurityRoles(SecurityRolesInfo securityRoles);
-
-	/**
-	 * @return Returns the siRunAs.
-	 */
-	public abstract String getSiValue();
-
-	/**
-	 * @param siValue The siRunAs to set.
-	 */
-	public abstract void setSiValue(String siValue);
-
-	/**
-	 * @return Returns the soapBinding.
-	 */
-	public abstract SOAPBindingInfo getSoapBinding();
-
-	/**
-	 * @param soapBinding The soapBinding to set.
-	 */
-	public abstract void setSoapBinding(SOAPBindingInfo soapBinding);
-
-	/**
-	 * @return Returns the wsName.
-	 */
-	public abstract String getWsName();
-
-	/**
-	 * @param wsName The wsName to set.
-	 */
-	public abstract void setWsName(String wsName);
-
-	/**
-	 * @return Returns the wsServiceName.
-	 */
-	public abstract String getWsServiceName();
-
-	/**
-	 * @param wsServiceName The wsServiceName to set.
-	 */
-	public abstract void setWsServiceName(String wsServiceName);
-
-	/**
-	 * @return Returns the wsTargetNamespace.
-	 */
-	public abstract String getWsTargetNamespace();
-
-	/**
-	 * @param wsTargetNamespace The wsTargetNamespace to set.
-	 */
-	public abstract void setWsTargetNamespace(String wsTargetNamespace);
-
-	/**
-	 * @return Returns the wsEndpointInterface.
-	 */
-	public abstract String getWsEndpointInterface();
-
-	/**
-	 * @param wsEndpointInterface The wsEndpointInterface to set.
-	 */
-	public abstract void setWsEndpointInterface(String wsEndpointInterface);
-
-	/**
-	 * @return Returns the wsWsdlLocation.
-	 */
-	public abstract String getWsWsdlLocation();
-
-	/**
-	 * @param wsWsdlLocation The wsWsdlLocation to set.
-	 */
-	public abstract void setWsWsdlLocation(String wsWsdlLocation);
-
-	/**
-	 * @return Returns the methods.
-	 */
-	public abstract Collection<Jsr181MethodMetadata> getMethods();
-
-	public abstract void addMethod(Jsr181MethodMetadata method);
-
-	public abstract List<SOAPMessageHandlerInfo> getSoapHandlers();
 
-	public abstract void addSOAPHandler(SOAPMessageHandlerInfo soapHandler);
+    void initHandlersFromChainConfig(URL chainConfigURL, String chainName)
+        throws Exception;
 
-	public abstract String getServiceImplementationBean();
+    DefinitionsDocument getWSDLAsDocument()
+        throws IOException, XmlException;
 
-	public abstract String getServiceEndpointInterface();
+    String getHcFileName();
+    void setHcFileName(String hcFileName);
+    
+    String getHcName();
+    void setHcName(String hcName);
+    
+    SecurityRolesInfo getSecurityRoles();
+    void setSecurityRoles(SecurityRolesInfo securityRoles);
+    
+    String getSiValue();
+    void setSiValue(String siValue);
+    
+    SOAPBindingInfo getSoapBinding();
+    void setSoapBinding(SOAPBindingInfo soapBinding);
+    
+    String getWsName();
+    void setWsName(String wsName);
+    
+    String getWsServiceName();
+    void setWsServiceName(String wsServiceName);
+    
+    String getWsTargetNamespace();
+    void setWsTargetNamespace(String wsTargetNamespace);
+    
+    String getWsEndpointInterface();
+    void setWsEndpointInterface(String wsEndpointInterface);
+    
+    String getWsWsdlLocation();
+    void setWsWsdlLocation(String wsWsdlLocation);
+    
+    Collection<Jsr181MethodMetadata> getMethods();
+    void addMethod(Jsr181MethodMetadata method);
+    
+    List<SOAPMessageHandlerInfo> getSoapHandlers();
+    void addSOAPHandler(SOAPMessageHandlerInfo soapHandler);
+    
+    String getServiceImplementationBean();
+    
+    String getServiceEndpointInterface();
 }