[Carbon-commits] [Project-Tools] svn commit r92151 - trunk/tools/ide/eclipse/poc/esb/org.wso2.carbonstudio.eclipse.esb/src/org/wso2/carbonstudio/eclipse/esb/mediator/impl
samindaw at wso2.com
samindaw at wso2.com
Thu Apr 21 01:17:04 PDT 2011
Author: samindaw
Date: Thu Apr 21 01:17:03 2011
New Revision: 92151
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=92151
Log:
attach path optional attribute in iterator mediator
Modified:
trunk/tools/ide/eclipse/poc/esb/org.wso2.carbonstudio.eclipse.esb/src/org/wso2/carbonstudio/eclipse/esb/mediator/impl/IterateMediatorImpl.java
Modified: trunk/tools/ide/eclipse/poc/esb/org.wso2.carbonstudio.eclipse.esb/src/org/wso2/carbonstudio/eclipse/esb/mediator/impl/IterateMediatorImpl.java
URL: http://wso2.org/svn/browse/wso2/trunk/tools/ide/eclipse/poc/esb/org.wso2.carbonstudio.eclipse.esb/src/org/wso2/carbonstudio/eclipse/esb/mediator/impl/IterateMediatorImpl.java?rev=92151&r1=92150&r2=92151&view=diff
==============================================================================
--- trunk/tools/ide/eclipse/poc/esb/org.wso2.carbonstudio.eclipse.esb/src/org/wso2/carbonstudio/eclipse/esb/mediator/impl/IterateMediatorImpl.java (original)
+++ trunk/tools/ide/eclipse/poc/esb/org.wso2.carbonstudio.eclipse.esb/src/org/wso2/carbonstudio/eclipse/esb/mediator/impl/IterateMediatorImpl.java Thu Apr 21 01:17:03 2011
@@ -74,6 +74,8 @@
* @ordered
*/
protected static final boolean PRESERVE_PAYLOAD_EDEFAULT = false;
+
+ protected static final String ATTACH_PATH_EDEFAULT = "";
/**
* The cached value of the '{@link #isPreservePayload() <em>Preserve Payload</em>}' attribute.
@@ -126,6 +128,7 @@
NamespacedProperty attachPath = getEsbFactory().createNamespacedProperty();
attachPath.setPrettyName("Attach Path");
attachPath.setPropertyName("attachPath");
+ attachPath.setPropertyValue(ATTACH_PATH_EDEFAULT);
setAttachPath(attachPath);
// Iterate expression.
@@ -194,7 +197,11 @@
if (isPreservePayload()) {
self.setAttribute("preservePayload", "true");
}
- getAttachPath().save(self);
+
+ if (isAttachPathSet()) {
+ getAttachPath().save(self);
+ }
+
getIterateExpression().save(self);
//target element
@@ -204,6 +211,10 @@
return self;
}
+
+ private boolean isAttachPathSet() {
+ return getAttachPath().getPropertyValue()!=null && !getAttachPath().getPropertyValue().trim().equals("");
+ }
/**
* <!-- begin-user-doc -->
More information about the Carbon-commits
mailing list