Author: veithen
Date: Mon Jul 11 20:38:26 2011
New Revision: 1145336
URL: http://svn.apache.org/viewvc?rev=1145336&view=rev
Log:
Merged r1072332, r1072333 and r1090216 to the 1.6 branch to upgrade to Neethi
3.0.1.
Added:
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/AcknowledgementIntervalAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/AcknowledgementIntervalAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/ContextManagerAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/ContextManagerAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/EPRDecoratorAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/EPRDecoratorAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/EnforceRMAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/EnforceRMAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/ExponentialBackoffAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/ExponentialBackoffAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/InactivityTimeoutAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/InactivityTimeoutAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/InactivityTimeoutMeasureAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/InactivityTimeoutMeasureAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/InvokeInOrderAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/InvokeInOrderAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/MakeConnectionAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/MakeConnectionAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/MaximumRetransmissionCountAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/MaximumRetransmissionCountAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/MessageTypesToDropAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/MessageTypesToDropAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RetransmissionIntervalAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RetransmissionIntervalAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/SandeshaPropertyAssertion.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/SandeshaPropertyAssertion.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/SecurityManagerAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/SecurityManagerAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/SequenceRemovalTimeoutAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/SequenceRemovalTimeoutAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/SequenceRemovalTimeoutMeasureAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/SequenceRemovalTimeoutMeasureAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/StorageManagersAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/StorageManagersAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/UseMessageSerializationAssertionBuilder.java
- copied unchanged from r1072333,
axis/axis2/java/sandesha/trunk/modules/core/src/main/java/org/apache/sandesha2/policy/builders/UseMessageSerializationAssertionBuilder.java
Modified:
axis/axis2/java/sandesha/branches/1_6/ (props changed)
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java
axis/axis2/java/sandesha/branches/1_6/modules/policy/src/main/resources/META-INF/services/org.apache.neethi.builders.AssertionBuilder
axis/axis2/java/sandesha/branches/1_6/pom.xml
Propchange: axis/axis2/java/sandesha/branches/1_6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 11 20:38:26 2011
@@ -1 +1 @@
-/axis/axis2/java/sandesha/trunk:1081570,1098145,1137383
+/axis/axis2/java/sandesha/trunk:1072332-1072333,1081570,1090216,1098145,1137383
Modified:
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java?rev=1145336&r1=1145335&r2=1145336&view=diff
==============================================================================
---
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java
(original)
+++
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java
Mon Jul 11 20:38:26 2011
@@ -627,5 +627,8 @@ public class SandeshaPolicyBean implemen
public void setParent(SandeshaPolicyBean parent) {
this.parent = parent;
}
-
+
+ public boolean isIgnorable() {
+ return false;
+ }
}
Modified:
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java?rev=1145336&r1=1145335&r2=1145336&view=diff
==============================================================================
---
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java
(original)
+++
axis/axis2/java/sandesha/branches/1_6/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java
Mon Jul 11 20:38:26 2011
@@ -19,24 +19,19 @@
package org.apache.sandesha2.policy.builders;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
import javax.xml.namespace.QName;
import org.apache.axiom.om.OMElement;
-import org.apache.axis2.Constants;
import org.apache.neethi.Assertion;
import org.apache.neethi.AssertionBuilderFactory;
import org.apache.neethi.Policy;
+import org.apache.neethi.PolicyComponent;
import org.apache.neethi.PolicyEngine;
import org.apache.neethi.builders.AssertionBuilder;
-import org.apache.neethi.builders.xml.XmlPrimtiveAssertion;
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.sandesha2.policy.SandeshaPolicyBean;
-public class RMAssertionBuilder implements AssertionBuilder {
+public class RMAssertionBuilder implements AssertionBuilder<OMElement> {
public Assertion build(OMElement element, AssertionBuilderFactory factory)
throws IllegalArgumentException {
@@ -44,7 +39,9 @@ public class RMAssertionBuilder implemen
SandeshaPolicyBean propertyBean = new SandeshaPolicyBean();
Policy policy = PolicyEngine.getPolicy(element.getFirstElement());
- processElements(policy.getPolicyComponents(), propertyBean);
+ for (PolicyComponent component : policy.getPolicyComponents()) {
+ ((SandeshaPropertyAssertion)component).apply(propertyBean);
+ }
return propertyBean;
}
@@ -52,125 +49,4 @@ public class RMAssertionBuilder implemen
return new QName[] { new QName(
Sandesha2Constants.Assertions.URI_RM_POLICY_NS, "RMAssertion")
};
}
-
- private void processElements(List policyComponents,
- SandeshaPolicyBean propertyBean) {
-
- XmlPrimtiveAssertion xmlPrimtiveAssertion;
-
- for (Iterator iterator = policyComponents.iterator(); iterator
- .hasNext();) {
- xmlPrimtiveAssertion = (XmlPrimtiveAssertion) iterator.next();
- OMElement element = xmlPrimtiveAssertion.getValue();
- String name = element.getLocalName();
-
- if (Sandesha2Constants.Assertions.ELEM_ACK_INTERVAL.equals(name)) {
- propertyBean.setAcknowledgementInterval(Long.parseLong(element
- .getText().trim()));
-
- } else if (Sandesha2Constants.Assertions.ELEM_EXP_BACKOFF
- .equals(name)) {
- propertyBean.setExponentialBackoff(Boolean.valueOf(
- element.getText().trim()).booleanValue());
-
- } else if (Sandesha2Constants.Assertions.ELEM_INACTIVITY_TIMEOUT
- .equals(name)) {
-
- propertyBean.setInactiveTimeoutValue
(Long.parseLong(element
- .getText().trim()));
-
- } else if
(Sandesha2Constants.Assertions.ELEM_INACTIVITY_TIMEOUT_MEASURES
- .equals(name)) {
- //using the previously set Inactivity Timeout
- propertyBean.setInactivityTimeoutMeasure
(element.getText().trim());
-
- } else if (Sandesha2Constants.Assertions.ELEM_DELETION_TIMEOUT
- .equals(name)) {
-
- propertyBean.setSequenceRemovalTimeoutValue
(Long.parseLong(element
- .getText().trim()));
-
- } else if
(Sandesha2Constants.Assertions.ELEM_DELETION_TIMEOUT_MEASURES
- .equals(name)) {
- //using the previously set Inavtivity Timeout
- propertyBean.setSequenceRemovalTimeoutMeasure
(element.getText().trim());
-
- } else if (Sandesha2Constants.Assertions.ELEM_INVOKE_INORDER
- .equals(name)) {
- String value = element.getText().trim();
- boolean inOrder = false;
-
- if (value!=null && Constants.VALUE_TRUE.equals(value))
- inOrder = true;
-
- propertyBean.setInOrder(inOrder);
-
- } else if (Sandesha2Constants.Assertions.ELEM_MAX_RETRANS_COUNT
- .equals(name)) {
- propertyBean.setMaximumRetransmissionCount
(Integer.parseInt(element.getText().trim()));
- } else if (Sandesha2Constants.Assertions.ELEM_MSG_TYPES_TO_DROP
- .equals(name)) {
- ArrayList<Integer> types = new ArrayList<Integer>();
- String str = element.getText().trim();
- String[] items = str.split(Sandesha2Constants.LIST_SEPERATOR);
- if (items!=null) {
- int size = items.length;
- for (int i=0;i<size;i++) {
- String itemStr = items[i];
- if (!itemStr.equals("") &&
!itemStr.equals(Sandesha2Constants.VALUE_NONE) )
- types.add(new Integer (itemStr));
- }
- }
- propertyBean.setMsgTypesToDrop (types);
- } else if (Sandesha2Constants.Assertions.ELEM_RETRANS_INTERVAL
- .equals(name)) {
- propertyBean.setRetransmissionInterval (Long.parseLong
(element.getText().trim()));
- } else if (Sandesha2Constants.Assertions.ELEM_SEC_MGR
- .equals(name)) {
- propertyBean.setSecurityManagerClass
(element.getText().trim());
- }
- else if
(Sandesha2Constants.Assertions.ELEM_EPR_DECORATOR.equals(name)) {
- propertyBean.setEPRDecoratorClass(element.getText().trim());
- } else if (Sandesha2Constants.Assertions.ELEM_STORAGE_MGR
- .equals(name)) {
- //finding out storage managers.
-
- OMElement inmemoryStorageManagerElem =
element.getFirstChildWithName(Sandesha2Constants.Assertions.Q_ELEM_INMEMORY_STORAGE_MGR);
- if (inmemoryStorageManagerElem!=null) {
- String inMemoryStorageMgr =
inmemoryStorageManagerElem.getText().trim();
-
propertyBean.setInMemoryStorageManagerClass(inMemoryStorageMgr);
- }
-
- OMElement permanentStorageManagerElem =
element.getFirstChildWithName(Sandesha2Constants.Assertions.Q_ELEM_PERMANENT_STORAGE_MGR);
- if (permanentStorageManagerElem!=null) {
- String permanentStorageMgr =
permanentStorageManagerElem.getText().trim();
-
propertyBean.setPermanentStorageManagerClass(permanentStorageMgr);
- }
- } else if
(Sandesha2Constants.Assertions.ELEM_CONTEXT_MGR.equals(name)) {
- propertyBean.setContextManagerClass (element.getText().trim());
-
- } else
if(Sandesha2Constants.Assertions.ELEM_MAKE_CONNECTION.equals(name)) {
- // Read the nested assertions
-
- OMElement enabledElem =
element.getFirstChildWithName(Sandesha2Constants.Assertions.Q_ELEM_ENABLED);
- if (enabledElem!=null) {
- String data = enabledElem.getText().trim();
-
propertyBean.setEnableMakeConnection(Boolean.valueOf(data).booleanValue());
- }
-
- OMElement useRMAnonElem =
element.getFirstChildWithName(Sandesha2Constants.Assertions.Q_ELEM_USE_RM_ANON_URI);
- if (useRMAnonElem!=null) {
- String data = useRMAnonElem.getText().trim();
-
propertyBean.setEnableRMAnonURI(Boolean.valueOf(data).booleanValue());
- }
- } else if
(Sandesha2Constants.Assertions.ELEM_USE_SERIALIZATION.equals(name)) {
- String value = element.getText().trim();
-
propertyBean.setUseMessageSerialization(Boolean.valueOf(value).booleanValue());
- } else if
(Sandesha2Constants.Assertions.ELEM_ENFORCE_RM.equals(name)) {
- String value = element.getText().trim();
- propertyBean.setEnforceRM
(Boolean.valueOf(value).booleanValue());
- }
- }
- }
-
}
Modified:
axis/axis2/java/sandesha/branches/1_6/modules/policy/src/main/resources/META-INF/services/org.apache.neethi.builders.AssertionBuilder
URL:
http://svn.apache.org/viewvc/axis/axis2/java/sandesha/branches/1_6/modules/policy/src/main/resources/META-INF/services/org.apache.neethi.builders.AssertionBuilder?rev=1145336&r1=1145335&r2=1145336&view=diff
==============================================================================
---
axis/axis2/java/sandesha/branches/1_6/modules/policy/src/main/resources/META-INF/services/org.apache.neethi.builders.AssertionBuilder
(original)
+++
axis/axis2/java/sandesha/branches/1_6/modules/policy/src/main/resources/META-INF/services/org.apache.neethi.builders.AssertionBuilder
Mon Jul 11 20:38:26 2011
@@ -16,3 +16,21 @@
# under the License.
org.apache.sandesha2.policy.builders.RMAssertionBuilder
+org.apache.sandesha2.policy.builders.MessageTypesToDropAssertionBuilder
+org.apache.sandesha2.policy.builders.SecurityManagerAssertionBuilder
+org.apache.sandesha2.policy.builders.ExponentialBackoffAssertionBuilder
+org.apache.sandesha2.policy.builders.SequenceRemovalTimeoutAssertionBuilder
+org.apache.sandesha2.policy.builders.InactivityTimeoutMeasureAssertionBuilder
+org.apache.sandesha2.policy.builders.AcknowledgementIntervalAssertionBuilder
+org.apache.sandesha2.policy.builders.InvokeInOrderAssertionBuilder
+org.apache.sandesha2.policy.builders.ContextManagerAssertionBuilder
+org.apache.sandesha2.policy.builders.EnforceRMAssertionBuilder
+org.apache.sandesha2.policy.builders.StorageManagersAssertionBuilder
+org.apache.sandesha2.policy.builders.SandeshaPropertyAssertion
+org.apache.sandesha2.policy.builders.RetransmissionIntervalAssertionBuilder
+org.apache.sandesha2.policy.builders.MaximumRetransmissionCountAssertionBuilder
+org.apache.sandesha2.policy.builders.SequenceRemovalTimeoutMeasureAssertionBuilder
+org.apache.sandesha2.policy.builders.EPRDecoratorAssertionBuilder
+org.apache.sandesha2.policy.builders.InactivityTimeoutAssertionBuilder
+org.apache.sandesha2.policy.builders.MakeConnectionAssertionBuilder
+org.apache.sandesha2.policy.builders.UseMessageSerializationAssertionBuilder
Modified: axis/axis2/java/sandesha/branches/1_6/pom.xml
URL:
http://svn.apache.org/viewvc/axis/axis2/java/sandesha/branches/1_6/pom.xml?rev=1145336&r1=1145335&r2=1145336&view=diff
==============================================================================
--- axis/axis2/java/sandesha/branches/1_6/pom.xml (original)
+++ axis/axis2/java/sandesha/branches/1_6/pom.xml Mon Jul 11 20:38:26 2011
@@ -439,7 +439,7 @@
<axis2.version>1.6.1-SNAPSHOT</axis2.version>
<rampart.version>1.6.1-SNAPSHOT</rampart.version>
<axiom.version>1.2.12</axiom.version>
- <neethi.version>2.0.5</neethi.version>
+ <neethi.version>3.0.1-SNAPSHOT</neethi.version>
<commons.logging.version>1.1.1</commons.logging.version>
<junit.version>3.8.2</junit.version>
<log4j.version>1.2.15</log4j.version>