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 1961b26977ad20de1ed2efea7cbe48261ec89809..48c4b4fbfdfa6db28f59e292e5f7e21ea5f5d4fe 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 @@ -691,6 +691,15 @@ public final class EncapsulatedOpenBISService implements IEncapsulatedOpenBISSer return injectDefaultShareIdIfMissing(dataSets); } + @Override + public List<SimpleDataSetInformationDTO> listPhysicalDataSetsByArchivingStatus(DataSetArchivingStatus archivingStatus) + throws UserFailureException + { + List<SimpleDataSetInformationDTO> dataSets = service.listPhysicalDataSetsByArchivingStatus(session.getSessionToken(), + session.getDataStoreCode(), archivingStatus); + return injectDefaultShareIdIfMissing(dataSets); + } + @Override public List<SimpleDataSetInformationDTO> listPhysicalDataSetsWithUnknownSize(int chunkSize, String dataSetCodeLowerLimit) 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 ca5e3ac7748c0e464747a03b378a436a847dfd83..28ea7a3d5f171d0c2a527f1fda924f4ed9c45da8 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 @@ -288,6 +288,13 @@ public interface IEncapsulatedOpenBISService extends IEncapsulatedBasicOpenBISSe public List<SimpleDataSetInformationDTO> listPhysicalDataSetsWithUnknownSize(int chunkSize, String dataSetCodeLowerLimit) throws UserFailureException; + /** + * Returns informations about physical data sets with certain archiving status + */ + @ManagedAuthentication + public List<SimpleDataSetInformationDTO> listPhysicalDataSetsByArchivingStatus(DataSetArchivingStatus archivingStatus) + throws UserFailureException; + /** * Updates sizes of the specified physical data sets (map key: data set code, map value: data set size). */ diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServer.java index 6274e2eff3a7da07be825e0728bd48b676dcf36f..faaf4aaf78e1a961db55ca1a50bf1640a983416c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServer.java @@ -1406,6 +1406,20 @@ public class ServiceForDataStoreServer extends AbstractCommonServer<IServiceForD return SimpleDataSetHelper.filterAndTranslate(dataSets); } + @Override + @RolesAllowed(RoleWithHierarchy.SPACE_ETL_SERVER) + public List<SimpleDataSetInformationDTO> listPhysicalDataSetsByArchivingStatus(String sessionToken, String dataStoreCode, + DataSetArchivingStatus archivingStatus) + { + final Session session = getSession(sessionToken); + final DataStorePE dataStore = loadDataStore(session, dataStoreCode); + final IDatasetLister datasetLister = businessObjectFactory.createDatasetLister(session); + final List<AbstractExternalData> dataSets = + datasetLister.listByArchivingStatus(dataStore.getId(), archivingStatus, + DATASET_FETCH_OPTIONS_FILE_DATASETS); + return SimpleDataSetHelper.filterAndTranslate(dataSets); + } + @Override @RolesAllowed(RoleWithHierarchy.SPACE_ETL_SERVER) public List<SimpleDataSetInformationDTO> listPhysicalDataSetsWithUnknownSize(String sessionToken, String dataStoreCode, int chunkSize, diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServerLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServerLogger.java index 9417ead519459667c4c700b6036774c266e2f2d3..e120217c32e45fe23d3f06a35bdc3eb8688d72b5 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServerLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ServiceForDataStoreServerLogger.java @@ -418,6 +418,14 @@ public class ServiceForDataStoreServerLogger extends AbstractServerLogger implem return null; } + @Override + public List<SimpleDataSetInformationDTO> listPhysicalDataSetsByArchivingStatus(String sessionToken, String dataStoreCode, + DataSetArchivingStatus archivingStatus) throws UserFailureException + { + logAccess(sessionToken, "listPhysicalDataSetsByArchivingStatus", "DATA_STORE(%s)", dataStoreCode); + return null; + } + @Override public List<SimpleDataSetInformationDTO> listPhysicalDataSetsWithUnknownSize(String sessionToken, String dataStoreCode, int chunkSize, String dataSetCodeLowerLimit) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java index 1e7aecf647bc17fffccb45bf687f010810e14335..f6d89c414a4443f42da33d9289b082f88c89c0dd 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetLister.java @@ -16,11 +16,6 @@ package ch.systemsx.cisd.openbis.generic.server.business.bo.datasetlister; -import it.unimi.dsi.fastutil.longs.Long2ObjectMap; -import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; -import it.unimi.dsi.fastutil.longs.LongOpenHashSet; -import it.unimi.dsi.fastutil.longs.LongSet; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -38,8 +33,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import net.lemnik.eodsql.DataIterator; - import org.apache.commons.lang.time.DateUtils; import ch.rinn.restrictions.Friend; @@ -90,12 +83,16 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TrackingDataSetCriteria; import ch.systemsx.cisd.openbis.generic.shared.dto.DataSetShareId; import ch.systemsx.cisd.openbis.generic.shared.translator.DataStoreTranslator; +import it.unimi.dsi.fastutil.longs.Long2ObjectMap; +import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; +import it.unimi.dsi.fastutil.longs.LongOpenHashSet; +import it.unimi.dsi.fastutil.longs.LongSet; +import net.lemnik.eodsql.DataIterator; /** * @author Tomasz Pylak */ -@Friend(toClasses = -{ DatasetRecord.class, DatasetRelationRecord.class, DataStoreRecord.class, +@Friend(toClasses = { DatasetRecord.class, DatasetRelationRecord.class, DataStoreRecord.class, DatasetCodeWithShareIdRecord.class, IDatasetListingQuery.class }) public class DatasetLister extends AbstractLister implements IDatasetLister { @@ -514,7 +511,8 @@ public class DatasetLister extends AbstractLister implements IDatasetLister orderByDate(enrichDatasets( handleDegenerateRegistrationTimestamp( query.getDatasetsByDataStoreId(dataStoreID, limit * multiplier), - dataStoreID), datasetFetchOptions)); + dataStoreID), + datasetFetchOptions)); multiplier = multiplier << 1; } @@ -529,7 +527,19 @@ public class DatasetLister extends AbstractLister implements IDatasetLister return orderByDate(enrichDatasets( handleDegenerateRegistrationTimestamp( query.getDatasetsByDataStoreId(dataStoreID, youngerThan, limit), - dataStoreID), datasetFetchOptions)); + dataStoreID), + datasetFetchOptions)); + } + + @Override + public List<AbstractExternalData> listByArchivingStatus(long dataStoreID, DataSetArchivingStatus archivingStatus, + EnumSet<DataSetFetchOption> datasetFetchOptions) + { + checkFetchOptions(datasetFetchOptions); + + List<DatasetRecord> dataSets = query.getDatasetsByDataStoreIdWithArchivingStatus(dataStoreID, archivingStatus.name()); + + return orderByCode(enrichDatasets(dataSets, datasetFetchOptions)); } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetLister.java index 4b928eab1d5d2a8b3db8045a1bea98c91cd024b4..64ef8d8962294db04293384ae03a4f237261ee27 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetLister.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetLister.java @@ -28,6 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.DataSetFetchOption; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AbstractExternalData; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ArchiverDataSetCriteria; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataSetArchivingStatus; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IDatasetLocationNode; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TrackingDataSetCriteria; @@ -138,6 +139,12 @@ public interface IDatasetLister List<AbstractExternalData> listByDataStoreWithUnknownSize(long dataStoreID, int limit, String dataSetCodeLowerLimit, EnumSet<DataSetFetchOption> datasetFetchOptions); + /** + * Lists physical datasets by archiving status of the specified data store. + */ + List<AbstractExternalData> listByArchivingStatus(long dataStoreID, DataSetArchivingStatus archivingStatus, + EnumSet<DataSetFetchOption> datasetFetchOptions); + /** * Lists {@link DataSetShareId}s of all data sets (even those in trash) in specified data store. */ diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetListingQuery.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetListingQuery.java index a79251823a98e70c1f51056a60c8b7268650568d..b60c471bea37efa7c95b6d5531e707aa1a8d0875 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetListingQuery.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/IDatasetListingQuery.java @@ -16,16 +16,9 @@ package ch.systemsx.cisd.openbis.generic.server.business.bo.datasetlister; -import it.unimi.dsi.fastutil.longs.LongSet; - import java.util.Date; import java.util.List; -import net.lemnik.eodsql.BaseQuery; -import net.lemnik.eodsql.DataIterator; -import net.lemnik.eodsql.Select; -import net.lemnik.eodsql.TransactionQuery; -import net.lemnik.eodsql.TypeMapper; import ch.rinn.restrictions.Friend; import ch.rinn.restrictions.Private; import ch.systemsx.cisd.common.db.mapper.LongSetMapper; @@ -36,6 +29,12 @@ import ch.systemsx.cisd.openbis.generic.server.business.bo.common.IPropertyListi import ch.systemsx.cisd.openbis.generic.server.business.bo.common.MaterialEntityPropertyRecord; import ch.systemsx.cisd.openbis.generic.server.business.bo.common.VocabularyTermRecord; import ch.systemsx.cisd.openbis.generic.server.business.bo.fetchoptions.common.MetaProjectWithEntityId; +import it.unimi.dsi.fastutil.longs.LongSet; +import net.lemnik.eodsql.BaseQuery; +import net.lemnik.eodsql.DataIterator; +import net.lemnik.eodsql.Select; +import net.lemnik.eodsql.TransactionQuery; +import net.lemnik.eodsql.TypeMapper; /** * A {@link TransactionQuery} interface for obtaining large sets of dataset-related entities from the database. @@ -46,8 +45,7 @@ import ch.systemsx.cisd.openbis.generic.server.business.bo.fetchoptions.common.M * @author Tomasz Pylak */ @Private -@Friend(toClasses = -{ DataStoreRecord.class }) +@Friend(toClasses = { DataStoreRecord.class }) public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery { public static final int FETCH_SIZE = 1000; @@ -117,8 +115,7 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery /** * Returns the directly connected datasets for the given sample ids. */ - @Select(sql = SELECT_ALL + " WHERE data.samp_id = any(?{1})", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + @Select(sql = SELECT_ALL + " WHERE data.samp_id = any(?{1})", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<DatasetRecord> getDatasetsForSamples(LongSet sampleIds); /** @@ -185,26 +182,23 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery /** * Returns ids of datasets directly connected to samples with given ids. */ - @Select(sql = "select id from data where data.samp_id = any(?{1})", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + @Select(sql = "select id from data where data.samp_id = any(?{1})", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<Long> getDatasetIdsForSamples(LongSet sampleIds); - @Select(sql = "select * from data_set_relationships where data_id_child = any(?{1}) and relationship_id = ?{2}", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + @Select(sql = "select * from data_set_relationships where data_id_child = any(?{1}) and relationship_id = ?{2}", parameterBindings = { + LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<DatasetRelationRecord> listParentDataSetIds(LongSet ids, long relationShipTypeId); - @Select(sql = "select * from data_set_relationships where data_id_parent = any(?{1}) and relationship_id = ?{2}", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + @Select(sql = "select * from data_set_relationships where data_id_parent = any(?{1}) and relationship_id = ?{2}", parameterBindings = { + LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<DatasetRelationRecord> listChildrenDataSetIds(LongSet ids, long relationShipTypeId); @Select(sql = SELECT_ALL + " where data.id in (select data_id_child from data_set_relationships " - + "where data_id_parent = any(?{1}) and relationship_id = ?{2})", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + + "where data_id_parent = any(?{1}) and relationship_id = ?{2})", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<DatasetRecord> getChildrenOf(LongSet ids, Long relationshipTypeId); @Select(sql = SELECT_ALL + " where data.id in (select data_id_parent from data_set_relationships " - + "where data_id_child = any(?{1}) and relationship_id = ?{2})", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + + "where data_id_child = any(?{1}) and relationship_id = ?{2})", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<DatasetRecord> getParentsOf(LongSet ids, Long relationshipTypeId); /** @@ -241,12 +235,10 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery /** * Returns the datasets for the given <var>entityIds</var>. */ - @Select(sql = SELECT_ALL + " where data.id = any(?{1})", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + @Select(sql = SELECT_ALL + " where data.id = any(?{1})", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<DatasetRecord> getDatasets(LongSet entityIds); - @Select(sql = SELECT_ALL + " where data.code = any(?{1})", parameterBindings = - { StringArrayMapper.class }, fetchSize = FETCH_SIZE) + @Select(sql = SELECT_ALL + " where data.code = any(?{1})", parameterBindings = { StringArrayMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<DatasetRecord> getDatasets(String[] datasetCodes); @Select(sql = SELECT_ALL_EXTERNAL_DATAS @@ -279,6 +271,9 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery + " order by data.code limit ?{2}", fetchSize = FETCH_SIZE) public List<DatasetRecord> getDatasetsByDataStoreIdWithUnknownSize(long dataStoreID, int limit, String dataSetCodeLowerLimit); + @Select(sql = SELECT_ALL_EXTERNAL_DATAS + " where data.dast_id = ?{1} and external_data.status = ?{2}", fetchSize = FETCH_SIZE) + public List<DatasetRecord> getDatasetsByDataStoreIdWithArchivingStatus(long dataStoreID, String archivingStatus); + // NOTE: we list ALL data sets (even those in trash) using data_all table here @Select(sql = "SELECT code, share_id FROM data_all LEFT OUTER JOIN external_data " + "ON data_all.id = external_data.data_id WHERE data_all.dast_id = ?{1}", fetchSize = FETCH_SIZE) @@ -289,8 +284,7 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery * Returns the children/component dataset ids of the specified datasets. */ @Select(sql = "select data_id_child from data_set_relationships " - + "where data_id_parent = any(?{1}) and relationship_id = ?{2}", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + + "where data_id_parent = any(?{1}) and relationship_id = ?{2}", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<Long> getDatasetChildrenIds(LongSet sampleId, long relationshipTypeId); @Select(sql = "select comp.code from data as comp " @@ -312,8 +306,7 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery + " FROM data_set_properties pr" + " JOIN data_set_type_property_types etpt ON pr.dstpt_id=etpt.id" + " LEFT OUTER JOIN scripts sc ON etpt.script_id = sc.id" - + " WHERE pr.value is not null AND pr.ds_id = any(?{1})", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + + " WHERE pr.value is not null AND pr.ds_id = any(?{1})", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<GenericEntityPropertyRecord> getEntityPropertyGenericValues( LongSet entityIds); @@ -327,8 +320,8 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery + " FROM data_set_properties pr" + " JOIN data_set_type_property_types etpt ON pr.dstpt_id=etpt.id" + " JOIN property_types pt ON etpt.prty_id=pt.id" - + " WHERE pr.value is not null AND pr.ds_id = any(?{1}) AND pt.code = ?{2}", parameterBindings = - { LongSetMapper.class, TypeMapper.class }, fetchSize = FETCH_SIZE) + + " WHERE pr.value is not null AND pr.ds_id = any(?{1}) AND pt.code = ?{2}", parameterBindings = { LongSetMapper.class, + TypeMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<GenericEntityPropertyRecord> getEntityPropertyGenericValues( LongSet entityIds, String propertyTypeCode); @@ -341,8 +334,7 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery + " FROM data_set_properties pr" + " JOIN data_set_type_property_types etpt ON pr.dstpt_id=etpt.id" + " JOIN controlled_vocabulary_terms cvte ON pr.cvte_id=cvte.id" - + " WHERE pr.cvte_id is not null AND pr.ds_id = any(?{1})", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + + " WHERE pr.cvte_id is not null AND pr.ds_id = any(?{1})", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<VocabularyTermRecord> getEntityPropertyVocabularyTermValues( LongSet entityIds); @@ -355,8 +347,7 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery + " FROM data_set_properties pr" + " JOIN data_set_type_property_types etpt ON pr.dstpt_id=etpt.id" + " JOIN materials m ON pr.mate_prop_id=m.id " - + " WHERE pr.mate_prop_id is not null AND pr.ds_id = any(?{1})", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + + " WHERE pr.mate_prop_id is not null AND pr.ds_id = any(?{1})", parameterBindings = { LongSetMapper.class }, fetchSize = FETCH_SIZE) public DataIterator<MaterialEntityPropertyRecord> getEntityPropertyMaterialValues( LongSet entityIds); @@ -378,8 +369,8 @@ public interface IDatasetListingQuery extends BaseQuery, IPropertyListingQuery @Select(sql = "select m.id as id, m.name as name, m.description as description, p.user_id as owner_name, " + " m.private as is_private, m.creation_date as creation_date, ma.data_id as entity_id " + " from metaprojects m, metaproject_assignments ma, persons p " - + " where ma.data_id = any(?{1}) and m.owner = ?{2} and m.id = ma.mepr_id and m.owner = p.id", parameterBindings = - { LongSetMapper.class }, fetchSize = FETCH_SIZE) + + " where ma.data_id = any(?{1}) and m.owner = ?{2} and m.id = ma.mepr_id and m.owner = p.id", parameterBindings = { + LongSetMapper.class }, fetchSize = FETCH_SIZE) public List<MetaProjectWithEntityId> getMetaprojects(LongSet entityIds, Long userId); } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IServiceForDataStoreServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IServiceForDataStoreServer.java index 3b24403428277273c0687f857587e4c6c2a6eb7a..31a7f890d5343fe23e851db75ba9c72a4d0a33f1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IServiceForDataStoreServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IServiceForDataStoreServer.java @@ -426,6 +426,13 @@ public interface IServiceForDataStoreServer extends IServer, ISessionProvider public List<SimpleDataSetInformationDTO> listOldestPhysicalDataSets(final String sessionToken, String dataStore, int limit) throws UserFailureException; + /** + * Returns informations about physical data sets with unknown size that belong to the specified data store server. + */ + @Transactional(readOnly = true) + public List<SimpleDataSetInformationDTO> listPhysicalDataSetsByArchivingStatus(String sessionToken, String dataStoreCode, + DataSetArchivingStatus archivingStatus); + /** * Lists the <var>limit</var> oldest physical data sets younger than <var>youngerThan</var> belonging to specified data store. * <p>