summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFradj Zayen2013-02-12 11:22:08 (EST)
committer Sven Rottstock2013-03-11 06:35:41 (EDT)
commit4491b8da9682f72ab55c9216a9ece608328d0d9a (patch)
tree37950102e5fa53f96068d40933be1fb24a9d83b5
parent73a8a22986b23c4e3ab969eac419061898b88e42 (diff)
downloadorg.eclipse.stardust.ui.web-4491b8da9682f72ab55c9216a9ece608328d0d9a.zip
org.eclipse.stardust.ui.web-4491b8da9682f72ab55c9216a9ece608328d0d9a.tar.gz
org.eclipse.stardust.ui.web-4491b8da9682f72ab55c9216a9ece608328d0d9a.tar.bz2
Jira-ID: CRNT-27871
Model with File Start Event cannot be deployed in IR: updated camel uri properties git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@62937 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js85
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/views/modeler/fileEventIntegrationOverlay.html15
2 files changed, 68 insertions, 32 deletions
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js
index 077c60b..f7b4773 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js
@@ -118,30 +118,63 @@ define(
*/
FileEventIntegrationOverlay.prototype.getEndpointUri = function() {
var uri = "file://";
-
- uri += this.fileOrDirectoryNameInput.val();
-
- uri += "?consumer.recursive="
- + this.recursiveInput.is(":checked");
- uri += "&consumer.initialInterval=";
- uri += this.getIntervalInMilliseconds(
+ //if(this.fileOrDirectoryNameInput!=null && this.fileOrDirectoryNameInput.val()!="Please specify ..."){
+ uri += this.fileOrDirectoryNameInput.val();
+ //}
+
+ var separator = "?";
+
+ if(this.recursiveInput.is(":checked")== true){
+ uri += separator + "recursive="+this.recursiveInput.is(":checked");
+ separator = "&";
+
+ }
+
+ if(this.getIntervalInMilliseconds(
+ this.initialIntervalInput.val(),
+ this.initialIntervalUnitSelect.val())!=null){
+ uri += separator + "initialDelay="+this.getIntervalInMilliseconds(
this.initialIntervalInput.val(),
this.initialIntervalUnitSelect.val());
- uri += "&consumer.repeatInterval=";
- uri += this.getIntervalInMilliseconds(
+ separator = "&";
+ }
+
+ if(this.getIntervalInMilliseconds(
+ this.repeatIntervalInput.val(),
+ this.repeatIntervalUnitSelect.val())!=null){
+ uri += separator + "delay="+this.getIntervalInMilliseconds(
this.repeatIntervalInput.val(),
this.repeatIntervalUnitSelect.val());
+ separator = "&";
+ }
+ if (this.lockBehaviorSelect.val() == "none") {
+ //nothing to do
+ }else{
+ if (this.lockBehaviorSelect.val() == "markerFile") {
+ uri += separator + "readLock=markerFile";
+ separator = "&";
+ }else{
+ if (this.lockBehaviorSelect.val() == "changed") {
+ uri += separator + "readLock=changed";
+ separator = "&";
+ }
+ }
+ }
+
+ /*
uri += "&consumer.alwaysConsume="
- + this.alwaysConsumeInput.prop("checked");
+ + this.alwaysConsumeInput.prop("checked");*/
if (this.postProcessingSelect.val() == "noop") {
- uri += "&consumer.noop=true";
- uri += "&consumer.delete=false";
+ uri += "&noop=true";
+ uri += "&delete=false";
} else if (this.postProcessingSelect.val() == "delete") {
- uri += "&consumer.noop=false";
- uri += "&consumer.delete=true";
+ uri += "&noop=false";
+ uri += "&delete=true";
}
-
+
+ uri=uri.replace(/&/g, "&")
+
return uri;
};
@@ -184,7 +217,9 @@ define(
this.submitOverlayChanges(parameterMappings);
};
-
+ FileEventIntegrationOverlay.prototype.getAdditionalRouteDefinitions = function() {
+ return "<to uri=\"ipp:direct\"/>";
+ };
/**
*
*/
@@ -197,9 +232,9 @@ define(
// TODO Need better URL encoding
- route = route.replace(/&/g, "&amp;");
+ //route = route.replace(/&/g,"&amp;");
- var xmlDoc = jQuery.parseXML(route);
+ var xmlDoc = jQuery.parseXML("<route>"+route+"</route>");
var xmlObject = jQuery(xmlDoc);
var from = jQuery(xmlObject).find("from");
var uri = from.attr("uri");
@@ -221,10 +256,10 @@ define(
var name = option[0];
var value = option[1];
- if (name == "consumer.recursive") {
+ if (name == "recursive") {
this.recursiveInput.prop("checked",
value);
- } else if (name == "consumer.initialInterval") {
+ } else if (name == "initialDelay") {
var intervalWithUnit = this
.getIntervalWithUnit(value);
@@ -232,7 +267,7 @@ define(
.val(intervalWithUnit.value);
this.initialIntervalUnitSelect
.val(intervalWithUnit.unit);
- } else if (name == "consumer.repeatInterval") {
+ } else if (name == "delay") {
var intervalWithUnit = this
.getIntervalWithUnit(value);
@@ -240,15 +275,15 @@ define(
.val(intervalWithUnit.value);
this.repeatIntervalUnitSelect
.val(intervalWithUnit.unit);
- } else if (name == "consumer.alwaysConsume") {
+ /*} else if (name == "consumer.alwaysConsume") {
this.alwaysConsumeInput.prop("checked",
- value == "true");
- } else if (name == "consumer.noop") {
+ value == "true");*/
+ } else if (name == "noop") {
if (value == "true") {
this.postProcessingSelect
.val("noop");
}
- } else if (name == "consumer.delete") {
+ } else if (name == "delete") {
if (value == "true") {
this.postProcessingSelect
.val("delete");
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/views/modeler/fileEventIntegrationOverlay.html b/web-modeler/src/main/resources/META-INF/xhtml/views/modeler/fileEventIntegrationOverlay.html
index abba90d..b5e53c8 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/views/modeler/fileEventIntegrationOverlay.html
+++ b/web-modeler/src/main/resources/META-INF/xhtml/views/modeler/fileEventIntegrationOverlay.html
@@ -18,7 +18,7 @@
<td><label for="fileOrDirectoryNameInput">File or
Directory Name</label></td>
<td><input id="fileOrDirectoryNameInput" type="text"
- style="width: 200px;" />
+ style="width: 200px;" onfocus="if(this.value == 'Please specify ...') {this.value=''}"/>
</td>
<td></td>
</tr>
@@ -50,27 +50,28 @@
</table>
<table style="margin-top: 10px;">
<tr>
- <td><label for="lockBehaviorSelect">Lock Behavior</label></td>
+ <td><label for="lockBehaviorSelect">Read Lock Behavior</label></td>
<td><select id="lockBehaviorSelect">
- <option value="exclusiveLock">Exclusive Lock</option>
- <option value="exclusiveReadLock">Exclusive Read Lock</option>
+ <option value="none">Please specify ...</option>
+ <option value="markerFile">Marker File</option><!-- Camel creates a marker file and then holds a lock on it-->
+ <option value="changed">Changed</option><!-- changed is using file length/modification timestamp to detect whether the file is currently being copied or not-->
</select></td>
<td></td>
</tr>
<tr>
<td><label for="postProcessingSelect">Post-Processing</label></td>
<td><select id="postProcessingSelect">
+ <option selected value="move">Move</option>
<option value="noop">Leave</option>
<option value="delete">Delete</option>
- <option value="move">Move</option>
</select></td>
<td></td>
</tr>
- <tr>
+ <!--<tr>
<td><label for="alwaysConsumeInput">Always consume</label></td>
<td><input id="alwaysConsumeInput" type="checkbox" /></td>
<td></td>
- </tr>
+ </tr>-->
</table>
</div>
<div id="parametersTab">