Skip to content
Snippets Groups Projects
Commit 0cb087e3 authored by felmer's avatar felmer
Browse files

SSDM-3220: Shortcuts for identifiers of component sample no longer supported...

SSDM-3220: Shortcuts for identifiers of component sample no longer supported in public V3 API. But they are still supported for ServiceForDataStoreServer.performEntityOpertations(). System tests adapted and new tests added.

SVN: 35733
parent 50d8c9a8
No related branches found
No related tags found
No related merge requests found
Showing
with 65 additions and 34 deletions
...@@ -47,7 +47,7 @@ public abstract class AbstractMapObjectByIdExecutor<ID extends IObjectId, OBJECT ...@@ -47,7 +47,7 @@ public abstract class AbstractMapObjectByIdExecutor<ID extends IObjectId, OBJECT
List<IListObjectById<? extends ID, OBJECT>> listers = new ArrayList<IListObjectById<? extends ID, OBJECT>>(); List<IListObjectById<? extends ID, OBJECT>> listers = new ArrayList<IListObjectById<? extends ID, OBJECT>>();
addListers(context, listers); addListers(context, listers);
return new MapObjectById<ID, OBJECT>().map(listers, ids); return new MapObjectById<ID, OBJECT>().map(context, listers, ids);
} }
protected abstract void addListers(IOperationContext context, List<IListObjectById<? extends ID, OBJECT>> listers); protected abstract void addListers(IOperationContext context, List<IListObjectById<? extends ID, OBJECT>> listers);
......
...@@ -60,7 +60,7 @@ public class MapEntityTypeByIdExecutor implements IMapEntityTypeByIdExecutor ...@@ -60,7 +60,7 @@ public class MapEntityTypeByIdExecutor implements IMapEntityTypeByIdExecutor
new LinkedList<IListObjectById<? extends IEntityTypeId, EntityTypePE>>(); new LinkedList<IListObjectById<? extends IEntityTypeId, EntityTypePE>>();
listers.add(new ListEntityTypeByPermId(daoFactory, entityKind)); listers.add(new ListEntityTypeByPermId(daoFactory, entityKind));
return new MapObjectById<IEntityTypeId, EntityTypePE>().map(listers, entityTypeIds); return new MapObjectById<IEntityTypeId, EntityTypePE>().map(context, listers, entityTypeIds);
} }
} }
...@@ -25,6 +25,7 @@ import java.util.Set; ...@@ -25,6 +25,7 @@ import java.util.Set;
import net.lemnik.eodsql.QueryTool; import net.lemnik.eodsql.QueryTool;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.material.id.MaterialPermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.material.id.MaterialPermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.TechIdStringIdentifierRecord; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.TechIdStringIdentifierRecord;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListTechIdById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListTechIdById;
import ch.systemsx.cisd.openbis.generic.shared.basic.CodeConverter; import ch.systemsx.cisd.openbis.generic.shared.basic.CodeConverter;
...@@ -44,7 +45,7 @@ public class ListMaterialsTechIdByPermId extends AbstractListTechIdById<Materia ...@@ -44,7 +45,7 @@ public class ListMaterialsTechIdByPermId extends AbstractListTechIdById<Materia
} }
@Override @Override
protected Map<Long, MaterialPermId> createIdsByTechIdsMap(List<MaterialPermId> ids) protected Map<Long, MaterialPermId> createIdsByTechIdsMap(IOperationContext context, List<MaterialPermId> ids)
{ {
Map<String, Map<String, MaterialPermId>> groupedIdentifiers = new HashMap<>(); Map<String, Map<String, MaterialPermId>> groupedIdentifiers = new HashMap<>();
for (MaterialPermId permId : ids) for (MaterialPermId permId : ids)
......
...@@ -25,6 +25,7 @@ import java.util.Set; ...@@ -25,6 +25,7 @@ import java.util.Set;
import net.lemnik.eodsql.QueryTool; import net.lemnik.eodsql.QueryTool;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.id.ProjectIdentifier; import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.id.ProjectIdentifier;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.TechIdStringIdentifierRecord; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.TechIdStringIdentifierRecord;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListTechIdById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListTechIdById;
import ch.systemsx.cisd.openbis.generic.shared.basic.CodeConverter; import ch.systemsx.cisd.openbis.generic.shared.basic.CodeConverter;
...@@ -45,7 +46,7 @@ public class ListProjectTechIdByIdentifier extends AbstractListTechIdById<Projec ...@@ -45,7 +46,7 @@ public class ListProjectTechIdByIdentifier extends AbstractListTechIdById<Projec
} }
@Override @Override
protected Map<Long, ProjectIdentifier> createIdsByTechIdsMap(List<ProjectIdentifier> ids) protected Map<Long, ProjectIdentifier> createIdsByTechIdsMap(IOperationContext context, List<ProjectIdentifier> ids)
{ {
Map<String, Map<String, ProjectIdentifier>> groupedIdentifiers = new HashMap<>(); Map<String, Map<String, ProjectIdentifier>> groupedIdentifiers = new HashMap<>();
for (ProjectIdentifier projectIdentifier : ids) for (ProjectIdentifier projectIdentifier : ids)
......
...@@ -29,6 +29,7 @@ import java.util.Set; ...@@ -29,6 +29,7 @@ import java.util.Set;
import net.lemnik.eodsql.QueryTool; import net.lemnik.eodsql.QueryTool;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.id.SampleIdentifier; import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.id.SampleIdentifier;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.TechIdStringIdentifierRecord; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.TechIdStringIdentifierRecord;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListTechIdById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListTechIdById;
import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel;
...@@ -38,6 +39,8 @@ import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel; ...@@ -38,6 +39,8 @@ import ch.systemsx.cisd.base.exceptions.CheckedExceptionTunnel;
*/ */
public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleIdentifier> public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleIdentifier>
{ {
public static final String CONTAINER_SHORTCUT_ALLOWED_ATTRIBUTE = "container-shortcut-allowed";
private String homeSpaceCodeOrNull; private String homeSpaceCodeOrNull;
public ListSampleTechIdByIdentifier(String homeSpaceCodeOrNull) public ListSampleTechIdByIdentifier(String homeSpaceCodeOrNull)
...@@ -52,17 +55,17 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI ...@@ -52,17 +55,17 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI
} }
@Override @Override
protected Map<Long, SampleIdentifier> createIdsByTechIdsMap(List<SampleIdentifier> ids) protected Map<Long, SampleIdentifier> createIdsByTechIdsMap(IOperationContext context, List<SampleIdentifier> ids)
{ {
Map<SampleIdentifierParts, Map<String, SampleIdentifier>> groupedIdentifiers = groupIdentifiers(ids); Map<SampleIdentifierParts, Map<String, SampleIdentifier>> groupedIdentifiers = groupIdentifiers(ids);
boolean containerShortcutAllowed = getContainerShortcutAllowed(context);
Map<Long, SampleIdentifier> result = new HashMap<>(); Map<Long, SampleIdentifier> result = new HashMap<>();
SampleQuery query = QueryTool.getManagedQuery(SampleQuery.class); SampleQuery query = QueryTool.getManagedQuery(SampleQuery.class);
for (Entry<SampleIdentifierParts, Map<String, SampleIdentifier>> entry : groupedIdentifiers.entrySet()) for (Entry<SampleIdentifierParts, Map<String, SampleIdentifier>> entry : groupedIdentifiers.entrySet())
{ {
SampleIdentifierParts key = entry.getKey(); SampleIdentifierParts key = entry.getKey();
Map<String, SampleIdentifier> identifiersByCode = entry.getValue(); Map<String, SampleIdentifier> identifiersByCode = entry.getValue();
List<TechIdStringIdentifierRecord> records = list(query, key, identifiersByCode.keySet()); List<TechIdStringIdentifierRecord> records = list(query, key, identifiersByCode.keySet(), containerShortcutAllowed);
for (TechIdStringIdentifierRecord record : records) for (TechIdStringIdentifierRecord record : records)
{ {
String sampleCode = record.identifier; String sampleCode = record.identifier;
...@@ -71,6 +74,12 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI ...@@ -71,6 +74,12 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI
} }
return result; return result;
} }
private boolean getContainerShortcutAllowed(IOperationContext context)
{
Object value = context.getAttribute(CONTAINER_SHORTCUT_ALLOWED_ATTRIBUTE);
return Boolean.TRUE.equals(value);
}
private Map<SampleIdentifierParts, Map<String, SampleIdentifier>> groupIdentifiers(List<SampleIdentifier> ids) private Map<SampleIdentifierParts, Map<String, SampleIdentifier>> groupIdentifiers(List<SampleIdentifier> ids)
{ {
...@@ -92,7 +101,8 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI ...@@ -92,7 +101,8 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI
return groupedIdentifiers; return groupedIdentifiers;
} }
private List<TechIdStringIdentifierRecord> list(final SampleQuery query, final SampleIdentifierParts key, final Collection<String> codes) private List<TechIdStringIdentifierRecord> list(final SampleQuery query, final SampleIdentifierParts key,
final Collection<String> codes, boolean containerShortcutAllowed)
{ {
final String[] codesArray = codes.toArray(new String[codes.size()]); final String[] codesArray = codes.toArray(new String[codes.size()]);
final String spaceCode = key.getSpaceCodeOrNull(); final String spaceCode = key.getSpaceCodeOrNull();
...@@ -117,7 +127,7 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI ...@@ -117,7 +127,7 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI
{ {
return query.listSharedSampleTechIdsByCodesWithSomeContainer(codesToList); return query.listSharedSampleTechIdsByCodesWithSomeContainer(codesToList);
} }
}); }, containerShortcutAllowed);
} }
return query.listSharedSampleTechIdsByContainerCodeAndCodes(containerCode, codesArray); return query.listSharedSampleTechIdsByContainerCodeAndCodes(containerCode, codesArray);
} }
...@@ -139,7 +149,7 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI ...@@ -139,7 +149,7 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI
{ {
return query.listSpaceSampleTechIdsByCodesWithSomeContainer(spaceCode, codesToList); return query.listSpaceSampleTechIdsByCodesWithSomeContainer(spaceCode, codesToList);
} }
}); }, containerShortcutAllowed);
} }
return query.listSpaceSampleTechIdsByContainerCodeAndCodes(spaceCode, containerCode, codesArray); return query.listSpaceSampleTechIdsByContainerCodeAndCodes(spaceCode, containerCode, codesArray);
} }
...@@ -159,13 +169,14 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI ...@@ -159,13 +169,14 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI
{ {
return query.listProjectSampleTechIdsByCodesWithSomeContainer(spaceCode, projectCode, codesToList); return query.listProjectSampleTechIdsByCodesWithSomeContainer(spaceCode, projectCode, codesToList);
} }
}); }, containerShortcutAllowed);
} }
return query.listProjectSampleTechIdsByContainerCodeAndCodes(spaceCode, projectCode, containerCode, codesArray); return query.listProjectSampleTechIdsByContainerCodeAndCodes(spaceCode, projectCode, containerCode, codesArray);
} }
private List<TechIdStringIdentifierRecord> listWithoutContainerOrWithSomeContainerAndUniqueCode(SampleQuery query, String[] codes, private List<TechIdStringIdentifierRecord> listWithoutContainerOrWithSomeContainerAndUniqueCode(SampleQuery query,
IListAction listWithoutContainer, IListAction listWithSomeContainer) String[] codes, IListAction listWithoutContainer, IListAction listWithSomeContainer,
boolean containerShortcutAllowed)
{ {
try try
{ {
...@@ -177,7 +188,7 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI ...@@ -177,7 +188,7 @@ public class ListSampleTechIdByIdentifier extends AbstractListTechIdById<SampleI
codesNotFound.remove(found.identifier); codesNotFound.remove(found.identifier);
} }
if (codesNotFound.isEmpty()) if (codesNotFound.isEmpty() || containerShortcutAllowed == false)
{ {
return foundWithoutContainer; return foundWithoutContainer;
} }
......
...@@ -65,7 +65,7 @@ public class MapVocabularyTermByIdExecutor implements IMapVocabularyTermByIdExec ...@@ -65,7 +65,7 @@ public class MapVocabularyTermByIdExecutor implements IMapVocabularyTermByIdExec
listers.add(new ListVocabularyTermByCode(vocabulary)); listers.add(new ListVocabularyTermByCode(vocabulary));
} }
return new MapObjectById<IVocabularyTermId, VocabularyTermPE>().map(listers, vocabularyTermIds); return new MapObjectById<IVocabularyTermId, VocabularyTermPE>().map(context, listers, vocabularyTermIds);
} }
} }
...@@ -21,6 +21,8 @@ import java.util.HashMap; ...@@ -21,6 +21,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
/** /**
* @author Franz-Josef Elmer * @author Franz-Josef Elmer
*/ */
...@@ -35,12 +37,12 @@ public abstract class AbstractListTechIdById<ID> extends AbstractListObjectById< ...@@ -35,12 +37,12 @@ public abstract class AbstractListTechIdById<ID> extends AbstractListObjectById<
} }
@Override @Override
public List<Long> listByIds(List<ID> ids) public List<Long> listByIds(IOperationContext context, List<ID> ids)
{ {
idsByTechIds = createIdsByTechIdsMap(ids); idsByTechIds = createIdsByTechIdsMap(context, ids);
return new ArrayList<>(idsByTechIds.keySet()); return new ArrayList<>(idsByTechIds.keySet());
} }
protected abstract Map<Long, ID> createIdsByTechIdsMap(List<ID> ids); protected abstract Map<Long, ID> createIdsByTechIdsMap(IOperationContext context, List<ID> ids);
} }
...@@ -22,6 +22,7 @@ import java.util.List; ...@@ -22,6 +22,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.id.ObjectPermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.id.ObjectPermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.TechIdStringIdentifierRecord; import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.common.TechIdStringIdentifierRecord;
/** /**
...@@ -33,7 +34,7 @@ public abstract class AbstractListTechIdByPermId<ID extends ObjectPermId> extend ...@@ -33,7 +34,7 @@ public abstract class AbstractListTechIdByPermId<ID extends ObjectPermId> extend
{ {
@Override @Override
protected Map<Long, ID> createIdsByTechIdsMap(List<ID> ids) protected Map<Long, ID> createIdsByTechIdsMap(IOperationContext context, List<ID> ids)
{ {
List<String> permIds = new ArrayList<>(ids.size()); List<String> permIds = new ArrayList<>(ids.size());
for (ID permId : ids) for (ID permId : ids)
......
...@@ -18,6 +18,8 @@ package ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common; ...@@ -18,6 +18,8 @@ package ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common;
import java.util.List; import java.util.List;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
/** /**
* @author pkupczyk * @author pkupczyk
*/ */
...@@ -28,6 +30,6 @@ public interface IListObjectById<ID, OBJECT> ...@@ -28,6 +30,6 @@ public interface IListObjectById<ID, OBJECT>
public ID createId(OBJECT entity); public ID createId(OBJECT entity);
public List<OBJECT> listByIds(List<ID> ids); public List<OBJECT> listByIds(IOperationContext context, List<ID> ids);
} }
...@@ -25,6 +25,7 @@ import java.util.Map; ...@@ -25,6 +25,7 @@ import java.util.Map;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.id.IObjectId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.id.IObjectId;
import ch.ethz.sis.openbis.generic.asapi.v3.exceptions.UnsupportedObjectIdException; import ch.ethz.sis.openbis.generic.asapi.v3.exceptions.UnsupportedObjectIdException;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
/** /**
* @author pkupczyk * @author pkupczyk
...@@ -58,7 +59,8 @@ public class MapObjectById<ID, OBJECT> ...@@ -58,7 +59,8 @@ public class MapObjectById<ID, OBJECT>
return idClassToIdListMap; return idClassToIdListMap;
} }
private Map mapByIds(List<IListObjectById<? extends ID, OBJECT>> listers, Map<Class, List> idClassToIdListMap) private Map mapByIds(IOperationContext context, List<IListObjectById<? extends ID, OBJECT>> listers,
Map<Class, List> idClassToIdListMap)
{ {
final Map idToObject = new HashMap(); final Map idToObject = new HashMap();
...@@ -66,7 +68,7 @@ public class MapObjectById<ID, OBJECT> ...@@ -66,7 +68,7 @@ public class MapObjectById<ID, OBJECT>
{ {
List idList = idClassToIdListMap.get(idClass); List idList = idClassToIdListMap.get(idClass);
IListObjectById listerForIdClass = findLister(listers, idClass, idList); IListObjectById listerForIdClass = findLister(listers, idClass, idList);
List objects = listerForIdClass.listByIds(idList); List objects = listerForIdClass.listByIds(context, idList);
if (objects != null) if (objects != null)
{ {
for (Object object : objects) for (Object object : objects)
...@@ -92,10 +94,11 @@ public class MapObjectById<ID, OBJECT> ...@@ -92,10 +94,11 @@ public class MapObjectById<ID, OBJECT>
throw new UnsupportedObjectIdException((IObjectId) idList.iterator().next()); throw new UnsupportedObjectIdException((IObjectId) idList.iterator().next());
} }
public Map<ID, OBJECT> map(List<IListObjectById<? extends ID, OBJECT>> listers, Collection<? extends ID> ids) public Map<ID, OBJECT> map(IOperationContext context, List<IListObjectById<? extends ID, OBJECT>> listers,
Collection<? extends ID> ids)
{ {
Map<Class, List> idClassToIdListMap = groupIdsByClass(ids); Map<Class, List> idClassToIdListMap = groupIdsByClass(ids);
Map idToObjectMap = mapByIds(listers, idClassToIdListMap); Map idToObjectMap = mapByIds(context, listers, idClassToIdListMap);
Map orderedMap = new LinkedHashMap(); Map orderedMap = new LinkedHashMap();
for (ID id : ids) for (ID id : ids)
......
...@@ -21,6 +21,7 @@ import java.util.List; ...@@ -21,6 +21,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.DataSetPermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.DataSetPermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDataDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDataDAO;
import ch.systemsx.cisd.openbis.generic.shared.dto.DataPE; import ch.systemsx.cisd.openbis.generic.shared.dto.DataPE;
...@@ -51,7 +52,7 @@ public class ListDataSetByPermId extends AbstractListObjectById<DataSetPermId, D ...@@ -51,7 +52,7 @@ public class ListDataSetByPermId extends AbstractListObjectById<DataSetPermId, D
} }
@Override @Override
public List<DataPE> listByIds(List<DataSetPermId> ids) public List<DataPE> listByIds(IOperationContext context, List<DataSetPermId> ids)
{ {
Set<String> codes = new HashSet<String>(); Set<String> codes = new HashSet<String>();
......
...@@ -20,6 +20,7 @@ import java.util.ArrayList; ...@@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.FileFormatTypePermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.FileFormatTypePermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IFileFormatTypeDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IFileFormatTypeDAO;
import ch.systemsx.cisd.openbis.generic.shared.dto.FileFormatTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.FileFormatTypePE;
...@@ -50,7 +51,7 @@ public class ListFileFormatTypeByPermId extends AbstractListObjectById<FileForma ...@@ -50,7 +51,7 @@ public class ListFileFormatTypeByPermId extends AbstractListObjectById<FileForma
} }
@Override @Override
public List<FileFormatTypePE> listByIds(List<FileFormatTypePermId> ids) public List<FileFormatTypePE> listByIds(IOperationContext context, List<FileFormatTypePermId> ids)
{ {
List<FileFormatTypePE> types = new ArrayList<FileFormatTypePE>(); List<FileFormatTypePE> types = new ArrayList<FileFormatTypePE>();
......
...@@ -20,6 +20,7 @@ import java.util.ArrayList; ...@@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.LocatorTypePermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.dataset.id.LocatorTypePermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.ILocatorTypeDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.ILocatorTypeDAO;
import ch.systemsx.cisd.openbis.generic.shared.dto.LocatorTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.LocatorTypePE;
...@@ -50,7 +51,7 @@ public class ListLocatorTypeByPermId extends AbstractListObjectById<LocatorTypeP ...@@ -50,7 +51,7 @@ public class ListLocatorTypeByPermId extends AbstractListObjectById<LocatorTypeP
} }
@Override @Override
public List<LocatorTypePE> listByIds(List<LocatorTypePermId> ids) public List<LocatorTypePE> listByIds(IOperationContext context, List<LocatorTypePermId> ids)
{ {
List<LocatorTypePE> types = new ArrayList<LocatorTypePE>(); List<LocatorTypePE> types = new ArrayList<LocatorTypePE>();
......
...@@ -20,6 +20,7 @@ import java.util.LinkedList; ...@@ -20,6 +20,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.datastore.id.DataStorePermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.datastore.id.DataStorePermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDataStoreDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDataStoreDAO;
import ch.systemsx.cisd.openbis.generic.shared.dto.DataStorePE; import ch.systemsx.cisd.openbis.generic.shared.dto.DataStorePE;
...@@ -50,7 +51,7 @@ public class ListDataStoreByPermId extends AbstractListObjectById<DataStorePermI ...@@ -50,7 +51,7 @@ public class ListDataStoreByPermId extends AbstractListObjectById<DataStorePermI
} }
@Override @Override
public List<DataStorePE> listByIds(List<DataStorePermId> ids) public List<DataStorePE> listByIds(IOperationContext context, List<DataStorePermId> ids)
{ {
List<DataStorePE> dataStores = new LinkedList<DataStorePE>(); List<DataStorePE> dataStores = new LinkedList<DataStorePE>();
......
...@@ -20,6 +20,7 @@ import java.util.LinkedList; ...@@ -20,6 +20,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.deletion.id.DeletionTechId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.deletion.id.DeletionTechId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDeletionDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDeletionDAO;
import ch.systemsx.cisd.openbis.generic.shared.dto.DeletionPE; import ch.systemsx.cisd.openbis.generic.shared.dto.DeletionPE;
...@@ -50,7 +51,7 @@ public class ListDeletionByTechId extends AbstractListObjectById<DeletionTechId, ...@@ -50,7 +51,7 @@ public class ListDeletionByTechId extends AbstractListObjectById<DeletionTechId,
} }
@Override @Override
public List<DeletionPE> listByIds(List<DeletionTechId> ids) public List<DeletionPE> listByIds(IOperationContext context, List<DeletionTechId> ids)
{ {
List<Long> techIds = new LinkedList<Long>(); List<Long> techIds = new LinkedList<Long>();
......
...@@ -20,6 +20,7 @@ import java.util.LinkedList; ...@@ -20,6 +20,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.id.EntityTypePermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.id.EntityTypePermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IEntityTypeDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IEntityTypeDAO;
...@@ -52,7 +53,7 @@ public class ListEntityTypeByPermId extends AbstractListObjectById<EntityTypePer ...@@ -52,7 +53,7 @@ public class ListEntityTypeByPermId extends AbstractListObjectById<EntityTypePer
} }
@Override @Override
public List<EntityTypePE> listByIds(List<EntityTypePermId> ids) public List<EntityTypePE> listByIds(IOperationContext context, List<EntityTypePermId> ids)
{ {
List<String> permIds = new LinkedList<String>(); List<String> permIds = new LinkedList<String>();
......
...@@ -22,6 +22,7 @@ import java.util.List; ...@@ -22,6 +22,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentIdentifier; import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentIdentifier;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IProjectDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IProjectDAO;
...@@ -59,7 +60,7 @@ public class ListExperimentByIdentifier extends AbstractListObjectById<Experimen ...@@ -59,7 +60,7 @@ public class ListExperimentByIdentifier extends AbstractListObjectById<Experimen
} }
@Override @Override
public List<ExperimentPE> listByIds(List<ExperimentIdentifier> experimentIdentifiers) public List<ExperimentPE> listByIds(IOperationContext context, List<ExperimentIdentifier> experimentIdentifiers)
{ {
List<ExperimentPE> experiments = new LinkedList<ExperimentPE>(); List<ExperimentPE> experiments = new LinkedList<ExperimentPE>();
......
...@@ -20,6 +20,7 @@ import java.util.LinkedList; ...@@ -20,6 +20,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentPermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentPermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO;
import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE; import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
...@@ -50,7 +51,7 @@ public class ListExperimentByPermId extends AbstractListObjectById<ExperimentPer ...@@ -50,7 +51,7 @@ public class ListExperimentByPermId extends AbstractListObjectById<ExperimentPer
} }
@Override @Override
public List<ExperimentPE> listByIds(List<ExperimentPermId> ids) public List<ExperimentPE> listByIds(IOperationContext context, List<ExperimentPermId> ids)
{ {
List<String> permIds = new LinkedList<String>(); List<String> permIds = new LinkedList<String>();
......
...@@ -20,6 +20,7 @@ import java.util.LinkedList; ...@@ -20,6 +20,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.externaldms.id.ExternalDmsPermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.externaldms.id.ExternalDmsPermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExternalDataManagementSystemDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExternalDataManagementSystemDAO;
import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataManagementSystemPE; import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataManagementSystemPE;
...@@ -50,7 +51,7 @@ public class ListExternalDmsByPermId extends AbstractListObjectById<ExternalDmsP ...@@ -50,7 +51,7 @@ public class ListExternalDmsByPermId extends AbstractListObjectById<ExternalDmsP
} }
@Override @Override
public List<ExternalDataManagementSystemPE> listByIds(List<ExternalDmsPermId> ids) public List<ExternalDataManagementSystemPE> listByIds(IOperationContext context, List<ExternalDmsPermId> ids)
{ {
List<ExternalDataManagementSystemPE> externalDmses = new LinkedList<ExternalDataManagementSystemPE>(); List<ExternalDataManagementSystemPE> externalDmses = new LinkedList<ExternalDataManagementSystemPE>();
......
...@@ -21,6 +21,7 @@ import java.util.List; ...@@ -21,6 +21,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.material.id.MaterialPermId; import ch.ethz.sis.openbis.generic.asapi.v3.dto.material.id.MaterialPermId;
import ch.ethz.sis.openbis.generic.server.asapi.v3.executor.IOperationContext;
import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById; import ch.ethz.sis.openbis.generic.server.asapi.v3.helper.common.AbstractListObjectById;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.IMaterialDAO; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IMaterialDAO;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.MaterialIdentifier; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.MaterialIdentifier;
...@@ -52,7 +53,7 @@ public class ListMaterialsByPermId extends AbstractListObjectById<MaterialPermId ...@@ -52,7 +53,7 @@ public class ListMaterialsByPermId extends AbstractListObjectById<MaterialPermId
} }
@Override @Override
public List<MaterialPE> listByIds(List<MaterialPermId> ids) public List<MaterialPE> listByIds(IOperationContext context, List<MaterialPermId> ids)
{ {
System.out.println("list by ids: " + ids); System.out.println("list by ids: " + ids);
Set<MaterialIdentifier> codes = new HashSet<MaterialIdentifier>(); Set<MaterialIdentifier> codes = new HashSet<MaterialIdentifier>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment