axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r369365 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/client/ core/src/org/apache/axis2/context/ core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/description/ core/src/org/apache/axis2/engine/ core/src...
Date Mon, 16 Jan 2006 06:09:25 GMT
Author: sanka
Date: Sun Jan 15 22:08:44 2006
New Revision: 369365

URL: http://svn.apache.org/viewcvs?rev=369365&view=rev
Log:
Added: AxisDescription as the parent of the all Axis* classes.

Added:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java
Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisServiceBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java
    webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/OperationContextTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsJMSServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/UtilServer.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/MEPClient.java Sun Jan 15 22:08:44 2006
@@ -26,6 +26,7 @@
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.i18n.Messages;
@@ -147,7 +148,7 @@
 
         configurationContext.getAxisConfiguration().addService(axisService);
         serviceContext = new ServiceGroupContext(configurationContext,
-                                                 axisService.getParent()).getServiceContext(axisService);
+                                                 (AxisServiceGroup) axisService.getParent()).getServiceContext(axisService);
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java Sun Jan 15 22:08:44 2006
@@ -10,6 +10,7 @@
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.ClientUtils;
 import org.apache.axis2.description.OutInAxisOperation;
 import org.apache.axis2.description.OutOnlyAxisOperation;
@@ -101,7 +102,7 @@
         // context and then get the service context for myself as I'll need that
         // later for stuff that I gotta do
         ServiceGroupContext sgc = new ServiceGroupContext(this.configContext,
-                this.axisService.getParent());
+                (AxisServiceGroup) this.axisService.getParent());
         this.serviceContext = sgc.getServiceContext(this.axisService);
     }
 
@@ -133,7 +134,7 @@
                 this.axisConfig.addService(this.axisService);
             }
             ServiceGroupContext sgc = new ServiceGroupContext(this.configContext,
-                    this.axisService.getParent());
+                    (AxisServiceGroup) this.axisService.getParent());
             this.serviceContext = sgc.getServiceContext(this.axisService);
         } catch (IOException e) {
             throw new AxisFault(e);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java Sun Jan 15 22:08:44 2006
@@ -102,7 +102,7 @@
                 }
 
                 if (messageContext.getAxisService() != null) {
-                    AxisServiceGroup axisServiceGroup = messageContext.getAxisService().getParent();
+                    AxisServiceGroup axisServiceGroup = (AxisServiceGroup) messageContext.getAxisService().getParent();
 
                     serviceGroupContext = new ServiceGroupContext(this, axisServiceGroup);
                     serviceContext = serviceGroupContext.getServiceContext(messageContext.getAxisService());

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java Sun Jan 15 22:08:44 2006
@@ -112,11 +112,7 @@
                 processHostCongiguration(hostElement, axisConfig);
             }
 
-            // setting the PolicyInclude
-            PolicyInclude policyInclude = new PolicyInclude();
-            axisConfig.setPolicyInclude(policyInclude);
-
-            // processing <wsp:Policy> .. </..> elements
+           // processing <wsp:Policy> .. </..> elements
             Iterator policyElements = config_element.getChildrenWithName(new QName(POLICY_NS_URI,
                     TAG_POLICY));
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisServiceBuilder.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisServiceBuilder.java Sun Jan 15 22:08:44 2006
@@ -159,7 +159,7 @@
 
 		// ///////////////// adding Policies ////////////////////////////
 
-		PolicyInclude policyInclude = new PolicyInclude();
+		PolicyInclude policyInclude = axisService.getPolicyInclude();
 
 		List wsdlPolicies = getPoliciesAsExtElements(wsdlDefinition
 				.getExtensibilityElements());
@@ -173,9 +173,7 @@
 			}
 		}
 
-		axisService.setPolicyInclude(policyInclude);
-
-		// ////////////////////////////////////////////////////////////////
+		// /////////////////////////////////////////////////////////////////
 
 		// setting the schema
 		Types types = wsdlDefinition.getTypes();
@@ -272,8 +270,8 @@
 
 				// //////////////adding Policy //////////////////////////////
 
-				PolicyInclude operationPolicyInclude = new PolicyInclude(
-						axisService.getPolicyInclude());
+				PolicyInclude operationPolicyInclude = axisOperation
+						.getPolicyInclude();
 
 				List operationPolicies;
 
@@ -289,8 +287,6 @@
 				addPolicyElements(PolicyInclude.BINDING_OPERATION_POLICY,
 						operationPolicies, operationPolicyInclude);
 
-				axisOperation.setPolicyInclude(operationPolicyInclude);
-
 				// /////////////////////////////////////////////////////////////
 
 				String soapActionURI = getSOAPActionURI(wsdl4jBindingOperation
@@ -312,8 +308,8 @@
 
 				// ////////////////// adding Policies /////////////////////////
 
-				PolicyInclude inputPolicyInclue = new PolicyInclude(
-						axisOperation.getPolicyInclude());
+				PolicyInclude inputPolicyInclue = axisInputMessage
+						.getPolicyInclude();
 
 				List inputMessagePolicies;
 
@@ -335,8 +331,6 @@
 				addPolicyElements(PolicyInclude.MESSAGE_POLICY,
 						inputMessagePolicies, inputPolicyInclue);
 
-				axisInputMessage.setPolicyInclude(policyInclude);
-
 				// /////////////////////////////////////////////////////////////
 
 				// setting the element qname
@@ -369,8 +363,9 @@
 
 					// ///////////// adding Policies ///////////////////////////
 
-					PolicyInclude outputPolicyInclude = new PolicyInclude(
-							axisService.getPolicyInclude());
+					PolicyInclude outputPolicyInclude = axisOutputMessage
+							.getPolicyInclude();
+
 					List outputPolicies;
 
 					// wsdl:Output
@@ -390,8 +385,6 @@
 							.getExtensibilityElements());
 					addPolicyElements(PolicyInclude.MESSAGE_POLICY,
 							outputPolicies, outputPolicyInclude);
