More docs and unit tests.

This commit is contained in:
ahocevar
2012-08-10 17:02:37 +02:00
parent ebc71b492e
commit e2acbc56d0
3 changed files with 86 additions and 4 deletions

View File

@@ -230,9 +230,13 @@ OpenLayers.WPSProcess = OpenLayers.Class({
(function callback() {
OpenLayers.Util.removeItem(me.executeCallbacks, callback);
if (me.chained !== 0) {
// need to wait until chained processes have a
// description and configuration - see chainProcess
me.executeCallbacks.push(callback);
return;
}
// all chained processes are added as references now, so
// let's proceed.
OpenLayers.Request.POST({
url: me.client.servers[me.server].url,
data: new OpenLayers.Format.WPSExecute().write(me.description),
@@ -487,15 +491,33 @@ OpenLayers.WPSProcess = OpenLayers.Class({
/**
* Class: OpenLayers.WPSProcess.ChainLink
* Type for chaining processes.
*/
OpenLayers.WPSProcess.ChainLink = OpenLayers.Class({
/**
* Property: process
* {<OpenLayers.WPSProcess>} The process to chain
*/
process: null,
/**
* Property: output
* {String} The output identifier of the output we are going to use as
* input for another process.
*/
output: null,
/**
* Constructor: OpenLayers.WPSProcess.ChainLink
*
* Parameters:
* options - {Object} Properties to set on the instance.
*/
initialize: function(options) {
OpenLayers.Util.extend(this, options);
}
},
CLASS_NAME: "OpenLayers.WPSProcess.ChainLink"
});