diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js index 90f1376ca861d59d08c475b8f3f133ecd9fa48f6..8156a2e68f51fb841d47313c1382ac50269a5490 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js @@ -184,49 +184,49 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, openbis, this.findSpace = function(facade, id) { var c = this; - return facade.mapSpaces([ id ], c.createSpaceFetchOptions()).then(function(spaces) { + return facade.getSpaces([ id ], c.createSpaceFetchOptions()).then(function(spaces) { return spaces[id]; }); }.bind(this); this.findProject = function(facade, id) { var c = this; - return facade.mapProjects([ id ], c.createProjectFetchOptions()).then(function(projects) { + return facade.getProjects([ id ], c.createProjectFetchOptions()).then(function(projects) { return projects[id]; }); }.bind(this); this.findExperiment = function(facade, id) { var c = this; - return facade.mapExperiments([ id ], c.createExperimentFetchOptions()).then(function(experiments) { + return facade.getExperiments([ id ], c.createExperimentFetchOptions()).then(function(experiments) { return experiments[id]; }); }.bind(this); this.findSample = function(facade, id) { var c = this; - return facade.mapSamples([ id ], c.createSampleFetchOptions()).then(function(samples) { + return facade.getSamples([ id ], c.createSampleFetchOptions()).then(function(samples) { return samples[id]; }); }.bind(this); this.findDataSet = function(facade, id) { var c = this; - return facade.mapDataSets([ id ], c.createDataSetFetchOptions()).then(function(dataSets) { + return facade.getDataSets([ id ], c.createDataSetFetchOptions()).then(function(dataSets) { return dataSets[id]; }); }.bind(this); this.findMaterial = function(facade, id) { var c = this; - return facade.mapMaterials([ id ], c.createMaterialFetchOptions()).then(function(materials) { + return facade.getMaterials([ id ], c.createMaterialFetchOptions()).then(function(materials) { return materials[id]; }); }.bind(this); this.findVocabularyTerm = function(facade, id) { var c = this; - return facade.mapVocabularyTerms([ id ], c.createVocabularyTermFetchOptions()).then(function(terms) { + return facade.getVocabularyTerms([ id ], c.createVocabularyTermFetchOptions()).then(function(terms) { return terms[id]; }); }.bind(this); diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/main.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/main.js index 6ea20a004de56f9b173d05efef8398e0c5bcab12..c3494b93f1eca88477ab324477cc4fbcd995ca3a 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/main.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/main.js @@ -3,7 +3,7 @@ define([ 'test/test-jsVSjava', 'test/test-create', 'test/test-update', 'test/test-search', - 'test/test-map', + 'test/test-get', 'test/test-delete', // 'test/test-dto', diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-map.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-get.js similarity index 74% rename from js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-map.js rename to js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-get.js index 0833b8d1d5da56c76799c19f73e0631d85962283..c2b837268f915cea38c5822142e18e8dac5f6acd 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-map.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-get.js @@ -1,20 +1,20 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, openbis, common) { return function() { - QUnit.module("Map tests"); + QUnit.module("Get tests"); - var testMap = function(c, fCreate, fMap, fMapEmptyFetchOptions, fechOptionsTestConfig) { + var testGet = function(c, fCreate, fGet, fGetEmptyFetchOptions, fechOptionsTestConfig) { c.start(); c.createFacadeAndLogin().then(function(facade) { return fCreate(facade).then(function(permIds) { c.assertTrue(permIds != null && permIds.length > 0, "Entities were created"); - return fMap(facade, permIds).then(function(map) { + return fGet(facade, permIds).then(function(map) { c.assertEqual(Object.keys(map).length, permIds.length, "Entity map size is correct"); permIds.forEach(function(permId) { var entity = map[permId]; testFetchOptionsResults(c, fechOptionsTestConfig, true, entity); c.assertEqual(entity.getPermId().toString(), permId.toString(), "Entity perm id matches"); }); - return fMapEmptyFetchOptions(facade, permIds).then(function(map) { + return fGetEmptyFetchOptions(facade, permIds).then(function(map) { c.assertEqual(Object.keys(map).length, permIds.length, "Entity map size is correct"); permIds.forEach(function(permId) { var entity = map[permId]; @@ -108,7 +108,7 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open return components; } - QUnit.test("mapSpaces()", function(assert) { + QUnit.test("getSpaces()", function(assert) { var c = new common(assert); var fo = new c.SpaceFetchOptions(); var fechOptionsTestConfig = getConfigForFetchOptions(fo); @@ -120,19 +120,19 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open }); } - var fMap = function(facade, permIds) { + var fGet = function(facade, permIds) { testFetchOptionsAssignation(c, fo, fechOptionsTestConfig); - return facade.mapSpaces(permIds, fo); + return facade.getSpaces(permIds, fo); } - var fMapEmptyFetchOptions = function(facade, permIds) { - return facade.mapSpaces(permIds, new c.SpaceFetchOptions()); + var fGetEmptyFetchOptions = function(facade, permIds) { + return facade.getSpaces(permIds, new c.SpaceFetchOptions()); } - testMap(c, fCreate, fMap, fMapEmptyFetchOptions, fechOptionsTestConfig); + testGet(c, fCreate, fGet, fGetEmptyFetchOptions, fechOptionsTestConfig); }); - QUnit.test("mapProjects()", function(assert) { + QUnit.test("getProjects()", function(assert) { var c = new common(assert); var fo = new c.ProjectFetchOptions(); var fechOptionsTestConfig = getConfigForFetchOptions(fo); @@ -144,20 +144,20 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open }); } - var fMap = function(facade, permIds) { + var fGet = function(facade, permIds) { testFetchOptionsAssignation(c, fo, fechOptionsTestConfig); - return facade.mapProjects(permIds, fo); + return facade.getProjects(permIds, fo); } - var fMapEmptyFetchOptions = function(facade, permIds) { - return facade.mapProjects(permIds, new c.ProjectFetchOptions()); + var fGetEmptyFetchOptions = function(facade, permIds) { + return facade.getProjects(permIds, new c.ProjectFetchOptions()); } - testMap(c, fCreate, fMap, fMapEmptyFetchOptions, fechOptionsTestConfig); + testGet(c, fCreate, fGet, fGetEmptyFetchOptions, fechOptionsTestConfig); }); - QUnit.test("mapExperiments()", function(assert) { + QUnit.test("getExperiments()", function(assert) { var c = new common(assert); var fo = new c.ExperimentFetchOptions(); var fechOptionsTestConfig = getConfigForFetchOptions(fo); @@ -169,19 +169,19 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open }); } - var fMap = function(facade, permIds) { + var fGet = function(facade, permIds) { testFetchOptionsAssignation(c, fo, fechOptionsTestConfig); - return facade.mapExperiments(permIds, fo); + return facade.getExperiments(permIds, fo); } - var fMapEmptyFetchOptions = function(facade, permIds) { - return facade.mapExperiments(permIds, new c.ExperimentFetchOptions()); + var fGetEmptyFetchOptions = function(facade, permIds) { + return facade.getExperiments(permIds, new c.ExperimentFetchOptions()); } - testMap(c, fCreate, fMap, fMapEmptyFetchOptions, fechOptionsTestConfig); + testGet(c, fCreate, fGet, fGetEmptyFetchOptions, fechOptionsTestConfig); }); - QUnit.test("mapSamples()", function(assert) { + QUnit.test("getSamples()", function(assert) { var c = new common(assert); var fo = new c.SampleFetchOptions(); var fechOptionsTestConfig = getConfigForFetchOptions(fo); @@ -193,19 +193,19 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open }); } - var fMap = function(facade, permIds) { + var fGet = function(facade, permIds) { testFetchOptionsAssignation(c, fo, fechOptionsTestConfig); - return facade.mapSamples(permIds, fo); + return facade.getSamples(permIds, fo); } - var fMapEmptyFetchOptions = function(facade, permIds) { - return facade.mapSamples(permIds, new c.SampleFetchOptions()); + var fGetEmptyFetchOptions = function(facade, permIds) { + return facade.getSamples(permIds, new c.SampleFetchOptions()); } - testMap(c, fCreate, fMap, fMapEmptyFetchOptions, fechOptionsTestConfig); + testGet(c, fCreate, fGet, fGetEmptyFetchOptions, fechOptionsTestConfig); }); - QUnit.test("mapDataSets()", function(assert) { + QUnit.test("getDataSets()", function(assert) { var c = new common(assert); var fo = new c.DataSetFetchOptions(); var fechOptionsTestConfig = getConfigForFetchOptions(fo); @@ -217,9 +217,9 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open }); } - var fMap = function(facade, permIds) { + var fGet = function(facade, permIds) { testFetchOptionsAssignation(c, fo, fechOptionsTestConfig); - var result = facade.mapDataSets(permIds, fo); + var result = facade.getDataSets(permIds, fo); result.then(function(map) { permIds.forEach(function(permId) { @@ -230,8 +230,8 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open return result; } - var fMapEmptyFetchOptions = function(facade, permIds) { - var result = facade.mapDataSets(permIds, new c.DataSetFetchOptions()); + var fGetEmptyFetchOptions = function(facade, permIds) { + var result = facade.getDataSets(permIds, new c.DataSetFetchOptions()); result.then(function(map) { permIds.forEach(function(permId) { @@ -242,10 +242,10 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open return result; } - testMap(c, fCreate, fMap, fMapEmptyFetchOptions, fechOptionsTestConfig); + testGet(c, fCreate, fGet, fGetEmptyFetchOptions, fechOptionsTestConfig); }); - QUnit.test("mapMaterials()", function(assert) { + QUnit.test("getMaterials()", function(assert) { var c = new common(assert); var fo = new c.MaterialFetchOptions(); var fechOptionsTestConfig = getConfigForFetchOptions(fo); @@ -257,19 +257,19 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open }); } - var fMap = function(facade, permIds) { + var fGet = function(facade, permIds) { testFetchOptionsAssignation(c, fo, fechOptionsTestConfig); - return facade.mapMaterials(permIds, fo); + return facade.getMaterials(permIds, fo); } - var fMapEmptyFetchOptions = function(facade, permIds) { - return facade.mapMaterials(permIds, new c.MaterialFetchOptions()); + var fGetEmptyFetchOptions = function(facade, permIds) { + return facade.getMaterials(permIds, new c.MaterialFetchOptions()); } - testMap(c, fCreate, fMap, fMapEmptyFetchOptions, fechOptionsTestConfig); + testGet(c, fCreate, fGet, fGetEmptyFetchOptions, fechOptionsTestConfig); }); - QUnit.test("mapVocabularyTerms()", function(assert) { + QUnit.test("getVocabularyTerms()", function(assert) { var c = new common(assert); var fo = new c.VocabularyTermFetchOptions(); var fechOptionsTestConfig = getConfigForFetchOptions(fo); @@ -281,16 +281,16 @@ define([ 'jquery', 'underscore', 'openbis', 'test/common' ], function($, _, open }); } - var fMap = function(facade, permIds) { + var fGet = function(facade, permIds) { testFetchOptionsAssignation(c, fo, fechOptionsTestConfig); - return facade.mapVocabularyTerms(permIds, fo); + return facade.getVocabularyTerms(permIds, fo); } - var fMapEmptyFetchOptions = function(facade, permIds) { - return facade.mapVocabularyTerms(permIds, new c.VocabularyTermFetchOptions()); + var fGetEmptyFetchOptions = function(facade, permIds) { + return facade.getVocabularyTerms(permIds, new c.VocabularyTermFetchOptions()); } - testMap(c, fCreate, fMap, fMapEmptyFetchOptions, fechOptionsTestConfig); + testGet(c, fCreate, fGet, fGetEmptyFetchOptions, fechOptionsTestConfig); }); } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApi.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApi.java index 730dd43af9b10c2f040ea76ad8b08802ced0faa6..ebaa713841e337b214bef166af0b09996b2e8784 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApi.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApi.java @@ -129,14 +129,14 @@ import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IDeleteSpaceM import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IDeleteVocabularyTermMethodExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IExecuteCustomASServiceMethodExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IGlobalSearchMethodExecutor; -import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IMapDataSetMethodExecutor; -import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IMapExperimentMethodExecutor; -import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IMapMaterialMethodExecutor; -import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IMapProjectMethodExecutor; -import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IMapSampleMethodExecutor; -import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IMapSpaceMethodExecutor; -import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IMapTagMethodExecutor; -import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IMapVocabularyTermMethodExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IGetDataSetMethodExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IGetExperimentMethodExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IGetMaterialMethodExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IGetProjectMethodExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IGetSampleMethodExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IGetSpaceMethodExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IGetTagMethodExecutor; +import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IGetVocabularyTermMethodExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.IRevertDeletionMethodExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.ISearchCustomASServiceMethodExecutor; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.method.ISearchDataSetMethodExecutor; @@ -237,28 +237,28 @@ public class ApplicationServerApi extends AbstractServer<IApplicationServerApi> private IUpdateTagMethodExecutor updateTagExecutor; @Autowired - private IMapSpaceMethodExecutor mapSpaceExecutor; + private IGetSpaceMethodExecutor getSpaceExecutor; @Autowired - private IMapProjectMethodExecutor mapProjectExecutor; + private IGetProjectMethodExecutor getProjectExecutor; @Autowired - private IMapExperimentMethodExecutor mapExperimentExecutor; + private IGetExperimentMethodExecutor getExperimentExecutor; @Autowired - private IMapSampleMethodExecutor mapSampleExecutor; + private IGetSampleMethodExecutor getSampleExecutor; @Autowired - private IMapDataSetMethodExecutor mapDataSetExecutor; + private IGetDataSetMethodExecutor getDataSetExecutor; @Autowired - private IMapMaterialMethodExecutor mapMaterialExecutor; + private IGetMaterialMethodExecutor getMaterialExecutor; @Autowired - private IMapVocabularyTermMethodExecutor mapVocabularyTermExecutor; + private IGetVocabularyTermMethodExecutor getVocabularyTermExecutor; @Autowired - private IMapTagMethodExecutor mapTagExecutor; + private IGetTagMethodExecutor getTagExecutor; @Autowired private ISearchSpaceMethodExecutor searchSpaceExecutor; @@ -535,68 +535,68 @@ public class ApplicationServerApi extends AbstractServer<IApplicationServerApi> @Override @Transactional(readOnly = true) @RolesAllowed({ RoleWithHierarchy.SPACE_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) - public Map<ISpaceId, Space> mapSpaces(String sessionToken, List<? extends ISpaceId> spaceIds, SpaceFetchOptions fetchOptions) + public Map<ISpaceId, Space> getSpaces(String sessionToken, List<? extends ISpaceId> spaceIds, SpaceFetchOptions fetchOptions) { - return mapSpaceExecutor.map(sessionToken, spaceIds, fetchOptions); + return getSpaceExecutor.get(sessionToken, spaceIds, fetchOptions); } @Override @Transactional(readOnly = true) @RolesAllowed({ RoleWithHierarchy.SPACE_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) - public Map<IProjectId, Project> mapProjects(String sessionToken, List<? extends IProjectId> projectIds, ProjectFetchOptions fetchOptions) + public Map<IProjectId, Project> getProjects(String sessionToken, List<? extends IProjectId> projectIds, ProjectFetchOptions fetchOptions) { - return mapProjectExecutor.map(sessionToken, projectIds, fetchOptions); + return getProjectExecutor.get(sessionToken, projectIds, fetchOptions); } @Override @Transactional(readOnly = true) @RolesAllowed({ RoleWithHierarchy.SPACE_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) - public Map<IExperimentId, Experiment> mapExperiments(String sessionToken, + public Map<IExperimentId, Experiment> getExperiments(String sessionToken, List<? extends IExperimentId> experimentIds, ExperimentFetchOptions fetchOptions) { - return mapExperimentExecutor.map(sessionToken, experimentIds, fetchOptions); + return getExperimentExecutor.get(sessionToken, experimentIds, fetchOptions); } @Override @Transactional(readOnly = true) @RolesAllowed({ RoleWithHierarchy.SPACE_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) - public Map<ISampleId, Sample> mapSamples(String sessionToken, List<? extends ISampleId> sampleIds, + public Map<ISampleId, Sample> getSamples(String sessionToken, List<? extends ISampleId> sampleIds, SampleFetchOptions fetchOptions) { - return mapSampleExecutor.map(sessionToken, sampleIds, fetchOptions); + return getSampleExecutor.get(sessionToken, sampleIds, fetchOptions); } @Override @Transactional(readOnly = true) @RolesAllowed({ RoleWithHierarchy.SPACE_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) - public Map<IDataSetId, DataSet> mapDataSets(String sessionToken, List<? extends IDataSetId> dataSetIds, DataSetFetchOptions fetchOptions) + public Map<IDataSetId, DataSet> getDataSets(String sessionToken, List<? extends IDataSetId> dataSetIds, DataSetFetchOptions fetchOptions) { - return mapDataSetExecutor.map(sessionToken, dataSetIds, fetchOptions); + return getDataSetExecutor.get(sessionToken, dataSetIds, fetchOptions); } @Override @Transactional(readOnly = true) @RolesAllowed({ RoleWithHierarchy.SPACE_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) - public Map<IMaterialId, Material> mapMaterials(String sessionToken, List<? extends IMaterialId> materialIds, MaterialFetchOptions fetchOptions) + public Map<IMaterialId, Material> getMaterials(String sessionToken, List<? extends IMaterialId> materialIds, MaterialFetchOptions fetchOptions) { - return mapMaterialExecutor.map(sessionToken, materialIds, fetchOptions); + return getMaterialExecutor.get(sessionToken, materialIds, fetchOptions); } @Override @Transactional(readOnly = true) @RolesAllowed({ RoleWithHierarchy.SPACE_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) - public Map<IVocabularyTermId, VocabularyTerm> mapVocabularyTerms(String sessionToken, List<? extends IVocabularyTermId> vocabularyTermIds, + public Map<IVocabularyTermId, VocabularyTerm> getVocabularyTerms(String sessionToken, List<? extends IVocabularyTermId> vocabularyTermIds, VocabularyTermFetchOptions fetchOptions) { - return mapVocabularyTermExecutor.map(sessionToken, vocabularyTermIds, fetchOptions); + return getVocabularyTermExecutor.get(sessionToken, vocabularyTermIds, fetchOptions); } @Override @Transactional(readOnly = true) @RolesAllowed({ RoleWithHierarchy.SPACE_OBSERVER, RoleWithHierarchy.SPACE_ETL_SERVER }) - public Map<ITagId, Tag> mapTags(String sessionToken, List<? extends ITagId> tagIds, TagFetchOptions fetchOptions) + public Map<ITagId, Tag> getTags(String sessionToken, List<? extends ITagId> tagIds, TagFetchOptions fetchOptions) { - return mapTagExecutor.map(sessionToken, tagIds, fetchOptions); + return getTagExecutor.get(sessionToken, tagIds, fetchOptions); } @Override diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApiLogger.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApiLogger.java index 5d6cf69c82baafb25004de4eaf8bc5391f256b79..1a25bf57f4a8ccbb780badd32a905a1d8e7aaaa9 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApiLogger.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/ApplicationServerApiLogger.java @@ -259,61 +259,61 @@ public class ApplicationServerApiLogger extends AbstractServerLogger implements } @Override - public Map<ISpaceId, Space> mapSpaces(String sessionToken, List<? extends ISpaceId> spaceIds, SpaceFetchOptions fetchOptions) + public Map<ISpaceId, Space> getSpaces(String sessionToken, List<? extends ISpaceId> spaceIds, SpaceFetchOptions fetchOptions) { - logAccess(sessionToken, "map-spaces", "SPACE_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(spaceIds), fetchOptions); + logAccess(sessionToken, "get-spaces", "SPACE_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(spaceIds), fetchOptions); return null; } @Override - public Map<IProjectId, Project> mapProjects(String sessionToken, List<? extends IProjectId> projectIds, ProjectFetchOptions fetchOptions) + public Map<IProjectId, Project> getProjects(String sessionToken, List<? extends IProjectId> projectIds, ProjectFetchOptions fetchOptions) { - logAccess(sessionToken, "map-projects", "PROJECT_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(projectIds), fetchOptions); + logAccess(sessionToken, "get-projects", "PROJECT_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(projectIds), fetchOptions); return null; } @Override - public Map<IExperimentId, Experiment> mapExperiments(String sessionToken, List<? extends IExperimentId> experimentIds, + public Map<IExperimentId, Experiment> getExperiments(String sessionToken, List<? extends IExperimentId> experimentIds, ExperimentFetchOptions fetchOptions) { - logAccess(sessionToken, "map-experiments", "EXPERIMENT_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(experimentIds), fetchOptions); + logAccess(sessionToken, "get-experiments", "EXPERIMENT_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(experimentIds), fetchOptions); return null; } @Override - public Map<ISampleId, Sample> mapSamples(String sessionToken, + public Map<ISampleId, Sample> getSamples(String sessionToken, List<? extends ISampleId> sampleIds, SampleFetchOptions fetchOptions) { - logAccess(sessionToken, "map-samples", "SAMPLE_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(sampleIds), fetchOptions); + logAccess(sessionToken, "get-samples", "SAMPLE_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(sampleIds), fetchOptions); return null; } @Override - public Map<IMaterialId, Material> mapMaterials(String sessionToken, List<? extends IMaterialId> materialIds, MaterialFetchOptions fetchOptions) + public Map<IMaterialId, Material> getMaterials(String sessionToken, List<? extends IMaterialId> materialIds, MaterialFetchOptions fetchOptions) { - logAccess(sessionToken, "map-materials", "MATERIAL_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(materialIds), fetchOptions); + logAccess(sessionToken, "get-materials", "MATERIAL_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(materialIds), fetchOptions); return null; } @Override - public Map<IVocabularyTermId, VocabularyTerm> mapVocabularyTerms(String sessionToken, List<? extends IVocabularyTermId> vocabularyTermIds, + public Map<IVocabularyTermId, VocabularyTerm> getVocabularyTerms(String sessionToken, List<? extends IVocabularyTermId> vocabularyTermIds, VocabularyTermFetchOptions fetchOptions) { - logAccess(sessionToken, "map-vocabulary-terms", "VOCABULARY_TERM_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(vocabularyTermIds), fetchOptions); + logAccess(sessionToken, "get-vocabulary-terms", "VOCABULARY_TERM_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(vocabularyTermIds), fetchOptions); return null; } @Override - public Map<ITagId, Tag> mapTags(String sessionToken, List<? extends ITagId> tagIds, TagFetchOptions fetchOptions) + public Map<ITagId, Tag> getTags(String sessionToken, List<? extends ITagId> tagIds, TagFetchOptions fetchOptions) { - logAccess(sessionToken, "map-tags", "TAG_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(tagIds), fetchOptions); + logAccess(sessionToken, "get-tags", "TAG_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(tagIds), fetchOptions); return null; } @Override - public Map<IDataSetId, DataSet> mapDataSets(String sessionToken, List<? extends IDataSetId> dataSetIds, DataSetFetchOptions fetchOptions) + public Map<IDataSetId, DataSet> getDataSets(String sessionToken, List<? extends IDataSetId> dataSetIds, DataSetFetchOptions fetchOptions) { - logAccess(sessionToken, "map-data-sets", "DATA_SET_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(dataSetIds), fetchOptions); + logAccess(sessionToken, "get-data-sets", "DATA_SET_IDS(%s) FETCH_OPTIONS(%s)", abbreviate(dataSetIds), fetchOptions); return null; } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/AbstractMapMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/AbstractGetMethodExecutor.java similarity index 95% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/AbstractMapMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/AbstractGetMethodExecutor.java index bbc9cd39ddfed8c5adc87bda9ef882862de93309..2c7e282018ef196a9b5fd9f15e4fe2cbdf7bd64e 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/AbstractMapMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/AbstractGetMethodExecutor.java @@ -30,10 +30,10 @@ import ch.ethz.sis.openbis.generic.server.asapi.v3.translator.TranslationContext /** * @author pkupczyk */ -public abstract class AbstractMapMethodExecutor<OBJECT_ID extends IObjectId, OBJECT_PE, OBJECT, FETCH_OPTIONS> extends AbstractMethodExecutor +public abstract class AbstractGetMethodExecutor<OBJECT_ID extends IObjectId, OBJECT_PE, OBJECT, FETCH_OPTIONS> extends AbstractMethodExecutor { - public Map<OBJECT_ID, OBJECT> map(final String sessionToken, final List<? extends OBJECT_ID> objectIds, final FETCH_OPTIONS fetchOptions) + public Map<OBJECT_ID, OBJECT> get(final String sessionToken, final List<? extends OBJECT_ID> objectIds, final FETCH_OPTIONS fetchOptions) { return executeInContext(sessionToken, new IMethodAction<Map<OBJECT_ID, OBJECT>>() { diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapDataSetSqlMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetDataSetMethodExecutor.java similarity index 91% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapDataSetSqlMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetDataSetMethodExecutor.java index f7faa9bdabf32e368197bea5d9daabffb2d05720..b4f27f0b8ea5cafbb3f1aaf8ff040d775d7cd980 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapDataSetSqlMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetDataSetMethodExecutor.java @@ -31,8 +31,8 @@ import ch.ethz.sis.openbis.generic.server.asapi.v3.translator.entity.dataset.IDa * @author pkupczyk */ @Component -public class MapDataSetSqlMethodExecutor extends AbstractMapMethodExecutor<IDataSetId, Long, DataSet, DataSetFetchOptions> implements - IMapDataSetMethodExecutor +public class GetDataSetMethodExecutor extends AbstractGetMethodExecutor<IDataSetId, Long, DataSet, DataSetFetchOptions> implements + IGetDataSetMethodExecutor { @Autowired diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapExperimentSqlMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetExperimentMethodExecutor.java similarity index 93% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapExperimentSqlMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetExperimentMethodExecutor.java index 6462ea08799bfaac4dee49e33901aaf998830885..fd4a4275a4c2f26b0d395de9edc2c89196ee79a1 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapExperimentSqlMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetExperimentMethodExecutor.java @@ -37,8 +37,8 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE; * @author pkupczyk */ @Component -public class MapExperimentSqlMethodExecutor extends AbstractMapMethodExecutor<IExperimentId, Long, Experiment, ExperimentFetchOptions> - implements IMapExperimentMethodExecutor +public class GetExperimentMethodExecutor extends AbstractGetMethodExecutor<IExperimentId, Long, Experiment, ExperimentFetchOptions> + implements IGetExperimentMethodExecutor { @Autowired diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapMaterialSqlMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetMaterialMethodExecutor.java similarity index 91% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapMaterialSqlMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetMaterialMethodExecutor.java index ccf393167e283c88de96d0f9fa025b54ad813192..004ed0ff7fc444f15bbf5f608c0305f1c407b713 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapMaterialSqlMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetMaterialMethodExecutor.java @@ -31,8 +31,8 @@ import ch.ethz.sis.openbis.generic.server.asapi.v3.translator.entity.material.IM * @author pkupczyk */ @Component -public class MapMaterialSqlMethodExecutor extends AbstractMapMethodExecutor<IMaterialId, Long, Material, MaterialFetchOptions> implements - IMapMaterialMethodExecutor +public class GetMaterialMethodExecutor extends AbstractGetMethodExecutor<IMaterialId, Long, Material, MaterialFetchOptions> implements + IGetMaterialMethodExecutor { @Autowired diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapProjectSqlMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetProjectMethodExecutor.java similarity index 91% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapProjectSqlMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetProjectMethodExecutor.java index d18e6f272c994da0e195168043bb396af138dd59..f8a785f6a4605e55f2a77d30898081dc2c352589 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapProjectSqlMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetProjectMethodExecutor.java @@ -31,8 +31,8 @@ import ch.ethz.sis.openbis.generic.server.asapi.v3.translator.entity.project.IPr * @author pkupczyk */ @Component -public class MapProjectSqlMethodExecutor extends AbstractMapMethodExecutor<IProjectId, Long, Project, ProjectFetchOptions> implements - IMapProjectMethodExecutor +public class GetProjectMethodExecutor extends AbstractGetMethodExecutor<IProjectId, Long, Project, ProjectFetchOptions> implements + IGetProjectMethodExecutor { @Autowired diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapSampleSqlMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetSampleMethodExecutor.java similarity index 91% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapSampleSqlMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetSampleMethodExecutor.java index 4d765eba8d94ebe130c0bca468c2bbb35139d688..8b222c56fbff17b5ff9ab8f6814995c85eecd2fe 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapSampleSqlMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetSampleMethodExecutor.java @@ -31,8 +31,8 @@ import ch.ethz.sis.openbis.generic.server.asapi.v3.translator.entity.sample.ISam * @author pkupczyk */ @Component -public class MapSampleSqlMethodExecutor extends AbstractMapMethodExecutor<ISampleId, Long, Sample, SampleFetchOptions> implements - IMapSampleMethodExecutor +public class GetSampleMethodExecutor extends AbstractGetMethodExecutor<ISampleId, Long, Sample, SampleFetchOptions> implements + IGetSampleMethodExecutor { @Autowired diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapSpaceSqlMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetSpaceMethodExecutor.java similarity index 92% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapSpaceSqlMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetSpaceMethodExecutor.java index b83683c65ed933796450bbe8fdc36f4af9b32205..6ed755bac497a152bc607201e08331b07b5183e7 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapSpaceSqlMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetSpaceMethodExecutor.java @@ -31,7 +31,7 @@ import ch.ethz.sis.openbis.generic.server.asapi.v3.translator.entity.space.ISpac * @author pkupczyk */ @Component -public class MapSpaceSqlMethodExecutor extends AbstractMapMethodExecutor<ISpaceId, Long, Space, SpaceFetchOptions> implements IMapSpaceMethodExecutor +public class GetSpaceMethodExecutor extends AbstractGetMethodExecutor<ISpaceId, Long, Space, SpaceFetchOptions> implements IGetSpaceMethodExecutor { @Autowired diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapTagMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetTagMethodExecutor.java similarity index 96% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapTagMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetTagMethodExecutor.java index fe0e1586655162f2225a5af14a41966863eebb19..379cb69bd4a2efe7414d762b5b0b933dc2d384ab 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapTagMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetTagMethodExecutor.java @@ -37,8 +37,8 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.MetaprojectPE; * @author pkupczyk */ @Component -public class MapTagMethodExecutor extends AbstractMapMethodExecutor<ITagId, Long, Tag, TagFetchOptions> implements - IMapTagMethodExecutor +public class GetTagMethodExecutor extends AbstractGetMethodExecutor<ITagId, Long, Tag, TagFetchOptions> implements + IGetTagMethodExecutor { @Autowired diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapVocabularyTermMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetVocabularyTermMethodExecutor.java similarity index 96% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapVocabularyTermMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetVocabularyTermMethodExecutor.java index 8ac647572c1882d66c4946245004357f530e10c6..5413f3d0c3f5a49ec56720dea3127665a4aadf7b 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/MapVocabularyTermMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/GetVocabularyTermMethodExecutor.java @@ -37,8 +37,8 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.VocabularyTermPE; * @author pkupczyk */ @Component -public class MapVocabularyTermMethodExecutor extends AbstractMapMethodExecutor<IVocabularyTermId, Long, VocabularyTerm, VocabularyTermFetchOptions> - implements IMapVocabularyTermMethodExecutor +public class GetVocabularyTermMethodExecutor extends AbstractGetMethodExecutor<IVocabularyTermId, Long, VocabularyTerm, VocabularyTermFetchOptions> + implements IGetVocabularyTermMethodExecutor { @Autowired diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapDataSetMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetDataSetMethodExecutor.java similarity index 93% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapDataSetMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetDataSetMethodExecutor.java index bb4ea65b9250871105b3de57c01e11122745db9b..200cc7fe20e773ba5f6cae6621ae7bc2b0b3f776 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapDataSetMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetDataSetMethodExecutor.java @@ -23,7 +23,7 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.IDataSetId; /** * @author pkupczyk */ -public interface IMapDataSetMethodExecutor extends IMapMethodExecutor<IDataSetId, DataSet, DataSetFetchOptions> +public interface IGetDataSetMethodExecutor extends IGetMethodExecutor<IDataSetId, DataSet, DataSetFetchOptions> { } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapExperimentMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetExperimentMethodExecutor.java similarity index 94% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapExperimentMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetExperimentMethodExecutor.java index 453c3d95ad3d627d061d5e1638fea26f5932bc85..00a50cf3d79ea38c8369199d6d9ecedd179a9343 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapExperimentMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetExperimentMethodExecutor.java @@ -23,7 +23,7 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.IExperimentId; /** * @author pkupczyk */ -public interface IMapExperimentMethodExecutor extends IMapMethodExecutor<IExperimentId, Experiment, ExperimentFetchOptions> +public interface IGetExperimentMethodExecutor extends IGetMethodExecutor<IExperimentId, Experiment, ExperimentFetchOptions> { } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapMaterialMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetMaterialMethodExecutor.java similarity index 93% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapMaterialMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetMaterialMethodExecutor.java index 58ec833c1a0f91f072f6aac73c9b8ade598db072..bc67f397e80fe84bb2d584ce01d032078b499c8c 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapMaterialMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetMaterialMethodExecutor.java @@ -23,7 +23,7 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.material.id.IMaterialId; /** * @author pkupczyk */ -public interface IMapMaterialMethodExecutor extends IMapMethodExecutor<IMaterialId, Material, MaterialFetchOptions> +public interface IGetMaterialMethodExecutor extends IGetMethodExecutor<IMaterialId, Material, MaterialFetchOptions> { } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetMethodExecutor.java similarity index 86% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetMethodExecutor.java index bb2af142618768965bf9cbbcf87d94dfbdb7e018..0cb6eadf6a2534729f5086acb3181e8eb6364d44 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetMethodExecutor.java @@ -22,9 +22,9 @@ import java.util.Map; /** * @author pkupczyk */ -public interface IMapMethodExecutor<OBJECT_ID, OBJECT, FETCH_OPTIONS> +public interface IGetMethodExecutor<OBJECT_ID, OBJECT, FETCH_OPTIONS> { - public Map<OBJECT_ID, OBJECT> map(String sessionToken, List<? extends OBJECT_ID> objectIds, FETCH_OPTIONS fetchOptions); + public Map<OBJECT_ID, OBJECT> get(String sessionToken, List<? extends OBJECT_ID> objectIds, FETCH_OPTIONS fetchOptions); } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapProjectMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetProjectMethodExecutor.java similarity index 93% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapProjectMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetProjectMethodExecutor.java index cefea7f04be0fa234ff17e950bc1f5e0290f8f09..053c55c13b8df555ce252ebb5ac9f62b5ced4e10 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapProjectMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetProjectMethodExecutor.java @@ -23,7 +23,7 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.id.IProjectId; /** * @author pkupczyk */ -public interface IMapProjectMethodExecutor extends IMapMethodExecutor<IProjectId, Project, ProjectFetchOptions> +public interface IGetProjectMethodExecutor extends IGetMethodExecutor<IProjectId, Project, ProjectFetchOptions> { } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapSampleMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetSampleMethodExecutor.java similarity index 93% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapSampleMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetSampleMethodExecutor.java index 3e4153033475c0bb93b17244f73ec8de4723a843..8cff07bb3d44c456b6009d259bee10ffd5ebe3d8 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapSampleMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetSampleMethodExecutor.java @@ -23,7 +23,7 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.id.ISampleId; /** * @author pkupczyk */ -public interface IMapSampleMethodExecutor extends IMapMethodExecutor<ISampleId, Sample, SampleFetchOptions> +public interface IGetSampleMethodExecutor extends IGetMethodExecutor<ISampleId, Sample, SampleFetchOptions> { } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapSpaceMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetSpaceMethodExecutor.java similarity index 93% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapSpaceMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetSpaceMethodExecutor.java index d0e294fc5937368498ea4819a7d501ad8e468c88..fcd179c10137469c0e3cd492e09c5a728e9d4cc2 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapSpaceMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetSpaceMethodExecutor.java @@ -23,7 +23,7 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.space.id.ISpaceId; /** * @author pkupczyk */ -public interface IMapSpaceMethodExecutor extends IMapMethodExecutor<ISpaceId, Space, SpaceFetchOptions> +public interface IGetSpaceMethodExecutor extends IGetMethodExecutor<ISpaceId, Space, SpaceFetchOptions> { } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapTagMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetTagMethodExecutor.java similarity index 93% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapTagMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetTagMethodExecutor.java index 786475860a5b56570facd823a9d79b27b04ceb57..a2ac95e27b5d7a09a66a163267aa117f598285ca 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapTagMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetTagMethodExecutor.java @@ -23,7 +23,7 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.tag.id.ITagId; /** * @author pkupczyk */ -public interface IMapTagMethodExecutor extends IMapMethodExecutor<ITagId, Tag, TagFetchOptions> +public interface IGetTagMethodExecutor extends IGetMethodExecutor<ITagId, Tag, TagFetchOptions> { } diff --git a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapVocabularyTermMethodExecutor.java b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetVocabularyTermMethodExecutor.java similarity index 94% rename from openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapVocabularyTermMethodExecutor.java rename to openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetVocabularyTermMethodExecutor.java index b303ca2ef010965ffc7e0376254e0a550392e301..6384c01377308b192fe73f2cd2e14e9f007fac5d 100644 --- a/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IMapVocabularyTermMethodExecutor.java +++ b/openbis/source/java/ch/ethz/sis/openbis/generic/server/asapi/v3/executor/method/IGetVocabularyTermMethodExecutor.java @@ -23,7 +23,7 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.id.IVocabularyTermId; /** * @author pkupczyk */ -public interface IMapVocabularyTermMethodExecutor extends IMapMethodExecutor<IVocabularyTermId, VocabularyTerm, VocabularyTermFetchOptions> +public interface IGetVocabularyTermMethodExecutor extends IGetMethodExecutor<IVocabularyTermId, VocabularyTerm, VocabularyTermFetchOptions> { } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/openbis.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/openbis.js index 8a09498d7cfe7dc9efb3b13a6f5fcf522f60603f..8634b119831db486e7c7926d117603852b1febb2 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/openbis.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/api/v3/openbis.js @@ -322,12 +322,12 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { }); } - this.mapSpaces = function(ids, fetchOptions) { + this.getSpaces = function(ids, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ url : openbisUrl, data : { - "method" : "mapSpaces", + "method" : "getSpaces", "params" : [ thisFacade._private.sessionToken, ids, fetchOptions ] }, returnType : { @@ -337,12 +337,12 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { }); } - this.mapProjects = function(ids, fetchOptions) { + this.getProjects = function(ids, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ url : openbisUrl, data : { - "method" : "mapProjects", + "method" : "getProjects", "params" : [ thisFacade._private.sessionToken, ids, fetchOptions ] }, returnType : { @@ -352,12 +352,12 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { }); } - this.mapExperiments = function(ids, fetchOptions) { + this.getExperiments = function(ids, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ url : openbisUrl, data : { - "method" : "mapExperiments", + "method" : "getExperiments", "params" : [ thisFacade._private.sessionToken, ids, fetchOptions ] }, returnType : { @@ -367,12 +367,12 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { }); } - this.mapSamples = function(ids, fetchOptions) { + this.getSamples = function(ids, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ url : openbisUrl, data : { - "method" : "mapSamples", + "method" : "getSamples", "params" : [ thisFacade._private.sessionToken, ids, fetchOptions ] }, returnType : { @@ -382,12 +382,12 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { }); } - this.mapDataSets = function(ids, fetchOptions) { + this.getDataSets = function(ids, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ url : openbisUrl, data : { - "method" : "mapDataSets", + "method" : "getDataSets", "params" : [ thisFacade._private.sessionToken, ids, fetchOptions ] }, returnType : { @@ -397,12 +397,12 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { }); } - this.mapMaterials = function(ids, fetchOptions) { + this.getMaterials = function(ids, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ url : openbisUrl, data : { - "method" : "mapMaterials", + "method" : "getMaterials", "params" : [ thisFacade._private.sessionToken, ids, fetchOptions ] }, returnType : { @@ -412,12 +412,12 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { }); } - this.mapVocabularyTerms = function(ids, fetchOptions) { + this.getVocabularyTerms = function(ids, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ url : openbisUrl, data : { - "method" : "mapVocabularyTerms", + "method" : "getVocabularyTerms", "params" : [ thisFacade._private.sessionToken, ids, fetchOptions ] }, returnType : { @@ -427,12 +427,12 @@ define([ 'jquery', 'util/Json' ], function($, stjsUtil) { }); } - this.mapTags = function(ids, fetchOptions) { + this.getTags = function(ids, fetchOptions) { var thisFacade = this; return thisFacade._private.ajaxRequest({ url : openbisUrl, data : { - "method" : "mapTags", + "method" : "getTags", "params" : [ thisFacade._private.sessionToken, ids, fetchOptions ] }, returnType : { diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractDeletionTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractDeletionTest.java index a1c51daf7f12ef1dfbb1b0b0d40bd913b46d6e7a..dab8c252967dcb54cec899151dd38c74acc595b7 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractDeletionTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractDeletionTest.java @@ -86,7 +86,7 @@ public class AbstractDeletionTest extends AbstractTest creation.setProperty("DESCRIPTION", "a description"); List<ExperimentPermId> permIds = v3api.createExperiments(sessionToken, Collections.singletonList(creation)); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, permIds, new ExperimentFetchOptions()); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, permIds, new ExperimentFetchOptions()); List<Experiment> experiments = new ArrayList<Experiment>(map.values()); Assert.assertEquals(1, experiments.size()); @@ -106,7 +106,7 @@ public class AbstractDeletionTest extends AbstractTest creation.setExperimentId(experimentId); List<SamplePermId> permIds = v3api.createSamples(sessionToken, Collections.singletonList(creation)); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, permIds, new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, permIds, new SampleFetchOptions()); List<Sample> samples = new ArrayList<Sample>(map.values()); Assert.assertEquals(1, samples.size()); @@ -129,7 +129,7 @@ public class AbstractDeletionTest extends AbstractTest { String sessionToken = v3api.login(TEST_USER, PASSWORD); Map<IProjectId, Project> map = - v3api.mapProjects(sessionToken, Collections.singletonList(projectId), new ProjectFetchOptions()); + v3api.getProjects(sessionToken, Collections.singletonList(projectId), new ProjectFetchOptions()); Assert.assertEquals(exists ? 1 : 0, map.size()); } @@ -147,7 +147,7 @@ public class AbstractDeletionTest extends AbstractTest { String sessionToken = v3api.login(TEST_USER, PASSWORD); Map<IExperimentId, Experiment> map = - v3api.mapExperiments(sessionToken, Collections.singletonList(experimentId), new ExperimentFetchOptions()); + v3api.getExperiments(sessionToken, Collections.singletonList(experimentId), new ExperimentFetchOptions()); Assert.assertEquals(exists ? 1 : 0, map.size()); } @@ -164,7 +164,7 @@ public class AbstractDeletionTest extends AbstractTest private void assertSampleExists(ISampleId sampleId, boolean exists) { String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Collections.singletonList(sampleId), new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Collections.singletonList(sampleId), new SampleFetchOptions()); Assert.assertEquals(exists ? 1 : 0, map.size()); } @@ -181,7 +181,7 @@ public class AbstractDeletionTest extends AbstractTest private void assertMaterialExists(IMaterialId materialId, boolean exists) { String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Collections.singletonList(materialId), new MaterialFetchOptions()); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Collections.singletonList(materialId), new MaterialFetchOptions()); Assert.assertEquals(exists ? 1 : 0, map.size()); } diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractVocabularyTermTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractVocabularyTermTest.java index a6dc075fcf54b0079750c275671b4d08aa65dbbe..24f8e6a85e4a062f1d16691cbfcbb7aa5d477fca 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractVocabularyTermTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AbstractVocabularyTermTest.java @@ -144,7 +144,7 @@ public class AbstractVocabularyTermTest extends AbstractTest ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); fetchOptions.withProperties(); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(id), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); v3api.logout(sessionToken); @@ -161,7 +161,7 @@ public class AbstractVocabularyTermTest extends AbstractTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withProperties(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(id), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); v3api.logout(sessionToken); @@ -178,7 +178,7 @@ public class AbstractVocabularyTermTest extends AbstractTest DataSetFetchOptions fetchOptions = new DataSetFetchOptions(); fetchOptions.withProperties(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(id), fetchOptions); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); return map.get(id); @@ -193,7 +193,7 @@ public class AbstractVocabularyTermTest extends AbstractTest MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withProperties(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(id), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); return map.get(id); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AssignSampleToExperimentTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AssignSampleToExperimentTest.java index af0d091e715d3fb8c3e7a5918364216be14103bc..3568656b70f8bfb90d1e4407f376e4f6f6423ff0 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AssignSampleToExperimentTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/AssignSampleToExperimentTest.java @@ -58,7 +58,7 @@ public class AssignSampleToExperimentTest extends AbstractAssignmentSampleToExpe ExperimentFetchOptions efo = new ExperimentFetchOptions(); efo.withSamples(); - Map<IExperimentId, Experiment> eMap = v3api.mapExperiments(userSessionToken, Arrays.asList(eId), efo); + Map<IExperimentId, Experiment> eMap = v3api.getExperiments(userSessionToken, Arrays.asList(eId), efo); Experiment e = eMap.get(eId); List<SampleUpdate> suList = new LinkedList<SampleUpdate>(); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateDataSetTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateDataSetTest.java index 3263b1068e79495e3cd7a87546f0120c5e94b3ba..b998100110df62b6aa6ff4f63869ceee1869670b 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateDataSetTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateDataSetTest.java @@ -1717,7 +1717,7 @@ public class CreateDataSetTest extends AbstractDataSetTest private DataSet createDataSet(String sessionToken, DataSetCreation creation, DataSetFetchOptions fo) { List<DataSetPermId> permIds = v3api.createDataSets(sessionToken, Arrays.asList(creation)); - Map<IDataSetId, DataSet> dataSets = v3api.mapDataSets(sessionToken, permIds, fo); + Map<IDataSetId, DataSet> dataSets = v3api.getDataSets(sessionToken, permIds, fo); return dataSets.values().iterator().next(); } diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateExperimentTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateExperimentTest.java index f7064097056b14ebee16fa6c5f5d5786a13ffef3..605d5c75d8a03fb37a7e976662221ccc4eb323c3 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateExperimentTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateExperimentTest.java @@ -237,7 +237,7 @@ public class CreateExperimentTest extends AbstractExperimentTest fetchOptions.withTags(); List<ExperimentPermId> permIds = v3api.createExperiments(sessionToken, Arrays.asList(creation)); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, permIds, fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, permIds, fetchOptions); List<Experiment> experiments = new ArrayList<Experiment>(map.values()); assertEquals(experiments.size(), 1); @@ -277,7 +277,7 @@ public class CreateExperimentTest extends AbstractExperimentTest fetchOptions.withProperties(); List<ExperimentPermId> permIds = v3api.createExperiments(sessionToken, Arrays.asList(creation)); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, permIds, fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, permIds, fetchOptions); List<Experiment> experiments = new ArrayList<Experiment>(map.values()); assertEquals(experiments.size(), 1); @@ -307,7 +307,7 @@ public class CreateExperimentTest extends AbstractExperimentTest fetchOptions.withTags(); List<ExperimentPermId> permIds = v3api.createExperiments(sessionToken, Arrays.asList(creation)); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, permIds, fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, permIds, fetchOptions); List<Experiment> experiments = new ArrayList<Experiment>(map.values()); assertEquals(experiments.size(), 1); @@ -433,7 +433,7 @@ public class CreateExperimentTest extends AbstractExperimentTest fetchOptions.withAttachments().withContent(); fetchOptions.withTags(); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, permIds, fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, permIds, fetchOptions); List<Experiment> experiments = new ArrayList<Experiment>(map.values()); assertEquals(experiments.size(), 1); @@ -496,7 +496,7 @@ public class CreateExperimentTest extends AbstractExperimentTest experimentFetchOptions.withAttachments().withContent(); experimentFetchOptions.withTags(); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, result, experimentFetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, result, experimentFetchOptions); List<Experiment> experiments = new ArrayList<Experiment>(map.values()); Assert.assertEquals(2, experiments.size()); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateMaterialTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateMaterialTest.java index 48dbe1f9e93612c9727252ae53bd8a6353cdafab..fbfc7abe00b0ff7e9d705b626b286a1a9341bb72 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateMaterialTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateMaterialTest.java @@ -58,7 +58,7 @@ public class CreateMaterialTest extends AbstractSampleTest List<MaterialPermId> materialIds = v3api.createMaterials(sessionToken, Arrays.asList(m1, m2)); MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, materialIds, fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, materialIds, fetchOptions); AssertionUtil.assertCollectionSize(map.values(), 2); Material material = map.get(new MaterialPermId("1982", "GENE")); @@ -89,7 +89,7 @@ public class CreateMaterialTest extends AbstractSampleTest MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withProperties(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, materialIds, fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, materialIds, fetchOptions); AssertionUtil.assertCollectionSize(map.values(), 1); Material material = map.get(new MaterialPermId("1982", "GENE")); @@ -114,7 +114,7 @@ public class CreateMaterialTest extends AbstractSampleTest MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withTags(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, materialIds, fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, materialIds, fetchOptions); AssertionUtil.assertCollectionSize(map.values(), 1); Material material = map.get(new MaterialPermId("NEW_GENE_WITH_TAGS", "GENE")); @@ -157,7 +157,7 @@ public class CreateMaterialTest extends AbstractSampleTest MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withMaterialPropertiesUsing(fetchOptions); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(m1id), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(m1id), fetchOptions); AssertionUtil.assertCollectionSize(map.values(), 1); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateProjectTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateProjectTest.java index 6200ebce89a736d4d16400ecd77629c205553c41..bfd8df35022d3514c8ebfceb4602ebcc0035418c 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateProjectTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateProjectTest.java @@ -233,7 +233,7 @@ public class CreateProjectTest extends AbstractTest fetchOptions.withLeader(); fetchOptions.withAttachments().withContent(); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, permIds, fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, permIds, fetchOptions); Assert.assertEquals(2, map.size()); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSampleTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSampleTest.java index 9df31a82ac803d1169d7341b9a99e3b9a810da91..d74c97a9f5fcb8d4b7ddc00d6d9e074d0676992a 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSampleTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSampleTest.java @@ -281,7 +281,7 @@ public class CreateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withSpace(); fetchOptions.withExperiment(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, permIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, permIds, fetchOptions); Sample sample = map.get(permIds.get(0)); assertEquals(sample.getCode(), "SAMPLE_WITH_EXPERIMENT"); assertEquals(sample.getSpace().getCode(), "CISD"); @@ -302,7 +302,7 @@ public class CreateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withSpace(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, permIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, permIds, fetchOptions); Sample sample = map.values().iterator().next(); assertEquals(sample.getCode(), "SHARED_SAMPLE_TEST"); @@ -468,7 +468,7 @@ public class CreateSampleTest extends AbstractSampleTest fetchOptions.withChildrenUsing(fetchOptions); fetchOptions.withParentsUsing(fetchOptions); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); Sample parent = samples.get(0); @@ -716,7 +716,7 @@ public class CreateSampleTest extends AbstractSampleTest fetchOptions.withComponents(); fetchOptions.withContainer(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); Sample container = samples.get(0); @@ -814,7 +814,7 @@ public class CreateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withContainer(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 2); @@ -840,7 +840,7 @@ public class CreateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withContainer(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 2); @@ -915,7 +915,7 @@ public class CreateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withProperties(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); Sample foundSample = samples.get(0); @@ -969,7 +969,7 @@ public class CreateSampleTest extends AbstractSampleTest fetchOptions.withTags(); fetchOptions.withParents(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); Sample sampleWithSpace1 = samples.get(0); @@ -1015,7 +1015,7 @@ public class CreateSampleTest extends AbstractSampleTest onlyParentsAndChildren.withParents(); onlyParentsAndChildren.withChildren(); - map = v3api.mapSamples(sessionToken, sample2Parents, onlyParentsAndChildren); + map = v3api.getSamples(sessionToken, sample2Parents, onlyParentsAndChildren); samples = new ArrayList<Sample>(map.values()); for (Sample sample : samples) diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSpaceTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSpaceTest.java index d2a0840197098c560ab1ec91a01326a91d4e6b30..31964eb990888cf1d15514a746eb8e6dc9ce1aeb 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSpaceTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateSpaceTest.java @@ -124,7 +124,7 @@ public class CreateSpaceTest extends AbstractTest creation.setDescription("a new description"); List<SpacePermId> permIds = v3api.createSpaces(sessionToken, Arrays.asList(creation)); - Map<ISpaceId, Space> map = v3api.mapSpaces(sessionToken, permIds, new SpaceFetchOptions()); + Map<ISpaceId, Space> map = v3api.getSpaces(sessionToken, permIds, new SpaceFetchOptions()); assertEquals(map.size(), 1); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateTagTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateTagTest.java index 33b77f03c9e3076e39c00e925d3cca23b5917d93..8632c4b944cb391e7f39834c5bea727282dd93d4 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateTagTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/CreateTagTest.java @@ -217,7 +217,7 @@ public class CreateTagTest extends AbstractTest fetchOptions.withDataSets(); fetchOptions.withMaterials(); - Map<ITagId, Tag> map = v3api.mapTags(sessionToken, ids, fetchOptions); + Map<ITagId, Tag> map = v3api.getTags(sessionToken, ids, fetchOptions); assertEquals(map.size(), 1); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/DeleteSpaceTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/DeleteSpaceTest.java index 8a7e919d71276fd528a48de54d2eedd9916e78a3..6fbc6044c5c5bcbedc8233a7caccb7a2d7e8b724 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/DeleteSpaceTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/DeleteSpaceTest.java @@ -48,7 +48,7 @@ public class DeleteSpaceTest extends AbstractDeletionTest List<SpacePermId> permIds = v3api.createSpaces(sessionToken, Arrays.asList(creation)); - Map<ISpaceId, Space> map = v3api.mapSpaces(sessionToken, permIds, new SpaceFetchOptions()); + Map<ISpaceId, Space> map = v3api.getSpaces(sessionToken, permIds, new SpaceFetchOptions()); assertEquals(map.size(), 1); SpaceDeletionOptions options = new SpaceDeletionOptions(); @@ -56,7 +56,7 @@ public class DeleteSpaceTest extends AbstractDeletionTest v3api.deleteSpaces(sessionToken, permIds, options); - map = v3api.mapSpaces(sessionToken, permIds, new SpaceFetchOptions()); + map = v3api.getSpaces(sessionToken, permIds, new SpaceFetchOptions()); assertEquals(map.size(), 0); } @@ -88,7 +88,7 @@ public class DeleteSpaceTest extends AbstractDeletionTest final List<SpacePermId> permIds = v3api.createSpaces(adminSessionToken, Arrays.asList(creation)); - Map<ISpaceId, Space> map = v3api.mapSpaces(adminSessionToken, permIds, new SpaceFetchOptions()); + Map<ISpaceId, Space> map = v3api.getSpaces(adminSessionToken, permIds, new SpaceFetchOptions()); assertEquals(map.size(), 1); final String sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapDataSetTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetDataSetTest.java similarity index 90% rename from openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapDataSetTest.java rename to openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetDataSetTest.java index e9482f1c98de9642b2c96acad42b0039205b373a..59e808b2e98458623f0347319668e4684f1a9532 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapDataSetTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetDataSetTest.java @@ -62,11 +62,11 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.tag.fetchoptions.TagFetchOptions /** * @author pkupczyk */ -public class MapDataSetTest extends AbstractDataSetTest +public class GetDataSetTest extends AbstractDataSetTest { @Test - public void testMapByPermId() + public void testGetByPermId() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -74,7 +74,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetPermId permId2 = new DataSetPermId("20110509092359990-10"); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId1, permId2), + v3api.getDataSets(sessionToken, Arrays.asList(permId1, permId2), new DataSetFetchOptions()); assertEquals(map.size(), 2); @@ -90,14 +90,14 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapByPermIdCaseInsensitive() + public void testGetByPermIdCaseInsensitive() { String sessionToken = v3api.login(TEST_USER, PASSWORD); DataSetPermId permId1 = new DataSetPermId("root_CONTAINER"); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId1), + v3api.getDataSets(sessionToken, Arrays.asList(permId1), new DataSetFetchOptions()); assertEquals(map.size(), 1); @@ -112,7 +112,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapByIdsNonexistent() + public void testGetByIdsNonexistent() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -120,7 +120,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetPermId permId2 = new DataSetPermId("NONEXISTENT"); DataSetPermId permId3 = new DataSetPermId("20110509092359990-10"); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(permId1, permId2, permId3), new DataSetFetchOptions()); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(permId1, permId2, permId3), new DataSetFetchOptions()); assertEquals(map.size(), 2); @@ -135,7 +135,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapByIdsDuplicated() + public void testGetByIdsDuplicated() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -143,7 +143,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetPermId permId2 = new DataSetPermId("20081105092159111-1"); DataSetPermId permId3 = new DataSetPermId("20110509092359990-10"); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(permId1, permId2, permId3), new DataSetFetchOptions()); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(permId1, permId2, permId3), new DataSetFetchOptions()); assertEquals(map.size(), 2); @@ -158,7 +158,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapByIdsUnauthorized() + public void testGetByIdsUnauthorized() { DataSetPermId permId1 = new DataSetPermId("20081105092159111-1"); DataSetPermId permId2 = new DataSetPermId("20120619092259000-22"); @@ -166,13 +166,13 @@ public class MapDataSetTest extends AbstractDataSetTest List<? extends IDataSetId> ids = Arrays.asList(permId1, permId2); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, ids, new DataSetFetchOptions()); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, ids, new DataSetFetchOptions()); assertEquals(map.size(), 2); v3api.logout(sessionToken); sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); - map = v3api.mapDataSets(sessionToken, ids, new DataSetFetchOptions()); + map = v3api.getDataSets(sessionToken, ids, new DataSetFetchOptions()); assertEquals(map.size(), 1); @@ -182,13 +182,13 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithFetchOptionsEmpty() + public void testGetWithFetchOptionsEmpty() { String sessionToken = v3api.login(TEST_USER, PASSWORD); DataSetPermId permId = new DataSetPermId("20081105092159111-1"); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Collections.singletonList(permId), new DataSetFetchOptions()); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Collections.singletonList(permId), new DataSetFetchOptions()); assertEquals(map.size(), 1); @@ -217,7 +217,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithType() + public void testGetWithType() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -228,7 +228,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withType(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId, permId2), + v3api.getDataSets(sessionToken, Arrays.asList(permId, permId2), fetchOptions); assertEquals(map.size(), 2); @@ -276,17 +276,17 @@ public class MapDataSetTest extends AbstractDataSetTest v3api.logout(sessionToken); } - + @Test - public void testMapWithTypeWithPropertyAssignments() + public void testGetWithTypeWithPropertyAssignments() { String sessionToken = v3api.login(TEST_USER, PASSWORD); DataSetPermId permId = new DataSetPermId("20081105092159111-1"); DataSetFetchOptions fetchOptions = new DataSetFetchOptions(); fetchOptions.withType().withPropertyAssignments().sortBy().code().desc(); - - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(permId), fetchOptions); - + + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); + assertEquals(map.size(), 1); DataSet dataSet = map.get(permId); DataSetType type = dataSet.getType(); @@ -304,9 +304,9 @@ public class MapDataSetTest extends AbstractDataSetTest assertEquals(propertyAssignments.size(), 4); v3api.logout(sessionToken); } - + @Test - public void testMapWithExperiment() + public void testGetWithExperiment() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -316,7 +316,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withExperiment(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId), + v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(map.size(), 1); @@ -340,7 +340,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithSample() + public void testGetWithSample() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -350,7 +350,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withSample(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId), + v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(map.size(), 1); @@ -374,7 +374,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithProperties() + public void testGetWithProperties() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -384,7 +384,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withProperties(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId), + v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(map.size(), 1); @@ -412,7 +412,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithChildren() + public void testGetWithChildren() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -422,7 +422,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withChildren(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId), + v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(map.size(), 1); @@ -451,7 +451,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithParents() + public void testGetWithParents() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -461,7 +461,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withParents(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId), + v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(map.size(), 1); @@ -490,7 +490,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithComponents() + public void testGetWithComponents() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -500,7 +500,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withComponents(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId), + v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(map.size(), 1); @@ -528,7 +528,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithContainers() + public void testGetWithContainers() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -538,7 +538,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withContainers(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId), + v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(map.size(), 1); @@ -566,7 +566,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithPhysicalDataForPhysicalDataSet() + public void testGetWithPhysicalDataForPhysicalDataSet() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -578,7 +578,7 @@ public class MapDataSetTest extends AbstractDataSetTest physicalDataFetchOptions.withLocatorType(); physicalDataFetchOptions.withStorageFormat(); - Map<IDataSetId, DataSet> dataSets = v3api.mapDataSets(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IDataSetId, DataSet> dataSets = v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(dataSets.size(), 1); DataSet dataSet = dataSets.get(permId); @@ -620,7 +620,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithPhysicalDataForNonPhysicalDataSet() + public void testGetWithPhysicalDataForNonPhysicalDataSet() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -628,7 +628,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetFetchOptions fetchOptions = new DataSetFetchOptions(); fetchOptions.withPhysicalData(); - Map<IDataSetId, DataSet> dataSets = v3api.mapDataSets(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IDataSetId, DataSet> dataSets = v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(dataSets.size(), 1); DataSet dataSet = dataSets.get(permId); @@ -638,7 +638,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithLinkedDataForLinkDataSet() + public void testGetWithLinkedDataForLinkDataSet() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -648,7 +648,7 @@ public class MapDataSetTest extends AbstractDataSetTest LinkedDataFetchOptions linkedDataFetchOptions = fetchOptions.withLinkedData(); linkedDataFetchOptions.withExternalDms(); - Map<IDataSetId, DataSet> dataSets = v3api.mapDataSets(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IDataSetId, DataSet> dataSets = v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(dataSets.size(), 1); DataSet dataSet = dataSets.get(permId); @@ -676,7 +676,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithLinkedDataForNonLinkDataSet() + public void testGetWithLinkedDataForNonLinkDataSet() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -684,7 +684,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetFetchOptions fetchOptions = new DataSetFetchOptions(); fetchOptions.withLinkedData(); - Map<IDataSetId, DataSet> dataSets = v3api.mapDataSets(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IDataSetId, DataSet> dataSets = v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(dataSets.size(), 1); DataSet dataSet = dataSets.get(permId); @@ -694,7 +694,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithModifier() + public void testGetWithModifier() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -704,7 +704,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withModifier(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId), + v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(1, map.size()); @@ -729,7 +729,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithRegistrator() + public void testGetWithRegistrator() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -739,7 +739,7 @@ public class MapDataSetTest extends AbstractDataSetTest fetchOptions.withRegistrator(); Map<IDataSetId, DataSet> map = - v3api.mapDataSets(sessionToken, Arrays.asList(permId), + v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(1, map.size()); @@ -763,7 +763,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithTags() + public void testGetWithTags() { String sessionToken = v3api.login(TEST_USER, PASSWORD); DataSetFetchOptions fetchOptions = new DataSetFetchOptions(); @@ -772,7 +772,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetPermId permId = new DataSetPermId("20120619092259000-22"); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Collections.singletonList(permId), fetchOptions); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Collections.singletonList(permId), fetchOptions); assertEquals(map.size(), 1); @@ -803,7 +803,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithMaterialProperties() + public void testGetWithMaterialProperties() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -813,7 +813,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetPermId permId = new DataSetPermId("20081105092159111-1"); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(permId), fetchOptions); DataSet data = map.get(permId); @@ -834,7 +834,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithHistoryEmpty() + public void testGetWithHistoryEmpty() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -843,7 +843,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetFetchOptions fetchOptions = new DataSetFetchOptions(); fetchOptions.withHistory(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(id), fetchOptions); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); DataSet dataSet = map.get(id); @@ -856,7 +856,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithHistoryProperty() + public void testGetWithHistoryProperty() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -871,7 +871,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetFetchOptions fetchOptions = new DataSetFetchOptions(); fetchOptions.withHistory(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(id), fetchOptions); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); DataSet dataSet = map.get(id); @@ -887,7 +887,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithHistoryExperiment() + public void testGetWithHistoryExperiment() { IDataSetId id = new DataSetPermId("COMPONENT_1A"); @@ -899,7 +899,7 @@ public class MapDataSetTest extends AbstractDataSetTest update2.setDataSetId(id); update2.setExperimentId(new ExperimentIdentifier("/CISD/DEFAULT/EXP-REUSE")); - List<HistoryEntry> history = testMapWithHistory(update, update2); + List<HistoryEntry> history = testGetWithHistory(update, update2); assertEquals(history.size(), 1); RelationHistoryEntry entry = (RelationHistoryEntry) history.get(0); @@ -908,7 +908,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithHistorySample() + public void testGetWithHistorySample() { IDataSetId id = new DataSetPermId("COMPONENT_1A"); @@ -920,7 +920,7 @@ public class MapDataSetTest extends AbstractDataSetTest update2.setDataSetId(id); update2.setSampleId(new SampleIdentifier("/CISD/3VCP6")); - List<HistoryEntry> history = testMapWithHistory(update, update2); + List<HistoryEntry> history = testGetWithHistory(update, update2); assertEquals(history.size(), 1); RelationHistoryEntry entry = (RelationHistoryEntry) history.get(0); @@ -929,7 +929,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithHistoryContainer() + public void testGetWithHistoryContainer() { IDataSetId id = new DataSetPermId("COMPONENT_1A"); @@ -941,7 +941,7 @@ public class MapDataSetTest extends AbstractDataSetTest update2.setDataSetId(id); update2.getContainerIds().set(new DataSetPermId("CONTAINER_1")); - List<HistoryEntry> history = testMapWithHistory(update, update2); + List<HistoryEntry> history = testGetWithHistory(update, update2); assertEquals(history.size(), 1); RelationHistoryEntry entry = (RelationHistoryEntry) history.get(0); @@ -950,7 +950,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithHistoryComponents() + public void testGetWithHistoryComponents() { IDataSetId id = new DataSetPermId("CONTAINER_1"); @@ -962,7 +962,7 @@ public class MapDataSetTest extends AbstractDataSetTest update2.setDataSetId(id); update2.getComponentIds().set(new DataSetPermId("COMPONENT_1A")); - List<HistoryEntry> history = testMapWithHistory(update, update2); + List<HistoryEntry> history = testGetWithHistory(update, update2); assertEquals(history.size(), 1); RelationHistoryEntry entry = (RelationHistoryEntry) history.get(0); @@ -971,7 +971,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithHistoryParent() + public void testGetWithHistoryParent() { IDataSetId id = new DataSetPermId("COMPONENT_1A"); @@ -983,7 +983,7 @@ public class MapDataSetTest extends AbstractDataSetTest update2.setDataSetId(id); update2.getParentIds().set(new DataSetPermId("CONTAINER_1")); - List<HistoryEntry> history = testMapWithHistory(update, update2); + List<HistoryEntry> history = testGetWithHistory(update, update2); assertEquals(history.size(), 1); RelationHistoryEntry entry = (RelationHistoryEntry) history.get(0); @@ -992,7 +992,7 @@ public class MapDataSetTest extends AbstractDataSetTest } @Test - public void testMapWithHistoryChild() + public void testGetWithHistoryChild() { IDataSetId id = new DataSetPermId("CONTAINER_1"); @@ -1004,7 +1004,7 @@ public class MapDataSetTest extends AbstractDataSetTest update2.setDataSetId(id); update2.getChildIds().set(new DataSetPermId("COMPONENT_1A")); - List<HistoryEntry> history = testMapWithHistory(update, update2); + List<HistoryEntry> history = testGetWithHistory(update, update2); assertEquals(history.size(), 1); RelationHistoryEntry entry = (RelationHistoryEntry) history.get(0); @@ -1012,7 +1012,7 @@ public class MapDataSetTest extends AbstractDataSetTest assertEquals(entry.getRelatedObjectId(), new DataSetPermId("COMPONENT_2A")); } - private List<HistoryEntry> testMapWithHistory(DataSetUpdate... updates) + private List<HistoryEntry> testGetWithHistory(DataSetUpdate... updates) { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1026,7 +1026,7 @@ public class MapDataSetTest extends AbstractDataSetTest DataSetFetchOptions fetchOptions = new DataSetFetchOptions(); fetchOptions.withHistory(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(id), fetchOptions); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); DataSet dataSet = map.get(id); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapExperimentTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetExperimentTest.java similarity index 91% rename from openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapExperimentTest.java rename to openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetExperimentTest.java index 13139256c072e89dcf8d4569fd0e3db5c2cb3821..d7359f340049801dfbf7e015e4bd1a43deabf9ca 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapExperimentTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetExperimentTest.java @@ -70,11 +70,11 @@ import ch.systemsx.cisd.common.test.AssertionUtil; /** * @author pkupczyk */ -public class MapExperimentTest extends AbstractExperimentTest +public class GetExperimentTest extends AbstractExperimentTest { @Test - public void testMapByPermId() + public void testGetByPermId() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -82,7 +82,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId2 = new ExperimentPermId("200811050952663-1029"); Map<IExperimentId, Experiment> map = - v3api.mapExperiments(sessionToken, Arrays.asList(permId1, permId2), + v3api.getExperiments(sessionToken, Arrays.asList(permId1, permId2), new ExperimentFetchOptions()); assertEquals(2, map.size()); @@ -98,7 +98,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapByIdentifier() + public void testGetByIdentifier() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -107,7 +107,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentIdentifier identifier3 = new ExperimentIdentifier("/CISD/NEMO/EXP10"); Map<IExperimentId, Experiment> map = - v3api.mapExperiments(sessionToken, + v3api.getExperiments(sessionToken, Arrays.asList(identifier1, identifier2, identifier3), new ExperimentFetchOptions()); @@ -126,14 +126,14 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapByIdentifierCaseInsensitive() + public void testGetByIdentifierCaseInsensitive() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentIdentifier identifier1 = new ExperimentIdentifier("/cisD/Noe/EXP-test-2"); Map<IExperimentId, Experiment> map = - v3api.mapExperiments(sessionToken, + v3api.getExperiments(sessionToken, Arrays.asList(identifier1), new ExperimentFetchOptions()); @@ -149,7 +149,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapByIdsNonexistent() + public void testGetByIdsNonexistent() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -166,7 +166,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentIdentifier identifier8 = new ExperimentIdentifier("/CISD/NEMO/NONEXISTENT_EXPERIMENT"); Map<IExperimentId, Experiment> map = - v3api.mapExperiments(sessionToken, + v3api.getExperiments(sessionToken, Arrays.asList(identifier1, identifier2, identifier3, identifier4, identifier5, identifier6, permId1, permId2, identifier7, permId3, identifier8), new ExperimentFetchOptions()); @@ -192,7 +192,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapByIdsDifferent() + public void testGetByIdsDifferent() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -201,7 +201,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentIdentifier identifier2 = new ExperimentIdentifier("/CISD/NEMO/EXP11"); Map<IExperimentId, Experiment> map = - v3api.mapExperiments(sessionToken, Arrays.asList(identifier1, permId, identifier2), new ExperimentFetchOptions()); + v3api.getExperiments(sessionToken, Arrays.asList(identifier1, permId, identifier2), new ExperimentFetchOptions()); assertEquals(3, map.size()); @@ -218,7 +218,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapByIdsDuplicated() + public void testGetByIdsDuplicated() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -229,7 +229,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId2 = new ExperimentPermId("200811050951882-1028"); Map<IExperimentId, Experiment> map = - v3api.mapExperiments(sessionToken, Arrays.asList(identifier1, permId1, identifier2, permId2), new ExperimentFetchOptions()); + v3api.getExperiments(sessionToken, Arrays.asList(identifier1, permId1, identifier2, permId2), new ExperimentFetchOptions()); assertEquals(3, map.size()); @@ -248,7 +248,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapByIdsUnauthorized() + public void testGetByIdsUnauthorized() { ExperimentIdentifier identifier1 = new ExperimentIdentifier("/CISD/NEMO/EXP1"); ExperimentIdentifier identifier2 = new ExperimentIdentifier("/TEST-SPACE/TEST-PROJECT/EXP-SPACE-TEST"); @@ -258,13 +258,13 @@ public class MapExperimentTest extends AbstractExperimentTest List<? extends IExperimentId> ids = Arrays.asList(identifier1, identifier2, identifier3, identifier4); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, ids, new ExperimentFetchOptions()); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, ids, new ExperimentFetchOptions()); assertEquals(map.size(), 4); v3api.logout(sessionToken); sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); - map = v3api.mapExperiments(sessionToken, ids, new ExperimentFetchOptions()); + map = v3api.getExperiments(sessionToken, ids, new ExperimentFetchOptions()); assertEquals(map.size(), 2); @@ -279,13 +279,13 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithFetchOptionsEmpty() + public void testGetWithFetchOptionsEmpty() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentPermId permId = new ExperimentPermId("200811050951882-1028"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Collections.singletonList(permId), new ExperimentFetchOptions()); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Collections.singletonList(permId), new ExperimentFetchOptions()); assertEquals(1, map.size()); @@ -308,7 +308,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithType() + public void testGetWithType() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -316,7 +316,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200811050951882-1028"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); assertEquals(1, map.size()); @@ -342,15 +342,15 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithTypeAndPropertyAssignments() + public void testGetWithTypeAndPropertyAssignments() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); fetchOptions.withType().withPropertyAssignments().sortBy().code().desc(); ExperimentPermId permId = new ExperimentPermId("200811050951882-1028"); - - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(permId), fetchOptions); - + + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(permId), fetchOptions); + assertEquals(1, map.size()); Experiment experiment = map.get(permId); ExperimentType type = experiment.getType(); @@ -368,9 +368,9 @@ public class MapExperimentTest extends AbstractExperimentTest assertEquals(propertyAssignments.size(), 3); v3api.logout(sessionToken); } - + @Test - public void testMapWithTypeReused() + public void testGetWithTypeReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -379,7 +379,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentIdentifier identifier1 = new ExperimentIdentifier("/CISD/NEMO/EXP1"); ExperimentIdentifier identifier2 = new ExperimentIdentifier("/CISD/NEMO/EXP11"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(identifier1, identifier2), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(identifier1, identifier2), fetchOptions); assertEquals(2, map.size()); Experiment experiment1 = map.get(identifier1); @@ -394,7 +394,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithAttachment() + public void testGetWithAttachment() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -402,7 +402,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200811050951882-1028"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); assertEquals(1, map.size()); @@ -433,7 +433,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test() - public void testMapWithProject() + public void testGetWithProject() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -441,7 +441,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200811050951882-1028"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); assertEquals(1, map.size()); @@ -465,7 +465,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test() - public void testMapWithProjectReused() + public void testGetWithProjectReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -474,7 +474,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentIdentifier identifier1 = new ExperimentIdentifier("/CISD/NEMO/EXP1"); ExperimentIdentifier identifier2 = new ExperimentIdentifier("/CISD/NEMO/EXP11"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(identifier1, identifier2), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(identifier1, identifier2), fetchOptions); assertEquals(2, map.size()); Experiment experiment1 = map.get(identifier1); @@ -489,7 +489,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithProperties() + public void testGetWithProperties() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -497,7 +497,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200811050951882-1028"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); assertEquals(1, map.size()); @@ -520,7 +520,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithRegistrator() + public void testGetWithRegistrator() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -528,7 +528,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200811050951882-1028"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); assertEquals(1, map.size()); @@ -549,7 +549,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test() - public void testMapWithRegistratorReused() + public void testGetWithRegistratorReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -558,7 +558,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentIdentifier identifier1 = new ExperimentIdentifier("/CISD/NEMO/EXP1"); ExperimentIdentifier identifier2 = new ExperimentIdentifier("/CISD/NEMO/EXP11"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(identifier1, identifier2), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(identifier1, identifier2), fetchOptions); assertEquals(2, map.size()); Experiment experiment1 = map.get(identifier1); @@ -573,7 +573,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithModifier() + public void testGetWithModifier() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -581,7 +581,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200811050951882-1028"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); assertEquals(1, map.size()); @@ -602,7 +602,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test() - public void testMapWithModifierReused() + public void testGetWithModifierReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -611,7 +611,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentIdentifier identifier1 = new ExperimentIdentifier("/CISD/NEMO/EXP1"); ExperimentIdentifier identifier2 = new ExperimentIdentifier("/CISD/NEMO/EXP10"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(identifier1, identifier2), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(identifier1, identifier2), fetchOptions); assertEquals(2, map.size()); Experiment experiment1 = map.get(identifier1); @@ -626,7 +626,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithTags() + public void testGetWithTags() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -634,7 +634,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200811050952663-1030"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Collections.singletonList(permId), fetchOptions); assertEquals(1, map.size()); @@ -661,7 +661,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithTagsReused() + public void testGetWithTagsReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -670,7 +670,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId1 = new ExperimentPermId("200811050952663-1030"); ExperimentPermId permId2 = new ExperimentPermId("201206190940555-1032"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); assertEquals(2, map.size()); Experiment experiment1 = map.get(permId1); @@ -684,7 +684,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithDataSets() + public void testGetWithDataSets() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -692,7 +692,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200902091239077-1033"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(permId), fetchOptions); Experiment experiment = map.get(permId); @@ -708,7 +708,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithSamples() + public void testGetWithSamples() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -716,7 +716,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200902091239077-1033"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(permId), fetchOptions); Experiment experiment = map.get(permId); List<Sample> samples = experiment.getSamples(); @@ -732,7 +732,7 @@ public class MapExperimentTest extends AbstractExperimentTest v3api.logout(sessionToken); } - public void testMapWithDataSetsAndDataSetFetchOptionsViaSample() + public void testGetWithDataSetsAndDataSetFetchOptionsViaSample() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); @@ -741,7 +741,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200902091239077-1033"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(permId), fetchOptions); Experiment experiment = map.get(permId); @@ -757,7 +757,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithProjectWithSpaceWithSamples() + public void testGetWithProjectWithSpaceWithSamples() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -766,7 +766,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("200902091255058-1037"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(permId), fetchOptions); assertEquals(1, map.size()); Experiment experiment = map.get(permId); @@ -789,7 +789,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithMaterialProperties() + public void testGetWithMaterialProperties() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -799,7 +799,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentPermId permId = new ExperimentPermId("201108050937246-1031"); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, Arrays.asList(permId), fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, Arrays.asList(permId), fetchOptions); Experiment experiment = map.get(permId); @@ -814,7 +814,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithHistoryEmpty() + public void testGetWithHistoryEmpty() { ExperimentCreation creation = new ExperimentCreation(); creation.setCode("EXPERIMENT_WITH_EMPTY_HISTORY"); @@ -822,13 +822,13 @@ public class MapExperimentTest extends AbstractExperimentTest creation.setProjectId(new ProjectIdentifier("/CISD/DEFAULT")); creation.setProperty("DESCRIPTION", "a description"); - List<HistoryEntry> history = testMapWithHistory(creation, null); + List<HistoryEntry> history = testGetWithHistory(creation, null); assertEquals(history, Collections.emptyList()); } @Test - public void testMapWithHistoryProperty() + public void testGetWithHistoryProperty() { ExperimentCreation creation = new ExperimentCreation(); creation.setCode("EXPERIMENT_WITH_EMPTY_HISTORY"); @@ -839,7 +839,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentUpdate update = new ExperimentUpdate(); update.setProperty("DESCRIPTION", "a description 2"); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -850,7 +850,7 @@ public class MapExperimentTest extends AbstractExperimentTest @Test(enabled = false) // SSDM-2292 - public void testMapWithHistoryProject() + public void testGetWithHistoryProject() { ExperimentCreation creation = new ExperimentCreation(); creation.setCode("EXPERIMENT_WITH_PROJECT_HISTORY"); @@ -861,7 +861,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentUpdate update = new ExperimentUpdate(); update.setProjectId(new ProjectIdentifier("/CISD/NEMO")); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -871,7 +871,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithHistorySample() + public void testGetWithHistorySample() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -900,7 +900,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); fetchOptions.withHistory(); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, experimentPermIds, fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, experimentPermIds, fetchOptions); assertEquals(map.size(), 1); Experiment experiment = map.get(experimentPermIds.get(0)); @@ -914,7 +914,7 @@ public class MapExperimentTest extends AbstractExperimentTest } @Test - public void testMapWithHistoryDataSet() + public void testGetWithHistoryDataSet() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -941,7 +941,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); fetchOptions.withHistory(); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, permIds, fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, permIds, fetchOptions); assertEquals(map.size(), 1); Experiment experiment = map.get(permIds.get(0)); @@ -954,7 +954,7 @@ public class MapExperimentTest extends AbstractExperimentTest assertEquals(entry.getRelatedObjectId(), new DataSetPermId("COMPONENT_1A")); } - private List<HistoryEntry> testMapWithHistory(ExperimentCreation creation, ExperimentUpdate update) + private List<HistoryEntry> testGetWithHistory(ExperimentCreation creation, ExperimentUpdate update) { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -969,7 +969,7 @@ public class MapExperimentTest extends AbstractExperimentTest ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); fetchOptions.withHistory(); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, permIds, fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, permIds, fetchOptions); assertEquals(map.size(), 1); Experiment experiment = map.get(permIds.get(0)); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapMaterialTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetMaterialTest.java similarity index 89% rename from openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapMaterialTest.java rename to openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetMaterialTest.java index 24464038815cddf02e873520dca1e59a3d5acd15..02ee1a1cfe9d42cb8dc146a9092f3169c5a76f29 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapMaterialTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetMaterialTest.java @@ -44,18 +44,18 @@ import ch.systemsx.cisd.common.test.AssertionUtil; /** * @author Jakub Straszewski */ -public class MapMaterialTest extends AbstractDataSetTest +public class GetMaterialTest extends AbstractDataSetTest { @Test - public void testMapByPermId() + public void testGetByPermId() { String sessionToken = v3api.login(TEST_USER, PASSWORD); MaterialPermId virusId = new MaterialPermId("VIRUS2", "VIRUS"); MaterialPermId bacteriaId = new MaterialPermId("BACTERIUM1", "BACTERIUM"); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(virusId, bacteriaId), + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(virusId, bacteriaId), new MaterialFetchOptions()); assertEquals(map.size(), 2); @@ -79,13 +79,13 @@ public class MapMaterialTest extends AbstractDataSetTest } @Test - public void testMapByPermIdCaseInsensitive() + public void testGetByPermIdCaseInsensitive() { String sessionToken = v3api.login(TEST_USER, PASSWORD); MaterialPermId virusId = new MaterialPermId("VIRus2", "viRUS"); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(virusId), + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(virusId), new MaterialFetchOptions()); assertEquals(map.size(), 1); @@ -103,14 +103,14 @@ public class MapMaterialTest extends AbstractDataSetTest } @Test - public void testMapWithFetchOptionsEmpty() + public void testGetWithFetchOptionsEmpty() { String sessionToken = v3api.login(TEST_USER, PASSWORD); MaterialPermId virusId = new MaterialPermId("VIRUS2", "VIRUS"); MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(virusId), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(virusId), fetchOptions); assertEquals(map.size(), 1); Material virus = map.get(virusId); @@ -124,7 +124,7 @@ public class MapMaterialTest extends AbstractDataSetTest } @Test - public void testMapWithProperties() + public void testGetWithProperties() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -136,7 +136,7 @@ public class MapMaterialTest extends AbstractDataSetTest fetchOptions.withRegistrator(); fetchOptions.withTags(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(virusId, bacteriaId), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(virusId, bacteriaId), fetchOptions); assertEquals(map.size(), 2); @@ -153,9 +153,9 @@ public class MapMaterialTest extends AbstractDataSetTest v3api.logout(sessionToken); } - + @Test - public void testMapWithType() + public void testGetWithType() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -163,7 +163,7 @@ public class MapMaterialTest extends AbstractDataSetTest fetchOptions.withType(); MaterialPermId selfId = new MaterialPermId("SRM_1A", "SELF_REF"); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(selfId), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(selfId), fetchOptions); Material item = map.get(selfId); MaterialType type = item.getType(); @@ -173,19 +173,19 @@ public class MapMaterialTest extends AbstractDataSetTest assertEquals(type.getDescription(), "Self Referencing Material"); assertEqualsDate(type.getModificationDate(), "2012-03-13 15:34:44"); assertEquals(type.getFetchOptions().hasPropertyAssignments(), false); - + v3api.logout(sessionToken); } @Test - public void testMapWithTypeAndPropertyAssignmentsSortByLabelDesc() + public void testGetWithTypeAndPropertyAssignmentsSortByLabelDesc() { String sessionToken = v3api.login(TEST_USER, PASSWORD); MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withType().withPropertyAssignments().sortBy().label().desc(); List<MaterialPermId> materialIds = Arrays.asList(new MaterialPermId("GFP", "CONTROL")); - - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, materialIds, fetchOptions); + + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, materialIds, fetchOptions); assertEquals(map.size(), 1); Material material = map.values().iterator().next(); @@ -201,20 +201,20 @@ public class MapMaterialTest extends AbstractDataSetTest assertEquals(propertyAssignment.getPropertyType().getDataTypeCode(), DataTypeCode.REAL); assertEquals(propertyAssignment.isMandatory(), false); assertOrder(propertyAssignments, "VOLUME", "IS_VALID", "SIZE", "PURCHASE_DATE", "EYE_COLOR", "DESCRIPTION"); - + v3api.logout(sessionToken); } - + @Test - public void testMapWithTypeAndPropertyAssignmentsSortByCodeAsc() + public void testGetWithTypeAndPropertyAssignmentsSortByCodeAsc() { String sessionToken = v3api.login(TEST_USER, PASSWORD); MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withType().withPropertyAssignments().sortBy().code().asc(); List<MaterialPermId> materialIds = Arrays.asList(new MaterialPermId("GFP", "CONTROL")); - - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, materialIds, fetchOptions); - + + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, materialIds, fetchOptions); + assertEquals(map.size(), 1); Material material = map.values().iterator().next(); MaterialType type = material.getType(); @@ -222,12 +222,12 @@ public class MapMaterialTest extends AbstractDataSetTest assertEquals(type.getFetchOptions().hasPropertyAssignments(), true); List<PropertyAssignment> propertyAssignments = type.getPropertyAssignments(); assertOrder(propertyAssignments, "DESCRIPTION", "EYE_COLOR", "IS_VALID", "PURCHASE_DATE", "SIZE", "VOLUME"); - + v3api.logout(sessionToken); } - + @Test - public void testMapWithRegistrator() + public void testGetWithRegistrator() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -235,14 +235,14 @@ public class MapMaterialTest extends AbstractDataSetTest fetchOptions.withRegistrator(); MaterialPermId selfId = new MaterialPermId("SRM_1A", "SELF_REF"); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(selfId), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(selfId), fetchOptions); Material item = map.get(selfId); assertEquals(item.getRegistrator().getUserId(), TEST_USER); } @Test - public void testMapWithHistoryEmpty() + public void testGetWithHistoryEmpty() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -251,7 +251,7 @@ public class MapMaterialTest extends AbstractDataSetTest MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withHistory(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(id), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); Material material = map.get(id); @@ -263,7 +263,7 @@ public class MapMaterialTest extends AbstractDataSetTest } @Test - public void testMapWithHistoryProperty() + public void testGetWithHistoryProperty() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -278,7 +278,7 @@ public class MapMaterialTest extends AbstractDataSetTest MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withHistory(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(id), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); Material material = map.get(id); @@ -294,7 +294,7 @@ public class MapMaterialTest extends AbstractDataSetTest } @Test - public void testWithTags() + public void testGetWithTags() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -302,7 +302,7 @@ public class MapMaterialTest extends AbstractDataSetTest fetchOptions.withTags(); MaterialPermId matId = new MaterialPermId("AD3", "VIRUS"); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(matId), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(matId), fetchOptions); Material item = map.get(matId); Set<Tag> tags = item.getTags(); AssertionUtil.assertSize(tags, 1); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapProjectTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetProjectTest.java similarity index 90% rename from openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapProjectTest.java rename to openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetProjectTest.java index b83fb5110bebd1418ca3c4ff346dd31288f4ab62..a2a921876f8c3f3acebaa21a75c18e4877aeeedd 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapProjectTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetProjectTest.java @@ -49,18 +49,18 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.space.id.SpacePermId; /** * @author pkupczyk */ -public class MapProjectTest extends AbstractTest +public class GetProjectTest extends AbstractTest { @Test - public void testMapByPermId() + public void testGetByPermId() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ProjectPermId permId1 = new ProjectPermId("20120814110011738-103"); ProjectPermId permId2 = new ProjectPermId("20120814110011738-105"); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(permId1, permId2), new ProjectFetchOptions()); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(permId1, permId2), new ProjectFetchOptions()); assertEquals(2, map.size()); @@ -75,14 +75,14 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdentifier() + public void testGetByIdentifier() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ProjectIdentifier identifier1 = new ProjectIdentifier("/CISD/NEMO"); ProjectIdentifier identifier2 = new ProjectIdentifier("/TEST-SPACE/TEST-PROJECT"); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(identifier1, identifier2), new ProjectFetchOptions()); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(identifier1, identifier2), new ProjectFetchOptions()); assertEquals(2, map.size()); @@ -97,13 +97,13 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdentifierCaseInsensitive() + public void testGetByIdentifierCaseInsensitive() { String sessionToken = v3api.login(TEST_USER, PASSWORD); ProjectIdentifier identifier1 = new ProjectIdentifier("/cisD/NeMo"); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(identifier1), new ProjectFetchOptions()); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(identifier1), new ProjectFetchOptions()); assertEquals(1, map.size()); @@ -117,7 +117,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdsNonexistent() + public void testGetByIdsNonexistent() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -127,7 +127,7 @@ public class MapProjectTest extends AbstractTest ProjectIdentifier identifier2 = new ProjectIdentifier("/IDONT/EXIST"); Map<IProjectId, Project> map = - v3api.mapProjects(sessionToken, Arrays.asList(permId1, identifier1, permId2, identifier2), new ProjectFetchOptions()); + v3api.getProjects(sessionToken, Arrays.asList(permId1, identifier1, permId2, identifier2), new ProjectFetchOptions()); assertEquals(2, map.size()); @@ -142,7 +142,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdsDuplicated() + public void testGetByIdsDuplicated() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -150,7 +150,7 @@ public class MapProjectTest extends AbstractTest ProjectIdentifier identifier = new ProjectIdentifier("/CISD/NEMO"); ProjectPermId permId2 = new ProjectPermId("20120814110011738-103"); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(permId1, identifier, permId2), new ProjectFetchOptions()); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(permId1, identifier, permId2), new ProjectFetchOptions()); assertEquals(2, map.size()); @@ -161,7 +161,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdsUnauthorized() + public void testGetByIdsUnauthorized() { ProjectPermId permId = new ProjectPermId("20120814110011738-101"); ProjectIdentifier identifier1 = new ProjectIdentifier("/CISD/NEMO"); @@ -170,13 +170,13 @@ public class MapProjectTest extends AbstractTest List<? extends IProjectId> ids = Arrays.asList(permId, identifier1, identifier2); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, ids, new ProjectFetchOptions()); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, ids, new ProjectFetchOptions()); assertEquals(map.size(), 3); v3api.logout(sessionToken); sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); - map = v3api.mapProjects(sessionToken, ids, new ProjectFetchOptions()); + map = v3api.getProjects(sessionToken, ids, new ProjectFetchOptions()); assertEquals(map.size(), 1); @@ -186,13 +186,13 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdsWithFetchOptionsEmpty() + public void testGetByIdsWithFetchOptionsEmpty() { ProjectIdentifier identifier = new ProjectIdentifier("/CISD/NEMO"); ProjectFetchOptions fetchOptions = new ProjectFetchOptions(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(identifier), fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(identifier), fetchOptions); Project project = map.get(identifier); @@ -212,7 +212,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdsWithExperiments() + public void testGetByIdsWithExperiments() { ProjectIdentifier identifier = new ProjectIdentifier("/CISD/DEFAULT"); @@ -220,7 +220,7 @@ public class MapProjectTest extends AbstractTest fetchOptions.withExperiments(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(identifier), fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(identifier), fetchOptions); Project project = map.get(identifier); List<Experiment> experiments = project.getExperiments(); @@ -235,7 +235,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdsWithSpace() + public void testGetByIdsWithSpace() { ProjectIdentifier identifier = new ProjectIdentifier("/CISD/DEFAULT"); @@ -243,7 +243,7 @@ public class MapProjectTest extends AbstractTest fetchOptions.withSpace(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(identifier), fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(identifier), fetchOptions); Project project = map.get(identifier); @@ -257,7 +257,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdsWithRegistrator() + public void testGetByIdsWithRegistrator() { String sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); @@ -270,7 +270,7 @@ public class MapProjectTest extends AbstractTest ProjectFetchOptions fetchOptions = new ProjectFetchOptions(); fetchOptions.withRegistrator(); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, permIds, fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, permIds, fetchOptions); Project project = map.values().iterator().next(); Assert.assertEquals(project.getRegistrator().getUserId(), TEST_SPACE_USER); @@ -283,7 +283,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdsWithModifier() + public void testGetByIdsWithModifier() { String sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); @@ -291,7 +291,7 @@ public class MapProjectTest extends AbstractTest ProjectFetchOptions fetchOptions = new ProjectFetchOptions(); fetchOptions.withModifier(); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(projectId), fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(projectId), fetchOptions); Project project = map.get(projectId); Assert.assertEquals(project.getModifier().getUserId(), TEST_USER); @@ -301,7 +301,7 @@ public class MapProjectTest extends AbstractTest v3api.updateProjects(sessionToken, Arrays.asList(update)); - map = v3api.mapProjects(sessionToken, Arrays.asList(projectId), fetchOptions); + map = v3api.getProjects(sessionToken, Arrays.asList(projectId), fetchOptions); project = map.get(projectId); Assert.assertEquals(project.getModifier().getUserId(), TEST_SPACE_USER); @@ -314,7 +314,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapByIdsWithLeader() + public void testGetByIdsWithLeader() { String sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); @@ -322,7 +322,7 @@ public class MapProjectTest extends AbstractTest ProjectFetchOptions fetchOptions = new ProjectFetchOptions(); fetchOptions.withLeader(); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(projectId), fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(projectId), fetchOptions); Project project = map.get(projectId); assertEquals(project.getLeader().getUserId(), SYSTEM_USER); @@ -335,7 +335,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapWithAttachment() + public void testGetWithAttachment() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -369,7 +369,7 @@ public class MapProjectTest extends AbstractTest fetchOptions.withAttachments().withRegistrator(); fetchOptions.withAttachments().withPreviousVersion().withContent(); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, projectPermIds, fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, projectPermIds, fetchOptions); assertEquals(1, map.size()); Project project = map.get(projectPermIds.get(0)); @@ -411,19 +411,19 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapWithHistoryEmpty() + public void testGetWithHistoryEmpty() { ProjectCreation creation = new ProjectCreation(); creation.setCode("PROJECT_WITH_EMPTY_HISTORY"); creation.setSpaceId(new SpacePermId("CISD")); - List<HistoryEntry> history = testMapWithHistory(creation, null); + List<HistoryEntry> history = testGetWithHistory(creation, null); assertEquals(history, Collections.emptyList()); } @Test - public void testMapWithHistorySpace() + public void testGetWithHistorySpace() { ProjectCreation creation = new ProjectCreation(); creation.setCode("PROJECT_WITH_SPACE_HISTORY"); @@ -432,7 +432,7 @@ public class MapProjectTest extends AbstractTest ProjectUpdate update = new ProjectUpdate(); update.setSpaceId(new SpacePermId("TEST-SPACE")); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -442,7 +442,7 @@ public class MapProjectTest extends AbstractTest } @Test - public void testMapWithHistoryExperiment() + public void testGetWithHistoryExperiment() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -469,7 +469,7 @@ public class MapProjectTest extends AbstractTest ProjectFetchOptions fetchOptions = new ProjectFetchOptions(); fetchOptions.withHistory(); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, projectPermIds, fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, projectPermIds, fetchOptions); assertEquals(map.size(), 1); Project project = map.get(projectPermIds.get(0)); @@ -482,7 +482,7 @@ public class MapProjectTest extends AbstractTest assertEquals(entry.getRelatedObjectId(), experimentPermIds.get(0)); } - private List<HistoryEntry> testMapWithHistory(ProjectCreation creation, ProjectUpdate update) + private List<HistoryEntry> testGetWithHistory(ProjectCreation creation, ProjectUpdate update) { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -497,7 +497,7 @@ public class MapProjectTest extends AbstractTest ProjectFetchOptions fetchOptions = new ProjectFetchOptions(); fetchOptions.withHistory(); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, permIds, fetchOptions); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, permIds, fetchOptions); assertEquals(map.size(), 1); Project project = map.get(permIds.get(0)); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapSampleTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSampleTest.java similarity index 90% rename from openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapSampleTest.java rename to openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSampleTest.java index e531ad3264ad0b1ed35e49cb24701fdce9c14b28..f92321d6a6f04d5304e2288b3ea850b2fbbcd282 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapSampleTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSampleTest.java @@ -72,11 +72,11 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleIdentifierFa /** * @author pkupczyk */ -public class MapSampleTest extends AbstractSampleTest +public class GetSampleTest extends AbstractSampleTest { @Test - public void testMapByPermId() + public void testGetByPermId() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -84,7 +84,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId2 = new SamplePermId("201206191219327-1055"); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Arrays.asList(permId1, permId2), + v3api.getSamples(sessionToken, Arrays.asList(permId1, permId2), new SampleFetchOptions()); assertEquals(2, map.size()); @@ -100,7 +100,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapByIdentifier() + public void testGetByIdentifier() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -114,7 +114,7 @@ public class MapSampleTest extends AbstractSampleTest List<SampleIdentifier> identifiers = Arrays.asList(identifier1, identifier2, identifier3, identifier4, identifier5, identifier6, identifier7); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, identifiers, new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, identifiers, new SampleFetchOptions()); assertEquals(map.size(), identifiers.size()); @@ -132,13 +132,13 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapBySharedComponentIdentifier() + public void testGetBySharedComponentIdentifier() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleIdentifier identifier1 = new SampleIdentifier("/MP:A03"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(identifier1), new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(identifier1), new SampleFetchOptions()); assertEquals(map.size(), 1); @@ -150,13 +150,13 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapBySharedComponentIdentifierWithOmittedContainerCodeAndUniqueComponentCode() + public void testGetBySharedComponentIdentifierWithOmittedContainerCodeAndUniqueComponentCode() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleIdentifier identifier1 = new SampleIdentifier("/A03"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(identifier1), new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(identifier1), new SampleFetchOptions()); assertEquals(map.size(), 0); @@ -164,7 +164,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapBySharedComponentIdentifierWithOmittedContainerCodeAndNotUniqueComponentCode() + public void testGetBySharedComponentIdentifierWithOmittedContainerCodeAndNotUniqueComponentCode() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -185,21 +185,21 @@ public class MapSampleTest extends AbstractSampleTest // therefore nothing should be found if we don't specify the container code SampleIdentifier identifier1 = new SampleIdentifier("/A03"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(identifier1), new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(identifier1), new SampleFetchOptions()); assertEquals(map.size(), 0); v3api.logout(sessionToken); } @Test - public void testMapBySpaceComponentIdentifier() + public void testGetBySpaceComponentIdentifier() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleIdentifier identifier1 = new SampleIdentifier("/CISD/PLATE_WELLSEARCH:WELL-A01"); SampleIdentifier identifier2 = new SampleIdentifier("/CISD/PLATE_WELLSEARCH:WELL-A02"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(identifier1, identifier2), new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(identifier1, identifier2), new SampleFetchOptions()); assertEquals(map.size(), 2); @@ -213,14 +213,14 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapBySpaceComponentIdentifierWithOmittedContainerCodeAndUniqueComponentCode() + public void testGetBySpaceComponentIdentifierWithOmittedContainerCodeAndUniqueComponentCode() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleIdentifier identifier1 = new SampleIdentifier("/CISD/WELL-A01"); SampleIdentifier identifier2 = new SampleIdentifier("/CISD/WELL-A02"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(identifier1, identifier2), new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(identifier1, identifier2), new SampleFetchOptions()); assertEquals(map.size(), 0); @@ -228,14 +228,14 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapBySpaceComponentIdentifierWithOmittedContainerCodeAndNotUniqueComponentCode() + public void testGetBySpaceComponentIdentifierWithOmittedContainerCodeAndNotUniqueComponentCode() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleIdentifier identifier1 = new SampleIdentifier("/CISD/A01"); SampleIdentifier identifier2 = new SampleIdentifier("/CISD/A02"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(identifier1, identifier2), new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(identifier1, identifier2), new SampleFetchOptions()); assertEquals(map.size(), 0); @@ -243,14 +243,14 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapBySpaceComponentIdentifierWithOmittedContainerCodeAndUniqueAndNotUniqueComponentCodes() + public void testGetBySpaceComponentIdentifierWithOmittedContainerCodeAndUniqueAndNotUniqueComponentCodes() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleIdentifier identifier1 = new SampleIdentifier("/CISD/WELL-A01"); SampleIdentifier identifier2 = new SampleIdentifier("/CISD/A02"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(identifier1, identifier2), new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(identifier1, identifier2), new SampleFetchOptions()); assertEquals(map.size(), 0); @@ -278,7 +278,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapByIdentifierCaseInsensitive() + public void testGetByIdentifierCaseInsensitive() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -289,7 +289,7 @@ public class MapSampleTest extends AbstractSampleTest SampleIdentifier identifier5 = new SampleIdentifier("//cL1:a01"); List<SampleIdentifier> identifiers = Arrays.asList(identifier1, identifier2, identifier3, identifier4, identifier5); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, identifiers, new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, identifiers, new SampleFetchOptions()); assertEquals(map.size(), identifiers.size()); @@ -319,7 +319,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapByIdsNonexistent() + public void testGetByIdsNonexistent() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -333,7 +333,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId3 = new SamplePermId("200902091225616-1027"); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, + v3api.getSamples(sessionToken, Arrays.asList(identifier1, identifier2, identifier3, permId1, permId2, identifier4, identifier5, permId3), new SampleFetchOptions()); @@ -356,7 +356,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapByIdsDifferent() + public void testGetByIdsDifferent() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -365,7 +365,7 @@ public class MapSampleTest extends AbstractSampleTest SampleIdentifier identifier2 = new SampleIdentifier("/TEST-SPACE/CP-TEST-4"); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Arrays.asList(identifier1, permId, identifier2), new SampleFetchOptions()); + v3api.getSamples(sessionToken, Arrays.asList(identifier1, permId, identifier2), new SampleFetchOptions()); assertEquals(3, map.size()); @@ -382,7 +382,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapByIdsDuplicated() + public void testGetByIdsDuplicated() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -393,7 +393,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId2 = new SamplePermId("200902091219327-1025"); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Arrays.asList(identifier1, permId1, identifier2, permId2), new SampleFetchOptions()); + v3api.getSamples(sessionToken, Arrays.asList(identifier1, permId1, identifier2, permId2), new SampleFetchOptions()); assertEquals(3, map.size()); @@ -412,7 +412,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapByIdsUnauthorized() + public void testGetByIdsUnauthorized() { SampleIdentifier identifier1 = new SampleIdentifier("/CISD/CP-TEST-1"); SampleIdentifier identifier2 = new SampleIdentifier("/TEST-SPACE/CP-TEST-4"); @@ -422,13 +422,13 @@ public class MapSampleTest extends AbstractSampleTest List<? extends ISampleId> ids = Arrays.asList(identifier1, identifier2, identifier3, identifier4); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, new SampleFetchOptions()); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, new SampleFetchOptions()); assertEquals(map.size(), 4); v3api.logout(sessionToken); sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); - map = v3api.mapSamples(sessionToken, ids, new SampleFetchOptions()); + map = v3api.getSamples(sessionToken, ids, new SampleFetchOptions()); assertEquals(map.size(), 2); @@ -443,11 +443,11 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithFetchOptionsEmpty() + public void testGetWithFetchOptionsEmpty() { String sessionToken = v3api.login(TEST_USER, PASSWORD); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Collections.singletonList(new SamplePermId("200902091219327-1025")), + v3api.getSamples(sessionToken, Collections.singletonList(new SamplePermId("200902091219327-1025")), new SampleFetchOptions()); List<Sample> samples = new ArrayList<Sample>(map.values()); @@ -473,7 +473,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithFetchOptionsNested() + public void testGetWithFetchOptionsNested() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); @@ -483,7 +483,7 @@ public class MapSampleTest extends AbstractSampleTest fetchOptions.withProperties(); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Collections.singletonList(new SamplePermId("200902091250077-1050")), fetchOptions); + v3api.getSamples(sessionToken, Collections.singletonList(new SamplePermId("200902091250077-1050")), fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); assertEquals(1, samples.size()); @@ -504,7 +504,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithRegistratorAndModifier() + public void testGetWithRegistratorAndModifier() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -520,7 +520,7 @@ public class MapSampleTest extends AbstractSampleTest fetchOptions.withRegistrator(); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, newSamplePermIds, + v3api.getSamples(sessionToken, newSamplePermIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); @@ -546,7 +546,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithModifierReused() + public void testGetWithModifierReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -556,7 +556,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("200811050919915-8"); SamplePermId permId2 = new SamplePermId("200902091219327-1025"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); assertEquals(2, map.size()); Sample sample1 = map.get(permId1); @@ -571,7 +571,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithTags() + public void testGetWithTags() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); @@ -579,7 +579,7 @@ public class MapSampleTest extends AbstractSampleTest tagfe.withOwner(); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Collections.singletonList(new SamplePermId("201206191219327-1055")), + v3api.getSamples(sessionToken, Collections.singletonList(new SamplePermId("201206191219327-1055")), fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); @@ -609,7 +609,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithTagsReused() + public void testGetWithTagsReused() { String sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); @@ -619,7 +619,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("201206191219327-1054"); SamplePermId permId2 = new SamplePermId("201206191219327-1055"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); assertEquals(map.size(), 2); Sample sample1 = map.get(permId1); @@ -633,14 +633,14 @@ public class MapSampleTest extends AbstractSampleTest v3api.logout(sessionToken); } - public void testMapWithSpace() + public void testGetWithSpace() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withSpace(); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Collections.singletonList(new SamplePermId("200902091219327-1025")), fetchOptions); + v3api.getSamples(sessionToken, Collections.singletonList(new SamplePermId("200902091219327-1025")), fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); Sample sample = samples.get(0); @@ -653,7 +653,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithSpaceReused() + public void testGetWithSpaceReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -663,7 +663,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("201206191219327-1054"); SamplePermId permId2 = new SamplePermId("201206191219327-1055"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); assertEquals(2, map.size()); Sample sample1 = map.get(permId1); @@ -678,7 +678,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithParentsAndProperties() + public void testGetWithParentsAndProperties() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); @@ -687,7 +687,7 @@ public class MapSampleTest extends AbstractSampleTest fetchOptions.withParents().withProperties(); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Collections.singletonList(new SamplePermId("200811050946559-982")), fetchOptions); + v3api.getSamples(sessionToken, Collections.singletonList(new SamplePermId("200811050946559-982")), fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); assertEquals(1, samples.size()); @@ -713,7 +713,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithParents() + public void testGetWithParents() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -755,7 +755,7 @@ public class MapSampleTest extends AbstractSampleTest List<SamplePermId> sampleIds = v3api.createSamples(sessionToken, Arrays.asList(sampleCreation, parent1Creation, parent2Creation, grandparent1Creation, grandparent2Creation)); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); Sample sample = samples.get(0); @@ -781,7 +781,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithParentsReused() + public void testGetWithParentsReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -791,7 +791,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("200811050946559-980"); SamplePermId permId2 = new SamplePermId("200811050946559-982"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); assertEquals(2, map.size()); Sample sample1 = map.get(permId1); @@ -806,7 +806,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithChildren() + public void testGetWithChildren() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); @@ -814,7 +814,7 @@ public class MapSampleTest extends AbstractSampleTest fetchOptions.withChildren(); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Collections.singletonList(new SamplePermId("200811050929940-1019")), fetchOptions); + v3api.getSamples(sessionToken, Collections.singletonList(new SamplePermId("200811050929940-1019")), fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); assertEquals(1, samples.size()); @@ -838,7 +838,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithChildrenReused() + public void testGetWithChildrenReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -848,7 +848,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("200811050944030-975"); SamplePermId permId2 = new SamplePermId("200811050945092-976"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); assertEquals(2, map.size()); Sample sample1 = map.get(permId1); @@ -863,7 +863,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithComponentsAndContainer() + public void testGetWithComponentsAndContainer() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); @@ -872,7 +872,7 @@ public class MapSampleTest extends AbstractSampleTest fetchOptions.withProperties(); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Collections.singletonList(new SamplePermId("200811050919915-8")), fetchOptions); + v3api.getSamples(sessionToken, Collections.singletonList(new SamplePermId("200811050919915-8")), fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); assertEquals(1, samples.size()); @@ -902,7 +902,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithContainerReused() + public void testGetWithContainerReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -912,7 +912,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("200811050919915-9"); SamplePermId permId2 = new SamplePermId("200811050919915-10"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); assertEquals(2, map.size()); Sample sample1 = map.get(permId1); @@ -930,7 +930,7 @@ public class MapSampleTest extends AbstractSampleTest * Test that translation can handle reference loops */ @Test - public void testMapWithContainerLoop() + public void testGetWithContainerLoop() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); @@ -940,7 +940,7 @@ public class MapSampleTest extends AbstractSampleTest fetchOptions.withProperties(); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Collections.singletonList(new SamplePermId("200811050919915-8")), fetchOptions); + v3api.getSamples(sessionToken, Collections.singletonList(new SamplePermId("200811050919915-8")), fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); assertEquals(1, samples.size()); @@ -972,7 +972,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithExperiment() + public void testGetWithExperiment() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); @@ -980,7 +980,7 @@ public class MapSampleTest extends AbstractSampleTest fetchOptions.withExperiment(); Map<ISampleId, Sample> map = - v3api.mapSamples(sessionToken, Arrays.asList(new SamplePermId("200811050946559-979"), new SampleIdentifier("/CISD/RP1-B1X"), + v3api.getSamples(sessionToken, Arrays.asList(new SamplePermId("200811050946559-979"), new SampleIdentifier("/CISD/RP1-B1X"), new SampleIdentifier("/CISD/RP2-A1X")), fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); @@ -1004,7 +1004,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithExperimentReused() + public void testGetWithExperimentReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1014,7 +1014,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("201206191219327-1054"); SamplePermId permId2 = new SamplePermId("201206191219327-1055"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); assertEquals(2, map.size()); @@ -1030,7 +1030,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithType() + public void testGetWithType() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); @@ -1038,7 +1038,7 @@ public class MapSampleTest extends AbstractSampleTest fetchOptions.withType(); List<SamplePermId> sampleIds = Collections.singletonList(new SamplePermId("200811050946559-979")); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); assertEquals(samples.size(), 1); @@ -1067,14 +1067,14 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithTypeAndPropertyAssignments() + public void testGetWithTypeAndPropertyAssignments() { String sessionToken = v3api.login(TEST_USER, PASSWORD); SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withType().withPropertyAssignments().sortBy().label().desc(); List<SamplePermId> sampleIds = Collections.singletonList(new SamplePermId("200811050917877-331")); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); assertEquals(samples.size(), 1); @@ -1103,7 +1103,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithTypeReused() + public void testGetWithTypeReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1113,7 +1113,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("200902091219327-1025"); SamplePermId permId2 = new SamplePermId("200902091250077-1026"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1, permId2), fetchOptions); assertEquals(2, map.size()); Sample sample1 = map.get(permId1); @@ -1128,7 +1128,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithDataSetAndItsTypeReused() + public void testGetWithDataSetAndItsTypeReused() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1137,7 +1137,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("200902091225616-1027"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1), fetchOptions); assertEquals(1, map.size()); Sample sample1 = map.get(permId1); @@ -1157,7 +1157,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithDataSetsInCircularFetchOptions() + public void testGetWithDataSetsInCircularFetchOptions() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1166,7 +1166,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId1 = new SamplePermId("200902091225616-1027"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId1), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId1), fetchOptions); assertEquals(1, map.size()); Sample sample1 = map.get(permId1); @@ -1182,7 +1182,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithSpaceWithProjectAndExperiments() + public void testGetWithSpaceWithProjectAndExperiments() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1191,7 +1191,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId = new SamplePermId("200902091250077-1060"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId), fetchOptions); List<Project> totalProjects = new ArrayList<Project>(); List<Experiment> totalExperiments = new ArrayList<Experiment>(); @@ -1229,7 +1229,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithMaterialProperties() + public void testGetWithMaterialProperties() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1239,7 +1239,7 @@ public class MapSampleTest extends AbstractSampleTest SamplePermId permId = new SamplePermId("200902091219327-1025"); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId), fetchOptions); Sample sample = map.get(permId); @@ -1260,20 +1260,20 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistoryEmpty() + public void testGetWithHistoryEmpty() { SampleCreation creation = new SampleCreation(); creation.setCode("SAMPLE_WITH_EMPTY_HISTORY"); creation.setTypeId(new EntityTypePermId("CELL_PLATE")); creation.setSpaceId(new SpacePermId("CISD")); - List<HistoryEntry> history = testMapWithHistory(creation, new SampleUpdate[] {}); + List<HistoryEntry> history = testGetWithHistory(creation, new SampleUpdate[] {}); assertEquals(history, Collections.emptyList()); } @Test(enabled = false) - public void testMapWithHistoryDates() + public void testGetWithHistoryDates() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1288,7 +1288,7 @@ public class MapSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withHistory(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(update.getSampleId()), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(update.getSampleId()), fetchOptions); Date end = new Date(); @@ -1310,7 +1310,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistoryProperty() + public void testGetWithHistoryProperty() { SampleCreation creation = new SampleCreation(); creation.setCode("SAMPLE_WITH_PROPERTY_HISTORY"); @@ -1321,7 +1321,7 @@ public class MapSampleTest extends AbstractSampleTest SampleUpdate update = new SampleUpdate(); update.setProperty("COMMENT", "comment2"); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -1334,7 +1334,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistorySystemProperty() + public void testGetWithHistorySystemProperty() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1359,7 +1359,7 @@ public class MapSampleTest extends AbstractSampleTest SampleUpdate update2 = new SampleUpdate(); update2.setProperty(simplePropertyCode, "I have been updated"); - List<HistoryEntry> history = testMapWithHistory(creation, update1, update2); + List<HistoryEntry> history = testGetWithHistory(creation, update1, update2); assertEquals(history.size(), 2); @@ -1374,7 +1374,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistorySpace() + public void testGetWithHistorySpace() { SampleCreation creation = new SampleCreation(); creation.setCode("SAMPLE_WITH_SPACE_HISTORY"); @@ -1384,7 +1384,7 @@ public class MapSampleTest extends AbstractSampleTest SampleUpdate update = new SampleUpdate(); update.setSpaceId(new SpacePermId("TEST-SPACE")); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -1394,7 +1394,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistoryExperiment() + public void testGetWithHistoryExperiment() { SampleCreation creation = new SampleCreation(); creation.setCode("SAMPLE_WITH_EXPERIMENT_HISTORY"); @@ -1405,7 +1405,7 @@ public class MapSampleTest extends AbstractSampleTest SampleUpdate update = new SampleUpdate(); update.setExperimentId(new ExperimentIdentifier("/CISD/NEMO/EXP11")); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -1415,7 +1415,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistoryDataSet() + public void testGetWithHistoryDataSet() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1442,7 +1442,7 @@ public class MapSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withHistory(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, permIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, permIds, fetchOptions); assertEquals(map.size(), 1); Sample sample = map.get(permIds.get(0)); @@ -1456,7 +1456,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistoryContainer() + public void testGetWithHistoryContainer() { SampleCreation creation = new SampleCreation(); creation.setCode("SAMPLE_WITH_CONTAINER_HISTORY"); @@ -1467,7 +1467,7 @@ public class MapSampleTest extends AbstractSampleTest SampleUpdate update = new SampleUpdate(); update.setContainerId(null); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -1477,7 +1477,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistoryComponents() + public void testGetWithHistoryComponents() { SampleCreation creation = new SampleCreation(); creation.setCode("SAMPLE_WITH_COMPONENTS_HISTORY"); @@ -1488,7 +1488,7 @@ public class MapSampleTest extends AbstractSampleTest SampleUpdate update = new SampleUpdate(); update.getComponentIds().set(); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -1498,7 +1498,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistoryParent() + public void testGetWithHistoryParent() { SampleCreation creation = new SampleCreation(); creation.setCode("SAMPLE_WITH_PARENT_HISTORY"); @@ -1509,7 +1509,7 @@ public class MapSampleTest extends AbstractSampleTest SampleUpdate update = new SampleUpdate(); update.getParentIds().set(); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -1519,7 +1519,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithHistoryChild() + public void testGetWithHistoryChild() { SampleCreation creation = new SampleCreation(); creation.setCode("SAMPLE_WITH_CHILD_HISTORY"); @@ -1530,7 +1530,7 @@ public class MapSampleTest extends AbstractSampleTest SampleUpdate update = new SampleUpdate(); update.getChildIds().set(); - List<HistoryEntry> history = testMapWithHistory(creation, update); + List<HistoryEntry> history = testGetWithHistory(creation, update); assertEquals(history.size(), 1); @@ -1539,7 +1539,7 @@ public class MapSampleTest extends AbstractSampleTest assertEquals(entry.getRelatedObjectId(), new SamplePermId("200811050919915-8")); } - private List<HistoryEntry> testMapWithHistory(SampleCreation creation, SampleUpdate... updates) + private List<HistoryEntry> testGetWithHistory(SampleCreation creation, SampleUpdate... updates) { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1557,7 +1557,7 @@ public class MapSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withHistory().withAuthor(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, permIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, permIds, fetchOptions); assertEquals(map.size(), 1); Sample sample = map.get(permIds.get(0)); @@ -1568,7 +1568,7 @@ public class MapSampleTest extends AbstractSampleTest } @Test - public void testMapWithAttachment() + public void testGetWithAttachment() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -1577,7 +1577,7 @@ public class MapSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withAttachments(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(id), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(id), fetchOptions); assertEquals(map.size(), 1); Sample sample = map.get(id); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapSpaceTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSpaceTest.java similarity index 88% rename from openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapSpaceTest.java rename to openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSpaceTest.java index 01c62e5ddfbd650c51e8412fdfba96de9af9fbbd..f34008fa966eeb306af8304cf679e8cee123e3ee 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapSpaceTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetSpaceTest.java @@ -37,11 +37,11 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.space.id.SpacePermId; /** * @author pkupczyk */ -public class MapSpaceTest extends AbstractTest +public class GetSpaceTest extends AbstractTest { @Test - public void testMapByPermId() + public void testGetByPermId() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -49,7 +49,7 @@ public class MapSpaceTest extends AbstractTest SpacePermId permId2 = new SpacePermId("/TEST-SPACE"); Map<ISpaceId, Space> map = - v3api.mapSpaces(sessionToken, Arrays.asList(permId1, permId2), + v3api.getSpaces(sessionToken, Arrays.asList(permId1, permId2), new SpaceFetchOptions()); assertEquals(2, map.size()); @@ -65,7 +65,7 @@ public class MapSpaceTest extends AbstractTest } @Test - public void testMapByPermIdCaseInsensitive() + public void testGetByPermIdCaseInsensitive() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -73,7 +73,7 @@ public class MapSpaceTest extends AbstractTest SpacePermId permId2 = new SpacePermId("/test-SPACE"); Map<ISpaceId, Space> map = - v3api.mapSpaces(sessionToken, Arrays.asList(permId1, permId2), + v3api.getSpaces(sessionToken, Arrays.asList(permId1, permId2), new SpaceFetchOptions()); assertEquals(2, map.size()); @@ -92,7 +92,7 @@ public class MapSpaceTest extends AbstractTest } @Test - public void testMapByIdsNonexistent() + public void testGetByIdsNonexistent() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -101,7 +101,7 @@ public class MapSpaceTest extends AbstractTest SpacePermId permId3 = new SpacePermId("TEST-SPACE"); Map<ISpaceId, Space> map = - v3api.mapSpaces(sessionToken, + v3api.getSpaces(sessionToken, Arrays.asList(permId1, permId2, permId3), new SpaceFetchOptions()); @@ -118,7 +118,7 @@ public class MapSpaceTest extends AbstractTest } @Test - public void testMapByIdsDuplicated() + public void testGetByIdsDuplicated() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -126,7 +126,7 @@ public class MapSpaceTest extends AbstractTest SpacePermId permId2 = new SpacePermId("/CISD"); Map<ISpaceId, Space> map = - v3api.mapSpaces(sessionToken, Arrays.asList(permId1, permId2), new SpaceFetchOptions()); + v3api.getSpaces(sessionToken, Arrays.asList(permId1, permId2), new SpaceFetchOptions()); assertEquals(1, map.size()); @@ -137,7 +137,7 @@ public class MapSpaceTest extends AbstractTest } @Test - public void testMapByIdsUnauthorized() + public void testGetByIdsUnauthorized() { SpacePermId permId1 = new SpacePermId("CISD"); SpacePermId permId2 = new SpacePermId("TEST-SPACE"); @@ -145,13 +145,13 @@ public class MapSpaceTest extends AbstractTest List<? extends ISpaceId> ids = Arrays.asList(permId1, permId2); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ISpaceId, Space> map = v3api.mapSpaces(sessionToken, ids, new SpaceFetchOptions()); + Map<ISpaceId, Space> map = v3api.getSpaces(sessionToken, ids, new SpaceFetchOptions()); assertEquals(map.size(), 2); v3api.logout(sessionToken); sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); - map = v3api.mapSpaces(sessionToken, ids, new SpaceFetchOptions()); + map = v3api.getSpaces(sessionToken, ids, new SpaceFetchOptions()); assertEquals(map.size(), 1); @@ -161,14 +161,14 @@ public class MapSpaceTest extends AbstractTest } @Test - public void testMapByIdsWithFetchOptionsEmpty() + public void testGetByIdsWithFetchOptionsEmpty() { SpacePermId permId = new SpacePermId("TEST-SPACE"); SpaceFetchOptions fetchOptions = new SpaceFetchOptions(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ISpaceId, Space> map = v3api.mapSpaces(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ISpaceId, Space> map = v3api.getSpaces(sessionToken, Arrays.asList(permId), fetchOptions); Space space = map.get(permId); @@ -184,7 +184,7 @@ public class MapSpaceTest extends AbstractTest } @Test - public void testMapByIdsWithProjects() + public void testGetByIdsWithProjects() { SpacePermId permId = new SpacePermId("TEST-SPACE"); @@ -192,7 +192,7 @@ public class MapSpaceTest extends AbstractTest fetchOptions.withProjects(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ISpaceId, Space> map = v3api.mapSpaces(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ISpaceId, Space> map = v3api.getSpaces(sessionToken, Arrays.asList(permId), fetchOptions); Space space = map.get(permId); List<Project> projects = space.getProjects(); @@ -204,7 +204,7 @@ public class MapSpaceTest extends AbstractTest } @Test - public void testMapByIdsWithSamples() + public void testGetByIdsWithSamples() { SpacePermId permId = new SpacePermId("TEST-SPACE"); @@ -212,7 +212,7 @@ public class MapSpaceTest extends AbstractTest fetchOptions.withSamples(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ISpaceId, Space> map = v3api.mapSpaces(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ISpaceId, Space> map = v3api.getSpaces(sessionToken, Arrays.asList(permId), fetchOptions); Space space = map.get(permId); List<Sample> samples = space.getSamples(); @@ -225,7 +225,7 @@ public class MapSpaceTest extends AbstractTest } @Test - public void testMapByIdsWithRegistrator() + public void testGetByIdsWithRegistrator() { SpacePermId permId = new SpacePermId("TEST-SPACE"); @@ -234,7 +234,7 @@ public class MapSpaceTest extends AbstractTest fetchOptions.withRegistrator().withRegistrator(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ISpaceId, Space> map = v3api.mapSpaces(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ISpaceId, Space> map = v3api.getSpaces(sessionToken, Arrays.asList(permId), fetchOptions); Space space = map.get(permId); Person registrator = space.getRegistrator(); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapTagTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetTagTest.java similarity index 88% rename from openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapTagTest.java rename to openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetTagTest.java index 4521dd0c857f25fb63bae7f36d28cede086a44c6..7c2db8bacca39f3a1961244466ebbf74194a327b 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapTagTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetTagTest.java @@ -36,11 +36,11 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.tag.id.TagPermId; /** * @author pkupczyk */ -public class MapTagTest extends AbstractTest +public class GetTagTest extends AbstractTest { @Test - public void testMapByPermId() + public void testGetByPermId() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -48,7 +48,7 @@ public class MapTagTest extends AbstractTest TagPermId permId2 = new TagPermId(TEST_USER, "ANOTHER_TEST_METAPROJECTS"); Map<ITagId, Tag> map = - v3api.mapTags(sessionToken, Arrays.asList(permId1, permId2), + v3api.getTags(sessionToken, Arrays.asList(permId1, permId2), new TagFetchOptions()); assertEquals(2, map.size()); @@ -64,7 +64,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByCode() + public void testGetByCode() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -72,7 +72,7 @@ public class MapTagTest extends AbstractTest TagCode code2 = new TagCode("ANOTHER_TEST_METAPROJECTS"); Map<ITagId, Tag> map = - v3api.mapTags(sessionToken, Arrays.asList(code1, code2), + v3api.getTags(sessionToken, Arrays.asList(code1, code2), new TagFetchOptions()); assertEquals(2, map.size()); @@ -88,7 +88,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByPermIdCaseSensitivity() + public void testGetByPermIdCaseSensitivity() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -98,7 +98,7 @@ public class MapTagTest extends AbstractTest TagPermId permId3 = new TagPermId("test", "ANOTHER_test_METAPROJECTS"); Map<ITagId, Tag> map = - v3api.mapTags(sessionToken, Arrays.asList(permId1, permId2, permId3), + v3api.getTags(sessionToken, Arrays.asList(permId1, permId2, permId3), new TagFetchOptions()); assertEquals(2, map.size()); @@ -114,7 +114,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByCodeCaseSensitivity() + public void testGetByCodeCaseSensitivity() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -123,7 +123,7 @@ public class MapTagTest extends AbstractTest TagCode code2 = new TagCode("ANOTHER_test_METAPROJECTS"); Map<ITagId, Tag> map = - v3api.mapTags(sessionToken, Arrays.asList(code1, code2), + v3api.getTags(sessionToken, Arrays.asList(code1, code2), new TagFetchOptions()); assertEquals(2, map.size()); @@ -139,7 +139,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByIdsNonexistent() + public void testGetByIdsNonexistent() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -148,7 +148,7 @@ public class MapTagTest extends AbstractTest TagCode code = new TagCode("IDONTEXIST"); Map<ITagId, Tag> map = - v3api.mapTags(sessionToken, + v3api.getTags(sessionToken, Arrays.asList(permId1, permId2, code), new TagFetchOptions()); @@ -162,7 +162,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByIdsDuplicated() + public void testGetByIdsDuplicated() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -170,7 +170,7 @@ public class MapTagTest extends AbstractTest TagCode code = new TagCode("TEST_METAPROJECTS"); Map<ITagId, Tag> map = - v3api.mapTags(sessionToken, Arrays.asList(permId, code), new TagFetchOptions()); + v3api.getTags(sessionToken, Arrays.asList(permId, code), new TagFetchOptions()); assertEquals(2, map.size()); @@ -181,7 +181,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByIdsUnauthorized() + public void testGetByIdsUnauthorized() { TagPermId permId1 = new TagPermId(TEST_USER, "TEST_METAPROJECTS"); TagPermId permId2 = new TagPermId(TEST_POWER_USER_CISD, "TEST_METAPROJECTS"); @@ -189,7 +189,7 @@ public class MapTagTest extends AbstractTest List<? extends ITagId> ids = Arrays.asList(permId1, permId2); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ITagId, Tag> map = v3api.mapTags(sessionToken, ids, new TagFetchOptions()); + Map<ITagId, Tag> map = v3api.getTags(sessionToken, ids, new TagFetchOptions()); assertEquals(map.size(), 1); assertEquals(map.get(permId1).getPermId(), permId1); @@ -198,7 +198,7 @@ public class MapTagTest extends AbstractTest v3api.logout(sessionToken); sessionToken = v3api.login(TEST_POWER_USER_CISD, PASSWORD); - map = v3api.mapTags(sessionToken, ids, new TagFetchOptions()); + map = v3api.getTags(sessionToken, ids, new TagFetchOptions()); assertEquals(map.size(), 1); assertEquals(map.get(permId2).getPermId(), permId2); @@ -208,14 +208,14 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByIdsWithFetchOptionsEmpty() + public void testGetByIdsWithFetchOptionsEmpty() { TagPermId permId = new TagPermId(TEST_USER, "TEST_METAPROJECTS"); TagFetchOptions fetchOptions = new TagFetchOptions(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ITagId, Tag> map = v3api.mapTags(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ITagId, Tag> map = v3api.getTags(sessionToken, Arrays.asList(permId), fetchOptions); Tag tag = map.get(permId); @@ -232,7 +232,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByIdsWithOwner() + public void testGetByIdsWithOwner() { TagPermId permId = new TagPermId(TEST_USER, "TEST_METAPROJECTS"); @@ -240,7 +240,7 @@ public class MapTagTest extends AbstractTest fetchOptions.withOwner(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ITagId, Tag> map = v3api.mapTags(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ITagId, Tag> map = v3api.getTags(sessionToken, Arrays.asList(permId), fetchOptions); Tag tag = map.get(permId); @@ -257,7 +257,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByIdsWithExperiments() + public void testGetByIdsWithExperiments() { TagPermId permId = new TagPermId(TEST_USER, "TEST_METAPROJECTS"); @@ -265,7 +265,7 @@ public class MapTagTest extends AbstractTest fetchOptions.withExperiments(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ITagId, Tag> map = v3api.mapTags(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ITagId, Tag> map = v3api.getTags(sessionToken, Arrays.asList(permId), fetchOptions); Tag tag = map.get(permId); @@ -282,7 +282,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByIdsWithSamples() + public void testGetByIdsWithSamples() { TagPermId permId = new TagPermId(TEST_SPACE_USER, "TEST_METAPROJECTS"); @@ -290,7 +290,7 @@ public class MapTagTest extends AbstractTest fetchOptions.withSamples(); String sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); - Map<ITagId, Tag> map = v3api.mapTags(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ITagId, Tag> map = v3api.getTags(sessionToken, Arrays.asList(permId), fetchOptions); Tag tag = map.get(permId); @@ -307,7 +307,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByIdsWithDataSets() + public void testGetByIdsWithDataSets() { TagPermId permId = new TagPermId(TEST_SPACE_USER, "TEST_METAPROJECTS"); @@ -315,7 +315,7 @@ public class MapTagTest extends AbstractTest fetchOptions.withDataSets(); String sessionToken = v3api.login(TEST_SPACE_USER, PASSWORD); - Map<ITagId, Tag> map = v3api.mapTags(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ITagId, Tag> map = v3api.getTags(sessionToken, Arrays.asList(permId), fetchOptions); Tag tag = map.get(permId); @@ -332,7 +332,7 @@ public class MapTagTest extends AbstractTest } @Test - public void testMapByIdsWithMaterials() + public void testGetByIdsWithMaterials() { TagPermId permId = new TagPermId(TEST_USER, "TEST_METAPROJECTS"); @@ -340,7 +340,7 @@ public class MapTagTest extends AbstractTest fetchOptions.withMaterials(); String sessionToken = v3api.login(TEST_USER, PASSWORD); - Map<ITagId, Tag> map = v3api.mapTags(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ITagId, Tag> map = v3api.getTags(sessionToken, Arrays.asList(permId), fetchOptions); Tag tag = map.get(permId); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapVocabularyTermTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetVocabularyTermTest.java similarity index 91% rename from openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapVocabularyTermTest.java rename to openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetVocabularyTermTest.java index ef33013bbfe27c0ff128c5b52e00d09148e8db6d..85653121ae266d429d697d63f37ac9b539e33918 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/MapVocabularyTermTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/GetVocabularyTermTest.java @@ -33,11 +33,11 @@ import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.id.VocabularyTermPerm * @author pkupczyk */ @Test(groups = { "before remote api" }) -public class MapVocabularyTermTest extends AbstractVocabularyTermTest +public class GetVocabularyTermTest extends AbstractVocabularyTermTest { @Test - public void testMapByPermId() + public void testGetByPermId() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -45,7 +45,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest VocabularyTermPermId permId2 = new VocabularyTermPermId("PROPRIETARY", "$STORAGE_FORMAT"); Map<IVocabularyTermId, VocabularyTerm> map = - v3api.mapVocabularyTerms(sessionToken, Arrays.asList(permId1, permId2), + v3api.getVocabularyTerms(sessionToken, Arrays.asList(permId1, permId2), new VocabularyTermFetchOptions()); assertEquals(2, map.size()); @@ -61,7 +61,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest } @Test - public void testMapByPermIdCaseInsensitive() + public void testGetByPermIdCaseInsensitive() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -69,7 +69,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest VocabularyTermPermId permId2 = new VocabularyTermPermId("proPRIETARY", "$storage_FORMAT"); Map<IVocabularyTermId, VocabularyTerm> map = - v3api.mapVocabularyTerms(sessionToken, Arrays.asList(permId1, permId2), + v3api.getVocabularyTerms(sessionToken, Arrays.asList(permId1, permId2), new VocabularyTermFetchOptions()); assertEquals(2, map.size()); @@ -92,7 +92,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest } @Test - public void testMapByIdsNonexistent() + public void testGetByIdsNonexistent() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -101,7 +101,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest VocabularyTermPermId permId3 = new VocabularyTermPermId("PROPRIETARY", "$STORAGE_FORMAT"); Map<IVocabularyTermId, VocabularyTerm> map = - v3api.mapVocabularyTerms(sessionToken, + v3api.getVocabularyTerms(sessionToken, Arrays.asList(permId1, permId2, permId3), new VocabularyTermFetchOptions()); @@ -118,7 +118,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest } @Test - public void testMapByIdsDuplicated() + public void testGetByIdsDuplicated() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -126,7 +126,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest VocabularyTermPermId permId2 = new VocabularyTermPermId("human", "organism"); Map<IVocabularyTermId, VocabularyTerm> map = - v3api.mapVocabularyTerms(sessionToken, Arrays.asList(permId1, permId2), new VocabularyTermFetchOptions()); + v3api.getVocabularyTerms(sessionToken, Arrays.asList(permId1, permId2), new VocabularyTermFetchOptions()); assertEquals(1, map.size()); @@ -137,7 +137,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest } @Test - public void testMapWithEmptyFetchOptions() + public void testGetWithEmptyFetchOptions() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -145,7 +145,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest VocabularyTermFetchOptions fetchOptions = new VocabularyTermFetchOptions(); Map<IVocabularyTermId, VocabularyTerm> terms = - v3api.mapVocabularyTerms(sessionToken, Arrays.asList(id), fetchOptions); + v3api.getVocabularyTerms(sessionToken, Arrays.asList(id), fetchOptions); VocabularyTerm term = terms.get(id); assertEquals(term.getPermId(), new VocabularyTermPermId("PROPRIETARY", "$STORAGE_FORMAT")); @@ -161,7 +161,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest } @Test - public void testMapWithVocabularyFetched() + public void testGetWithVocabularyFetched() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -170,7 +170,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest fetchOptions.withVocabulary().withRegistrator(); Map<IVocabularyTermId, VocabularyTerm> terms = - v3api.mapVocabularyTerms(sessionToken, Arrays.asList(id), fetchOptions); + v3api.getVocabularyTerms(sessionToken, Arrays.asList(id), fetchOptions); VocabularyTerm term = terms.get(id); assertEquals(term.getPermId(), new VocabularyTermPermId("PROPRIETARY", "$STORAGE_FORMAT")); @@ -191,7 +191,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest } @Test - public void testMapWithRegistratorFetched() + public void testGetWithRegistratorFetched() { String sessionToken = v3api.login(TEST_USER, PASSWORD); @@ -200,7 +200,7 @@ public class MapVocabularyTermTest extends AbstractVocabularyTermTest fetchOptions.withRegistrator(); Map<IVocabularyTermId, VocabularyTerm> terms = - v3api.mapVocabularyTerms(sessionToken, Arrays.asList(id), fetchOptions); + v3api.getVocabularyTerms(sessionToken, Arrays.asList(id), fetchOptions); VocabularyTerm term = terms.get(id); assertEquals(term.getPermId(), new VocabularyTermPermId("PROPRIETARY", "$STORAGE_FORMAT")); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/LoginTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/LoginTest.java index ff5a8402ca9ccca9f090c29153504eef4839673c..b4db846398bf8332586f1bdb3e2b89dfbf689426 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/LoginTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/LoginTest.java @@ -28,13 +28,13 @@ public class LoginTest extends AbstractTest Assert.assertNotNull(sessionToken); Map<IExperimentId, Experiment> experimentFromCisdSpace = - v3api.mapExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("200811050951882-1028")), + v3api.getExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("200811050951882-1028")), new ExperimentFetchOptions()); Assert.assertEquals(1, experimentFromCisdSpace.size()); Map<IExperimentId, Experiment> experimentFromTestSpace = - v3api.mapExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("201206190940555-1032")), + v3api.getExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("201206190940555-1032")), new ExperimentFetchOptions()); Assert.assertEquals(1, experimentFromTestSpace.size()); @@ -85,13 +85,13 @@ public class LoginTest extends AbstractTest Assert.assertNotNull(sessionToken); Map<IExperimentId, Experiment> experimentFromCisdSpace = - v3api.mapExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("200811050951882-1028")), + v3api.getExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("200811050951882-1028")), new ExperimentFetchOptions()); Assert.assertEquals(1, experimentFromCisdSpace.size()); Map<IExperimentId, Experiment> experimentFromTestSpace = - v3api.mapExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("201206190940555-1032")), + v3api.getExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("201206190940555-1032")), new ExperimentFetchOptions()); Assert.assertEquals(1, experimentFromTestSpace.size()); @@ -105,13 +105,13 @@ public class LoginTest extends AbstractTest Assert.assertNotNull(sessionToken); Map<IExperimentId, Experiment> experimentFromCisdSpace = - v3api.mapExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("200811050951882-1028")), + v3api.getExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("200811050951882-1028")), new ExperimentFetchOptions()); Assert.assertEquals(0, experimentFromCisdSpace.size()); Map<IExperimentId, Experiment> experimentFromTestSpace = - v3api.mapExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("201206190940555-1032")), + v3api.getExperiments(sessionToken, Collections.singletonList(new ExperimentPermId("201206190940555-1032")), new ExperimentFetchOptions()); Assert.assertEquals(1, experimentFromTestSpace.size()); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateDataSetTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateDataSetTest.java index 08b63e4dea276cf81be65bb8512856b456a1887f..e1a7ab216f1ce3aac3e23850b1bc2668f416b60b 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateDataSetTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateDataSetTest.java @@ -85,7 +85,7 @@ public class UpdateDataSetTest extends AbstractSampleTest DataSetFetchOptions fe = new DataSetFetchOptions(); fe.withProperties(); - DataSet result = v3api.mapDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); + DataSet result = v3api.getDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); assertEquals(result.getProperties().get("COMMENT"), "Updated description"); } @@ -125,7 +125,7 @@ public class UpdateDataSetTest extends AbstractSampleTest DataSetFetchOptions fe = new DataSetFetchOptions(); fe.withSample(); fe.withExperiment(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(dataSetId), fe); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(dataSetId), fe); DataSet result = map.get(dataSetId); assertEquals(result.getSample().getPermId(), sampleId); @@ -147,7 +147,7 @@ public class UpdateDataSetTest extends AbstractSampleTest DataSetFetchOptions fe = new DataSetFetchOptions(); fe.withSample(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(dataSetId), fe); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(dataSetId), fe); DataSet result = map.get(dataSetId); assertEquals(result.getSample().getPermId(), sampleId); @@ -169,7 +169,7 @@ public class UpdateDataSetTest extends AbstractSampleTest DataSetFetchOptions fe = new DataSetFetchOptions(); fe.withSample(); fe.withExperiment(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(dataSetId), fe); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(dataSetId), fe); DataSet result = map.get(dataSetId); assertEquals(result.getSample().getPermId(), sampleId); @@ -205,7 +205,7 @@ public class UpdateDataSetTest extends AbstractSampleTest fe.withExperiment(); fe.withSample(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(dataSetId), fe); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(dataSetId), fe); DataSet result = map.get(dataSetId); assertEquals(result.getExperiment().getPermId().getPermId(), "200902091239077-1033"); @@ -217,7 +217,7 @@ public class UpdateDataSetTest extends AbstractSampleTest v3api.updateDataSets(sessionToken, Arrays.asList(update)); - map = v3api.mapDataSets(sessionToken, Arrays.asList(dataSetId), fe); + map = v3api.getDataSets(sessionToken, Arrays.asList(dataSetId), fe); result = map.get(dataSetId); assertEquals(result.getExperiment().getPermId().getPermId(), "200902091239077-1033"); @@ -240,7 +240,7 @@ public class UpdateDataSetTest extends AbstractSampleTest DataSetFetchOptions fe = new DataSetFetchOptions(); fe.withProperties(); fe.withExperiment(); - DataSet result = v3api.mapDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); + DataSet result = v3api.getDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); assertEquals(result.getExperiment().getPermId().getPermId(), "200811050951882-1028"); } @@ -298,7 +298,7 @@ public class UpdateDataSetTest extends AbstractSampleTest fe.withExperiment(); fe.withSample(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(dataSetId), fe); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(dataSetId), fe); DataSet result = map.get(dataSetId); assertEquals(result.getExperiment().getPermId().getPermId(), "200902091239077-1033"); @@ -311,7 +311,7 @@ public class UpdateDataSetTest extends AbstractSampleTest v3api.updateDataSets(sessionToken, Arrays.asList(update)); - map = v3api.mapDataSets(sessionToken, Arrays.asList(dataSetId), fe); + map = v3api.getDataSets(sessionToken, Arrays.asList(dataSetId), fe); result = map.get(dataSetId); assertEquals(result.getExperiment().getPermId().getPermId(), "200902091258949-1034"); @@ -336,7 +336,7 @@ public class UpdateDataSetTest extends AbstractSampleTest DataSetFetchOptions fe = new DataSetFetchOptions(); fe.withProperties(); fe.withPhysicalData().withFileFormatType(); - DataSet result = v3api.mapDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); + DataSet result = v3api.getDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); assertEquals(result.getPhysicalData().getFileFormatType().getCode(), "PLKPROPRIETARY"); } @@ -403,7 +403,7 @@ public class UpdateDataSetTest extends AbstractSampleTest fe.withProperties(); fe.withExperiment(); fe.withParents(); - DataSet result = v3api.mapDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); + DataSet result = v3api.getDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); AssertionUtil.assertSize(result.getParents(), 2); } @@ -517,7 +517,7 @@ public class UpdateDataSetTest extends AbstractSampleTest DataSetFetchOptions fe = new DataSetFetchOptions(); fe.withComponents(); - DataSet result = v3api.mapDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); + DataSet result = v3api.getDataSets(sessionToken, Collections.singletonList(dataSetId), fe).get(dataSetId); AssertionUtil.assertCollectionContainsOnly(dataSetCodes(result.getComponents()), "COMPONENT_1B", "COMPONENT_2A"); } @@ -562,7 +562,7 @@ public class UpdateDataSetTest extends AbstractSampleTest DataSetFetchOptions fe = new DataSetFetchOptions(); fe.withContainers(); fe.withComponents(); - Map<IDataSetId, DataSet> map = v3api.mapDataSets(sessionToken, Arrays.asList(dataSetId, cont2, cont3a, cont1), fe); + Map<IDataSetId, DataSet> map = v3api.getDataSets(sessionToken, Arrays.asList(dataSetId, cont2, cont3a, cont1), fe); DataSet result = map.get(dataSetId); @@ -636,7 +636,7 @@ public class UpdateDataSetTest extends AbstractSampleTest v3api.updateDataSets(sessionToken, Arrays.asList(firstUpdate)); - Map<IDataSetId, DataSet> result = v3api.mapDataSets(sessionToken, Arrays.asList(dataSet), fe); + Map<IDataSetId, DataSet> result = v3api.getDataSets(sessionToken, Arrays.asList(dataSet), fe); AssertionUtil.assertCollectionContainsOnly(tagCodes(result.get(dataSet).getTags()), existingTag.getCode(), newTag1.getCode()); // remove test_metaprojects and add a new tag2 @@ -647,7 +647,7 @@ public class UpdateDataSetTest extends AbstractSampleTest v3api.updateDataSets(sessionToken, Arrays.asList(secondUpdate)); - result = v3api.mapDataSets(sessionToken, Arrays.asList(dataSet), fe); + result = v3api.getDataSets(sessionToken, Arrays.asList(dataSet), fe); AssertionUtil.assertCollectionContainsOnly(tagCodes(result.get(dataSet).getTags()), newTag1.getCode(), newTag2.getCode()); } @@ -679,7 +679,7 @@ public class UpdateDataSetTest extends AbstractSampleTest fe.withProperties(); fe.withParents(); fe.withChildren(); - Map<IDataSetId, DataSet> result = v3api.mapDataSets(sessionToken, Arrays.asList(originalChild, originalParent), fe); + Map<IDataSetId, DataSet> result = v3api.getDataSets(sessionToken, Arrays.asList(originalChild, originalParent), fe); AssertionUtil.assertCollectionContains(dataSetCodes(result.get(originalParent).getChildren()), originalChild.getPermId()); AssertionUtil.assertCollectionContains(dataSetCodes(result.get(originalChild).getParents()), originalParent.getPermId()); @@ -688,7 +688,7 @@ public class UpdateDataSetTest extends AbstractSampleTest v3api.updateDataSets(sessionToken, Collections.singletonList(update)); // assert parent removed - result = v3api.mapDataSets(sessionToken, Arrays.asList(originalChild, originalParent), fe); + result = v3api.getDataSets(sessionToken, Arrays.asList(originalChild, originalParent), fe); AssertionUtil.assertCollectionDoesntContain(dataSetCodes(result.get(originalParent).getChildren()), originalChild.getPermId()); AssertionUtil.assertCollectionDoesntContain(dataSetCodes(result.get(originalChild).getParents()), originalParent.getPermId()); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateExperimentTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateExperimentTest.java index dc59242832942f5a091355bbc2176c4c8523e427..d383409b6af8a3ddbd9f585f2bc4dd651b6e95eb 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateExperimentTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateExperimentTest.java @@ -115,7 +115,7 @@ public class UpdateExperimentTest extends AbstractExperimentTest v3api.updateExperiments(sessionToken, Arrays.asList(update)); ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, ids, fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, ids, fetchOptions); List<Experiment> experiments = new ArrayList<Experiment>(map.values()); AssertionUtil.assertCollectionSize(experiments, 1); @@ -218,7 +218,7 @@ public class UpdateExperimentTest extends AbstractExperimentTest sampleFetchOptions.withSpace(); sampleFetchOptions.withExperiment(); - Map<ISampleId, Sample> sampleMap = v3api.mapSamples(sessionToken, sampleIds, sampleFetchOptions); + Map<ISampleId, Sample> sampleMap = v3api.getSamples(sessionToken, sampleIds, sampleFetchOptions); Sample sample = sampleMap.get(sampleId); assertEquals(sample.getSpace().getCode(), "TEST-SPACE"); @@ -289,7 +289,7 @@ public class UpdateExperimentTest extends AbstractExperimentTest ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); fetchOptions.withProperties(); - Map<IExperimentId, Experiment> map = v3api.mapExperiments(sessionToken, ids, fetchOptions); + Map<IExperimentId, Experiment> map = v3api.getExperiments(sessionToken, ids, fetchOptions); List<Experiment> experiments = new ArrayList<Experiment>(map.values()); AssertionUtil.assertCollectionSize(experiments, 1); @@ -760,7 +760,7 @@ public class UpdateExperimentTest extends AbstractExperimentTest ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); fetchOptions.withTags(); - Map<IExperimentId, Experiment> experiments = v3api.mapExperiments(sessionToken, Arrays.asList(experimentId), fetchOptions); + Map<IExperimentId, Experiment> experiments = v3api.getExperiments(sessionToken, Arrays.asList(experimentId), fetchOptions); assertEquals(experiments.size(), 1); assertTags(experiments.get(experimentId).getTags(), expectedTagPermIds); @@ -773,7 +773,7 @@ public class UpdateExperimentTest extends AbstractExperimentTest ExperimentFetchOptions fetchOptions = new ExperimentFetchOptions(); fetchOptions.withAttachments().withContent(); - Map<IExperimentId, Experiment> experiments = v3api.mapExperiments(sessionToken, Arrays.asList(experimentId), fetchOptions); + Map<IExperimentId, Experiment> experiments = v3api.getExperiments(sessionToken, Arrays.asList(experimentId), fetchOptions); assertEquals(experiments.size(), 1); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateMaterialTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateMaterialTest.java index cd6046968757d7c77d88989aa683b05d5d394429..ae7071bccf1fd17c4f9289257e7647981c064f1a 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateMaterialTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateMaterialTest.java @@ -59,7 +59,7 @@ public class UpdateMaterialTest extends AbstractSampleTest MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withProperties(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(update.getMaterialId()), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(update.getMaterialId()), fetchOptions); Material material = map.get(update.getMaterialId()); assertEquals(material.getProperties().get("DESCRIPTION"), description); @@ -76,7 +76,7 @@ public class UpdateMaterialTest extends AbstractSampleTest MaterialPermId selfParentId = new MaterialPermId("SRM_1", "SELF_REF"); MaterialPermId selfChildId = new MaterialPermId("SRM_1A", "SELF_REF"); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(selfChildId, selfParentId), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(selfChildId, selfParentId), fetchOptions); Material parent = map.get(selfParentId); Material child = map.get(selfChildId); @@ -104,7 +104,7 @@ public class UpdateMaterialTest extends AbstractSampleTest fetchOptions.withProperties(); fetchOptions.withMaterialProperties().withType(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(update.getMaterialId()), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(update.getMaterialId()), fetchOptions); Material material = map.get(update.getMaterialId()); assertEquals(material.getProperties().get("ANY_MATERIAL"), "1 (GENE)"); @@ -132,7 +132,7 @@ public class UpdateMaterialTest extends AbstractSampleTest MaterialFetchOptions fetchOptions = new MaterialFetchOptions(); fetchOptions.withTags(); - Map<IMaterialId, Material> map = v3api.mapMaterials(sessionToken, Arrays.asList(update.getMaterialId()), fetchOptions); + Map<IMaterialId, Material> map = v3api.getMaterials(sessionToken, Arrays.asList(update.getMaterialId()), fetchOptions); Material material = map.get(update.getMaterialId()); Set<Tag> tags = material.getTags(); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateProjectTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateProjectTest.java index 90dda301fa9959a4bc98313a7aa265699a1fc634..79a439dff1e7a6657b40e271197c2fbf88c76579 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateProjectTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateProjectTest.java @@ -170,7 +170,7 @@ public class UpdateProjectTest extends AbstractTest projectFetchOptions.withSpace(); projectFetchOptions.withExperiments().withSamples().withSpace(); - Map<IProjectId, Project> projectMap = v3api.mapProjects(sessionToken, Arrays.asList(projectId), projectFetchOptions); + Map<IProjectId, Project> projectMap = v3api.getProjects(sessionToken, Arrays.asList(projectId), projectFetchOptions); for (Project project : projectMap.values()) { @@ -192,7 +192,7 @@ public class UpdateProjectTest extends AbstractTest v3api.updateProjects(sessionToken, Arrays.asList(update)); - projectMap = v3api.mapProjects(sessionToken, Arrays.asList(projectId), projectFetchOptions); + projectMap = v3api.getProjects(sessionToken, Arrays.asList(projectId), projectFetchOptions); for (Project project : projectMap.values()) { @@ -222,7 +222,7 @@ public class UpdateProjectTest extends AbstractTest List<ProjectPermId> projectPermIds = v3api.createProjects(sessionToken, Arrays.asList(projectCreation)); - Map<IProjectId, Project> projectMap = v3api.mapProjects(sessionToken, projectPermIds, projectFetchOptions); + Map<IProjectId, Project> projectMap = v3api.getProjects(sessionToken, projectPermIds, projectFetchOptions); Project project = projectMap.values().iterator().next(); assertAttachments(project.getAttachments()); @@ -239,7 +239,7 @@ public class UpdateProjectTest extends AbstractTest v3api.updateProjects(sessionToken, Arrays.asList(projectUpdate)); - projectMap = v3api.mapProjects(sessionToken, projectPermIds, projectFetchOptions); + projectMap = v3api.getProjects(sessionToken, projectPermIds, projectFetchOptions); project = projectMap.values().iterator().next(); assertAttachments(project.getAttachments(), attachmentCreation); @@ -252,7 +252,7 @@ public class UpdateProjectTest extends AbstractTest final IProjectId projectId1 = new ProjectIdentifier("/CISD/NEMO"); final IProjectId projectId2 = new ProjectIdentifier("/TEST-SPACE/TEST-PROJECT"); - Map<IProjectId, Project> map = v3api.mapProjects(sessionToken, Arrays.asList(projectId1, projectId2), new ProjectFetchOptions()); + Map<IProjectId, Project> map = v3api.getProjects(sessionToken, Arrays.asList(projectId1, projectId2), new ProjectFetchOptions()); Project project1 = map.get(projectId1); Project project2 = map.get(projectId2); @@ -272,7 +272,7 @@ public class UpdateProjectTest extends AbstractTest v3api.updateProjects(sessionToken, Arrays.asList(update1, update2)); - map = v3api.mapProjects(sessionToken, Arrays.asList(projectId1, projectId2), new ProjectFetchOptions()); + map = v3api.getProjects(sessionToken, Arrays.asList(projectId1, projectId2), new ProjectFetchOptions()); project1 = map.get(projectId1); project2 = map.get(projectId2); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateSampleTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateSampleTest.java index f57d6d6f732c00bafb616668ed1ea06e078bf7c7..2a27897c68baa3f77245b6865c97e09575c6f9f9 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateSampleTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateSampleTest.java @@ -86,7 +86,7 @@ public class UpdateSampleTest extends AbstractSampleTest fetchOptions.withExperiment(); fetchOptions.withProperties(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 1); @@ -156,7 +156,7 @@ public class UpdateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 1); @@ -230,7 +230,7 @@ public class UpdateSampleTest extends AbstractSampleTest fetchOptions.withExperiment(); fetchOptions.withProperties(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 1); @@ -311,7 +311,7 @@ public class UpdateSampleTest extends AbstractSampleTest fetchOptions.withExperiment(); fetchOptions.withProperties(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 1); @@ -369,7 +369,7 @@ public class UpdateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withExperiment(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 1); @@ -453,7 +453,7 @@ public class UpdateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withExperiment(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 1); @@ -478,7 +478,7 @@ public class UpdateSampleTest extends AbstractSampleTest v3api.updateSamples(sessionToken, Arrays.asList(update)); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(sampleId), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(sampleId), fetchOptions); Sample sample = map.get(sampleId); Assert.assertNull(sample.getExperiment()); @@ -561,7 +561,7 @@ public class UpdateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withProperties(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 1); @@ -609,7 +609,7 @@ public class UpdateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withProperties(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, sampleIds, fetchOptions); Sample foundSample = map.get(sampleId); assertEquals(foundSample.getProperty(systemPropertyName), systemPropertyValue); @@ -639,7 +639,7 @@ public class UpdateSampleTest extends AbstractSampleTest fetchOptions.withContainer(); fetchOptions.withComponents(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 2); @@ -778,7 +778,7 @@ public class UpdateSampleTest extends AbstractSampleTest fetchOptions.withContainer(); fetchOptions.withComponents(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 5); @@ -928,7 +928,7 @@ public class UpdateSampleTest extends AbstractSampleTest fetchOptions.withParents(); fetchOptions.withChildren(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 5); @@ -1078,7 +1078,7 @@ public class UpdateSampleTest extends AbstractSampleTest fetchOptions.withParents(); fetchOptions.withChildren(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); AssertionUtil.assertCollectionSize(samples, 5); @@ -1228,7 +1228,7 @@ public class UpdateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withAttachments().withContent(); - Map<ISampleId, Sample> samples = v3api.mapSamples(sessionToken, sampleIds, fetchOptions); + Map<ISampleId, Sample> samples = v3api.getSamples(sessionToken, sampleIds, fetchOptions); Map<String, Attachment> attachmentMap1 = assertAttachments(samples.get(sampleId1).getAttachments(), attachmentCreation1, attachmentCreation3); @@ -1279,7 +1279,7 @@ public class UpdateSampleTest extends AbstractSampleTest SampleFetchOptions fetchOptions = new SampleFetchOptions(); fetchOptions.withTags(); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, ids, fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, ids, fetchOptions); List<Sample> samples = new ArrayList<Sample>(map.values()); assertCollectionSize(samples, 2); @@ -1311,7 +1311,7 @@ public class UpdateSampleTest extends AbstractSampleTest v3api.updateSamples(sessionToken, Arrays.asList(update1)); - Map<ISampleId, Sample> map = v3api.mapSamples(sessionToken, Arrays.asList(permId), fetchOptions); + Map<ISampleId, Sample> map = v3api.getSamples(sessionToken, Arrays.asList(permId), fetchOptions); Sample sample = map.get(permId); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateSpaceTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateSpaceTest.java index ae667a23f81fee14dda5a58a7d12685724b04ce6..f198faf16bce0e26be1c433b81926285c03f43a4 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateSpaceTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateSpaceTest.java @@ -85,7 +85,7 @@ public class UpdateSpaceTest extends AbstractTest final ISpaceId spaceId1 = new SpacePermId(spaceCode1); final ISpaceId spaceId2 = new SpacePermId(spaceCode2); - Map<ISpaceId, Space> map = v3api.mapSpaces(sessionToken, Arrays.asList(spaceId1, spaceId2), new SpaceFetchOptions()); + Map<ISpaceId, Space> map = v3api.getSpaces(sessionToken, Arrays.asList(spaceId1, spaceId2), new SpaceFetchOptions()); Space space1 = map.get(spaceId1); Space space2 = map.get(spaceId2); @@ -104,7 +104,7 @@ public class UpdateSpaceTest extends AbstractTest update2.setDescription("a new description 2"); v3api.updateSpaces(sessionToken, Arrays.asList(update1, update2)); - map = v3api.mapSpaces(sessionToken, Arrays.asList(spaceId1, spaceId2), new SpaceFetchOptions()); + map = v3api.getSpaces(sessionToken, Arrays.asList(spaceId1, spaceId2), new SpaceFetchOptions()); space1 = map.get(spaceId1); space2 = map.get(spaceId2); diff --git a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateTagTest.java b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateTagTest.java index 55f692e541b8ada152ad3c391082bdde19e286b7..6b27b81e92c85cb3256ba2e116485095e4f9fb96 100644 --- a/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateTagTest.java +++ b/openbis/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/UpdateTagTest.java @@ -353,7 +353,7 @@ public class UpdateTagTest extends AbstractTest fetchOptions.withOwner(); String sessionToken = v3api.login(user, password); - Map<ITagId, Tag> tags = v3api.mapTags(sessionToken, Arrays.asList(tagId), fetchOptions); + Map<ITagId, Tag> tags = v3api.getTags(sessionToken, Arrays.asList(tagId), fetchOptions); return tags.get(tagId); } diff --git a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/IApplicationServerApi.java b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/IApplicationServerApi.java index d267ec35e51ef41390e6dc9c87f79a40da12452b..460b0f507359308d5751a2f3b9c010e807ed95a1 100644 --- a/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/IApplicationServerApi.java +++ b/openbis_api/source/java/ch/ethz/sis/openbis/generic/asapi/v3/IApplicationServerApi.java @@ -165,25 +165,25 @@ public interface IApplicationServerApi extends IRpcService public void updateTags(String sessionToken, List<TagUpdate> tagUpdates); - public Map<ISpaceId, Space> mapSpaces(String sessionToken, List<? extends ISpaceId> spaceIds, + public Map<ISpaceId, Space> getSpaces(String sessionToken, List<? extends ISpaceId> spaceIds, SpaceFetchOptions fetchOptions); - public Map<IProjectId, Project> mapProjects(String sessionToken, List<? extends IProjectId> projectIds, + public Map<IProjectId, Project> getProjects(String sessionToken, List<? extends IProjectId> projectIds, ProjectFetchOptions fetchOptions); - public Map<IExperimentId, Experiment> mapExperiments(String sessionToken, List<? extends IExperimentId> experimentIds, + public Map<IExperimentId, Experiment> getExperiments(String sessionToken, List<? extends IExperimentId> experimentIds, ExperimentFetchOptions fetchOptions); - public Map<ISampleId, Sample> mapSamples(String sessionToken, List<? extends ISampleId> sampleIds, SampleFetchOptions fetchOptions); + public Map<ISampleId, Sample> getSamples(String sessionToken, List<? extends ISampleId> sampleIds, SampleFetchOptions fetchOptions); - public Map<IDataSetId, DataSet> mapDataSets(String sessionToken, List<? extends IDataSetId> dataSetIds, DataSetFetchOptions fetchOptions); + public Map<IDataSetId, DataSet> getDataSets(String sessionToken, List<? extends IDataSetId> dataSetIds, DataSetFetchOptions fetchOptions); - public Map<IMaterialId, Material> mapMaterials(String sessionToken, List<? extends IMaterialId> materialIds, MaterialFetchOptions fetchOptions); + public Map<IMaterialId, Material> getMaterials(String sessionToken, List<? extends IMaterialId> materialIds, MaterialFetchOptions fetchOptions); - public Map<IVocabularyTermId, VocabularyTerm> mapVocabularyTerms(String sessionToken, List<? extends IVocabularyTermId> vocabularyTermIds, + public Map<IVocabularyTermId, VocabularyTerm> getVocabularyTerms(String sessionToken, List<? extends IVocabularyTermId> vocabularyTermIds, VocabularyTermFetchOptions fetchOptions); - public Map<ITagId, Tag> mapTags(String sessionToken, List<? extends ITagId> tagIds, TagFetchOptions fetchOptions); + public Map<ITagId, Tag> getTags(String sessionToken, List<? extends ITagId> tagIds, TagFetchOptions fetchOptions); public SearchResult<Space> searchSpaces(String sessionToken, SpaceSearchCriteria searchCriteria, SpaceFetchOptions fetchOptions); diff --git a/openbis_api/sourceTest/java/ch/ethz/sis/openbis/generic/sharedapi/v3/dictionary.txt b/openbis_api/sourceTest/java/ch/ethz/sis/openbis/generic/sharedapi/v3/dictionary.txt index 0b05d31cc93d1e5853f70d641e6b2ea088618fff..5e959982697f02f337eae4b43b90d9e3cae2819c 100644 --- a/openbis_api/sourceTest/java/ch/ethz/sis/openbis/generic/sharedapi/v3/dictionary.txt +++ b/openbis_api/sourceTest/java/ch/ethz/sis/openbis/generic/sharedapi/v3/dictionary.txt @@ -447,12 +447,12 @@ logout LongDateFormat main mangleToplevel -mapDataSets -mapExperiments -mapMaterials -mapProjects -mapSamples -mapSpaces +getDataSets +getExperiments +getMaterials +getProjects +getSamples +getSpaces Material MaterialCreation MaterialDeletionOptions @@ -1060,7 +1060,7 @@ get Vocabulary Term Id set Vocabulary Term Id update Vocabulary Terms Vocabulary Term Update -map Vocabulary Terms +get Vocabulary Terms get Replaced Id get Replacement Id Vocabulary Term Replacement @@ -1109,7 +1109,7 @@ I Project Holder I Projects Holder I Sample Holder I Samples Holder -map Tags +get Tags set Materials with Materials with Materials Using