-
-					axisOutputMessage.setPolicyInclude(outputPolicyInclude);
 
 					// /////////////////////////////////////////////////////////
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java Sun Jan 15 22:08:44 2006
@@ -92,17 +92,7 @@
             }
 
             // setting the PolicyInclude
-            PolicyInclude policyInclude;
-
-            if (axisConfig != null) {
-                PolicyInclude parent = axisConfig.getPolicyInclude();
-                policyInclude = new PolicyInclude(parent);
-
-            } else {
-                policyInclude = new PolicyInclude();
-            }
-            module.setPolicyInclude(policyInclude);
-
+            
             // processing <wsp:Policy> .. </..> elements
             Iterator policyElements = moduleElement.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY));
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java Sun Jan 15 22:08:44 2006
@@ -189,9 +189,6 @@
 
             Iterator parameters = messageElement.getChildrenWithName(new QName(TAG_PARAMETER));
 
-            // setting the PolicyInclude
-//            PolicyInclude policyInclude = message.getPolicyInclude();
-
             // processing <wsp:Policy> .. </..> elements
             Iterator policyElements = messageElement.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY));
 
@@ -301,7 +298,6 @@
             }
 
             // setting the PolicyInclude
-//            PolicyInclude policyInclude = op_descrip.getPolicyInclude();
 
             // processing <wsp:Policy> .. </..> elements
             Iterator policyElements = operation.getChildrenWithName(new QName(POLICY_NS_URI, TAG_POLICY));

Added: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java?rev=369365&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java (added)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisDescription.java Sun Jan 15 22:08:44 2006
@@ -0,0 +1,103 @@
+package org.apache.axis2.description;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.om.OMElement;
+
+public abstract class AxisDescription implements ParameterInclude,
+		DescriptionConstants {
+
+	private AxisDescription parent = null;
+
+	private ParameterInclude parameterInclude;
+
+	private PolicyInclude policyInclude;
+
+	private HashMap children = new HashMap();
+
+	public AxisDescription() {
+		parameterInclude = new ParameterIncludeImpl();
+		policyInclude = new PolicyInclude(this);
+	}
+
+	public void addParameter(Parameter param) throws AxisFault {
+
+		if (param == null) {
+			return;
+		}
+
+		if (isParameterLocked(param.getName())) {
+			throw new AxisFault("Parameter:" + param.getName()
+					+ " is already locked, hence value cannot be overridden");
+		}
+
+		parameterInclude.addParameter(param);
+	}
+
+	public void deserializeParameters(OMElement parameterElement)
+			throws AxisFault {
+
+		parameterInclude.deserializeParameters(parameterElement);
+
+	}
+
+	public Parameter getParameter(String name) {
+		return parameterInclude.getParameter(name);
+	}
+
+	public ArrayList getParameters() {
+		return parameterInclude.getParameters();
+	}
+
+	public boolean isParameterLocked(String parameterName) {
+
+		if (getParent() != null && getParent().isParameterLocked(parameterName)) {
+			return true;
+		}
+
+		return getParameter(parameterName) != null
+				&& getParameter(parameterName).isLocked();
+	}
+
+	public void setParent(AxisDescription parent) {
+		this.parent = parent;
+		if (parent.getChild(getKey()) == null
+				|| parent.getChild(getKey()) != this) {
+			parent.addChild(this);
+		}
+	}
+
+	public AxisDescription getParent() {
+		return parent;
+	}
+
+	public void setPolicyInclude(PolicyInclude policyInclude) {
+		this.policyInclude = policyInclude;
+	}
+
+	public PolicyInclude getPolicyInclude() {
+		return policyInclude;
+	}
+
+	public void addChild(AxisDescription child) {
+		children.put(child.getKey(), child);
+		if (child.getParent() == null || child.getParent() != this) {
+			child.setParent(this);
+		}
+	}
+
+	public Iterator getChildren() {
+		return children.values().iterator();
+	}
+
+	public AxisDescription getChild(Object key) {
+		return (AxisDescription) children.get(key);
+	}
+
+	public abstract Object getKey();
+}

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisMessage.java Sun Jan 15 22:08:44 2006
@@ -29,10 +29,9 @@
  * This class represents the messages in WSDL. There can be message element in services.xml
  * which are representd by this class.
  */
-public class AxisMessage implements ParameterInclude {
+public class AxisMessage extends AxisDescription {
     private ArrayList handlerChain;
-    private ParameterInclude parameterinclude;
-    private AxisOperation parent;
+    
     //to keep data in WSDL message refference and to keep the Java2WSDL data
     // such as SchemaElementName , direction etc.
     private MessageReference messageReference;
@@ -40,44 +39,14 @@
     private PolicyInclude policyInclude;
 
     public AxisMessage() {
-        parameterinclude = new ParameterIncludeImpl();
         handlerChain = new ArrayList();
         messageReference = new MessageReferenceImpl();
-        policyInclude = new PolicyInclude();
-    }
-
-    public void addParameter(Parameter param) throws AxisFault {
-        if (param == null) {
-            return;
-        }
-
-        if (isParameterLocked(param.getName())) {
-            throw new AxisFault("Parmter is locked can not overide: " + param.getName());
-        } else {
-            parameterinclude.addParameter(param);
-        }
-    }
-
-    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
-        parameterinclude.deserializeParameters(parameterElement);
     }
 
     public ArrayList getMessageFlow() {
         return handlerChain;
     }
 
-    public Parameter getParameter(String name) {
-        return parameterinclude.getParameter(name);
-    }
-
-    public ArrayList getParameters() {
-        return parameterinclude.getParameters();
-    }
-
-    public AxisOperation getParent() {
-        return parent;
-    }
-
     public boolean isParameterLocked(String parameterName) {
 
         // checking the locked value of parent
@@ -100,13 +69,6 @@
         this.handlerChain = operationFlow;
     }
 
-    public void setParent(AxisOperation parent) {
-        this.parent = parent;
-        if (parent.getPolicyInclude() != null) {
-            policyInclude.setParent(parent.getPolicyInclude());
-        }
-    }
-
     public String getDirection() {
         return messageReference.getDirection();
     }
@@ -123,11 +85,7 @@
         messageReference.setElementQName(element);
     }
     
