diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java index dfce62c935edeeca96f9c96a9170d0e515e3f824..97eb8f7cfdd88eabfd12a3a27d4389f7e6a61a97 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/EncapsulatedOpenBISService.java @@ -19,6 +19,7 @@ package ch.systemsx.cisd.openbis.dss.generic.server; import java.util.Collection; import java.util.Date; import java.util.List; +import java.util.Map; import org.apache.commons.lang.time.DateUtils; import org.apache.log4j.Logger; @@ -256,6 +257,13 @@ public final class EncapsulatedOpenBISService implements IEncapsulatedOpenBISSer return service.tryGetSampleIdentifier(session.getSessionToken(), samplePermID); } + @Override + public Map<String, SampleIdentifier> listSampleIdentifiers(List<String> samplePermID) + throws UserFailureException + { + return service.listSamplesByPermId(session.getSessionToken(), samplePermID); + } + @Override public ExperimentType getExperimentType(String experimentTypeCode) throws UserFailureException { diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedOpenBISService.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedOpenBISService.java index 06d1109d65c6e203bbafe65f8a383d9e885c2537..d3cf704bdb171aca45b6df083ee75dd6621d37e5 100644 --- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedOpenBISService.java +++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/IEncapsulatedOpenBISService.java @@ -18,6 +18,7 @@ package ch.systemsx.cisd.openbis.dss.generic.shared; import java.util.Date; import java.util.List; +import java.util.Map; import ch.systemsx.cisd.common.exceptions.UserFailureException; import ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetInformation; @@ -133,6 +134,15 @@ public interface IEncapsulatedOpenBISService extends IEncapsulatedBasicOpenBISSe @ManagedAuthentication public SampleIdentifier tryGetSampleIdentifier(String samplePermID) throws UserFailureException; + /** + * Tries to get the sample identifier for the sample with specified permanent ID. + * + * @return <code>null</code> if nothing found. + */ + @ManagedAuthentication + public Map<String, SampleIdentifier> listSampleIdentifiers(List<String> samplePermID) + throws UserFailureException; + /** * For given (@code name} and {@code ownerId} returns the corresponding {@link Metaproject} */