diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html index 0162c0b78bd01aafffa6363461eb16f7668a7ebf..4d33cf86576cc6f483ccc93fee742fd825f53c62 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html @@ -12,7 +12,8 @@ "qunit": "support/qunit", "qunit-report": "support/qunit-reporter-junit", "common-test": "../common-test/common-test", - "dto": "models/dto" + "dto": "models/dto", + "sys": "models/sys" }, shim: { "qunit": { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/deletion/Deletion.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/deletion/Deletion.js index 01439330830ca10817498943f7abdf06674ebf7c..a9d7fa7219c7366751ad2650c892a77a31b1465f 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/deletion/Deletion.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/deletion/Deletion.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions) { var Deletion = function() {}; stjs.extend(Deletion, null, [], function(constructor, prototype) { prototype['@type'] = 'Deletion'; @@ -32,7 +32,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasDeletedObjects()) { return this.deletedObjects; } else { - throw new NotFetchedException("Deleted objects have not been fetched."); + throw new exceptions.NotFetchedException("Deleted objects have not been fetched."); } }; prototype.setDeletedObjects = function(deletedObjects) { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/attachment/Attachment.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/attachment/Attachment.js index dda900c1a6a45ab8b71a484a6331bf9b3afd0b86..f14d0f61fd8214a0ef0f610fce8355ae563d72ec 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/attachment/Attachment.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/attachment/Attachment.js @@ -1,7 +1,7 @@ /** * Class automatically generated with {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator} */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions) { var Attachment = function() {}; stjs.extend(Attachment, null, [], function(constructor, prototype) { prototype['@type'] = 'Attachment'; @@ -69,7 +69,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasRegistrator()) { return this.registrator; } else { - throw new NotFetchedException("Registrator has not been fetched."); + throw new exceptions.NotFetchedException("Registrator has not been fetched."); } }; prototype.setRegistrator = function(registrator) { @@ -79,7 +79,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasPreviousVersion()) { return this.previousVersion; } else { - throw new NotFetchedException("Previous version of attachment has not been fetched."); + throw new exceptions.NotFetchedException("Previous version of attachment has not been fetched."); } }; prototype.setPreviousVersion = function(previousVersion) { @@ -89,7 +89,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasContent()) { return this.content; } else { - throw new NotFetchedException("Content has not been fetched."); + throw new exceptions.NotFetchedException("Content has not been fetched."); } }; prototype.setContent = function(content) { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/dataset/DataSet.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/dataset/DataSet.js index 235c193f330f3ec21c5c795b6687cf0f282ed7ea..6c36573259a431748703307f9d4e2f6d8046bc74 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/dataset/DataSet.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/dataset/DataSet.js @@ -1,7 +1,7 @@ /** * Class automatically generated with {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator} */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions) { var DataSet = function() {}; stjs.extend(DataSet, null, [], function(constructor, prototype) { prototype['@type'] = 'DataSet'; @@ -65,7 +65,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasParents()) { return this.parents; } else { - throw new NotFetchedException("Parents has not been fetched."); + throw new exceptions.NotFetchedException("Parents has not been fetched."); } }; prototype.setParents = function(parents) { @@ -75,7 +75,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasChildren()) { return this.children; } else { - throw new NotFetchedException("Children has not been fetched."); + throw new exceptions.NotFetchedException("Children has not been fetched."); } }; prototype.setChildren = function(children) { @@ -85,7 +85,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasContainers()) { return this.containers; } else { - throw new NotFetchedException("Container data sets has not been fetched."); + throw new exceptions.NotFetchedException("Container data sets has not been fetched."); } }; prototype.setContainers = function(containers) { @@ -95,7 +95,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasContained()) { return this.contained; } else { - throw new NotFetchedException("Contained data sets has not been fetched."); + throw new exceptions.NotFetchedException("Contained data sets has not been fetched."); } }; prototype.setContained = function(contained) { @@ -105,7 +105,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasTags()) { return this.tags; } else { - throw new NotFetchedException("Tags has not been fetched."); + throw new exceptions.NotFetchedException("Tags has not been fetched."); } }; prototype.setTags = function(tags) { @@ -115,7 +115,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasType()) { return this.type; } else { - throw new NotFetchedException("Data Set type has not been fetched."); + throw new exceptions.NotFetchedException("Data Set type has not been fetched."); } }; prototype.setType = function(type) { @@ -131,7 +131,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasModifier()) { return this.modifier; } else { - throw new NotFetchedException("Modifier has not been fetched."); + throw new exceptions.NotFetchedException("Modifier has not been fetched."); } }; prototype.setModifier = function(modifier) { @@ -147,7 +147,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasRegistrator()) { return this.registrator; } else { - throw new NotFetchedException("Registrator has not been fetched."); + throw new exceptions.NotFetchedException("Registrator has not been fetched."); } }; prototype.setRegistrator = function(registrator) { @@ -157,7 +157,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasExperiment()) { return this.experiment; } else { - throw new NotFetchedException("Experiment has not been fetched."); + throw new exceptions.NotFetchedException("Experiment has not been fetched."); } }; prototype.setExperiment = function(experiment) { @@ -167,7 +167,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasSample()) { return this.sample; } else { - throw new NotFetchedException("Sample has not been fetched."); + throw new exceptions.NotFetchedException("Sample has not been fetched."); } }; prototype.setSample = function(sample) { @@ -177,7 +177,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasProperties()) { return this.properties; } else { - throw new NotFetchedException("Properties has not been fetched."); + throw new exceptions.NotFetchedException("Properties has not been fetched."); } }; prototype.setProperties = function(properties) { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/Experiment.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/Experiment.js index 287739dd9e4440645a618af5f1cb86a4f736e487..882f594391a7f0a57d01c211525a10de6d3cd4e0 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/Experiment.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/Experiment.js @@ -1,7 +1,7 @@ /** * Class automatically generated with {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator} */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions) { var Experiment = function() {}; stjs.extend(Experiment, null, [], function(constructor, prototype) { prototype['@type'] = 'Experiment'; @@ -59,7 +59,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasType()) { return this.type; } else { - throw new NotFetchedException("Experiment type has not been fetched."); + throw new exceptions.NotFetchedException("Experiment type has not been fetched."); } }; prototype.setType = function(type) { @@ -69,7 +69,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasProject()) { return this.project; } else { - throw new NotFetchedException("Project has not been fetched."); + throw new exceptions.NotFetchedException("Project has not been fetched."); } }; prototype.setProject = function(project) { @@ -79,7 +79,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasProperties()) { return this.properties; } else { - throw new NotFetchedException("Properties has not been fetched."); + throw new exceptions.NotFetchedException("Properties has not been fetched."); } }; prototype.setProperties = function(properties) { @@ -89,7 +89,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasTags()) { return this.tags; } else { - throw new NotFetchedException("Tags has not been fetched."); + throw new exceptions.NotFetchedException("Tags has not been fetched."); } }; prototype.setTags = function(tags) { @@ -99,7 +99,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasRegistrator()) { return this.registrator; } else { - throw new NotFetchedException("Registrator has not been fetched."); + throw new exceptions.NotFetchedException("Registrator has not been fetched."); } }; prototype.setRegistrator = function(registrator) { @@ -109,7 +109,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasModifier()) { return this.modifier; } else { - throw new NotFetchedException("Modifier has not been fetched."); + throw new exceptions.NotFetchedException("Modifier has not been fetched."); } }; prototype.setModifier = function(modifier) { @@ -119,7 +119,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasAttachments()) { return this.attachments; } else { - throw new NotFetchedException("Attachments has not been fetched."); + throw new exceptions.NotFetchedException("Attachments has not been fetched."); } }; prototype.setAttachments = function(attachments) { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/ExperimentCreation.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/ExperimentCreation.js index f88c6031fb8226f4bc9ef9aa10abb0c8e597de4f..33bf8181a46a288a57c492c7e606bf66d65dfa90 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/ExperimentCreation.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/ExperimentCreation.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/hashmap"], function (stjs, HashMap) { var ExperimentCreation = function() {}; stjs.extend(ExperimentCreation, null, [], function(constructor, prototype) { prototype['@type'] = 'ExperimentCreation'; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/ExperimentUpdate.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/ExperimentUpdate.js index e4e2bfb2e151fea0b499cc8fef913e3c416f309d..7da35aa95c4e387d626255f384e2d85ff923af93 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/ExperimentUpdate.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/experiment/ExperimentUpdate.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/hashmap"], function (stjs, HashMap) { var ExperimentUpdate = function() {}; stjs.extend(ExperimentUpdate, null, [], function(constructor, prototype) { prototype['@type'] = 'ExperimentUpdate'; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/person/Person.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/person/Person.js index 66adbc5bf3d0e382847bee859c4d8e065ac838f8..c86c4150de410fd0d9b456787b4017f57a2062da 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/person/Person.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/person/Person.js @@ -1,7 +1,7 @@ /** * Class automatically generated with {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator} */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions) { var Person = function() {}; stjs.extend(Person, null, [], function(constructor, prototype) { prototype['@type'] = 'Person'; @@ -61,7 +61,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasSpace()) { return this.space; } else { - throw new NotFetchedException("Space has not been fetched."); + throw new exceptions.NotFetchedException("Space has not been fetched."); } }; prototype.setSpace = function(space) { @@ -71,7 +71,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasRegistrator()) { return this.registrator; } else { - throw new NotFetchedException("Registrator has not been fetched."); + throw new exceptions.NotFetchedException("Registrator has not been fetched."); } }; prototype.setRegistrator = function(registrator) { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/project/Project.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/project/Project.js index cbcf04e1969769b36339246650e8225cee78d08f..72845cdbd554539282cfca22e32678587ca55a35 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/project/Project.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/project/Project.js @@ -1,7 +1,7 @@ /** * Class automatically generated with {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator} */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions) { var Project = function() {}; stjs.extend(Project, null, [], function(constructor, prototype) { prototype['@type'] = 'Project'; @@ -62,7 +62,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasSpace()) { return this.space; } else { - throw new NotFetchedException("Space has not been fetched."); + throw new exceptions.NotFetchedException("Space has not been fetched."); } }; prototype.setSpace = function(space) { @@ -72,7 +72,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasRegistrator()) { return this.registrator; } else { - throw new NotFetchedException("Registrator has not been fetched."); + throw new exceptions.NotFetchedException("Registrator has not been fetched."); } }; prototype.setRegistrator = function(registrator) { @@ -82,7 +82,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasModifier()) { return this.modifier; } else { - throw new NotFetchedException("Modifier has not been fetched."); + throw new exceptions.NotFetchedException("Modifier has not been fetched."); } }; prototype.setModifier = function(modifier) { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/Sample.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/Sample.js index c80ca277c10edbcfb6fb75bb1b2d112a620f9461..945e05c31f40237014644bb6faa1b7509f159d8b 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/Sample.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/Sample.js @@ -1,7 +1,7 @@ /** * Class automatically generated with {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator} */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions) { var Sample = function() {}; stjs.extend(Sample, null, [], function(constructor, prototype) { prototype['@type'] = 'Sample'; @@ -64,7 +64,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasType()) { return this.type; } else { - throw new NotFetchedException("Sample type has not been fetched."); + throw new exceptions.NotFetchedException("Sample type has not been fetched."); } }; prototype.setType = function(type) { @@ -74,7 +74,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasSpace()) { return this.space; } else { - throw new NotFetchedException("Space has not been fetched."); + throw new exceptions.NotFetchedException("Space has not been fetched."); } }; prototype.setSpace = function(space) { @@ -84,7 +84,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasExperiment()) { return this.experiment; } else { - throw new NotFetchedException("Experiment has not been fetched."); + throw new exceptions.NotFetchedException("Experiment has not been fetched."); } }; prototype.setExperiment = function(experiment) { @@ -94,7 +94,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasProperties()) { return this.properties; } else { - throw new NotFetchedException("Properties has not been fetched."); + throw new exceptions.NotFetchedException("Properties has not been fetched."); } }; prototype.setProperties = function(properties) { @@ -104,7 +104,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasParents()) { return this.parents; } else { - throw new NotFetchedException("Parents has not been fetched."); + throw new exceptions.NotFetchedException("Parents has not been fetched."); } }; prototype.setParents = function(parents) { @@ -114,7 +114,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasChildren()) { return this.children; } else { - throw new NotFetchedException("Children has not been fetched."); + throw new exceptions.NotFetchedException("Children has not been fetched."); } }; prototype.setChildren = function(children) { @@ -124,7 +124,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasContainer()) { return this.container; } else { - throw new NotFetchedException("Container sample has not been fetched."); + throw new exceptions.NotFetchedException("Container sample has not been fetched."); } }; prototype.setContainer = function(container) { @@ -134,7 +134,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasContained()) { return this.contained; } else { - throw new NotFetchedException("Contained samples has not been fetched."); + throw new exceptions.NotFetchedException("Contained samples has not been fetched."); } }; prototype.setContained = function(contained) { @@ -144,7 +144,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasTags()) { return this.tags; } else { - throw new NotFetchedException("Tags has not been fetched."); + throw new exceptions.NotFetchedException("Tags has not been fetched."); } }; prototype.setTags = function(tags) { @@ -154,7 +154,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasRegistrator()) { return this.registrator; } else { - throw new NotFetchedException("Registrator has not been fetched."); + throw new exceptions.NotFetchedException("Registrator has not been fetched."); } }; prototype.setRegistrator = function(registrator) { @@ -164,7 +164,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasModifier()) { return this.modifier; } else { - throw new NotFetchedException("Modifier has not been fetched."); + throw new exceptions.NotFetchedException("Modifier has not been fetched."); } }; prototype.setModifier = function(modifier) { @@ -174,7 +174,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasAttachments()) { return this.attachments; } else { - throw new NotFetchedException("Attachments has not been fetched."); + throw new exceptions.NotFetchedException("Attachments has not been fetched."); } }; prototype.setAttachments = function(attachments) { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/SampleCreation.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/SampleCreation.js index 3df7ec1ae6da2f33fa32d7e5a42901451a5a6401..e1a0050bf509ed612f17b48f14a1a1c01edced6e 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/SampleCreation.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/SampleCreation.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/hashmap"], function (stjs, HashMap) { var SampleCreation = function() {}; stjs.extend(SampleCreation, null, [], function(constructor, prototype) { prototype['@type'] = 'SampleCreation'; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/SampleUpdate.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/SampleUpdate.js index fcf8960311d0b556ea7a6522a43146acb82bd531..f93af65b3f3bd4c082355592f2251489be54bb48 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/SampleUpdate.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/sample/SampleUpdate.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/hashmap"], function (stjs, HashMap) { var SampleUpdate = function() {}; stjs.extend(SampleUpdate, null, [], function(constructor, prototype) { prototype['@type'] = 'SampleUpdate'; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/space/Space.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/space/Space.js index 08fbfce8ce96e631fad1299380e8d52491308410..34f36850ce3e1d420fb66568038c2c5dfaaffe3d 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/space/Space.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/space/Space.js @@ -1,7 +1,7 @@ /** * Class automatically generated with {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator} */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions) { var Space = function() {}; stjs.extend(Space, null, [], function(constructor, prototype) { prototype['@type'] = 'Space'; @@ -46,7 +46,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasRegistrator()) { return this.registrator; } else { - throw new NotFetchedException("Registrator has not been fetched."); + throw new exceptions.NotFetchedException("Registrator has not been fetched."); } }; prototype.setRegistrator = function(registrator) { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/tag/Tag.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/tag/Tag.js index 255edb3c0e8508db4c180183c289f03660b4a488..90de10df56c47b6699f58e158944df1e2e419bff 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/tag/Tag.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/entity/tag/Tag.js @@ -1,7 +1,7 @@ /** * Class automatically generated with {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator} */ -define(["support/stjs"], function (stjs) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions) { var Tag = function() {}; stjs.extend(Tag, null, [], function(constructor, prototype) { prototype['@type'] = 'Tag'; @@ -53,7 +53,7 @@ define(["support/stjs"], function (stjs) { if (this.getFetchOptions().hasOwner()) { return this.owner; } else { - throw new NotFetchedException("Owner has not been fetched."); + throw new exceptions.NotFetchedException("Owner has not been fetched."); } }; prototype.setOwner = function(owner) { diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectIdentifier.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectIdentifier.js index 07efff10a7499e7bd8a50a525adbaa92c50e0322..976d4ad15a901a8473d57da820e01ac8fc2049f0 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectIdentifier.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectIdentifier.js @@ -5,7 +5,7 @@ * * @author pkupczyk */ -define(["support/stjs", "dto/id/IObjectId"], function (stjs, IObjectId) { +define(["support/stjs", "sys/exceptions", "dto/id/IObjectId"], function (stjs, exceptions, IObjectId) { var ObjectIdentifier = function(identifier) { this.setIdentifier(identifier); }; @@ -18,7 +18,7 @@ define(["support/stjs", "dto/id/IObjectId"], function (stjs, IObjectId) { }; prototype.setIdentifier = function(identifier) { if (identifier == null) { -// throw new IllegalArgumentException("Identifier id cannot be null"); +// throw new exceptions.IllegalArgumentException("Identifier id cannot be null"); } this.identifier = identifier; }; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectPermId.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectPermId.js index 3d6fdbd953b94cc821991e7e4cdc632e47bf18b9..d61a6bbb86892c94a8fa3c973963d807751d9d2c 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectPermId.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectPermId.js @@ -5,7 +5,7 @@ * * @author pkupczyk */ -define(["support/stjs", "dto/id/IObjectId"], function (stjs, IObjectId) { +define(["support/stjs", "sys/exceptions", "dto/id/IObjectId"], function (stjs, exceptions, IObjectId) { var ObjectPermId = function(permId) { this.setPermId(permId); }; @@ -18,7 +18,7 @@ define(["support/stjs", "dto/id/IObjectId"], function (stjs, IObjectId) { }; prototype.setPermId = function(permId) { if (permId == null) { - //TODO throw new IllegalArgumentException("PermId cannot be null"); + //TODO throw new exceptions.IllegalArgumentException("PermId cannot be null"); } this.permId = permId; }; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectTechId.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectTechId.js index 6ac972a122621738171689d881920d1746f1993e..ac23e114628ac51173bd3b585e2618f0a7b27e87 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectTechId.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/ObjectTechId.js @@ -1,7 +1,7 @@ /** * @author pkupczyk */ -define(["support/stjs", "dto/id/IObjectId"], function (stjs, IObjectId) { +define(["support/stjs", "sys/exceptions", "dto/id/IObjectId"], function (stjs, exceptions, IObjectId) { var ObjectTechId = function(techId) { this.setTechId(techId); }; @@ -14,7 +14,7 @@ define(["support/stjs", "dto/id/IObjectId"], function (stjs, IObjectId) { }; prototype.setTechId = function(techId) { if (techId == null) { - throw new IllegalArgumentException("TechId cannot be null"); + throw new exceptions.IllegalArgumentException("TechId cannot be null"); } this.techId = techId; }; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/attachment/AttachmentFileName.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/attachment/AttachmentFileName.js index 8136708e14977b43b20c92aa1793028ccb6fbad2..6028c9333d0f897476762e8c5e955f7c6eaee126 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/attachment/AttachmentFileName.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/attachment/AttachmentFileName.js @@ -3,7 +3,7 @@ * * @author pkupczyk */ -define(["support/stjs", "dto/id/attachment/IAttachmentId"], function (stjs, IAttachmentId) { +define(["support/stjs", "sys/exceptions", "dto/id/attachment/IAttachmentId"], function (stjs, exceptions, IAttachmentId) { var AttachmentFileName = /** * @param fileName Attachment file name, e.g. "my_file.txt". */ @@ -19,7 +19,7 @@ define(["support/stjs", "dto/id/attachment/IAttachmentId"], function (stjs, IAtt }; prototype.setFileName = function(fileName) { if (fileName == null) { - throw new IllegalArgumentException("File name cannot be null"); + throw new exceptions.IllegalArgumentException("File name cannot be null"); } this.fileName = fileName; }; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/tag/TagCode.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/tag/TagCode.js index fbbc8356bb2fa21b3f389ae920b48fb14b45caab..91ba41cf8937a9da807fcec87ef39ece0c81d97c 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/tag/TagCode.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/id/tag/TagCode.js @@ -4,7 +4,7 @@ * @author Franz-Josef Elmer * @author Jakub Straszewski */ -define(["support/stjs", "dto/id/tag/ITagId"], function (stjs, ITagId) { +define(["support/stjs", "sys/exceptions", "dto/id/tag/ITagId"], function (stjs, exceptions, ITagId) { var TagCode = /** * @param code Tag code, e.g. "MY_TAG". */ @@ -20,7 +20,7 @@ define(["support/stjs", "dto/id/tag/ITagId"], function (stjs, ITagId) { }; prototype.setCode = function(code) { if (code == null) { - throw new IllegalArgumentException("Code cannot be null"); + throw new exceptions.IllegalArgumentException("Code cannot be null"); } this.code = code; }; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/search/DateFieldSearchCriterion.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/search/DateFieldSearchCriterion.js index 31bd915248c3722e2a3b03bc0ed12437f8a9c7ee..71f9f436ff41031750603087422cc125c9210f5b 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/search/DateFieldSearchCriterion.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/dto/search/DateFieldSearchCriterion.js @@ -1,4 +1,4 @@ -define(["support/stjs"], function (stjs, AbstractFieldSearchCriterion) { +define(["support/stjs", "sys/exceptions"], function (stjs, exceptions, AbstractFieldSearchCriterion) { var DateFieldSearchCriterion = function(fieldName, fieldType) { AbstractFieldSearchCriterion.call(this, fieldName, fieldType); }; @@ -53,7 +53,7 @@ define(["support/stjs"], function (stjs, AbstractFieldSearchCriterion) { return; }catch (e) {} } - throw new IllegalArgumentException("Date value: " + value + " does not match any of the supported formats: " + DateFieldSearchCriterion.DATE_FORMATS); + throw new exceptions.IllegalArgumentException("Date value: " + value + " does not match any of the supported formats: " + DateFieldSearchCriterion.DATE_FORMATS); } }; }, {DATE_FORMATS: {name: "List", arguments: ["IDateFormat"]}, timeZone: "ITimeZone", fieldType: {name: "Enum", arguments: ["SearchFieldType"]}}); diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/sys/exceptions.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/sys/exceptions.js new file mode 100644 index 0000000000000000000000000000000000000000..eb531c76255f60493d5b39eb2ffa4b183527f15f --- /dev/null +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/sys/exceptions.js @@ -0,0 +1,25 @@ +define(function() { + function RuntimeException(message) { + this.name = "RuntimeException"; + this.message = (message || ""); + } + RuntimeException.prototype = Error.prototype; + + function IllegalArgumentException(message) { + this.name = "IllegalArgumentException"; + this.message = (message || ""); + } + IllegalArgumentException.prototype = Error.prototype; + + function NotFetchedException(message) { + this.name = "NotFetchedException"; + this.message = (message || ""); + } + NotFetchedException.prototype = Error.prototype; + + return { + RuntimeException: RuntimeException, + IllegalArgumentException: IllegalArgumentException, + NotFetchedException: NotFetchedException + } +}) \ No newline at end of file diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/sys/hashmap.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/sys/hashmap.js new file mode 100644 index 0000000000000000000000000000000000000000..7575ffa7fd7da078e15797f0c6e7e34bbf38bfb0 --- /dev/null +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/models/sys/hashmap.js @@ -0,0 +1,8 @@ +define(function() { + var HashMap = function() {} + HashMap.prototype.put = function(key, val) { + this[key] = val; + }; + + return HashMap; +}) \ No newline at end of file diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api-test.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api-test.js index 9e64e48e4fcb1e7600fda92baebdff6d90f90be0..4eb702968795d642d35d1f978eb473eb46b1acf5 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api-test.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api-test.js @@ -198,9 +198,11 @@ define(['jquery', 'openbis-v3-api'], function($, openbis){ }) }) .done(function(samples) { - assertObjectsCount(samples, 1); + var keys = Object.keys(samples); + assertObjectsCount(keys, 1); + + var sample = samples[keys[0]]; - var sample = samples[0]; equal(sample.code, "PLATE-1", "Sample code"); equal(sample.type.code, "PLATE", "Type code"); equal(sample.experiment.code, "EXP-1", "Experiment code"); diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api.js index b574067487c434414724d364569238834e392323..575829374cda1eb07e6a9b2797df2ed8952a5685 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/openbis-v3-api.js @@ -96,7 +96,9 @@ define(['jquery', 'support/Utils'], function($, stjsUtil) { } }) .done(function(experiments) { - require(['dto/entity/experiment/Experiment'], function() { + require(['dto/entity/experiment/Experiment', + 'dto/entity/tag/Tag', + 'dto/id/tag/TagPermId'], function() { var experimentDTOs = {}; for(var experimentPermId in experiments) { var experimentJson = experiments[experimentPermId]; diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/support/type_registry.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/support/type_registry.js index a949103753aa054a913fbe9981e544523891087d..1382c07b065df6f96d29cf20b5d402b58012e6ad 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/support/type_registry.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/support/type_registry.js @@ -1,4 +1,4 @@ -define([], function() { +define(["sys/exceptions"], function(exceptions) { var store = {}; return { register: function(name, type) { @@ -8,7 +8,7 @@ define([], function() { get: function(name) { if (!store.hasOwnProperty(name)) { - throw new IllegalArgumentException("Type [" + name + "] was not registered yet."); + throw new exceptions.IllegalArgumentException("Type [" + name + "] was not registered yet."); } return store[name]; }