-    public void setPolicyInclude(PolicyInclude policyInclude) {
-        this.policyInclude = policyInclude;
-    }
-    
-    public PolicyInclude getPolicyInclude() {
-        return policyInclude;
+    public Object getKey() {
+    	return getElementQName();
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisOperation.java Sun Jan 15 22:08:44 2006
@@ -23,8 +23,8 @@
 import java.util.HashMap;
 import java.util.Iterator;
 
-public abstract class AxisOperation
-        implements ParameterInclude, DescriptionConstants, WSDLConstants {
+public abstract class AxisOperation extends AxisDescription
+        implements  WSDLConstants {
     public static final String STYLE_RPC = "rpc";
     public static final String STYLE_MSG = "msg";
     public static final String STYLE_DOC = "doc";
@@ -50,20 +50,13 @@
 
     // todo need to change name to String
     private QName name;
-    private ParameterInclude parameterInclude;
 
-    private AxisService parent;
     private ArrayList wsamappingList;
     
-    // to store policies which are valid for entire operation
-    private PolicyInclude policyInclude;
-
     public AxisOperation() {
         mepURI = MEP_URI_IN_OUT;
-        parameterInclude = new ParameterIncludeImpl();
         modulerefs = new ArrayList();
         moduleConfigmap = new HashMap();
-        policyInclude = new PolicyInclude();
     }
 
     public AxisOperation(QName name) {
@@ -102,27 +95,6 @@
     }
 
     /**
-     * Method addParameter.
-     *
-     * @param param Parameter that is added
-     */
-    public void addParameter(Parameter param) throws AxisFault {
-        if (param == null) {
-            return;
-        }
-
-        if (isParameterLocked(param.getName())) {
-            throw new AxisFault("Parmter is locked can not overide: " + param.getName());
-        } else {
-            parameterInclude.addParameter(param);
-        }
-    }
-
-    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
-        parameterInclude.deserializeParameters(parameterElement);
-    }
-
-    /**
      * Engages a module. It is required to use this method.
      *
      * @param moduleref
@@ -326,23 +298,6 @@
         return name;
     }
 
-    /**
-     * Method getParameter.
-     *
-     * @param name Name of the parameter
-     */
-    public Parameter getParameter(String name) {
-        return parameterInclude.getParameter(name);
-    }
-
-    public ArrayList getParameters() {
-        return parameterInclude.getParameters();
-    }
-
-    public AxisService getParent() {
-        return parent;
-    }
-
     public abstract ArrayList getPhasesInFaultFlow();
 
     public abstract ArrayList getPhasesOutFaultFlow();
@@ -398,13 +353,6 @@
         this.name = name;
     }
 
-    public void setParent(AxisService parent) {
-        this.parent = parent;
-        if (parent.getPolicyInclude() != null) {
-            policyInclude.setParent(parent.getPolicyInclude());
-        }
-    }
-
     public abstract void setPhasesInFaultFlow(ArrayList list);
 
     public abstract void setPhasesOutFaultFlow(ArrayList list);
@@ -427,11 +375,7 @@
         throw new UnsupportedOperationException ("The MEP you are using (" + mepURI + ") has not implemented createClient().");
     }
     
-    public void setPolicyInclude(PolicyInclude policyInclude) {
-        this.policyInclude = policyInclude;
-    }
-    
-    public PolicyInclude getPolicyInclude() {
-        return policyInclude;
+    public Object getKey() {
+    	return getName();
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Sun Jan 15 22:08:44 2006
@@ -51,8 +51,7 @@
 /**
  * Class AxisService
  */
-public class AxisService
-        implements ParameterInclude, DescriptionConstants {
+public class AxisService extends AxisDescription {
     private Definition definition = null;
     private Log log = LogFactory.getLog(getClass());
     private String fileName = "";
@@ -72,8 +71,6 @@
     private long lastupdate;
     private HashMap moduleConfigmap;
     private String name;
-    private ParameterInclude parameterInclude;
-    private AxisServiceGroup parent;
     private ClassLoader serviceClassLoader;
 
     //to keep the XMLScheam getting either from WSDL or java2wsdl
@@ -88,9 +85,6 @@
     //to store default message receivers
     private HashMap messageReceivers;
 
-    // to store policies which are valid for the entire service
-    private PolicyInclude policyInclude;
-
 // to set the handler chain available in phase info
     private boolean useDefaultChains = true;
 
@@ -98,13 +92,11 @@
      * Constructor AxisService.
      */
     public AxisService() {
-        this.parameterInclude = new ParameterIncludeImpl();
         this.operationsAliasesMap = new HashMap();
         moduleConfigmap = new HashMap();
         //by dafault service scope is for the request
         scope = Constants.SCOPE_REQUEST;
         messageReceivers = new HashMap();
-        policyInclude = new PolicyInclude();
     }
 
     /**
@@ -180,11 +172,11 @@
 
         while (modules.hasNext()) {
             ModuleDescription module = (ModuleDescription) modules.next();
-            AxisServiceGroup parent = getParent();
+            AxisServiceGroup parent = (AxisServiceGroup) getParent();
             AxisConfiguration axisConfig = null;
 
             if (parent != null) {
-                axisConfig = parent.getParent();
+                axisConfig = (AxisConfiguration) parent.getParent();
             }
 
             try {
@@ -200,23 +192,6 @@
     }
 
     /**
-     * Method addParameter.
-     *
-     * @param param
-     */
-    public void addParameter(Parameter param) throws AxisFault {
-        if (param == null) {
-            return;
-        }
-
-        if (isParameterLocked(param.getName())) {
-            throw new AxisFault("Parmter is locked can not overide: " + param.getName());
-        } else {
-            parameterInclude.addParameter(param);
-        }
-    }
-
-    /**
      * Gets a copy from module operation.
      *
      * @param axisOperation
@@ -247,10 +222,6 @@
         return operation;
     }
 
-    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
-        parameterInclude.deserializeParameters(parameterElement);
-    }
-
     /*
      * (non-Javadoc)
      *
@@ -515,29 +486,6 @@
      */
 
     /**
-     * Method getParameter.
-     *
-     * @param name
-     * @return Returns Parameter.
-     */
-    public Parameter getParameter(String name) {
-        return parameterInclude.getParameter(name);
-    }
-
-    public ArrayList getParameters() {
-        return parameterInclude.getParameters();
-    }
-
-    /**
-     * Gets the parent. (AxisConfiguration in this case)
-     *
-     * @return Returns <code>AxisConfiguration</code>
-     */
-    public AxisServiceGroup getParent() {
-        return parent;
-    }
-
-    /**
      * Gets only the published operations.
      */
     public ArrayList getPublishedOperations() {
@@ -559,25 +507,6 @@
         return definition;
     }
 
-    // to check whether a given parameter is locked
-    public boolean isParameterLocked(String parameterName) {
-
-        // checking the locked value of parent
-        boolean loscked = false;
-
-        if (getParent() != null) {
-            loscked = getParent().getAxisDescription().isParameterLocked(parameterName);
-        }
-
-        if (loscked) {
-            return true;
-        } else {
-            Parameter parameter = getParameter(parameterName);
-
-            return (parameter != null) && parameter.isLocked();
-        }
-    }
-
     /**
      * Sets the description about the service whish is specified in services.xml
      *
@@ -617,13 +546,6 @@
         this.name = name;
     }
 
-    public void setParent(AxisServiceGroup parent) {
-        this.parent = parent;
-        if (parent.getPolicyInclude() != null) {
-            policyInclude.setParent(parent.getPolicyInclude());
-        }
-    }
-
     public void setWSDLDefinition(Definition difDefinition) {
         this.definition = difDefinition;
     }
@@ -658,19 +580,15 @@
         }
     }
 
-    public void setPolicyInclude(PolicyInclude policyInclude) {
-        this.policyInclude = policyInclude;
-    }
-
-    public PolicyInclude getPolicyInclude() {
-        return policyInclude;
-    }
-
     public boolean isUseDefaultChains() {
         return useDefaultChains;
     }
 
     public void setUseDefaultChains(boolean useDefaultChains) {
         this.useDefaultChains = useDefaultChains;
+    }
+    
+    public Object getKey() {
+    	return getName();
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisServiceGroup.java Sun Jan 15 22:08:44 2006
@@ -29,7 +29,7 @@
 import java.util.HashMap;
 import java.util.Iterator;
 
-public class AxisServiceGroup implements ParameterInclude {
+public class AxisServiceGroup extends AxisDescription {
     private Log log = LogFactory.getLog(getClass());
 
     // to store module ref at deploy time parsing
@@ -40,34 +40,22 @@
 
     // to store modeule configuration info
     private HashMap moduleConfigmap;
-
-    // to add and get parameters
-    protected ParameterInclude paramInclude;
-
-    // to keep the parent of service group , to chcek parameter lock checking
-    // and serching
-    private AxisConfiguration parent;
-
+    
     // class loader
     private ClassLoader serviceGroupClassLoader;
 
     // to keep name of the service group
     private String serviceGroupName;
     
-    // to store policy information
-    private PolicyInclude policyInclude;
-
     /**
      * Field services
      */
     private HashMap services;
 
     public AxisServiceGroup() {
-        paramInclude = new ParameterIncludeImpl();
         services = new HashMap();
         moduleConfigmap = new HashMap();
         engagedModules = new ArrayList();
-        policyInclude = new PolicyInclude();
     }
 
     public AxisServiceGroup(AxisConfiguration axisDescription) {
@@ -92,14 +80,10 @@
         modulesList.add(moduleref);
     }
 
-    public void addParameter(Parameter param) throws AxisFault {
-        paramInclude.addParameter(param);
-    }
-
     public void addService(AxisService service) throws AxisFault {
         service.setParent(this);
 
-        AxisConfiguration axisConfig = getParent();
+        AxisConfiguration axisConfig = (AxisConfiguration) getParent();
 
         if (axisConfig != null) {
             Iterator modules = getEngagedModules().iterator();
@@ -125,10 +109,6 @@
         engagedModules.add(moduleName);
     }
 
-    public void deserializeParameters(OMElement parameterElement) throws AxisFault {
-        this.paramInclude.deserializeParameters(parameterElement);
-    }
-
     public void engageModule(ModuleDescription module) throws AxisFault {
         QName moduleName = module.getName();
         boolean needToadd = true;
@@ -148,7 +128,7 @@
             // engaging each service
             AxisService axisService = (AxisService) srevice.next();
             try {
-                axisService.engageModule(module, parent);
+                axisService.engageModule(module, (AxisConfiguration) getParent());
             } catch (AxisFault axisFault) {
                 log.info(axisFault.getMessage());
             }
@@ -163,14 +143,14 @@
         AxisService service = getService(name);
 
         if (service != null) {
-            this.parent.notifyObservers(AxisEvent.SERVICE_DEPLOY, service);
+            ((AxisConfiguration) getParent()).notifyObservers(AxisEvent.SERVICE_DEPLOY, service);
         }
 
         services.remove(name);
     }
 
     public AxisConfiguration getAxisDescription() {
-        return parent;
+        return (AxisConfiguration) getParent();
     }
 
     public ArrayList getEngagedModules() {
@@ -185,18 +165,6 @@
         return modulesList;
     }
 
-    public Parameter getParameter(String name) {
-        return paramInclude.getParameter(name);
-    }
-
-    public ArrayList getParameters() {
-        return paramInclude.getParameters();
-    }
-
-    public AxisConfiguration getParent() {
-        return parent;
-    }
-
     public AxisService getService(String name) throws AxisFault {
         return (AxisService) services.get(name);
     }
@@ -213,33 +181,8 @@
         return services.values().iterator();
     }
 
-    public boolean isParameterLocked(String parameterName) {
-
-        // checking the locked value of parent
-        boolean loscked = false;
-
-        if (getParent() != null) {
-            loscked = getParent().isParameterLocked(parameterName);
-        }
-
-        if (loscked) {
-            return true;
-        } else {
-            Parameter parameter = getParameter(parameterName);
-
-            return (parameter != null) && parameter.isLocked();
-        }
-    }
-
     public void setAxisDescription(AxisConfiguration axisDescription) {
-        this.parent = axisDescription;
-    }
-
-    public void setParent(AxisConfiguration parent) {
-        this.parent = parent;
-        if (parent.getPolicyInclude() != null) {
-            policyInclude.setParent(parent.getPolicyInclude());
-        }
+    	setParent(axisDescription);
     }
 
     public void setServiceGroupClassLoader(ClassLoader serviceGroupClassLoader) {
@@ -250,11 +193,7 @@
         this.serviceGroupName = serviceGroupName;
     }
     
-    public PolicyInclude getPolicyInclude() {
-        return policyInclude;
-    }
-    
-    public void setPolicyInclude(PolicyInclude policyInclude) {
-        this.policyInclude = policyInclude;
+    public Object getKey() {
+    	return getServiceGroupName();
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java Sun Jan 15 22:08:44 2006
@@ -16,196 +16,264 @@
 
 package org.apache.axis2.description;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+
 import org.apache.ws.policy.Policy;
 import org.apache.ws.policy.PolicyReference;
 import org.apache.ws.policy.util.PolicyRegistry;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-
 public class PolicyInclude {
 
-    public static final String ANON_POLICY = "anonymous";
-
-    public static final int AXIS_POLICY = 1;
-
-    public static final int AXIS_SERVICE_POLICY = 2;
-
-    public static final int AXIS_OPERATION_POLICY = 14;
-
-    public static final int AXIS_MESSAGE_POLICY = 15;
-
-    public static final int MODULE_POLICY = 3;
-
-    public static final int SERVICE_POLICY = 3;
-
-    public static final int PORT_POLICY = 4;
-
-    public static final int PORT_TYPE_POLICY = 5;
-
-    public static final int BINDING_POLICY = 6;
-
-    public static final int OPERATION_POLICY = 7;
-
-    public static final int BINDING_OPERATION_POLICY = 8;
-
-    public static final int INPUT_POLICY = 9;
-
-    public static final int OUTPUT_POLICY = 10;
-
-    public static final int BINDING_INPUT_POLICY = 11;
-
-    public static final int BINDING_OUTPUT_POLICY = 12;
-
-    public static final int MESSAGE_POLICY = 13;
-
-    private Policy policy = null;
-
-    private Policy effectivePolicy = null;
-
-    private PolicyInclude parent = null;
-
-    private PolicyRegistry reg;
-
-    private ArrayList policyElements = new ArrayList();
-
-    public PolicyInclude() {
-        reg = new PolicyRegistry();
-    }
-
-    public PolicyInclude(PolicyInclude parent) {
-        reg = new PolicyRegistry();
-        setParent(parent);
-    }
-
-    public void setParent(PolicyInclude parent) {
-        this.parent = parent;
-        reg.setParent(parent.getPolicyRegistry());
-    }
-
-    public void setPolicyRegistry(PolicyRegistry reg) {
-        this.reg = reg;
-    }
-
-    public PolicyRegistry getPolicyRegistry() {
-        return reg;
-    }
-
-    public void setPolicy(Policy policy) {
-        this.policy = policy;
-    }
-
-    public Policy getPolicy() {
-
-        if (policy == null) {
-            Iterator iterator = policyElements.iterator();
-
-            while (iterator.hasNext()) {
-
-                Object policyElement = ((PolicyElement) iterator.next()).value;
-                Policy p = null;
-
-                if (policyElement instanceof PolicyReference) {
-                    p = (Policy) ((PolicyReference) policyElement)
-                            .normalize(getPolicyRegistry());
-
-                } else if (policyElement instanceof Policy) {
-                    p = (Policy) policyElement;
-
-                } else {
-                    // TODO an exception ?
-                }
-                policy = (policy == null) ? (Policy) p.normalize(reg)
-                        : (Policy) policy.merge(p, reg);
-            }
-        }
-
-        return policy;
-    }
-
-    public Policy getEffectivePolicy() {
-
-        if (effectivePolicy != null) {
-            return effectivePolicy;
-        }
-
-        Policy parentEffectivePolicy = parent.getEffectivePolicy();
-
-        if (parent == null || parentEffectivePolicy == null) {
-            return getPolicy();
-        }
-
-        if (getPolicy() != null) {
-            return parent.getEffectivePolicy();
-        }
-
-        return (Policy) parentEffectivePolicy.merge(getPolicy(), reg);
-
-    }
-
-    //    public void setPolicyElements(ArrayList policyElements) {
-    //        this.policyElements = policyElements;
-    //    }
-
-    public ArrayList getPolicyElements() {
-        ArrayList policyElementsList = new ArrayList();
-        Iterator policyElementIterator = policyElements.iterator();
-
-        while (policyElementIterator.hasNext()) {
-            policyElementsList.add(((PolicyElement) policyElementIterator
-                    .next()).value);
-        }
-        return policyElementsList;
-    }
-
-
-    public ArrayList getPolicyElements(int type) {
-        ArrayList policyElementList = new ArrayList();
-        Iterator policyElementIterator = policyElements.iterator();
-
-        PolicyElement policyElement;
-
-        while (policyElementIterator.hasNext()) {
-            policyElement = (PolicyElement) policyElementIterator.next();
-
-            if (policyElement.type == type) {
-                policyElementList.add(policyElement.value);
-            }
-        }
-
-        return policyElementList;
-
-    }
-
-    public void registerPolicy(Policy policy) {
-        reg.register(policy.getPolicyURI(), policy);
-    }
-
-    public Policy getPolicy(String policyURI) {
-        return reg.lookup(policyURI);
-    }
-
-    public void addPolicyElement(int type, Policy policy) {
-        PolicyElement policyElement = new PolicyElement();
-        policyElement.type = type;
-        policyElement.value = policy;
-        policyElements.add(policyElement);
+	public static final String ANON_POLICY = "anonymous";
 
-        if (policy.getPolicyURI() != null) {
-            reg.register(policy.getPolicyURI(), policy);
-        }
-    }
+	public static final int AXIS_POLICY = 1;
 
-    public void addPolicyRefElement(int type, PolicyReference policyReference) {
-        PolicyElement policyElement = new PolicyElement();
-        policyElement.type = type;
-        policyElement.value = policyReference;
-        policyElements.add(policyElement);
-    }
+	public static final int AXIS_SERVICE_POLICY = 2;
 
-    private class PolicyElement {
-        int type;
+	public static final int AXIS_OPERATION_POLICY = 14;
 
-        Object value;
-    }
+	public static final int AXIS_MESSAGE_POLICY = 15;
+
+	public static final int MODULE_POLICY = 3;
+
+	public static final int SERVICE_POLICY = 3;
+
+	public static final int PORT_POLICY = 4;
+
+	public static final int PORT_TYPE_POLICY = 5;
+
+	public static final int BINDING_POLICY = 6;
+
+	public static final int OPERATION_POLICY = 7;
+
+	public static final int BINDING_OPERATION_POLICY = 8;
+
+	public static final int INPUT_POLICY = 9;
+
+	public static final int OUTPUT_POLICY = 10;
+
+	public static final int BINDING_INPUT_POLICY = 11;
+
+	public static final int BINDING_OUTPUT_POLICY = 12;
+
+	public static final int MESSAGE_POLICY = 13;
+
+	private Policy policy = null;
+
+	private Policy effectivePolicy = null;
+	
+	private PolicyRegistry reg;
+
+	private AxisDescription description;
+	
+	private ArrayList wrapperElements = new ArrayList();
+
+	private boolean useCache = false;
+
+	public PolicyInclude() {
+		reg = new PolicyRegistry();
+	}
+	
+	public PolicyInclude(AxisDescription axisDescription) {
+		reg = new PolicyRegistry();
+		setDescription(axisDescription);
+		
+		if (axisDescription.getParent() != null) {
+			PolicyInclude parentPolicyInclude = axisDescription.getParent().getPolicyInclude();
+			reg.setParent(parentPolicyInclude.getPolicyRegistry());
+		}
+		
+	}
+
+	public void setPolicyRegistry(PolicyRegistry reg) {
+		this.reg = reg;
+	}
+	
+	public PolicyRegistry getPolicyRegistry() {
+		return reg;
+	}
+
+	public void setPolicy(Policy policy) {
+		this.policy = policy;
+	}
+	
+	public void setEffectivePolicy(Policy effectivePolicy) {
+		this.effectivePolicy = effectivePolicy;
+	}
+	
+	public void setDescription(AxisDescription description) {
+		this.description = description;
+	}
+	
+	public AxisDescription getDescription() {
+		return description;
+	}
+	
+	private PolicyInclude getParent() {
+
+		if (description != null) {
+			return description.getPolicyInclude();
+		}
+		return null;
+	}
+
+	private void calculatePolicy() {
+
+		Policy result = null;
+		Iterator iterator = wrapperElements.iterator();
+
+		while (iterator.hasNext()) {
+			Object policyElement = ((Wrapper) iterator.next()).getValue();
+			Policy p;
+
+			if (policyElement instanceof PolicyReference) {
+				p = (Policy) ((PolicyReference) policyElement)
+						.normalize(getPolicyRegistry());
+
+			} else if (policyElement instanceof Policy) {
+				p = (Policy) policyElement;
+
+			} else {
+				// TODO AxisFault?
+				throw new RuntimeException();
+			}
+
+			result = (result == null) ? (Policy) p.normalize(reg)
+					: (Policy) result.merge(p, reg);
+		}
+		setPolicy(result);
+		calculateEffectivePolicy();
+	}
+
+	private void calculateEffectivePolicy() {
+		Policy result = null;
+		
+		if (getParent() != null) {
+			Policy parentPolicy = getParent().getEffectivePolicy();
+			
+			if (parentPolicy == null) {
+				result = getPolicy();
+				
+			} else {
+				result = (Policy) parentPolicy.merge(getPolicy(), reg);
+			}
+			
+		} else {
+			result = getPolicy();
+		}
+		setEffectivePolicy(result);
+		useCache(true);		
+	}
+	
+	public Policy getPolicy() {
+		
+		if (! useCache) {
+			calculatePolicy();
+		}
+		return policy;
+	}
+
+	public Policy getEffectivePolicy() {
+		
+		if (! useCache) {
+			calculateEffectivePolicy();			
+		}
+		return effectivePolicy;
+	}
+
+	public ArrayList getPolicyElements() {
+		ArrayList policyElementsList = new ArrayList();
+		Iterator policyElementIterator = wrapperElements.iterator();
+
+		while (policyElementIterator.hasNext()) {
+			policyElementsList
+					.add(((Wrapper) policyElementIterator.next()).getValue());
+		}
+		return policyElementsList;
+	}
+
+	public ArrayList getPolicyElements(int type) {
+		ArrayList policyElementList = new ArrayList();
+		Iterator wrapperElementIterator = wrapperElements.iterator();
+		Wrapper wrapper;
+
+		while (wrapperElementIterator.hasNext()) {
+			wrapper = (Wrapper) wrapperElementIterator.next();
+
+			if (wrapper.getType() == type) {
+				policyElementList.add(wrapper.getValue());
+			}
+		}
+		return policyElementList;
+	}
+
+	public void registerPolicy(Policy policy) {
+		reg.register(policy.getPolicyURI(), policy);
+	}
+
+	public Policy getPolicy(String policyURI) {
+		return reg.lookup(policyURI);
+	}
+
+	public void addPolicyElement(int type, Policy policy) {
+		Wrapper wrapper = new Wrapper(type, policy);
+		wrapperElements.add(wrapper);
+
+		if (policy.getPolicyURI() != null) {
+			reg.register(policy.getPolicyURI(), policy);
+		}
+	}
+
+	public void addPolicyRefElement(int type, PolicyReference policyReference) {
+		Wrapper wrapper = new Wrapper(type, policyReference);
+		wrapperElements.add(wrapper);
+	}
+
+	public void invalidate() {
+		
+		if (description != null) {
+//			Iterator children = description.getChildren();
+//			
+//			if (children != null) {
+//				AxisDescription axisDescription;
+//				
+//				while (children.hasNext()) {
+//					axisDescription = (AxisDescription) children.next();
+//					axisDescription.getPolicyInclude().invalidate();
+//				}				
+//			}
+		}
+		useCache(false);
+	}
+	
+	private void useCache(boolean useCache) {
+		this.useCache = useCache;
+	}
+	
+	class Wrapper {
+		private int type;
+		private Object value;
+		
+		Wrapper(int type, Object value) {
+			setType(type);
+			setValue(value);
+		}
+		
+		void setType(int type) {
+			this.type = type;
+		}
+		
+		int getType() {
+			return type;
+		}
+		
+		void setValue(Object value) {
+			this.value = value;
+		}
+		
+		Object getValue() {
+			return value;
+		}
+	}
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java Sun Jan 15 22:08:44 2006
@@ -23,6 +23,7 @@
 import org.apache.axis2.deployment.DeploymentEngine;
 import org.apache.axis2.deployment.repository.util.ArchiveReader;
 import org.apache.axis2.deployment.util.PhasesInfo;
+import org.apache.axis2.description.AxisDescription;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.AxisServiceGroup;
@@ -55,7 +56,7 @@
 /**
  * Class AxisConfigurationImpl
  */
-public class AxisConfiguration implements ParameterInclude {
+public class AxisConfiguration extends AxisDescription {
 
     private Log log = LogFactory.getLog(getClass());
     /**
@@ -94,14 +95,10 @@
     private ArrayList inPhasesUptoAndIncludingPostDispatch;
     private HashMap messageReceivers;
 
-    // to store policies which are valid for entire system
-    private PolicyInclude policyInclude;
-
     private ClassLoader moduleClassLoader;
     private HashMap moduleConfigmap;
     private ArrayList outFaultPhases;
     private ArrayList outPhases;
-    protected final ParameterInclude paramInclude;
     protected PhasesInfo phasesinfo;
     private ClassLoader serviceClassLoader;
     private ClassLoader systemClassLoader;
@@ -111,7 +108,6 @@
      */
     public AxisConfiguration() {
         moduleConfigmap = new HashMap();
-        paramInclude = new ParameterIncludeImpl();
         engagedModules = new ArrayList();
         messageReceivers = new HashMap();
         outPhases = new ArrayList();
@@ -122,8 +118,6 @@
         observersList = new ArrayList();
         inPhasesUptoAndIncludingPostDispatch = new ArrayList();
 
-        policyInclude = new PolicyInclude();
-
         systemClassLoader = Thread.currentThread().getContextClassLoader();
         serviceClassLoader = Thread.currentThread().getContextClassLoader();
         moduleClassLoader = Thread.currentThread().getContextClassLoader();
@@ -177,19 +171,6 @@
     }
 
     /**
-     * Method addParameter.
-     *
-     * @param param
-     */
-    public void addParameter(Parameter param) throws AxisFault {
-        if (isParameterLocked(param.getName())) {
-            throw new AxisFault("Parmter is locked can not overide: " + param.getName());
-        } else {
-            paramInclude.addParameter(param);
-        }
-    }
-
-    /**
      * Method addService.
      *
      * @param service
@@ -301,10 +282,6 @@
         inPhasesUptoAndIncludingPostDispatch.add(dispatchPhase);
     }
 
-    public void deserializeParameters(OMElement parameters) throws AxisFault {
-        this.paramInclude.deserializeParameters(parameters);
-    }
-
     /**
      * Engages the default module version corresponding to given module name , or if the module
      * name contains version number in it then it will engage the correct module. 
@@ -512,20 +489,6 @@
         return outFaultPhases;
     }
 
-    /**
-     * Method getParameter.
-     *
-     * @param name
-     * @return Returns Parameter.
-     */
-    public Parameter getParameter(String name) {
-        return paramInclude.getParameter(name);
-    }
-
-    public ArrayList getParameters() {
-        return paramInclude.getParameters();
-    }
-
     public PhasesInfo getPhasesInfo() {
         return phasesinfo;
     }
@@ -660,14 +623,6 @@
         this.systemClassLoader = classLoader;
     }
 
-    public void setPolicyInclude(PolicyInclude policyInclude) {
-        this.policyInclude = policyInclude;
-    }
-
-    public PolicyInclude getPolicyInclude() {
-        return policyInclude;
-    }
-
     public static String getAxis2HomeDirectory() {
         // if user has set the axis2 home variable try to get that from System properties
         String axis2home = System.getProperty(Constants.HOME_AXIS2);
@@ -705,5 +660,9 @@
         } else {
             return (ModuleDescription) allModules.get(new QName(moduleName + "-" + defualtModuleVersion));
         }
+    }
+    
+    public Object getKey() {
+    	return getAxis2HomeDirectory(); // TODO CheckMe
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/PolicyUtil.java Sun Jan 15 22:08:44 2006
@@ -58,10 +58,10 @@
         AxisServiceGroup axisServiceGroup = null;
         AxisConfiguration axisConfiguration = null;
         
-        axisServiceGroup = axisService.getParent();
+        axisServiceGroup = (AxisServiceGroup) axisService.getParent();
         
         if (axisServiceGroup == null) {
-            axisConfiguration = axisServiceGroup.getParent();
+            axisConfiguration = (AxisConfiguration) axisServiceGroup.getParent();
         }
 
         PolicyInclude servicePolicyInclude = axisService.getPolicyInclude();

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java Sun Jan 15 22:08:44 2006
@@ -194,7 +194,7 @@
                                                                            ConfigurationContext configurationContext) {
         String serviceGroupContextId = UUIDGenerator.getUUID();
         ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configurationContext,
-                axisService.getParent());
+                (AxisServiceGroup) axisService.getParent());
 
         serviceGroupContext.setId(serviceGroupContextId);
         configurationContext.registerServiceGroupContext(serviceGroupContext);

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java Sun Jan 15 22:08:44 2006
@@ -20,6 +20,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.InOutAxisOperation;
 import org.apache.axis2.description.ParameterImpl;
 import org.apache.axis2.engine.AxisConfiguration;
@@ -49,7 +50,7 @@
         ConfigurationContext configurationContext = new ConfigurationContext(
                 axisConfiguration);
         ServiceGroupContext serviceGroupContext = new ServiceGroupContext(
-                configurationContext, axisService.getParent());
+                configurationContext, (AxisServiceGroup) axisService.getParent());
         ServiceContext serviceContext = serviceGroupContext
                 .getServiceContext(axisService);
         MessageContext msgctx = new MessageContext();

Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/OperationContextTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/OperationContextTest.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/OperationContextTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/OperationContextTest.java Sun Jan 15 22:08:44 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.addressing.RelatesTo;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.InOutAxisOperation;
 import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.description.TransportOutDescription;
@@ -43,7 +44,7 @@
         AxisService axisService = new AxisService("TempSC");
         configContext.getAxisConfiguration().addService(axisService);
         ServiceGroupContext sgc = new ServiceGroupContext(configContext,
-                axisService.getParent());
+                (AxisServiceGroup) axisService.getParent());
 
         ServiceContext sessionContext = sgc.getServiceContext(axisService);
         MessageContext messageContext1 = this.getBasicMessageContext();

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java Sun Jan 15 22:08:44 2006
@@ -24,6 +24,7 @@
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.deployment.DeploymentEngine;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.ModuleDescription;
 import org.apache.axis2.transport.http.SimpleHTTPServer;
 
@@ -135,7 +136,7 @@
 
         configContext.getAxisConfiguration().addService(service);
 
-        return new ServiceGroupContext(configContext, service.getParent())
+        return new ServiceGroupContext(configContext, (AxisServiceGroup) service.getParent())
                 .getServiceContext(service);
     }
 
@@ -172,7 +173,7 @@
 
         configContext.getAxisConfiguration().addService(service);
 
-        return new ServiceGroupContext(configContext, service.getParent())
+        return new ServiceGroupContext(configContext, (AxisServiceGroup) service.getParent())
                 .getServiceContext(service);
     }
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsJMSServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsJMSServer.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsJMSServer.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsJMSServer.java Sun Jan 15 22:08:44 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.transport.jms.JNDIVendorAdapter;
 import org.apache.axis2.transport.jms.SimpleJMSListener;
 import org.apache.commons.logging.Log;
@@ -47,7 +48,7 @@
         receiver.getConfigurationContext().getAxisConfiguration().addService(service);
 
         ServiceGroupContext serviceGroupContext = new ServiceGroupContext(
-                receiver.getConfigurationContext(), service.getParent());
+                receiver.getConfigurationContext(), (AxisServiceGroup) service.getParent());
     }
 
     public static synchronized void unDeployService(QName service)

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilsTCPServer.java Sun Jan 15 22:08:44 2006
@@ -21,6 +21,7 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.transport.tcp.TCPServer;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -44,7 +45,7 @@
 
         receiver.getConfigurationContext().getAxisConfiguration().addService(service);
         ServiceGroupContext serviceGroupContext = new ServiceGroupContext(
-                receiver.getConfigurationContext(), service.getParent());
+                receiver.getConfigurationContext(), (AxisServiceGroup) service.getParent());
     }
 
     public static synchronized void unDeployService(QName service)

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java Sun Jan 15 22:08:44 2006
@@ -32,6 +32,7 @@
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.OutInAxisOperation;
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.engine.MessageReceiver;
@@ -117,7 +118,7 @@
         service.addOperation(axisOperation);
         configContext.getAxisConfiguration().addService(service);
         ServiceContext serviceContext = new ServiceGroupContext(configContext,
-                service.getParent()).getServiceContext(service);
+        		(AxisServiceGroup) service.getParent()).getServiceContext(service);
 
         Options options = new Options();
         options.setTo(targetEPR);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java Sun Jan 15 22:08:44 2006
@@ -29,6 +29,7 @@
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.engine.util.TestConstants;
 import org.apache.axis2.integration.TestingUtils;
@@ -81,7 +82,7 @@
             configContext.getAxisConfiguration().addService(clientService);
 
             ServiceContext serviceContext = new ServiceGroupContext(
-                    configContext, clientService.getParent())
+                    configContext, (AxisServiceGroup) clientService.getParent())
                     .getServiceContext(clientService);
             serviceClient = new ServiceClient(configContext, clientService);
 

Modified: webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/UtilServer.java?rev=369365&r1=369364&r2=369365&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/UtilServer.java (original)
+++ webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/UtilServer.java Sun Jan 15 22:08:44 2006
@@ -23,6 +23,7 @@
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.deployment.DeploymentEngine;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.ModuleDescription;
 import org.apache.axis2.transport.http.SimpleHTTPServer;
 
@@ -126,7 +127,7 @@
 
         configContext.getAxisConfiguration().addService(service);
 
-        return new ServiceGroupContext(configContext, service.getParent())
+        return new ServiceGroupContext(configContext, (AxisServiceGroup) service.getParent())
                 .getServiceContext(service);
     }
 
@@ -163,7 +164,7 @@
 
         configContext.getAxisConfiguration().addService(service);
 
-        return new ServiceGroupContext(configContext, service.getParent())
+        return new ServiceGroupContext(configContext, (AxisServiceGroup) service.getParent())
                 .getServiceContext(service);
     }
 }



Mime
View raw message