You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/09/15 21:07:03 UTC
svn commit: r289289 [16/134] - in /webservices/axis2/trunk/java: ./ etc/
modules/addressing/ modules/addressing/src/META-INF/
modules/addressing/src/org/apache/axis2/handlers/addressing/
modules/addressing/test-resources/ modules/addressing/test/org/ap...
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java Thu Sep 15 11:52:11 2005
@@ -1,89 +1,89 @@
-package org.apache.axis2.description;
-
-import org.apache.axis2.AxisFault;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-/*
-* Copyright 2004,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.
-*
-*
-*/
-
-/**
- * Author: Deepal Jayasinghe
- * Date: Sep 1, 2005
- * Time: 2:06:46 PM
- */
-
-/**
- * This is to store deployment time data , described by
- * <moduleConfig module="modulename">
- * <paramter> ....</parameter>
- * </moduleConfig>
- *
- * for the initilal stage this just keep set of paramters , but when the time
- * bean will be store more
- */
-
-public class ModuleConfiguration implements ParameterInclude{
-
- private QName moduleName;
- private ParameterInclude paramterinclude;
-
- //to keep the pointer to its parent , only to access paramters
- private ParameterInclude parent;
-
- public ModuleConfiguration(QName moduleName, ParameterInclude parent) {
- this.moduleName = moduleName;
- this.parent = parent;
- paramterinclude = new ParameterIncludeImpl();
- }
-
- public QName getModuleName() {
- return moduleName;
- }
-
- public void addParameter(Parameter param) throws AxisFault {
- if(isParamterLocked(param.getName())){
- throw new AxisFault("Parmter is locked can not overide: " + param.getName());
- } else{
- paramterinclude.addParameter(param);
- }
- }
-
- public Parameter getParameter(String name) {
- return paramterinclude.getParameter(name);
- }
-
- public ArrayList getParameters() {
- return paramterinclude.getParameters();
- }
-
- public boolean isParamterLocked(String paramterName) {
- // checking the locked value of parent
- boolean loscked = false;
- if (parent !=null) {
- loscked = parent.isParamterLocked(paramterName);
- }
- if(loscked){
- return true;
- } else {
- Parameter parameter = getParameter(paramterName);
- return parameter != null && parameter.isLocked();
- }
- }
-
-}
+package org.apache.axis2.description;
+
+import org.apache.axis2.AxisFault;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+/*
+* Copyright 2004,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.
+*
+*
+*/
+
+/**
+ * Author: Deepal Jayasinghe
+ * Date: Sep 1, 2005
+ * Time: 2:06:46 PM
+ */
+
+/**
+ * This is to store deployment time data , described by
+ * <moduleConfig module="modulename">
+ * <paramter> ....</parameter>
+ * </moduleConfig>
+ *
+ * for the initilal stage this just keep set of paramters , but when the time
+ * bean will be store more
+ */
+
+public class ModuleConfiguration implements ParameterInclude{
+
+ private QName moduleName;
+ private ParameterInclude paramterinclude;
+
+ //to keep the pointer to its parent , only to access paramters
+ private ParameterInclude parent;
+
+ public ModuleConfiguration(QName moduleName, ParameterInclude parent) {
+ this.moduleName = moduleName;
+ this.parent = parent;
+ paramterinclude = new ParameterIncludeImpl();
+ }
+
+ public QName getModuleName() {
+ return moduleName;
+ }
+
+ public void addParameter(Parameter param) throws AxisFault {
+ if(isParamterLocked(param.getName())){
+ throw new AxisFault("Parmter is locked can not overide: " + param.getName());
+ } else{
+ paramterinclude.addParameter(param);
+ }
+ }
+
+ public Parameter getParameter(String name) {
+ return paramterinclude.getParameter(name);
+ }
+
+ public ArrayList getParameters() {
+ return paramterinclude.getParameters();
+ }
+
+ public boolean isParamterLocked(String paramterName) {
+ // checking the locked value of parent
+ boolean loscked = false;
+ if (parent !=null) {
+ loscked = parent.isParamterLocked(paramterName);
+ }
+ if(loscked){
+ return true;
+ } else {
+ Parameter parameter = getParameter(paramterName);
+ return parameter != null && parameter.isLocked();
+ }
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleConfiguration.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java Thu Sep 15 11:52:11 2005
@@ -1,214 +1,214 @@
-/*
-* Copyright 2004,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 org.apache.axis2.description;
-
-import org.apache.axis2.modules.Module;
-import org.apache.axis2.engine.AxisConfiguration;
-import org.apache.axis2.AxisFault;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-
-/**
- * <p>This holds the information about a Module. </p>
- * <ol>
- * <li>parameters<li>
- * <li>handlers<li>
- * <ol>
- * <p>Handler are registered once they are avlible but they avalibe to all services if axis2.xml
- * has a module ref="." or avalible to a single service if service.xml have module ref=".."</p>
- */
-public class ModuleDescription implements FlowInclude, ParameterInclude {
-
- private Module module;
- /**
- * Field name
- */
- private QName name;
-
- private AxisConfiguration parent;
-
- /**
- * Field flowInclude
- */
- private final FlowInclude flowInclude = new FlowIncludeImpl();
-
- //to store module opeartions , which are suppose to be added to a service if it is engaged to a service
- private HashMap opeartions;
-
- /**
- * Field parameters
- */
- private final ParameterInclude parameters = new ParameterIncludeImpl();
-
- /**
- * Constructor ModuleDescription
- */
- public ModuleDescription() {
- opeartions = new HashMap();
- }
-
- /**
- * Constructor ModuleDescription
- *
- * @param name
- */
- public ModuleDescription(QName name) {
- this();
- this.name = name;
- }
-
- /**
- * @return
- */
- public Flow getFaultInFlow() {
- return flowInclude.getFaultInFlow();
- }
-
- public Flow getFaultOutFlow() {
- return flowInclude.getFaultOutFlow();
- }
-
- /**
- * @return
- */
- public Flow getInFlow() {
- return flowInclude.getInFlow();
- }
-
- /**
- * @return
- */
- public Flow getOutFlow() {
- return flowInclude.getOutFlow();
- }
-
- /**
- * @param faultFlow
- */
- public void setFaultInFlow(Flow faultFlow) {
- flowInclude.setFaultInFlow(faultFlow);
- }
-
- /**
- * @param faultFlow
- */
- public void setFaultOutFlow(Flow faultFlow) {
- flowInclude.setFaultOutFlow(faultFlow);
- }
-
- /**
- * @param inFlow
- */
- public void setInFlow(Flow inFlow) {
- flowInclude.setInFlow(inFlow);
- }
-
- /**
- * @param outFlow
- */
- public void setOutFlow(Flow outFlow) {
- flowInclude.setOutFlow(outFlow);
- }
-
- /**
- * @param param
- */
- public void addParameter(Parameter param)throws AxisFault{
- if(isParamterLocked(param.getName())){
- throw new AxisFault("Parmter is locked can not overide: " + param.getName());
- } else{
- parameters.addParameter(param);
- }
- }
-
- /**
- * @param name
- * @return
- */
- public Parameter getParameter(String name) {
- return parameters.getParameter(name);
- }
-
- public ArrayList getParameters() {
- return parameters.getParameters();
- }
-
- /**
- * @return
- */
- public QName getName() {
- return name;
- }
-
- /**
- * @param name
- */
- public void setName(QName name) {
- this.name = name;
- }
-
- /**
- * @return
- */
- public Module getModule() {
- return module;
- }
-
- /**
- * @param module
- */
- public void setModule(Module module) {
- this.module = module;
- }
-
- public void addOperation(OperationDescription operation) {
- opeartions.put(operation.getName(), operation);
- }
-
- public HashMap getOperations() {
- return opeartions;
- }
-
- public AxisConfiguration getParent() {
- return parent;
- }
-
- public void setParent(AxisConfiguration parent) {
- this.parent = parent;
- }
-
- //to check whether a given paramter is locked
- public boolean isParamterLocked(String paramterName) {
- // checking the locked value of parent
- boolean loscked = false;
- if (getParent() !=null) {
- loscked= getParent().isParamterLocked(paramterName);
- }
- if(loscked){
- return true;
- } else {
- Parameter parameter = getParameter(paramterName);
- if(parameter != null && parameter.isLocked()){
- return true;
- } else {
- return false;
- }
- }
- }
-
-}
+/*
+* Copyright 2004,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 org.apache.axis2.description;
+
+import org.apache.axis2.modules.Module;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.AxisFault;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+/**
+ * <p>This holds the information about a Module. </p>
+ * <ol>
+ * <li>parameters<li>
+ * <li>handlers<li>
+ * <ol>
+ * <p>Handler are registered once they are avlible but they avalibe to all services if axis2.xml
+ * has a module ref="." or avalible to a single service if service.xml have module ref=".."</p>
+ */
+public class ModuleDescription implements FlowInclude, ParameterInclude {
+
+ private Module module;
+ /**
+ * Field name
+ */
+ private QName name;
+
+ private AxisConfiguration parent;
+
+ /**
+ * Field flowInclude
+ */
+ private final FlowInclude flowInclude = new FlowIncludeImpl();
+
+ //to store module opeartions , which are suppose to be added to a service if it is engaged to a service
+ private HashMap opeartions;
+
+ /**
+ * Field parameters
+ */
+ private final ParameterInclude parameters = new ParameterIncludeImpl();
+
+ /**
+ * Constructor ModuleDescription
+ */
+ public ModuleDescription() {
+ opeartions = new HashMap();
+ }
+
+ /**
+ * Constructor ModuleDescription
+ *
+ * @param name
+ */
+ public ModuleDescription(QName name) {
+ this();
+ this.name = name;
+ }
+
+ /**
+ * @return
+ */
+ public Flow getFaultInFlow() {
+ return flowInclude.getFaultInFlow();
+ }
+
+ public Flow getFaultOutFlow() {
+ return flowInclude.getFaultOutFlow();
+ }
+
+ /**
+ * @return
+ */
+ public Flow getInFlow() {
+ return flowInclude.getInFlow();
+ }
+
+ /**
+ * @return
+ */
+ public Flow getOutFlow() {
+ return flowInclude.getOutFlow();
+ }
+
+ /**
+ * @param faultFlow
+ */
+ public void setFaultInFlow(Flow faultFlow) {
+ flowInclude.setFaultInFlow(faultFlow);
+ }
+
+ /**
+ * @param faultFlow
+ */
+ public void setFaultOutFlow(Flow faultFlow) {
+ flowInclude.setFaultOutFlow(faultFlow);
+ }
+
+ /**
+ * @param inFlow
+ */
+ public void setInFlow(Flow inFlow) {
+ flowInclude.setInFlow(inFlow);
+ }
+
+ /**
+ * @param outFlow
+ */
+ public void setOutFlow(Flow outFlow) {
+ flowInclude.setOutFlow(outFlow);
+ }
+
+ /**
+ * @param param
+ */
+ public void addParameter(Parameter param)throws AxisFault{
+ if(isParamterLocked(param.getName())){
+ throw new AxisFault("Parmter is locked can not overide: " + param.getName());
+ } else{
+ parameters.addParameter(param);
+ }
+ }
+
+ /**
+ * @param name
+ * @return
+ */
+ public Parameter getParameter(String name) {
+ return parameters.getParameter(name);
+ }
+
+ public ArrayList getParameters() {
+ return parameters.getParameters();
+ }
+
+ /**
+ * @return
+ */
+ public QName getName() {
+ return name;
+ }
+
+ /**
+ * @param name
+ */
+ public void setName(QName name) {
+ this.name = name;
+ }
+
+ /**
+ * @return
+ */
+ public Module getModule() {
+ return module;
+ }
+
+ /**
+ * @param module
+ */
+ public void setModule(Module module) {
+ this.module = module;
+ }
+
+ public void addOperation(OperationDescription operation) {
+ opeartions.put(operation.getName(), operation);
+ }
+
+ public HashMap getOperations() {
+ return opeartions;
+ }
+
+ public AxisConfiguration getParent() {
+ return parent;
+ }
+
+ public void setParent(AxisConfiguration parent) {
+ this.parent = parent;
+ }
+
+ //to check whether a given paramter is locked
+ public boolean isParamterLocked(String paramterName) {
+ // checking the locked value of parent
+ boolean loscked = false;
+ if (getParent() !=null) {
+ loscked= getParent().isParamterLocked(paramterName);
+ }
+ if(loscked){
+ return true;
+ } else {
+ Parameter parameter = getParameter(paramterName);
+ if(parameter != null && parameter.isLocked()){
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java Thu Sep 15 11:52:11 2005
@@ -1,418 +1,418 @@
-package org.apache.axis2.description;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.*;
-import org.apache.axis2.engine.AxisError;
-import org.apache.axis2.engine.MessageReceiver;
-import org.apache.axis2.engine.Phase;
-import org.apache.axis2.engine.SOAPProcessingModelChecker;
-import org.apache.axis2.i18n.Messages;
-import org.apache.axis2.phaseresolver.PhaseMetadata;
-import org.apache.axis2.phaseresolver.PhaseResolver;
-import org.apache.wsdl.WSDLConstants;
-import org.apache.wsdl.WSDLOperation;
-import org.apache.wsdl.impl.WSDLOperationImpl;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-
-/**
- * @author chathura@opensource.lk
- */
-public class OperationDescription extends WSDLOperationImpl implements
- ParameterInclude, WSDLOperation, DescriptionConstants,
- WSDLConstants {
-
- private MessageReceiver messageReceiver;
- private ArrayList remainingPhasesInFlow;
- private ArrayList phasesOutFlow;
- private ArrayList phasesInFaultFlow;
- private ArrayList phasesOutFaultFlow;
-
- private HashMap moduleConfigmap;
-
- private int mep = MEP_CONSTANT_INVALID;
-
- private ServiceDescription parent;
-
- //To store deploytime module refs
- private ArrayList modulerefs;
-
- public OperationDescription() {
- this.setMessageExchangePattern(MEP_URI_IN_OUT);
- this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
- this.setComponentProperty(MODULEREF_KEY, new ArrayList());
-
- remainingPhasesInFlow = new ArrayList();
- remainingPhasesInFlow.add(
- new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
- Phase messageProcessing = new Phase(PhaseMetadata.PHASE_MESSAGE_PROCESSING);
- messageProcessing.addHandler(new SOAPProcessingModelChecker());
- remainingPhasesInFlow.add(messageProcessing);
-
- phasesOutFlow = new ArrayList();
- phasesOutFlow.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
- phasesOutFlow.add(new Phase(PhaseMetadata.PHASE_MESSAGE_OUT));
-
- phasesInFaultFlow = new ArrayList();
- phasesOutFaultFlow = new ArrayList();
- modulerefs = new ArrayList();
- }
-
- public OperationDescription(QName name) {
- this();
- this.setName(name);
- }
-
- /**
- * To ebgage a module it is reuired to use this method
- *
- * @param moduleref
- * @throws AxisFault
- */
- public void engageModule(ModuleDescription moduleref) throws AxisFault {
- if (moduleref == null) {
- return;
- }
- if (moduleref != null) {
- Collection collectionModule = (Collection) this.getComponentProperty(
- MODULEREF_KEY);
- for (Iterator iterator = collectionModule.iterator();
- iterator.hasNext();) {
- ModuleDescription modu = (ModuleDescription) iterator.next();
- if (modu.getName().equals(moduleref.getName())) {
- throw new AxisFault(moduleref.getName().getLocalPart() +
- " module has alredy engaged to the operation" +
- " operation terminated !!!");
- }
-
- }
- }
- new PhaseResolver().engageModuleToOperation(this, moduleref);
- Collection collectionModule = (Collection) this.getComponentProperty(
- MODULEREF_KEY);
- collectionModule.add(moduleref);
- }
-
- public void addToEngageModuleList(ModuleDescription moduleName) {
- Collection collectionModule = (Collection) this.getComponentProperty(
- MODULEREF_KEY);
- for (Iterator iterator = collectionModule.iterator();
- iterator.hasNext();) {
- ModuleDescription moduleDescription = (ModuleDescription) iterator.next();
- if (moduleName.getName().equals(moduleDescription.getName())) {
- return;
- }
- }
- collectionModule.add(moduleName);
- }
-
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.axis2.description.ServiceDescription#getEngadgedModules()
- */
-
- /**
- * Method getEngadgedModules
- *
- * @return
- */
- public Collection getModules() {
- return (Collection) this.getComponentProperty(MODULEREF_KEY);
- }
-
- /**
- * Method addParameter
- *
- * @param param Parameter that will be added
- */
- public void addParameter(Parameter param) throws AxisFault {
- if (param == null) {
- return;
- }
- if(isParamterLocked(param.getName())){
- throw new AxisFault("Parmter is locked can not overide: " + param.getName());
- } else{
- ParameterIncludeImpl paramInclude = (ParameterIncludeImpl) this
- .getComponentProperty(PARAMETER_KEY);
- paramInclude.addParameter(param);
- }
- }
-
- /**
- * Method getParameter
- *
- * @param name Name of the parameter
- * @return
- */
- public Parameter getParameter(String name) {
- ParameterIncludeImpl paramInclude = (ParameterIncludeImpl) this
- .getComponentProperty(PARAMETER_KEY);
- return paramInclude.getParameter(name);
- }
-
- public ArrayList getParameters() {
- ParameterIncludeImpl paramInclude = (ParameterIncludeImpl) this
- .getComponentProperty(PARAMETER_KEY);
- return paramInclude.getParameters();
- }
-
- /**
- * This method is responsible for finding a MEPContext for an incomming
- * messages. An incomming message can be of two states.
- * <p/>
- * 1)This is a new incomming message of a given MEP. 2)This message is a
- * part of an MEP which has already begun.
- * <p/>
- * The method is special cased for the two MEPs
- * <p/>
- * #IN_ONLY #IN_OUT
- * <p/>
- * for two reasons. First reason is the wide usage and the second being that
- * the need for the MEPContext to be saved for further incomming messages.
- * <p/>
- * In the event that MEP of this operation is different from the two MEPs
- * deafulted above the decession of creating a new or this message relates
- * to a MEP which already in business is decided by looking at the WSA
- * Relates TO of the incomming message.
- *
- * @param msgContext
- * @return
- */
- public OperationContext findOperationContext(MessageContext msgContext, ServiceContext serviceContext) throws AxisFault {
- OperationContext operationContext = null;
-
- if (null == msgContext.getRelatesTo()) {
- //Its a new incomming message so get the factory to create a new
- // one
- operationContext =
- OperationContextFactory.createOperationContext(
- getAxisSpecifMEPConstant(), this, serviceContext);
-
- } else {
- // So this message is part of an ongoing MEP
- // operationContext =
- ConfigurationContext configContext = msgContext.getSystemContext();
- operationContext =
- configContext.getOperationContext(
- msgContext.getRelatesTo().getValue());
-
- if (null == operationContext) {
- throw new AxisFault(Messages.getMessage("cannotCorrealteMsg",
- this.getName().toString(),msgContext.getRelatesTo().getValue()));
- }
-
- }
-
- registerOperationContext(msgContext, operationContext);
-
- return operationContext;
-
- }
-
- /**
- * This will not create a new operation context if there is no one already.
- * @param msgContext
- * @return
- * @throws AxisFault
- */
- public OperationContext findForExistingOperationContext(MessageContext msgContext) throws AxisFault {
- OperationContext operationContext = null;
-
- if (null == msgContext.getRelatesTo()) {
- return null;
- } else {
- // So this message is part of an ongoing MEP
- // operationContext =
- ConfigurationContext configContext = msgContext.getSystemContext();
- operationContext = configContext.getOperationContext(msgContext.getRelatesTo().getValue());
-
- if (null == operationContext) {
- throw new AxisFault(Messages.getMessage("cannotCorrealteMsg",
- this.getName().toString(),msgContext.getRelatesTo().getValue()));
- }
-
- }
-
- registerOperationContext(msgContext, operationContext);
-
- return operationContext;
-
- }
-
- public void registerOperationContext(MessageContext msgContext, OperationContext operationContext) throws AxisFault {
- msgContext.getSystemContext().registerOperationContext(
- msgContext.getMessageID(), operationContext);
- operationContext.addMessageContext(msgContext);
- msgContext.setOperationContext(operationContext);
- if (operationContext.isComplete()) {
- operationContext.cleanup();
- }
- }
-
- public MessageReceiver getMessageReceiver() {
- return messageReceiver;
- }
-
- public void setMessageReceiver(MessageReceiver messageReceiver) {
- this.messageReceiver = messageReceiver;
- }
-
-
- /**
- * This method will simply map the String URI of the Message exchange
- * pattern to a integer. Further in the first lookup it will cash the looked
- * up value so that the subsequent method calls will be extremely efficient.
- *
- * @return
- */
- public int getAxisSpecifMEPConstant() {
- if (this.mep != MEP_CONSTANT_INVALID) {
- return this.mep;
- }
-
- int temp = MEP_CONSTANT_INVALID;
-
- if (MEP_URI_IN_OUT.equals(getMessageExchangePattern())) {
- temp = MEP_CONSTANT_IN_OUT;
- } else if (MEP_URI_IN_ONLY.equals(getMessageExchangePattern())) {
- temp = MEP_CONSTANT_IN_ONLY;
- } else if (MEP_URI_IN_OPTIONAL_OUT.equals(getMessageExchangePattern())) {
- temp = MEP_CONSTANT_IN_OPTIONAL_OUT;
- } else if (MEP_URI_OUT_IN.equals(getMessageExchangePattern())) {
- temp = MEP_CONSTANT_OUT_IN;
- } else if (MEP_URI_OUT_ONLY.equals(getMessageExchangePattern())) {
- temp = MEP_CONSTANT_OUT_ONLY;
- } else if (MEP_URI_OUT_OPTIONAL_IN.equals(getMessageExchangePattern())) {
- temp = MEP_CONSTANT_OUT_OPTIONAL_IN;
- } else if (MEP_URI_ROBUST_IN_ONLY.equals(getMessageExchangePattern())) {
- temp = MEP_CONSTANT_ROBUST_IN_ONLY;
- } else if (MEP_URI_ROBUST_OUT_ONLY.equals(getMessageExchangePattern())) {
- temp = MEP_CONSTANT_ROBUST_OUT_ONLY;
- }
-
- if (temp == MEP_CONSTANT_INVALID) {
- throw new AxisError(
- "Could not Map the MEP URI to a axis MEP constant value");
- }
- this.mep = temp;
- return this.mep;
-
- }
-
-
- /**
- * @return
- */
- public ArrayList getPhasesInFaultFlow() {
- return phasesInFaultFlow;
- }
-
- /**
- * @return
- */
- public ArrayList getPhasesOutFaultFlow() {
- return phasesOutFaultFlow;
- }
-
- /**
- * @return
- */
- public ArrayList getPhasesOutFlow() {
- return phasesOutFlow;
- }
-
- /**
- * @return
- */
- public ArrayList getRemainingPhasesInFlow() {
- return remainingPhasesInFlow;
- }
-
- /**
- * @param list
- */
- public void setPhasesInFaultFlow(ArrayList list) {
- phasesInFaultFlow = list;
- }
-
- /**
- * @param list
- */
- public void setPhasesOutFaultFlow(ArrayList list) {
- phasesOutFaultFlow = list;
- }
-
- /**
- * @param list
- */
- public void setPhasesOutFlow(ArrayList list) {
- phasesOutFlow = list;
- }
-
- /**
- * @param list
- */
- public void setRemainingPhasesInFlow(ArrayList list) {
- remainingPhasesInFlow = list;
- }
-
- public void addModule(QName moduleName) {
- modulerefs.add(moduleName);
- }
-
- public ArrayList getModuleRefs() {
- return modulerefs;
- }
-
- public ServiceDescription getParent() {
- return parent;
- }
-
- public void setParent(ServiceDescription parent) {
- this.parent = parent;
- }
-
- //to check whether a given paramter is locked
- public boolean isParamterLocked(String paramterName) {
- // checking the locked value of parent
- boolean loscked = false;
- if (getParent() !=null) {
- loscked= getParent().isParamterLocked(paramterName);
- }
- if(loscked){
- return true;
- } else {
- Parameter parameter = getParameter(paramterName);
- if(parameter != null && parameter.isLocked()){
- return true;
- } else {
- return false;
- }
- }
- }
-
- /**
- * Adding module configuration , if there is moduleConfig tag in operation
- * @param moduleConfiguration
- */
- public void addModuleConfig(ModuleConfiguration moduleConfiguration){
- if(moduleConfigmap == null){
- moduleConfigmap = new HashMap();
- }
- moduleConfigmap.put(moduleConfiguration.getModuleName(),moduleConfiguration);
- }
-
- public ModuleConfiguration getModuleConfig(QName moduleName){
- return (ModuleConfiguration)moduleConfigmap.get(moduleName);
- }
-
-}
-
+package org.apache.axis2.description;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.*;
+import org.apache.axis2.engine.AxisError;
+import org.apache.axis2.engine.MessageReceiver;
+import org.apache.axis2.engine.Phase;
+import org.apache.axis2.engine.SOAPProcessingModelChecker;
+import org.apache.axis2.i18n.Messages;
+import org.apache.axis2.phaseresolver.PhaseMetadata;
+import org.apache.axis2.phaseresolver.PhaseResolver;
+import org.apache.wsdl.WSDLConstants;
+import org.apache.wsdl.WSDLOperation;
+import org.apache.wsdl.impl.WSDLOperationImpl;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class OperationDescription extends WSDLOperationImpl implements
+ ParameterInclude, WSDLOperation, DescriptionConstants,
+ WSDLConstants {
+
+ private MessageReceiver messageReceiver;
+ private ArrayList remainingPhasesInFlow;
+ private ArrayList phasesOutFlow;
+ private ArrayList phasesInFaultFlow;
+ private ArrayList phasesOutFaultFlow;
+
+ private HashMap moduleConfigmap;
+
+ private int mep = MEP_CONSTANT_INVALID;
+
+ private ServiceDescription parent;
+
+ //To store deploytime module refs
+ private ArrayList modulerefs;
+
+ public OperationDescription() {
+ this.setMessageExchangePattern(MEP_URI_IN_OUT);
+ this.setComponentProperty(PARAMETER_KEY, new ParameterIncludeImpl());
+ this.setComponentProperty(MODULEREF_KEY, new ArrayList());
+
+ remainingPhasesInFlow = new ArrayList();
+ remainingPhasesInFlow.add(
+ new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
+ Phase messageProcessing = new Phase(PhaseMetadata.PHASE_MESSAGE_PROCESSING);
+ messageProcessing.addHandler(new SOAPProcessingModelChecker());
+ remainingPhasesInFlow.add(messageProcessing);
+
+ phasesOutFlow = new ArrayList();
+ phasesOutFlow.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
+ phasesOutFlow.add(new Phase(PhaseMetadata.PHASE_MESSAGE_OUT));
+
+ phasesInFaultFlow = new ArrayList();
+ phasesOutFaultFlow = new ArrayList();
+ modulerefs = new ArrayList();
+ }
+
+ public OperationDescription(QName name) {
+ this();
+ this.setName(name);
+ }
+
+ /**
+ * To ebgage a module it is reuired to use this method
+ *
+ * @param moduleref
+ * @throws AxisFault
+ */
+ public void engageModule(ModuleDescription moduleref) throws AxisFault {
+ if (moduleref == null) {
+ return;
+ }
+ if (moduleref != null) {
+ Collection collectionModule = (Collection) this.getComponentProperty(
+ MODULEREF_KEY);
+ for (Iterator iterator = collectionModule.iterator();
+ iterator.hasNext();) {
+ ModuleDescription modu = (ModuleDescription) iterator.next();
+ if (modu.getName().equals(moduleref.getName())) {
+ throw new AxisFault(moduleref.getName().getLocalPart() +
+ " module has alredy engaged to the operation" +
+ " operation terminated !!!");
+ }
+
+ }
+ }
+ new PhaseResolver().engageModuleToOperation(this, moduleref);
+ Collection collectionModule = (Collection) this.getComponentProperty(
+ MODULEREF_KEY);
+ collectionModule.add(moduleref);
+ }
+
+ public void addToEngageModuleList(ModuleDescription moduleName) {
+ Collection collectionModule = (Collection) this.getComponentProperty(
+ MODULEREF_KEY);
+ for (Iterator iterator = collectionModule.iterator();
+ iterator.hasNext();) {
+ ModuleDescription moduleDescription = (ModuleDescription) iterator.next();
+ if (moduleName.getName().equals(moduleDescription.getName())) {
+ return;
+ }
+ }
+ collectionModule.add(moduleName);
+ }
+
+
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.axis2.description.ServiceDescription#getEngadgedModules()
+ */
+
+ /**
+ * Method getEngadgedModules
+ *
+ * @return
+ */
+ public Collection getModules() {
+ return (Collection) this.getComponentProperty(MODULEREF_KEY);
+ }
+
+ /**
+ * Method addParameter
+ *
+ * @param param Parameter that will be added
+ */
+ public void addParameter(Parameter param) throws AxisFault {
+ if (param == null) {
+ return;
+ }
+ if(isParamterLocked(param.getName())){
+ throw new AxisFault("Parmter is locked can not overide: " + param.getName());
+ } else{
+ ParameterIncludeImpl paramInclude = (ParameterIncludeImpl) this
+ .getComponentProperty(PARAMETER_KEY);
+ paramInclude.addParameter(param);
+ }
+ }
+
+ /**
+ * Method getParameter
+ *
+ * @param name Name of the parameter
+ * @return
+ */
+ public Parameter getParameter(String name) {
+ ParameterIncludeImpl paramInclude = (ParameterIncludeImpl) this
+ .getComponentProperty(PARAMETER_KEY);
+ return paramInclude.getParameter(name);
+ }
+
+ public ArrayList getParameters() {
+ ParameterIncludeImpl paramInclude = (ParameterIncludeImpl) this
+ .getComponentProperty(PARAMETER_KEY);
+ return paramInclude.getParameters();
+ }
+
+ /**
+ * This method is responsible for finding a MEPContext for an incomming
+ * messages. An incomming message can be of two states.
+ * <p/>
+ * 1)This is a new incomming message of a given MEP. 2)This message is a
+ * part of an MEP which has already begun.
+ * <p/>
+ * The method is special cased for the two MEPs
+ * <p/>
+ * #IN_ONLY #IN_OUT
+ * <p/>
+ * for two reasons. First reason is the wide usage and the second being that
+ * the need for the MEPContext to be saved for further incomming messages.
+ * <p/>
+ * In the event that MEP of this operation is different from the two MEPs
+ * deafulted above the decession of creating a new or this message relates
+ * to a MEP which already in business is decided by looking at the WSA
+ * Relates TO of the incomming message.
+ *
+ * @param msgContext
+ * @return
+ */
+ public OperationContext findOperationContext(MessageContext msgContext, ServiceContext serviceContext) throws AxisFault {
+ OperationContext operationContext = null;
+
+ if (null == msgContext.getRelatesTo()) {
+ //Its a new incomming message so get the factory to create a new
+ // one
+ operationContext =
+ OperationContextFactory.createOperationContext(
+ getAxisSpecifMEPConstant(), this, serviceContext);
+
+ } else {
+ // So this message is part of an ongoing MEP
+ // operationContext =
+ ConfigurationContext configContext = msgContext.getSystemContext();
+ operationContext =
+ configContext.getOperationContext(
+ msgContext.getRelatesTo().getValue());
+
+ if (null == operationContext) {
+ throw new AxisFault(Messages.getMessage("cannotCorrealteMsg",
+ this.getName().toString(),msgContext.getRelatesTo().getValue()));
+ }
+
+ }
+
+ registerOperationContext(msgContext, operationContext);
+
+ return operationContext;
+
+ }
+
+ /**
+ * This will not create a new operation context if there is no one already.
+ * @param msgContext
+ * @return
+ * @throws AxisFault
+ */
+ public OperationContext findForExistingOperationContext(MessageContext msgContext) throws AxisFault {
+ OperationContext operationContext = null;
+
+ if (null == msgContext.getRelatesTo()) {
+ return null;
+ } else {
+ // So this message is part of an ongoing MEP
+ // operationContext =
+ ConfigurationContext configContext = msgContext.getSystemContext();
+ operationContext = configContext.getOperationContext(msgContext.getRelatesTo().getValue());
+
+ if (null == operationContext) {
+ throw new AxisFault(Messages.getMessage("cannotCorrealteMsg",
+ this.getName().toString(),msgContext.getRelatesTo().getValue()));
+ }
+
+ }
+
+ registerOperationContext(msgContext, operationContext);
+
+ return operationContext;
+
+ }
+
+ public void registerOperationContext(MessageContext msgContext, OperationContext operationContext) throws AxisFault {
+ msgContext.getSystemContext().registerOperationContext(
+ msgContext.getMessageID(), operationContext);
+ operationContext.addMessageContext(msgContext);
+ msgContext.setOperationContext(operationContext);
+ if (operationContext.isComplete()) {
+ operationContext.cleanup();
+ }
+ }
+
+ public MessageReceiver getMessageReceiver() {
+ return messageReceiver;
+ }
+
+ public void setMessageReceiver(MessageReceiver messageReceiver) {
+ this.messageReceiver = messageReceiver;
+ }
+
+
+ /**
+ * This method will simply map the String URI of the Message exchange
+ * pattern to a integer. Further in the first lookup it will cash the looked
+ * up value so that the subsequent method calls will be extremely efficient.
+ *
+ * @return
+ */
+ public int getAxisSpecifMEPConstant() {
+ if (this.mep != MEP_CONSTANT_INVALID) {
+ return this.mep;
+ }
+
+ int temp = MEP_CONSTANT_INVALID;
+
+ if (MEP_URI_IN_OUT.equals(getMessageExchangePattern())) {
+ temp = MEP_CONSTANT_IN_OUT;
+ } else if (MEP_URI_IN_ONLY.equals(getMessageExchangePattern())) {
+ temp = MEP_CONSTANT_IN_ONLY;
+ } else if (MEP_URI_IN_OPTIONAL_OUT.equals(getMessageExchangePattern())) {
+ temp = MEP_CONSTANT_IN_OPTIONAL_OUT;
+ } else if (MEP_URI_OUT_IN.equals(getMessageExchangePattern())) {
+ temp = MEP_CONSTANT_OUT_IN;
+ } else if (MEP_URI_OUT_ONLY.equals(getMessageExchangePattern())) {
+ temp = MEP_CONSTANT_OUT_ONLY;
+ } else if (MEP_URI_OUT_OPTIONAL_IN.equals(getMessageExchangePattern())) {
+ temp = MEP_CONSTANT_OUT_OPTIONAL_IN;
+ } else if (MEP_URI_ROBUST_IN_ONLY.equals(getMessageExchangePattern())) {
+ temp = MEP_CONSTANT_ROBUST_IN_ONLY;
+ } else if (MEP_URI_ROBUST_OUT_ONLY.equals(getMessageExchangePattern())) {
+ temp = MEP_CONSTANT_ROBUST_OUT_ONLY;
+ }
+
+ if (temp == MEP_CONSTANT_INVALID) {
+ throw new AxisError(
+ "Could not Map the MEP URI to a axis MEP constant value");
+ }
+ this.mep = temp;
+ return this.mep;
+
+ }
+
+
+ /**
+ * @return
+ */
+ public ArrayList getPhasesInFaultFlow() {
+ return phasesInFaultFlow;
+ }
+
+ /**
+ * @return
+ */
+ public ArrayList getPhasesOutFaultFlow() {
+ return phasesOutFaultFlow;
+ }
+
+ /**
+ * @return
+ */
+ public ArrayList getPhasesOutFlow() {
+ return phasesOutFlow;
+ }
+
+ /**
+ * @return
+ */
+ public ArrayList getRemainingPhasesInFlow() {
+ return remainingPhasesInFlow;
+ }
+
+ /**
+ * @param list
+ */
+ public void setPhasesInFaultFlow(ArrayList list) {
+ phasesInFaultFlow = list;
+ }
+
+ /**
+ * @param list
+ */
+ public void setPhasesOutFaultFlow(ArrayList list) {
+ phasesOutFaultFlow = list;
+ }
+
+ /**
+ * @param list
+ */
+ public void setPhasesOutFlow(ArrayList list) {
+ phasesOutFlow = list;
+ }
+
+ /**
+ * @param list
+ */
+ public void setRemainingPhasesInFlow(ArrayList list) {
+ remainingPhasesInFlow = list;
+ }
+
+ public void addModule(QName moduleName) {
+ modulerefs.add(moduleName);
+ }
+
+ public ArrayList getModuleRefs() {
+ return modulerefs;
+ }
+
+ public ServiceDescription getParent() {
+ return parent;
+ }
+
+ public void setParent(ServiceDescription parent) {
+ this.parent = parent;
+ }
+
+ //to check whether a given paramter is locked
+ public boolean isParamterLocked(String paramterName) {
+ // checking the locked value of parent
+ boolean loscked = false;
+ if (getParent() !=null) {
+ loscked= getParent().isParamterLocked(paramterName);
+ }
+ if(loscked){
+ return true;
+ } else {
+ Parameter parameter = getParameter(paramterName);
+ if(parameter != null && parameter.isLocked()){
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Adding module configuration , if there is moduleConfig tag in operation
+ * @param moduleConfiguration
+ */
+ public void addModuleConfig(ModuleConfiguration moduleConfiguration){
+ if(moduleConfigmap == null){
+ moduleConfigmap = new HashMap();
+ }
+ moduleConfigmap.put(moduleConfiguration.getModuleName(),moduleConfiguration);
+ }
+
+ public ModuleConfiguration getModuleConfig(QName moduleName){
+ return (ModuleConfiguration)moduleConfigmap.get(moduleName);
+ }
+
+}
+
Propchange: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java Thu Sep 15 11:52:11 2005
@@ -1,101 +1,101 @@
-/*
- * Copyright 2004,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 org.apache.axis2.description;
-
-import org.apache.axis2.om.OMElement;
-
-/**
- * Interface Parameter
- */
-public interface Parameter {
- /**
- * Field TEXT_PARAMETER
- */
- public static int TEXT_PARAMETER = 0;
-
- /**
- * Field DOM_PARAMETER
- */
- public static int DOM_PARAMETER = 1;
-
- /**
- * Method getName
- *
- * @return int
- */
- public String getName();
-
- /**
- * Method getValue
- *
- * @return Object
- */
- public Object getValue();
-
- /**
- * Method setName
- *
- * @param name
- */
- public void setName(String name);
-
- /**
- * Method setValue
- *
- * @param value
- */
- public void setValue(Object value);
-
- /**
- * Method isLocked
- *
- * @return boolean
- */
- public boolean isLocked();
-
- /**
- * Method setLocked
- *
- * @param value
- */
- public void setLocked(boolean value);
-
- /**
- * Method getParameterType
- *
- * @return int
- */
- public int getParameterType();
-
- public void setParamterType(int type);
-
- /**
- * Paramter can be any thing it can be XML element with number of child elements , so if some
- * one wants to access the XML elemet we need to store that , at the deployment time , to store
- * the XMLelment of the parameter can use this method it will store whole
- * <parameter name="ServiceClass1" locked="false">org.apache.axis2.sample.echo.EchoImpl</parameter>
- * element
- * @param element <code>OMElement<code>
- */
-
- public void setParameterElement(OMElement element);
-
- /**
- * To get the whole paramter element
- * @return <code>OMElement<code>
- */
- public OMElement getParameterElement();
-}
+/*
+ * Copyright 2004,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 org.apache.axis2.description;
+
+import org.apache.axis2.om.OMElement;
+
+/**
+ * Interface Parameter
+ */
+public interface Parameter {
+ /**
+ * Field TEXT_PARAMETER
+ */
+ public static int TEXT_PARAMETER = 0;
+
+ /**
+ * Field DOM_PARAMETER
+ */
+ public static int DOM_PARAMETER = 1;
+
+ /**
+ * Method getName
+ *
+ * @return int
+ */
+ public String getName();
+
+ /**
+ * Method getValue
+ *
+ * @return Object
+ */
+ public Object getValue();
+
+ /**
+ * Method setName
+ *
+ * @param name
+ */
+ public void setName(String name);
+
+ /**
+ * Method setValue
+ *
+ * @param value
+ */
+ public void setValue(Object value);
+
+ /**
+ * Method isLocked
+ *
+ * @return boolean
+ */
+ public boolean isLocked();
+
+ /**
+ * Method setLocked
+ *
+ * @param value
+ */
+ public void setLocked(boolean value);
+
+ /**
+ * Method getParameterType
+ *
+ * @return int
+ */
+ public int getParameterType();
+
+ public void setParamterType(int type);
+
+ /**
+ * Paramter can be any thing it can be XML element with number of child elements , so if some
+ * one wants to access the XML elemet we need to store that , at the deployment time , to store
+ * the XMLelment of the parameter can use this method it will store whole
+ * <parameter name="ServiceClass1" locked="false">org.apache.axis2.sample.echo.EchoImpl</parameter>
+ * element
+ * @param element <code>OMElement<code>
+ */
+
+ public void setParameterElement(OMElement element);
+
+ /**
+ * To get the whole paramter element
+ * @return <code>OMElement<code>
+ */
+ public OMElement getParameterElement();
+}
Propchange: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/Parameter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterImpl.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterImpl.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterImpl.java Thu Sep 15 11:52:11 2005
@@ -1,143 +1,143 @@
-/*
- * Copyright 2004,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 org.apache.axis2.description;
-
-import org.apache.axis2.om.OMElement;
-
-/**
- * Class ParameterImpl
- */
-public class ParameterImpl implements Parameter {
- /**
- * Field name
- */
- private String name;
-
- /**
- * Field value
- */
- private Object value;
-
- /**
- * Field locked
- */
- private boolean locked;
-
- /**
- * Field type
- */
- private int type = TEXT_PARAMETER;
-
-
- /**
- * to store the parameter lement
- * <parameter name="ServiceClass1" locked="false">
- * org.apache.axis2.sample.echo.EchoImpl</parameter>
- */
- private OMElement parameterElement ;
-
- /**
- * Constructor ParameterImpl
- */
- public ParameterImpl() {
- }
-
- /**
- * Constructor ParameterImpl
- *
- * @param name
- * @param value
- */
- public ParameterImpl(String name, String value) {
- this.name = name;
- this.value = value;
- }
-
- /**
- * Method setName
- *
- * @param name
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * Method setValue
- *
- * @param value
- */
- public void setValue(Object value) {
- this.value = value;
- }
-
- /**
- * Method isLocked
- *
- * @return
- */
- public boolean isLocked() {
- return locked;
- }
-
- /**
- * Method setLocked
- *
- * @param value
- */
- public void setLocked(boolean value) {
- locked = value;
- }
-
- /**
- * Method getName
- *
- * @return
- */
- public String getName() {
- return name;
- }
-
- /**
- * Method getValue
- *
- * @return
- */
- public Object getValue() {
- return value;
- }
-
- /**
- * Method getParameterType
- *
- * @return
- */
- public int getParameterType() {
- return type;
- }
-
- public void setParamterType(int type) {
- this.type =type;
- }
-
- public void setParameterElement(OMElement element) {
- this.parameterElement = element;
- }
-
- public OMElement getParameterElement() {
- return this.parameterElement;
- }
-}
+/*
+ * Copyright 2004,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 org.apache.axis2.description;
+
+import org.apache.axis2.om.OMElement;
+
+/**
+ * Class ParameterImpl
+ */
+public class ParameterImpl implements Parameter {
+ /**
+ * Field name
+ */
+ private String name;
+
+ /**
+ * Field value
+ */
+ private Object value;
+
+ /**
+ * Field locked
+ */
+ private boolean locked;
+
+ /**
+ * Field type
+ */
+ private int type = TEXT_PARAMETER;
+
+
+ /**
+ * to store the parameter lement
+ * <parameter name="ServiceClass1" locked="false">
+ * org.apache.axis2.sample.echo.EchoImpl</parameter>
+ */
+ private OMElement parameterElement ;
+
+ /**
+ * Constructor ParameterImpl
+ */
+ public ParameterImpl() {
+ }
+
+ /**
+ * Constructor ParameterImpl
+ *
+ * @param name
+ * @param value
+ */
+ public ParameterImpl(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ /**
+ * Method setName
+ *
+ * @param name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Method setValue
+ *
+ * @param value
+ */
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ /**
+ * Method isLocked
+ *
+ * @return
+ */
+ public boolean isLocked() {
+ return locked;
+ }
+
+ /**
+ * Method setLocked
+ *
+ * @param value
+ */
+ public void setLocked(boolean value) {
+ locked = value;
+ }
+
+ /**
+ * Method getName
+ *
+ * @return
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Method getValue
+ *
+ * @return
+ */
+ public Object getValue() {
+ return value;
+ }
+
+ /**
+ * Method getParameterType
+ *
+ * @return
+ */
+ public int getParameterType() {
+ return type;
+ }
+
+ public void setParamterType(int type) {
+ this.type =type;
+ }
+
+ public void setParameterElement(OMElement element) {
+ this.parameterElement = element;
+ }
+
+ public OMElement getParameterElement() {
+ return this.parameterElement;
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java Thu Sep 15 11:52:11 2005
@@ -1,54 +1,54 @@
-/*
- * Copyright 2004,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 org.apache.axis2.description;
-
-import org.apache.axis2.AxisFault;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-
-/**
- * Interface ParameterInclude
- */
-public interface ParameterInclude {
-
- // parameters
-
- /**
- * Method addParameter
- *
- * @param param
- */
- public void addParameter(Parameter param) throws AxisFault;
-
- /**
- * Method getParameter
- *
- * @param name
- * @return
- */
- public Parameter getParameter(String name);
-
- /**
- * To get all the parameters in a given description
- * @return
- */
- ArrayList getParameters();
-
- //to check whether the paramter is locked at any levle
- boolean isParamterLocked(String paramterName);
-
-}
+/*
+ * Copyright 2004,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 org.apache.axis2.description;
+
+import org.apache.axis2.AxisFault;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+
+/**
+ * Interface ParameterInclude
+ */
+public interface ParameterInclude {
+
+ // parameters
+
+ /**
+ * Method addParameter
+ *
+ * @param param
+ */
+ public void addParameter(Parameter param) throws AxisFault;
+
+ /**
+ * Method getParameter
+ *
+ * @param name
+ * @return
+ */
+ public Parameter getParameter(String name);
+
+ /**
+ * To get all the parameters in a given description
+ * @return
+ */
+ ArrayList getParameters();
+
+ //to check whether the paramter is locked at any levle
+ boolean isParamterLocked(String paramterName);
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java Thu Sep 15 11:52:11 2005
@@ -1,74 +1,74 @@
-/*
-* Copyright 2004,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 org.apache.axis2.description;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-
-/**
- * Class ParameterIncludeImpl
- */
-public class ParameterIncludeImpl implements ParameterInclude {
- /**
- * Field parmeters
- */
- protected final HashMap parmeters;
-
- /**
- * Constructor ParameterIncludeImpl
- */
- public ParameterIncludeImpl() {
- parmeters = new HashMap();
- }
-
- /**
- * Method addParameter
- *
- * @param param
- */
- public void addParameter(Parameter param) {
- if (param != null) {
- parmeters.put(param.getName(), param);
- }
- }
-
- /**
- * Method getParameter
- *
- * @param name
- * @return
- */
- public Parameter getParameter(String name) {
- return (Parameter) parmeters.get(name);
- }
-
- public ArrayList getParameters() {
- Collection col = parmeters.values();
- ArrayList para_list = new ArrayList();
- for (Iterator iterator = col.iterator(); iterator.hasNext();) {
- Parameter parameter = (Parameter) iterator.next();
- para_list.add(parameter);
- }
- return para_list;
- }
-
- //to check whether the paramter is locked at any levle
- public boolean isParamterLocked(String paramterName) {
- return false;
- }
-}
+/*
+* Copyright 2004,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 org.apache.axis2.description;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+
+/**
+ * Class ParameterIncludeImpl
+ */
+public class ParameterIncludeImpl implements ParameterInclude {
+ /**
+ * Field parmeters
+ */
+ protected final HashMap parmeters;
+
+ /**
+ * Constructor ParameterIncludeImpl
+ */
+ public ParameterIncludeImpl() {
+ parmeters = new HashMap();
+ }
+
+ /**
+ * Method addParameter
+ *
+ * @param param
+ */
+ public void addParameter(Parameter param) {
+ if (param != null) {
+ parmeters.put(param.getName(), param);
+ }
+ }
+
+ /**
+ * Method getParameter
+ *
+ * @param name
+ * @return
+ */
+ public Parameter getParameter(String name) {
+ return (Parameter) parmeters.get(name);
+ }
+
+ public ArrayList getParameters() {
+ Collection col = parmeters.values();
+ ArrayList para_list = new ArrayList();
+ for (Iterator iterator = col.iterator(); iterator.hasNext();) {
+ Parameter parameter = (Parameter) iterator.next();
+ para_list.add(parameter);
+ }
+ return para_list;
+ }
+
+ //to check whether the paramter is locked at any levle
+ public boolean isParamterLocked(String paramterName) {
+ return false;
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PhaseRule.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PhaseRule.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PhaseRule.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PhaseRule.java Thu Sep 15 11:52:11 2005
@@ -1,156 +1,156 @@
-/*
- * Copyright 2004,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 org.apache.axis2.description;
-
-/**
- * Class PhaseRule
- */
-public class PhaseRule {
-
- // can be either name of phase or handler
-
- /**
- * Field before
- */
- private String before;
-
- // can be either name of phase or handler
-
- /**
- * Field after
- */
- private String after;
-
- /**
- * Field phaseName
- */
- private String phaseName;
-
- /**
- * Field phaseFirst
- */
- private boolean phaseFirst;
-
- /**
- * Field phaseLast
- */
- private boolean phaseLast;
-
- /**
- * Constructor PhaseRule
- */
- public PhaseRule() {
- this.before = "";
- this.after = "";
- this.phaseName = "";
- }
-
- public PhaseRule(String phaseName) {
- this.before = "";
- this.after = "";
- this.phaseName = phaseName;
- }
-
- /**
- * Method getBefore
- *
- * @return
- */
- public String getBefore() {
- return before;
- }
-
- /**
- * Method setBefore
- *
- * @param before
- */
- public void setBefore(String before) {
- this.before = before;
- }
-
- /**
- * Method getAfter
- *
- * @return
- */
- public String getAfter() {
- return after;
- }
-
- /**
- * Method setAfter
- *
- * @param after
- */
- public void setAfter(String after) {
- this.after = after;
- }
-
- /**
- * Method getPhaseName
- *
- * @return
- */
- public String getPhaseName() {
- return phaseName;
- }
-
- /**
- * Method setPhaseName
- *
- * @param phaseName
- */
- public void setPhaseName(String phaseName) {
- this.phaseName = phaseName;
- }
-
- /**
- * Method isPhaseFirst
- *
- * @return
- */
- public boolean isPhaseFirst() {
- return phaseFirst;
- }
-
- /**
- * Method setPhaseFirst
- *
- * @param phaseFirst
- */
- public void setPhaseFirst(boolean phaseFirst) {
- this.phaseFirst = phaseFirst;
- }
-
- /**
- * Method isPhaseLast
- *
- * @return
- */
- public boolean isPhaseLast() {
- return phaseLast;
- }
-
- /**
- * Method setPhaseLast
- *
- * @param phaseLast
- */
- public void setPhaseLast(boolean phaseLast) {
- this.phaseLast = phaseLast;
- }
-}
+/*
+ * Copyright 2004,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 org.apache.axis2.description;
+
+/**
+ * Class PhaseRule
+ */
+public class PhaseRule {
+
+ // can be either name of phase or handler
+
+ /**
+ * Field before
+ */
+ private String before;
+
+ // can be either name of phase or handler
+
+ /**
+ * Field after
+ */
+ private String after;
+
+ /**
+ * Field phaseName
+ */
+ private String phaseName;
+
+ /**
+ * Field phaseFirst
+ */
+ private boolean phaseFirst;
+
+ /**
+ * Field phaseLast
+ */
+ private boolean phaseLast;
+
+ /**
+ * Constructor PhaseRule
+ */
+ public PhaseRule() {
+ this.before = "";
+ this.after = "";
+ this.phaseName = "";
+ }
+
+ public PhaseRule(String phaseName) {
+ this.before = "";
+ this.after = "";
+ this.phaseName = phaseName;
+ }
+
+ /**
+ * Method getBefore
+ *
+ * @return
+ */
+ public String getBefore() {
+ return before;
+ }
+
+ /**
+ * Method setBefore
+ *
+ * @param before
+ */
+ public void setBefore(String before) {
+ this.before = before;
+ }
+
+ /**
+ * Method getAfter
+ *
+ * @return
+ */
+ public String getAfter() {
+ return after;
+ }
+
+ /**
+ * Method setAfter
+ *
+ * @param after
+ */
+ public void setAfter(String after) {
+ this.after = after;
+ }
+
+ /**
+ * Method getPhaseName
+ *
+ * @return
+ */
+ public String getPhaseName() {
+ return phaseName;
+ }
+
+ /**
+ * Method setPhaseName
+ *
+ * @param phaseName
+ */
+ public void setPhaseName(String phaseName) {
+ this.phaseName = phaseName;
+ }
+
+ /**
+ * Method isPhaseFirst
+ *
+ * @return
+ */
+ public boolean isPhaseFirst() {
+ return phaseFirst;
+ }
+
+ /**
+ * Method setPhaseFirst
+ *
+ * @param phaseFirst
+ */
+ public void setPhaseFirst(boolean phaseFirst) {
+ this.phaseFirst = phaseFirst;
+ }
+
+ /**
+ * Method isPhaseLast
+ *
+ * @return
+ */
+ public boolean isPhaseLast() {
+ return phaseLast;
+ }
+
+ /**
+ * Method setPhaseLast
+ *
+ * @param phaseLast
+ */
+ public void setPhaseLast(boolean phaseLast) {
+ this.phaseLast = phaseLast;
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PhaseRule.java
------------------------------------------------------------------------------
svn:eol-style = native