Skip to content
Snippets Groups Projects
Commit 92ff81d8 authored by Adam Laskowski's avatar Adam Laskowski
Browse files

BIS-711: Created mechanism for executing custom services - js

parent b3637d07
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Showing
with 153 additions and 0 deletions
define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) {
var CustomDSSService = function() {
};
stjs.extend(CustomDSSService, null, [], function(constructor, prototype) {
prototype['@type'] = 'dss.dto.service.CustomDSSService';
constructor.serialVersionUID = 1;
prototype.fetchOptions = null;
prototype.code = null;
prototype.label = null;
prototype.description = null;
prototype.getFetchOptions = function() {
return this.fetchOptions;
};
prototype.setFetchOptions = function(fetchOptions) {
this.fetchOptions = fetchOptions;
};
prototype.getCode = function() {
return this.code;
};
prototype.setCode = function(code) {
this.code = code;
};
prototype.getLabel = function() {
return this.label;
};
prototype.setLabel = function(label) {
this.label = label;
};
prototype.getDescription = function() {
return this.description;
};
prototype.setDescription = function(description) {
this.description = description;
};
prototype.toString = function() {
return "CustomDSSService " + this.code;
};
}, {
fetchOptions : "CustomDSSServiceFetchOptions",
code: "CustomDSSServiceCode"
});
return CustomDSSService;
})
\ No newline at end of file
define([ "stjs", "dss/dto/service/execute/AbstractExecutionOptionsWithParameters"], function(stjs, AbstractExecutionOptionsWithParameters) {
var CustomDSSServiceExecutionOptions = function() {
AbstractExecutionOptionsWithParameters.call(this);
};
stjs.extend(CustomDSSServiceExecutionOptions, AbstractExecutionOptionsWithParameters, [AbstractExecutionOptionsWithParameters ], function(constructor, prototype) {
prototype['@type'] = 'dss.dto.service.CustomDSSServiceExecutionOptions';
constructor.serialVersionUID = 1;
}, {});
return CustomDSSServiceExecutionOptions;
})
define([ "stjs"], function(stjs) {
var AbstractExecutionOptionsWithParameters = function() {
this.parameters = {};
};
stjs.extend(AbstractExecutionOptionsWithParameters, null, [ ], function(constructor, prototype) {
prototype['@type'] = 'dss.dto.service.execute.AbstractExecutionOptionsWithParameters';
constructor.serialVersionUID = 1;
prototype.parameters = null;
prototype.withParameter = function(parameterName, value) {
this.parameters[parameterName] = value;
return this;
}
prototype.getParameters = function() {
return this.parameters;
}
}, {
parameters : {
name : "Map",
arguments : [ null, null ]
}
});
return AbstractExecutionOptionsWithParameters;
})
\ No newline at end of file
/**
*/
define([ "stjs", "dss/dto/common/operation/IOperationResult" ], function(stjs, IOperationResult) {
var ExecuteCustomDSSServiceOperationResult = function(result) {
this.result = result;
};
stjs.extend(ExecuteCustomDSSServiceOperationResult, null, [ IOperationResult ], function(constructor, prototype) {
prototype['@type'] = 'dss.dto.service.execute.ExecuteCustomASServiceOperationResult';
prototype.result = null;
prototype.getResult = function() {
return this.result;
};
prototype.getMessage = function() {
return "ExecuteCustomDSSServiceOperationResult";
};
}, {
result : "Object"
});
return ExecuteCustomDSSServiceOperationResult;
})
\ No newline at end of file
define([ "require", "stjs", "as/dto/common/fetchoptions/FetchOptions", "dss/dto/service/fetchoptions/CustomDSSServiceSortOptions" ], function(require, stjs, FetchOptions) {
var CustomDSSServiceFetchOptions = function() {
};
stjs.extend(CustomDSSServiceFetchOptions, FetchOptions, [ FetchOptions ], function(constructor, prototype) {
prototype['@type'] = 'dss.dto.service.fetchoptions.CustomDSSServiceFetchOptions';
constructor.serialVersionUID = 1;
prototype.sort = null;
prototype.sortBy = function() {
if (this.sort == null) {
var CustomDSSServiceSortOptions = require("dss/dto/service/fetchoptions/CustomDSSServiceSortOptions");
this.sort = new CustomDSSServiceSortOptions();
}
return this.sort;
};
prototype.getSortBy = function() {
return this.sort;
};
}, {
sort : "CustomDSSServiceSortOptions"
});
return CustomDSSServiceFetchOptions;
})
\ No newline at end of file
define([ "require", "stjs", "as/dto/common/fetchoptions/SortOptions" ], function(require, stjs, SortOptions) {
var CustomDSSServiceSortOptions = function() {
SortOptions.call(this);
};
stjs.extend(CustomDSSServiceSortOptions, SortOptions, [ SortOptions ], function(constructor, prototype) {
prototype['@type'] = 'dss.dto.service.fetchoptions.CustomDSSServiceSortOptions';
constructor.serialVersionUID = 1;
}, {});
return CustomDSSServiceSortOptions;
})
\ No newline at end of file
/**
* Custom DSS service code
*
*/
define([ "stjs", "as/dto/common/id/ObjectPermId", "dss/dto/service/id/ICustomDSSServiceId" ], function(stjs, ObjectPermId, ICustomDSSServiceId) {
var CustomDSSServiceCode = function(code) {
ObjectPermId.call(this, code);
};
stjs.extend(CustomDSSServiceCode, ObjectPermId, [ ObjectPermId, ICustomDSSServiceId ], function(constructor, prototype) {
prototype['@type'] = 'dss.dto.service.id.CustomDSSServiceCode';
constructor.serialVersionUID = 1;
}, {});
return CustomDSSServiceCode;
})
\ No newline at end of file
/**
* Holds information that uniquely identifies a custom dss service in openBIS.
*
*/
define([ "stjs", "as/dto/common/id/IObjectId" ], function(stjs, IObjectId) {
var ICustomDSSServiceId = function() {
};
stjs.extend(ICustomDSSServiceId, null, [ IObjectId ], null, {});
return ICustomDSSServiceId;
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment