diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-jsVSjava.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-jsVSjava.js index 4f3e3ef9e97667a6f43cbfe8284f8dfd519055dc..be1380243da4fd8be575d518329eaff4f221cdac 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-jsVSjava.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-jsVSjava.js @@ -4,141 +4,157 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, openbis, common) { return function() { QUnit.module("JS VS JAVA API"); - + // // Ignore specific Java classes giving a custom message // var getSimpleClassName = function(fullyQualifiedClassName) { - var idx = fullyQualifiedClassName.lastIndexOf("."); - return fullyQualifiedClassName.substring(idx+1, fullyQualifiedClassName.length); + var idx = fullyQualifiedClassName.lastIndexOf("."); + return fullyQualifiedClassName.substring(idx + 1, fullyQualifiedClassName.length); }; - + var ignoreMessages = { - "AbstractCollectionView" : "Java class ignored: ", - "ListView" : "Java class ignored: ", - "SetView" : "Java class ignored: ", - "NotFetchedException" : "Java class ignored: ", - "ObjectNotFoundException" : "Java class ignored: ", - "UnauthorizedObjectAccessException" : "Java class ignored: ", - "UnsupportedObjectIdException" : "Java class ignored: ", - "IApplicationServerApi" : "Java class ignored: ", - "DataSetFileDownloadInputStream" : "Java class ignored: ", - "IDataStoreServerApi" : "Java class ignored: ", - "DataSetCreation" : "Java class ignored: ", - "LinkedDataCreation" : "Java class ignored: ", - "PhysicalDataCreation" : "Java class ignored: ", - "DataSetFileDownload" : "Java class not implemented in JS: ", - "DataSetFileDownloadOptions" : "Java class not implemented in JS: ", - "DataSetFileDownloadReader" : "Java class not implemented in JS: ", - "DataSetFileSearchCriteria" : "Java class not implemented in JS: ", - "DataSetFile" : "Java class not implemented in JS: ", - "DataSetFilePermId" : "Java class not implemented in JS: ", - "IDataSetFileId" : "Java class not implemented in JS: " + "AbstractCollectionView" : "Java class ignored: ", + "ListView" : "Java class ignored: ", + "SetView" : "Java class ignored: ", + "NotFetchedException" : "Java class ignored: ", + "ObjectNotFoundException" : "Java class ignored: ", + "UnauthorizedObjectAccessException" : "Java class ignored: ", + "UnsupportedObjectIdException" : "Java class ignored: ", + "IApplicationServerApi" : "Java class ignored: ", + "DataSetFileDownloadInputStream" : "Java class ignored: ", + "IDataStoreServerApi" : "Java class ignored: ", + "DataSetCreation" : "Java class ignored: ", + "LinkedDataCreation" : "Java class ignored: ", + "PhysicalDataCreation" : "Java class ignored: ", + "DataSetFileDownload" : "Java class not implemented in JS: ", + "DataSetFileDownloadOptions" : "Java class not implemented in JS: ", + "DataSetFileDownloadReader" : "Java class not implemented in JS: ", + "DataSetFileSearchCriteria" : "Java class not implemented in JS: ", + "DataSetFile" : "Java class not implemented in JS: ", + "DataSetFilePermId" : "Java class not implemented in JS: ", + "IDataSetFileId" : "Java class not implemented in JS: " } - + // // JS Classes contained into other classes // var circularDependencies = { - "SampleChildrenSearchCriteria" : { containerClass : "dto.sample.search.SampleSearchCriteria", method : "withChildren" }, - "SampleContainerSearchCriteria" : { containerClass : "dto.sample.search.SampleSearchCriteria", method : "withContainer" }, - "SampleParentsSearchCriteria" : { containerClass : "dto.sample.search.SampleSearchCriteria", method : "withParents" }, - "DataSetChildrenSearchCriteria" : { containerClass : "dto.dataset.search.DataSetSearchCriteria", method : "withChildren" }, - "DataSetContainerSearchCriteria" : { containerClass : "dto.dataset.search.DataSetSearchCriteria", method : "withContainer" }, - "DataSetParentsSearchCriteria" : { containerClass : "dto.dataset.search.DataSetSearchCriteria", method : "withParents" }, + "SampleChildrenSearchCriteria" : { + containerClass : "dto.sample.search.SampleSearchCriteria", + method : "withChildren" + }, + "SampleContainerSearchCriteria" : { + containerClass : "dto.sample.search.SampleSearchCriteria", + method : "withContainer" + }, + "SampleParentsSearchCriteria" : { + containerClass : "dto.sample.search.SampleSearchCriteria", + method : "withParents" + }, + "DataSetChildrenSearchCriteria" : { + containerClass : "dto.dataset.search.DataSetSearchCriteria", + method : "withChildren" + }, + "DataSetContainerSearchCriteria" : { + containerClass : "dto.dataset.search.DataSetSearchCriteria", + method : "withContainer" + }, + "DataSetParentsSearchCriteria" : { + containerClass : "dto.dataset.search.DataSetSearchCriteria", + method : "withParents" + }, } - + // // Java VS JS Comparator // - var jsComparator = function(testsResults, javaClassReport, jsObject, circularDependencyConfig) { - //Check object returned - if(!jsObject) { + var jsComparator = function(testsResults, javaClassReport, jsObject) { + // Check object returned + if (!jsObject) { var errorResult = "JS class missing instance: " + javaClassReport.jsonObjAnnotation; testsResults.error.push(errorResult); console.info(errorResult); return; } - - //Check prototype available - if(!jsObject.prototype && !circularDependencyConfig) { + + var jsPrototype = null; + + if ($.isFunction(jsObject)) { + jsPrototype = jsObject.prototype; + } else { + jsPrototype = jsObject; + } + + if (!jsPrototype) { var errorResult = "JS class missing prototype: " + javaClassReport.jsonObjAnnotation; testsResults.error.push(errorResult); console.info(errorResult); return; } - - var jsPrototype = null; - if(circularDependencyConfig) { - jsPrototype = jsObject.__proto__; - } - - if(jsObject.prototype) { - jsPrototype = jsObject.prototype; - } - - //Java Fields found in Javascript - for(var fIdx = 0; fIdx < javaClassReport.fields.length; fIdx++) { - if(!jsPrototype[javaClassReport.fields[fIdx]]) { + + // Java Fields found in Javascript + for (var fIdx = 0; fIdx < javaClassReport.fields.length; fIdx++) { + if (!jsPrototype[javaClassReport.fields[fIdx]]) { var errorResult = "JS class missing field: " + javaClassReport.jsonObjAnnotation + " - " + javaClassReport.fields[fIdx]; testsResults.error.push(errorResult); console.info(errorResult); } } - - //Java Methods found in Javascript - for(var fIdx = 0; fIdx < javaClassReport.methods.length; fIdx++) { - if(!jsPrototype[javaClassReport.methods[fIdx]]) { + + // Java Methods found in Javascript + for (var fIdx = 0; fIdx < javaClassReport.methods.length; fIdx++) { + if (!jsPrototype[javaClassReport.methods[fIdx]]) { var errorResult = "JS class missing method: " + javaClassReport.jsonObjAnnotation + " - " + javaClassReport.methods[fIdx]; testsResults.error.push(errorResult); console.info(errorResult); } } } - + // // Main Reporting Logic // var areClassesCorrect = function(report, callback) { var testsToDo = []; var testsResults = { - info : [], - warning : [], - error : [] + info : [], + warning : [], + error : [] }; - + var doNext = function() { - if(testsToDo.length > 0) { + if (testsToDo.length > 0) { var next = testsToDo.shift(); next(); } else { callback(testsResults); } } - - for(var ridx = 0; ridx < report.entries.length; ridx++) { + + for (var ridx = 0; ridx < report.entries.length; ridx++) { var javaClassReport = report.entries[ridx]; var testClassFunc = function(javaClassReport) { - return function () { + return function() { var javaClassName = javaClassReport.name; var javaSimpleClassName = getSimpleClassName(javaClassName); var ignoreMessage = ignoreMessages[javaSimpleClassName]; var circularDependencyConfig = circularDependencies[javaSimpleClassName]; - - if(ignoreMessage) { + + if (ignoreMessage) { var warningResult = ignoreMessage + javaClassReport.name; testsResults.warning.push(warningResult); console.info(warningResult); doNext(); } else { var jsClassName = null; - if(circularDependencyConfig) { + if (circularDependencyConfig) { jsClassName = circularDependencyConfig.containerClass; } else { jsClassName = javaClassReport.jsonObjAnnotation; } - - if(jsClassName) { + + if (jsClassName) { var failedLoadingErrorHandler = function(javaClassName) { return function() { var errorResult = "Java class with jsonObjectAnnotation missing in Javascript: " + javaClassName; @@ -147,29 +163,29 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open doNext(); }; }; - + var loadedHandler = null; - + loadedHandler = function(circularDependencyConfig) { return function(javaClassReport) { return function(jsObject) { - if(circularDependencyConfig) { + if (circularDependencyConfig) { var instanceJSObject = new jsObject(); var containedJsObject = instanceJSObject[circularDependencyConfig.method](); jsObject = containedJsObject; } - - jsComparator(testsResults, javaClassReport, jsObject, circularDependencyConfig); + + jsComparator(testsResults, javaClassReport, jsObject); testsResults.info.push("Java class matching JS: " + javaClassReport.name); doNext(); }; }; } - + loadedHandler = loadedHandler(circularDependencyConfig); - - var requireJsPath = jsClassName.replace(/\./g,'/'); - require([requireJsPath], loadedHandler(javaClassReport), failedLoadingErrorHandler(javaClassName)); + + var requireJsPath = jsClassName.replace(/\./g, '/'); + require([ requireJsPath ], loadedHandler(javaClassReport), failedLoadingErrorHandler(javaClassName)); } else { var errorResult = "Java class missing jsonObjectAnnotation: " + javaClassName; testsResults.error.push(errorResult); @@ -181,46 +197,47 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open } testsToDo.push(testClassFunc(javaClassReport)); } - + doNext(); } - + var getPrintableReport = function(javaReport, testsResults) { var printableReport = "Total Java classes found " + javaReport.entries.length; - printableReport += " - Javascript Error Msg: " + testsResults.error.length; - printableReport += " - Javascript Warning Msg: " + testsResults.warning.length; - printableReport += " - Javascript Info Msg: " + testsResults.info.length; - printableReport += "\n"; - - for(var edx = 0; edx < testsResults.error.length; edx++) { - printableReport += "[ERROR] " + testsResults.error[edx] + "\n"; - } - for(var wdx = 0; wdx < testsResults.warning.length; wdx++) { - printableReport += "[WARNING] " + testsResults.warning[wdx] + "\n"; - } - for(var idx = 0; idx < testsResults.info.length; idx++) { - printableReport += "[INFO] " + testsResults.info[idx] + "\n"; - } + printableReport += " - Javascript Error Msg: " + testsResults.error.length; + printableReport += " - Javascript Warning Msg: " + testsResults.warning.length; + printableReport += " - Javascript Info Msg: " + testsResults.info.length; + printableReport += "\n"; + + for (var edx = 0; edx < testsResults.error.length; edx++) { + printableReport += "[ERROR] " + testsResults.error[edx] + "\n"; + } + for (var wdx = 0; wdx < testsResults.warning.length; wdx++) { + printableReport += "[WARNING] " + testsResults.warning[wdx] + "\n"; + } + for (var idx = 0; idx < testsResults.info.length; idx++) { + printableReport += "[INFO] " + testsResults.info[idx] + "\n"; + } return printableReport; } - + QUnit.test("get Java report from aggregation service", function(assert) { var c = new common(assert); c.start(); - + var getV3APIReport = function(facade) { - c.getResponseFromJSTestAggregationService(facade, {"method" : "getV3APIReport"}, function(data) { + c.getResponseFromJSTestAggregationService(facade, { + "method" : "getV3APIReport" + }, function(data) { var javaReport = null; - - if ( !data.error && - data.result.columns[0].title === "STATUS" && - data.result.rows[0][0].value === "SUCCESS") { //Success Case + + if (!data.error && data.result.columns[0].title === "STATUS" && data.result.rows[0][0].value === "SUCCESS") { // Success + // Case javaReport = JSON.parse(data.result.rows[0][1].value); - } - - if(javaReport) { + } + + if (javaReport) { areClassesCorrect(javaReport, function(testsResults) { - if(testsResults.error.length > 0) { + if (testsResults.error.length > 0) { c.fail(getPrintableReport(javaReport, testsResults)); } else { c.ok(getPrintableReport(javaReport, testsResults)); @@ -233,7 +250,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open } }); } - + c.createFacadeAndLogin().then(getV3APIReport); }); } diff --git a/js-test/source/java/ch/systemsx/cisd/openbis/jstest/report/V3APIReport.java b/js-test/source/java/ch/systemsx/cisd/openbis/jstest/report/V3APIReport.java index b5de90148887bedba089dc8861e810ed23dfd92d..628ee1dc91cf0cb6a75881a1edbda21acc1d1539 100644 --- a/js-test/source/java/ch/systemsx/cisd/openbis/jstest/report/V3APIReport.java +++ b/js-test/source/java/ch/systemsx/cisd/openbis/jstest/report/V3APIReport.java @@ -1,4 +1,5 @@ package ch.systemsx.cisd.openbis.jstest.report; + /* * Copyright 2015 ETH Zuerich, CISD * @@ -17,7 +18,6 @@ package ch.systemsx.cisd.openbis.jstest.report; import java.lang.annotation.Annotation; import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; @@ -35,11 +35,12 @@ import org.reflections.util.ConfigurationBuilder; import org.reflections.util.FilterBuilder; import org.testng.annotations.Test; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Predicate; import com.google.common.collect.Collections2; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimap; -import com.fasterxml.jackson.databind.ObjectMapper; /** * @author pkupczyk @@ -114,12 +115,15 @@ public class V3APIReport private String getJSONObjectAnnotation(Class<?> clazz) { Annotation[] annotations = clazz.getAnnotations(); - for(Annotation annotation:annotations) { + for (Annotation annotation : annotations) + { Class<? extends Annotation> type = annotation.annotationType(); String name = type.getName(); - if(name.equals("ch.systemsx.cisd.base.annotation.JsonObject")) { - - for (Method method : type.getDeclaredMethods()) { + if (name.equals("ch.systemsx.cisd.base.annotation.JsonObject")) + { + + for (Method method : type.getDeclaredMethods()) + { try { Object value = method.invoke(annotation, (Object[]) null); @@ -133,13 +137,13 @@ public class V3APIReport } return null; } - + private Collection<Field> getPublicFields(Class<?> clazz) { Collection<Field> fields = new ArrayList<Field>(); for (Field field : clazz.getDeclaredFields()) { - if (Modifier.isPublic(field.getModifiers())) + if (Modifier.isPublic(field.getModifiers()) && field.getAnnotation(JsonIgnore.class) == null) { fields.add(field); } @@ -153,7 +157,7 @@ public class V3APIReport for (Method method : clazz.getDeclaredMethods()) { - if (Modifier.isPublic(method.getModifiers())) + if (Modifier.isPublic(method.getModifiers()) && method.getAnnotation(JsonIgnore.class) == null) { methods.add(method); } @@ -209,9 +213,9 @@ public class V3APIReport static class Entry { private String Name; - + private String jsonObjAnnotation; - + private List<String> fields = new ArrayList<String>(); private List<String> methods = new ArrayList<String>(); @@ -227,7 +231,6 @@ public class V3APIReport return this.Name; } - public String getJsonObjAnnotation() { return this.jsonObjAnnotation; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/Enum.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/Enum.js new file mode 100644 index 0000000000000000000000000000000000000000..70168c1597387f89c0032448881972181ff25c98 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/Enum.js @@ -0,0 +1,15 @@ +define([ "stjs" ], function(stjs) { + var Enum = function(values) { + var thisEnum = this; + this.values = values; + values.forEach(function(value) { + thisEnum[value] = value; + }); + }; + stjs.extend(Enum, null, [], function(constructor, prototype) { + prototype.values = function() { + return this.values; + }; + }, {}); + return Enum; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/fetchoptions/CacheMode.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/fetchoptions/CacheMode.js index 05bdd5c6c72d02e5ba2fe3bc48627257ae2ac79c..67219fddb0f4fbc32c031ae68abafe38b469b676 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/fetchoptions/CacheMode.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/fetchoptions/CacheMode.js @@ -1,10 +1,12 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - NO_CACHE : "NO_CACHE", - CACHE : "CACHE", - RELOAD_AND_CACHE : "RELOAD_AND_CACHE" + +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var CacheMode = function() { + Enum.call(this, [ "NO_CACHE", "CACHE", "RELOAD_AND_CACHE" ]); }; + stjs.extend(CacheMode, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new CacheMode(); }) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IAttachmentsHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IAttachmentsHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..e6edcaf3fbd531a5fece3f6029afee3decae2709 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IAttachmentsHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IAttachmentsHolder = function() { + }; + stjs.extend(IAttachmentsHolder, null, [], function(constructor, prototype) { + prototype.getAttachments = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IAttachmentsHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ICodeHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ICodeHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..a70316eac4bc0c5820c02b64242c470b5cae94f8 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ICodeHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ICodeHolder = function() { + }; + stjs.extend(ICodeHolder, null, [], function(constructor, prototype) { + prototype.getCode = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return ICodeHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ICreationIdHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ICreationIdHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..e5f5d346f3cea629fa15ecc40d6c0ab2cb7992c2 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ICreationIdHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ICreationIdHolder = function() { + }; + stjs.extend(ICreationIdHolder, null, [], function(constructor, prototype) { + prototype.getCreationId = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return ICreationIdHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IModificationDateHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IModificationDateHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..d788552c78376b11143de22e3aa882548b265f52 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IModificationDateHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IModificationDateHolder = function() { + }; + stjs.extend(IModificationDateHolder, null, [], function(constructor, prototype) { + prototype.getModificationDate = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IModificationDateHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IModifierHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IModifierHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..5819140d54d45eaf63fc184dc92aad3cbe556727 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IModifierHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IModifierHolder = function() { + }; + stjs.extend(IModifierHolder, null, [], function(constructor, prototype) { + prototype.getModifier = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IModifierHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IParentChildrenHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IParentChildrenHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..8efe448944a7c5cb19958cda0820335b52646a0d --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IParentChildrenHolder.js @@ -0,0 +1,13 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IParentChildrenHolder = function() { + }; + stjs.extend(IParentChildrenHolder, null, [], function(constructor, prototype) { + prototype.getChildren = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + prototype.getParents = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IParentChildrenHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IPermIdHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IPermIdHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..8fd80c1fee07a2293e9868344d70041dd390692e --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IPermIdHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IPermIdHolder = function() { + }; + stjs.extend(IPermIdHolder, null, [], function(constructor, prototype) { + prototype.getPermId = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IPermIdHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IPropertiesHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IPropertiesHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..18ecbaeac201042e5a2b6dd980d11dc0494934af --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IPropertiesHolder.js @@ -0,0 +1,19 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IPropertiesHolder = function() { + }; + stjs.extend(IPropertiesHolder, null, [], function(constructor, prototype) { + prototype.getProperty = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + prototype.getProperties = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + prototype.getMaterialProperties = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + prototype.getMaterialProperty = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IPropertiesHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IRegistrationDateHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IRegistrationDateHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..9d9277a1006418358e1d3190cd2dbd8da059886c --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IRegistrationDateHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IRegistrationDateHolder = function() { + }; + stjs.extend(IRegistrationDateHolder, null, [], function(constructor, prototype) { + prototype.getRegistrationDate = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IRegistrationDateHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IRegistratorHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IRegistratorHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..ecc77ed332600a83f59d3f4cefef7c7a6aa3cb78 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/IRegistratorHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var IRegistratorHolder = function() { + }; + stjs.extend(IRegistratorHolder, null, [], function(constructor, prototype) { + prototype.getRegistrator = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return IRegistratorHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ISpaceHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ISpaceHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..7ba560c5204680250bafc026207708f3b7c8eebf --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ISpaceHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ISpaceHolder = function() { + }; + stjs.extend(ISpaceHolder, null, [], function(constructor, prototype) { + prototype.getSpace = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return ISpaceHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ITagsHolder.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ITagsHolder.js new file mode 100644 index 0000000000000000000000000000000000000000..fbe95dc188ae29abe9fc0c18c391b14f70d66e45 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/interfaces/ITagsHolder.js @@ -0,0 +1,10 @@ +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { + var ITagsHolder = function() { + }; + stjs.extend(ITagsHolder, null, [], function(constructor, prototype) { + prototype.getTags = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); + return ITagsHolder; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/operation/IOperation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/operations/IOperation.js similarity index 100% rename from openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/operation/IOperation.js rename to openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/operations/IOperation.js diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/operation/IOperationResult.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/operations/IOperationResult.js similarity index 100% rename from openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/operation/IOperationResult.js rename to openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/operations/IOperationResult.js diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/IDateFormat.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/IDateFormat.js index fcf5d419a4c1a48d27981db58d870469643a73f7..052454ffdc0c22509b0d8020694e1150f090d7f2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/IDateFormat.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/IDateFormat.js @@ -1,9 +1,10 @@ -/** - * @author pkupczyk - */ -define([ "stjs" ], function(stjs) { +define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { var IDateFormat = function() { }; - stjs.extend(IDateFormat, null, [], null, {}); + stjs.extend(IDateFormat, null, [], function(constructor, prototype) { + prototype.getFormat = function() { + throw new exceptions.RuntimeException("Interface method."); + }; + }, {}); return IDateFormat; }) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/SearchFieldType.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/SearchFieldType.js index 1a619c029d43421a2287ab6ccc83f1ee8cc356a1..3d9e74016cec37bed51ba2d782ba21bc9c40e4cd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/SearchFieldType.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/SearchFieldType.js @@ -1,11 +1,12 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - PROPERTY : "PROPERTY", - ATTRIBUTE : "ATTRIBUTE", - ANY_PROPERTY : "ANY_PROPERTY", - ANY_FIELD : "ANY_FIELD" + +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var SearchFieldType = function() { + Enum.call(this, [ "PROPERTY", "ATTRIBUTE", "ANY_PROPERTY", "ANY_FIELD" ]); }; + stjs.extend(SearchFieldType, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new SearchFieldType(); }) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/SearchOperator.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/SearchOperator.js index 361caa21708e4ac028f5d3957c6de2afdbf7490a..dc375db653739c9a6b7ca1583f868c8491b68c7b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/SearchOperator.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/common/search/SearchOperator.js @@ -1,9 +1,12 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - AND : "AND", - OR : "OR" + +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var SearchOperator = function() { + Enum.call(this, [ "AND", "OR" ]); }; -}) + stjs.extend(SearchOperator, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new SearchOperator(); +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/ArchivingStatus.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/ArchivingStatus.js index 6f4885060ef98d972f3968e6be49bab222efa638..21531e57f713f9c469076f16783db8168697cd53 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/ArchivingStatus.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/ArchivingStatus.js @@ -1,13 +1,12 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - AVAILABLE : "AVAILABLE", - LOCKED : "LOCKED", - ARCHIVED : "ARCHIVED", - UNARCHIVE_PENDING : "UNARCHIVE_PENDING", - ARCHIVE_PENDING : "ARCHIVE_PENDING", - BACKUP_PENDING : "BACKUP_PENDING" + +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var ArchivingStatus = function() { + Enum.call(this, [ "AVAILABLE", "LOCKED", "ARCHIVED", "UNARCHIVE_PENDING", "ARCHIVE_PENDING", "BACKUP_PENDING" ]); }; -}) + stjs.extend(ArchivingStatus, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new ArchivingStatus(); +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/Complete.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/Complete.js index 308b93f49f0330de4c6b0fe65377e07d3c1ce8cc..2c19f5ee6ceacbe0781e89d430578b94126777c5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/Complete.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/Complete.js @@ -1,10 +1,11 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - YES : "YES", - NO : "NO", - UNKNOWN : "UNKNOWN" +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var Complete = function() { + Enum.call(this, [ "YES", "NO", "UNKNOWN" ]); }; -}) + stjs.extend(Complete, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new Complete(); +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/DataSetKind.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/DataSetKind.js index ff5f0eeddf943d7705bb439709343c24918e4e30..1818551542db2c2083eb284396cd88b28dfa2ba5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/DataSetKind.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/DataSetKind.js @@ -1,10 +1,11 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - PHYSICAL : "PHYSICAL", - CONTAINER : "CONTAINER", - LINK : "LINK" +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var DataSetKind = function() { + Enum.call(this, [ "PHYSICAL", "CONTAINER", "LINK" ]); }; -}) + stjs.extend(DataSetKind, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new DataSetKind(); +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/history/DataSetRelationType.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/history/DataSetRelationType.js index 02a2f7433f97935f1e9c7d8ad59e708a17de6309..37a3d18854b6438fc07d64afc006ab15c56ffef8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/history/DataSetRelationType.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/history/DataSetRelationType.js @@ -1,13 +1,12 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - EXPERIMENT : "EXPERIMENT", - SAMPLE : "SAMPLE", - PARENT : "PARENT", - CHILD : "CHILD", - CONTAINER : "CONTAINER", - COMPONENT : "COMPONENT" + +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var DataSetRelationType = function() { + Enum.call(this, [ "EXPERIMENT", "SAMPLE", "PARENT", "CHILD", "CONTAINER", "COMPONENT" ]); }; + stjs.extend(DataSetRelationType, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new DataSetRelationType(); }) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/search/DataSetSearchRelation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/search/DataSetSearchRelation.js index 884afaaf12174aacf65b7e3e7d9c4a946e168e7a..828b3c375c0ee91a13d52c9846be98c0f44364a5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/search/DataSetSearchRelation.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/dataset/search/DataSetSearchRelation.js @@ -1,11 +1,11 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - DATASET : "DATASET", - PARENTS : "PARENTS", - CHILDREN : "CHILDREN", - CONTAINER : "CONTAINER" +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var DataSetSearchRelation = function() { + Enum.call(this, [ "DATASET", "PARENTS", "CHILDREN", "CONTAINER" ]); }; + stjs.extend(DataSetSearchRelation, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new DataSetSearchRelation(); }) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/create/CreateExperimentsOperation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/create/CreateExperimentsOperation.js index 33dbd998bdd4ac5a9fdbfa8273ffa5b70c798be5..deb731afe66f370644bf12c2d07d13d2ff1f5910 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/create/CreateExperimentsOperation.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/create/CreateExperimentsOperation.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperation" ], function(stjs, IOperation) { +define([ "stjs", "dto/common/operations/IOperation" ], function(stjs, IOperation) { var CreateExperimentsOperation = function() { }; stjs.extend(CreateExperimentsOperation, null, [ IOperation ], function(constructor, prototype) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/create/CreateExperimentsOperationResult.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/create/CreateExperimentsOperationResult.js index b6cd1ac260476e0d9a7f36ecbc626035a1d66a47..41c69b4506fa2b4e8797689d24dc1737ee54352e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/create/CreateExperimentsOperationResult.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/create/CreateExperimentsOperationResult.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperationResult" ], function(stjs, IOperationResult) { +define([ "stjs", "dto/common/operations/IOperationResult" ], function(stjs, IOperationResult) { var CreateExperimentsOperationResult = function() { }; stjs.extend(CreateExperimentsOperationResult, null, [ IOperationResult ], function(constructor, prototype) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/history/ExperimentRelationType.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/history/ExperimentRelationType.js index 0cd8b60623089513685420c0beae37cdca15ac08..aa3e153c693ed9050b0103bafbb323e395883b02 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/history/ExperimentRelationType.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/history/ExperimentRelationType.js @@ -1,10 +1,11 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - PROJECT : "PROJECT", - SAMPLE : "SAMPLE", - DATA_SET : "DATA_SET" +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var ExperimentRelationType = function() { + Enum.call(this, [ "PROJECT", "SAMPLE", "DATA_SET" ]); }; + stjs.extend(ExperimentRelationType, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new ExperimentRelationType(); }) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/list/ListExperimentsOperation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/list/ListExperimentsOperation.js index 29ca80c53d1f85f1585aa3e25928c4b01becf411..952d2305ae953054c23608986e7f223d208438d8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/list/ListExperimentsOperation.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/list/ListExperimentsOperation.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperation" ], function(stjs, IOperation) { +define([ "stjs", "dto/common/operations/IOperation" ], function(stjs, IOperation) { var ListExperimentsOperation = function() { }; stjs.extend(ListExperimentsOperation, null, [ IOperation ], function(constructor, prototype) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/list/ListExperimentsOperationResult.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/list/ListExperimentsOperationResult.js index 489783de3af180c2d32c17c4a06a01a90264b8be..754773930ca8713b12ce057a3c3bc181ea207883 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/list/ListExperimentsOperationResult.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/list/ListExperimentsOperationResult.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperationResult" ], function(stjs, IOperationResult) { +define([ "stjs", "dto/common/operations/IOperationResult" ], function(stjs, IOperationResult) { var ListExperimentsOperationResult = function() { }; stjs.extend(ListExperimentsOperationResult, null, [ IOperationResult ], function(constructor, prototype) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/search/SearchExperimentsOperation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/search/SearchExperimentsOperation.js index efaf1fb36a63a4ac8d911d01ef403ceffe06485b..bfb056eba3c68245a6c87a843e504e258a87165a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/search/SearchExperimentsOperation.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/search/SearchExperimentsOperation.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperation" ], function(stjs, IOperation) { +define([ "stjs", "dto/common/operations/IOperation" ], function(stjs, IOperation) { var SearchForExperimentsOperation = function() { }; stjs.extend(SearchForExperimentsOperation, null, [ IOperation ], function(constructor, prototype) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/search/SearchExperimentsOperationResult.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/search/SearchExperimentsOperationResult.js index 2f0884bb81c6906fa73c8a24a3d0641c354dc651..89b5f3b41f85c7e406d0957e116443316d1f15e8 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/search/SearchExperimentsOperationResult.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/search/SearchExperimentsOperationResult.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperationResult" ], function(stjs, IOperationResult) { +define([ "stjs", "dto/common/operations/IOperationResult" ], function(stjs, IOperationResult) { var SearchForExperimentsOperationResult = function() { }; stjs.extend(SearchForExperimentsOperationResult, null, [ IOperationResult ], function(constructor, prototype) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/update/UpdateExperimentsOperation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/update/UpdateExperimentsOperation.js index eadc203753282fe7c59eca22c12ec0b60a6c477a..823202d8a504f8cc3e6e0fbf5fbd365bda29631c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/update/UpdateExperimentsOperation.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/update/UpdateExperimentsOperation.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperation" ], function(stjs, IOperation) { +define([ "stjs", "dto/common/operations/IOperation" ], function(stjs, IOperation) { var UpdateExperimentsOperation = function() { }; stjs.extend(UpdateExperimentsOperation, null, [ IOperation ], function(constructor, prototype) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/update/UpdateExperimentsOperationResult.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/update/UpdateExperimentsOperationResult.js index a59db7f4a152088a73b64f595b26464cdcd9ddfb..7db9668dc2cf115e840648b4a2e37a98ec4cc0a6 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/update/UpdateExperimentsOperationResult.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/experiment/update/UpdateExperimentsOperationResult.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperationResult" ], function(stjs, IOperationResult) { +define([ "stjs", "dto/common/operations/IOperationResult" ], function(stjs, IOperationResult) { var UpdateExperimentsOperationResult = function() { }; stjs.extend(UpdateExperimentsOperationResult, null, [ IOperationResult ], function(constructor, prototype) { diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/history/IRelationType.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/history/IRelationType.js new file mode 100644 index 0000000000000000000000000000000000000000..0d3c0c7eb4b1f016b0c34e3a24b73cf7e2277c31 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/history/IRelationType.js @@ -0,0 +1,6 @@ +define([ "stjs" ], function(stjs) { + var IRelationType = function() { + }; + stjs.extend(IRelationType, null, [], null, {}); + return IRelationType; +}) \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/project/history/ProjectRelationType.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/project/history/ProjectRelationType.js index 7064b881b2abaeea1fb10ab5cde0ea02c53c5109..d2983d130c748be533b43ae64de87e252b17955a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/project/history/ProjectRelationType.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/project/history/ProjectRelationType.js @@ -1,9 +1,11 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - SPACE : "SPACE", - EXPERIMENT : "EXPERIMENT" +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var ProjectRelationType = function() { + Enum.call(this, [ "SPACE", "EXPERIMENT" ]); }; + stjs.extend(ProjectRelationType, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new ProjectRelationType(); }) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/create/CreateSamplesOperation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/create/CreateSamplesOperation.js index b999447487faed706ea0a76211effeee0486cde7..93411fc508583156b8097509444a4355fbea5a6f 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/create/CreateSamplesOperation.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/create/CreateSamplesOperation.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperation" ], function(stjs, IOperation) { +define([ "stjs", "dto/common/operations/IOperation" ], function(stjs, IOperation) { var CreateSamplesOperation = function(creations) { this.creations = creations; }; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/create/CreateSamplesResult.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/create/CreateSamplesResult.js index b4d74ae119ef1e76c1af311fb9452a30b44bd08e..98270a2d8ce503afe3c6c53b74af0c09c28d1ceb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/create/CreateSamplesResult.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/create/CreateSamplesResult.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperationResult" ], function(stjs, IOperationResult) { +define([ "stjs", "dto/common/operations/IOperationResult" ], function(stjs, IOperationResult) { var CreateSamplesResult = function(permIds) { this.permIds = permIds; }; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/history/SampleRelationType.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/history/SampleRelationType.js index e6cedc087cee1b0033f95d467538c0922a55f619..1ca5bf0f02447366ef20e515520a39624953bc87 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/history/SampleRelationType.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/history/SampleRelationType.js @@ -1,14 +1,11 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - SPACE : "SPACE", - EXPERIMENT : "EXPERIMENT", - PARENT : "PARENT", - CHILD : "CHILD", - CONTAINER : "CONTAINER", - COMPONENT : "COMPONENT", - DATA_SET : "DATA_SET" +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var SampleRelationType = function() { + Enum.call(this, [ "SPACE", "EXPERIMENT", "PARENT", "CHILD", "CONTAINER", "COMPONENT", "DATA_SET" ]); }; + stjs.extend(SampleRelationType, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new SampleRelationType(); }) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/search/SampleSearchRelation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/search/SampleSearchRelation.js index 01b548919f6e821d26c67400cbcff00f37712a1c..fc131e58665a7b4e86e6af7cdd37441dfa13c54c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/search/SampleSearchRelation.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/search/SampleSearchRelation.js @@ -1,11 +1,11 @@ /** * @author pkupczyk */ -define([ "stjs" ], function(stjs) { - return { - SAMPLE : "SAMPLE", - PARENTS : "PARENTS", - CHILDREN : "CHILDREN", - CONTAINER : "CONTAINER" +define([ "stjs", "dto/common/Enum" ], function(stjs, Enum) { + var SampleSearchRelation = function() { + Enum.call(this, [ "SAMPLE", "PARENTS", "CHILDREN", "CONTAINER" ]); }; + stjs.extend(SampleSearchRelation, Enum, [ Enum ], function(constructor, prototype) { + }, {}); + return new SampleSearchRelation(); }) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/update/UpdateSamplesOperation.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/update/UpdateSamplesOperation.js index 77f4050513ca7cebb74c75779f6d80cae4b421bb..8fbbaf6df0b19339e9ec7edb63886b55c1844e4b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/update/UpdateSamplesOperation.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/dto/sample/update/UpdateSamplesOperation.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define([ "stjs", "dto/common/operation/IOperation" ], function(stjs, IOperation) { +define([ "stjs", "dto/common/operations/IOperation" ], function(stjs, IOperation) { var UpdateSamplesOperation = function(updates) { this.updates = updates; }; diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/fetchoptions/EntitySortOptions.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/fetchoptions/EntitySortOptions.java index 06751eca18efb1f82068317d2a1383f57edbaa64..cf1b15217a4448321623bc97995aa29f23247461 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/fetchoptions/EntitySortOptions.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/fetchoptions/EntitySortOptions.java @@ -16,6 +16,8 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.fetchoptions; +import com.fasterxml.jackson.annotation.JsonIgnore; + import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces.ICodeHolder; import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces.IModificationDateHolder; import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces.IRegistrationDateHolder; @@ -30,10 +32,13 @@ public class EntitySortOptions<OBJECT extends ICodeHolder & IRegistrationDateHol private static final long serialVersionUID = 1L; + @JsonIgnore public static final String CODE = "CODE"; + @JsonIgnore public static final String MODIFICATION_DATE = "MODIFICATION_DATE"; + @JsonIgnore public static final String REGISTRATION_DATE = "REGISTRATION_DATE"; public SortOrder code() diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/fetchoptions/EntityWithPropertiesSortOptions.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/fetchoptions/EntityWithPropertiesSortOptions.java index b9872fb7d748b547410264d05cd5fd96f4b5c94a..e9765b6a53eca50cc9da54cf7b435c384d7e55f9 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/fetchoptions/EntityWithPropertiesSortOptions.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/fetchoptions/EntityWithPropertiesSortOptions.java @@ -16,6 +16,8 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.fetchoptions; +import com.fasterxml.jackson.annotation.JsonIgnore; + import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces.ICodeHolder; import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces.IModificationDateHolder; import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces.IPropertiesHolder; @@ -32,6 +34,7 @@ public class EntityWithPropertiesSortOptions<OBJECT extends ICodeHolder & IRegis private static final long serialVersionUID = 1L; + @JsonIgnore public static final String PROPERTY = "PROPERTY"; public SortOrder property(String propertyName) diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IAttachmentsHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IAttachmentsHolder.java index 3d142902d7ec0a735352bcd8118e73bdaca1afc0..8a8645df1a1ead3443a3ffcbc68f65d28a15afc1 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IAttachmentsHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IAttachmentsHolder.java @@ -19,10 +19,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import java.util.List; import ch.ethz.sis.openbis.generic.as.api.v3.dto.attachment.Attachment; +import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author Jakub Straszewski */ +@JsonObject("dto.common.interfaces.IAttachmentsHolder") public interface IAttachmentsHolder { List<Attachment> getAttachments(); diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ICodeHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ICodeHolder.java index 291a5e4e6feed9ef302993be37ef5e8afd1cb3a5..ab4d9951184795836a76111a07c69825d576c6de 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ICodeHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ICodeHolder.java @@ -16,9 +16,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; +import ch.systemsx.cisd.base.annotation.JsonObject; + /** * @author pkupczyk */ +@JsonObject("dto.common.interfaces.ICodeHolder") public interface ICodeHolder { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ICreationIdHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ICreationIdHolder.java index e30e7edc8135bb8ff9782451eb7be5748f39fd9d..4e4d8cb0a894ffc759aa320d29f4f9e06be455c7 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ICreationIdHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ICreationIdHolder.java @@ -17,10 +17,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.id.CreationId; +import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author pkupczyk */ +@JsonObject("dto.common.interfaces.ICreationIdHolder") public interface ICreationIdHolder { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IModificationDateHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IModificationDateHolder.java index 42a955f34f69fa004584ce173c7cf986e7cf539a..9ea900749d5ad5625bdc6f1ac827f64bf4379440 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IModificationDateHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IModificationDateHolder.java @@ -18,9 +18,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import java.util.Date; +import ch.systemsx.cisd.base.annotation.JsonObject; + /** * @author Jakub Straszewski */ +@JsonObject("dto.common.interfaces.IModificationDateHolder") public interface IModificationDateHolder { Date getModificationDate(); diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IModifierHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IModifierHolder.java index 376e381ed5bd3d05fe1afe0bb041ba6aa197da8f..81e5330118f1eaa4b8c9f3b32f9510f5900dc78f 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IModifierHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IModifierHolder.java @@ -17,10 +17,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import ch.ethz.sis.openbis.generic.as.api.v3.dto.person.Person; +import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author Jakub Straszewski */ +@JsonObject("dto.common.interfaces.IModifierHolder") public interface IModifierHolder { Person getModifier(); diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IParentChildrenHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IParentChildrenHolder.java index c3164b70829d87e3066e821d1de8d7b2bbbdc2b0..f2d204904ef6d617449912c6006d154f0f5283a4 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IParentChildrenHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IParentChildrenHolder.java @@ -18,9 +18,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import java.util.List; +import ch.systemsx.cisd.base.annotation.JsonObject; + /** * @author Jakub Straszewski */ +@JsonObject("dto.common.interfaces.IParentChildrenHolder") public interface IParentChildrenHolder<T> { List<T> getParents(); diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IPermIdHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IPermIdHolder.java index cedc211c34f2f5c578c338c73c32088ffd863a7d..7d16280e14bbba273c3f2a5bb948670468812e5f 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IPermIdHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IPermIdHolder.java @@ -17,10 +17,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.id.IObjectId; +import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author pkupczyk */ +@JsonObject("dto.common.interfaces.IPermIdHolder") public interface IPermIdHolder { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IPropertiesHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IPropertiesHolder.java index 93f78690126966a4211ba46e025334a99dced350..a3240c3c773eb4ccf2b13202d145ecc312cde8e4 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IPropertiesHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IPropertiesHolder.java @@ -19,10 +19,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import java.util.Map; import ch.ethz.sis.openbis.generic.as.api.v3.dto.material.Material; +import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author Jakub Straszewski */ +@JsonObject("dto.common.interfaces.IPropertiesHolder") public interface IPropertiesHolder { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IRegistrationDateHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IRegistrationDateHolder.java index 98e57d613e6ab6013b7c1b92c5ba65dacb7eb5d5..49f86a4b2788e02b17f22cdaca5dff88e617e360 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IRegistrationDateHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IRegistrationDateHolder.java @@ -18,9 +18,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import java.util.Date; +import ch.systemsx.cisd.base.annotation.JsonObject; + /** * @author Jakub Straszewski */ +@JsonObject("dto.common.interfaces.IRegistrationDateHolder") public interface IRegistrationDateHolder { Date getRegistrationDate(); diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IRegistratorHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IRegistratorHolder.java index 9c0f4d8fa12307395d08b94bb944a07bea74abb4..d4d2cf8fc1e00656cadca21f71d011ff5ac3608d 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IRegistratorHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/IRegistratorHolder.java @@ -17,10 +17,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import ch.ethz.sis.openbis.generic.as.api.v3.dto.person.Person; +import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author Jakub Straszewski */ +@JsonObject("dto.common.interfaces.IRegistratorHolder") public interface IRegistratorHolder { Person getRegistrator(); diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ISpaceHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ISpaceHolder.java index 679fa653e4bfa3d317784f341eee70bb21c2dd6f..60ede91da870603b006743da530f3a11adc031b3 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ISpaceHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ISpaceHolder.java @@ -17,10 +17,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import ch.ethz.sis.openbis.generic.as.api.v3.dto.space.Space; +import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author Jakub Straszewski */ +@JsonObject("dto.common.interfaces.ISpaceHolder") public interface ISpaceHolder { Space getSpace(); diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ITagsHolder.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ITagsHolder.java index d6a8537e4d8a3816feeb9c822d63d2ff34554a4f..a34fe44dd631f9257d715195b1c822a0ac5d0965 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ITagsHolder.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/common/interfaces/ITagsHolder.java @@ -19,10 +19,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.common.interfaces; import java.util.Set; import ch.ethz.sis.openbis.generic.as.api.v3.dto.tag.Tag; +import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author Jakub Straszewski */ +@JsonObject("dto.common.interfaces.ITagsHolder") public interface ITagsHolder { Set<Tag> getTags(); diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/experiment/search/SearchExperimentsOperation.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/experiment/search/SearchExperimentsOperation.java index 11009f21116a1ad229f9b8955ba3e659cd593a5c..b33ff2a35be1fd8e9375515cc4bbb33d9180c010 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/experiment/search/SearchExperimentsOperation.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/experiment/search/SearchExperimentsOperation.java @@ -22,7 +22,7 @@ import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author pkupczyk */ -@JsonObject("dto.experiment.search.SearchForExperimentsOperation") +@JsonObject("dto.experiment.search.SearchExperimentsOperation") public class SearchExperimentsOperation implements IOperation { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/experiment/search/SearchExperimentsOperationResult.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/experiment/search/SearchExperimentsOperationResult.java index ba291d6232aac60f7f35c6c50b0961ec31514e33..b7775cd5bf6804e7bbe9be45330e41f5becfd083 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/experiment/search/SearchExperimentsOperationResult.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/experiment/search/SearchExperimentsOperationResult.java @@ -22,7 +22,7 @@ import ch.systemsx.cisd.base.annotation.JsonObject; /** * @author pkupczyk */ -@JsonObject("dto.experiment.search.SearchForExperimentsOperationResult") +@JsonObject("dto.experiment.search.SearchExperimentsOperationResult") public class SearchExperimentsOperationResult implements IOperationResult { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/history/IRelationType.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/history/IRelationType.java index 0841b22f6cd4e3e1e3d56a84b60d82116c0877b3..3016aca75b3899b96607914838f81b28be61c328 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/history/IRelationType.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/history/IRelationType.java @@ -16,9 +16,12 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.history; +import ch.systemsx.cisd.base.annotation.JsonObject; + /** * @author pkupczyk */ +@JsonObject("dto.history.IRelationType") public interface IRelationType { diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/tag/fetchoptions/TagSortOptions.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/tag/fetchoptions/TagSortOptions.java index fc55c7085980cf900e7aa14f6021396f05037dc2..3961a470a544977c59acc6ab47565a9fb2b9f1c5 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/tag/fetchoptions/TagSortOptions.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/as/api/v3/dto/tag/fetchoptions/TagSortOptions.java @@ -16,6 +16,8 @@ package ch.ethz.sis.openbis.generic.as.api.v3.dto.tag.fetchoptions; +import com.fasterxml.jackson.annotation.JsonIgnore; + import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.fetchoptions.SortOptions; import ch.ethz.sis.openbis.generic.as.api.v3.dto.common.fetchoptions.SortOrder; import ch.ethz.sis.openbis.generic.as.api.v3.dto.tag.Tag; @@ -30,8 +32,10 @@ public class TagSortOptions extends SortOptions<Tag> private static final long serialVersionUID = 1L; + @JsonIgnore public static final String CODE = "CODE"; + @JsonIgnore public static final String REGISTRATION_DATE = "REGISTRATION_DATE"; public SortOrder code()