diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/DataSetUpdatesCollectionPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/DataSetUpdatesCollectionPredicate.java index 524376b416867098416b71c2745af301631922e5..a2fcbd15cdc164a12973939b6eafabb34c23be43 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/DataSetUpdatesCollectionPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/DataSetUpdatesCollectionPredicate.java @@ -19,6 +19,8 @@ package ch.systemsx.cisd.openbis.generic.server.authorization.predicate; import java.util.ArrayList; import java.util.List; +import ch.systemsx.cisd.common.conversation.context.ServiceConversationsThreadContext; +import ch.systemsx.cisd.common.conversation.progress.IServiceConversationProgressListener; import ch.systemsx.cisd.common.exceptions.Status; import ch.systemsx.cisd.openbis.generic.server.authorization.IAuthorizationDataProvider; import ch.systemsx.cisd.openbis.generic.server.authorization.RoleWithIdentifier; @@ -79,8 +81,11 @@ public class DataSetUpdatesCollectionPredicate extends return Status.OK; } + IServiceConversationProgressListener progressListener = + ServiceConversationsThreadContext.getProgressListener(); List<TechId> techIds = new ArrayList<TechId>(); List<SampleOwnerIdentifier> sampleIdentifiers = new ArrayList<SampleOwnerIdentifier>(); + int index = 0; for (DataSetUpdatesDTO dataSetUpdates : value) { techIds.add(dataSetUpdates.getDatasetId()); @@ -100,6 +105,7 @@ public class DataSetUpdatesCollectionPredicate extends { sampleIdentifiers.add(sampleIdentifier); } + progressListener.update("authorizeDatasetUpdates", value.size(), ++index); } Status result = dataSetTechIdCollectionPredicate.doEvaluation(person, allowedRoles, techIds); diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/SampleUpdatesCollectionPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/SampleUpdatesCollectionPredicate.java index 1c2ead5fe3e22da5fc563ba45205891b1407ed15..9a0e11b45eedaa0a6f425adc64148d4f33391a1e 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/SampleUpdatesCollectionPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/SampleUpdatesCollectionPredicate.java @@ -19,6 +19,8 @@ package ch.systemsx.cisd.openbis.generic.server.authorization.predicate; import java.util.ArrayList; import java.util.List; +import ch.systemsx.cisd.common.conversation.context.ServiceConversationsThreadContext; +import ch.systemsx.cisd.common.conversation.progress.IServiceConversationProgressListener; import ch.systemsx.cisd.common.exceptions.Status; import ch.systemsx.cisd.openbis.generic.server.authorization.IAuthorizationDataProvider; import ch.systemsx.cisd.openbis.generic.server.authorization.RoleWithIdentifier; @@ -76,9 +78,12 @@ public class SampleUpdatesCollectionPredicate extends AbstractPredicate<List<Sam return Status.OK; } + IServiceConversationProgressListener progressListener = + ServiceConversationsThreadContext.getProgressListener(); List<TechId> techIds = new ArrayList<TechId>(value.size()); List<SampleOwnerIdentifier> sampleIdentifiers = new ArrayList<SampleOwnerIdentifier>(value.size()); + int index = 0; for (SampleUpdatesDTO sampleUpdates : value) { TechId sampleId = sampleUpdates.getSampleIdOrNull(); @@ -100,6 +105,7 @@ public class SampleUpdatesCollectionPredicate extends AbstractPredicate<List<Sam { sampleIdentifiers.add(sampleIdentifier); } + progressListener.update("authorizeSampleUpdates", value.size(), ++index); } Status result = sampleTechIdCollectionPredicate.doEvaluation(person, allowedRoles, techIds); if (result.isOK() == false)