From db5f7ca826c4adc0e758f41bc03f9eae0e64cb91 Mon Sep 17 00:00:00 2001 From: kaloyane <kaloyane> Date: Wed, 23 Mar 2011 12:14:50 +0000 Subject: [PATCH] minor: fix unit test SVN: 20466 --- .../shared/IETLLIMSService.java.expected | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java.expected b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java.expected index fb44cf7d7a0..a6e1eca6b9f 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java.expected +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java.expected @@ -31,6 +31,8 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractT import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AtomicOperationsPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodeCollectionPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodePredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ExistingSampleOwnerIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ExistingSpaceIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSampleCriteriaPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSamplesByPropertyPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewExperimentPredicate; @@ -57,9 +59,11 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewExperiment; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSamplesWithTypes; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Person; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Project; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.VocabularyTerm; import ch.systemsx.cisd.openbis.generic.shared.dto.AtomicEntityOperationDetails; import ch.systemsx.cisd.openbis.generic.shared.dto.AtomicEntityOperationResult; @@ -72,6 +76,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.NewProperty; import ch.systemsx.cisd.openbis.generic.shared.dto.SampleUpdatesDTO; import ch.systemsx.cisd.openbis.generic.shared.dto.SimpleDataSetInformationDTO; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifier; +import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ProjectIdentifier; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleIdentifier; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SpaceIdentifier; @@ -107,7 +112,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleWithHierarchy.SPACE_ETL_SERVER) public Experiment tryToGetExperiment( String sessionToken, - @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) + @AuthorizationGuard(guardClass = ExistingSpaceIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) throws UserFailureException; /** @@ -123,7 +128,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleWithHierarchy.SPACE_ETL_SERVER) public Sample tryGetSampleWithExperiment( final String sessionToken, - @AuthorizationGuard(guardClass = SampleOwnerIdentifierPredicate.class) final SampleIdentifier sampleIdentifier) + @AuthorizationGuard(guardClass = ExistingSampleOwnerIdentifierPredicate.class) final SampleIdentifier sampleIdentifier) throws UserFailureException; /** @@ -597,9 +602,30 @@ public interface IETLLIMSService extends IServer, ISessionProvider @DatabaseUpdateModification(value = { ObjectKind.SAMPLE, ObjectKind.EXPERIMENT }) @DatabaseCreateOrDeleteModification(value = - { ObjectKind.SAMPLE, ObjectKind.EXPERIMENT, ObjectKind.DATA_SET }) + { ObjectKind.SPACE, ObjectKind.PROJECT, ObjectKind.SAMPLE, ObjectKind.EXPERIMENT, + ObjectKind.DATA_SET }) public AtomicEntityOperationResult performEntityOperations( String sessionToken, @AuthorizationGuard(guardClass = AtomicOperationsPredicate.class) AtomicEntityOperationDetails operationDetails); + /** + * Tries to return the space specified by its identifier. + */ + @Transactional(readOnly = true) + @RolesAllowed(value = + { RoleWithHierarchy.SPACE_ETL_SERVER }) + public Space tryGetSpace( + String sessionToken, + @AuthorizationGuard(guardClass = ExistingSpaceIdentifierPredicate.class) SpaceIdentifier spaceIdentifier); + + /** + * Tries to return the project specified by its identifier. + */ + @Transactional(readOnly = true) + @RolesAllowed(value = + { RoleWithHierarchy.SPACE_ETL_SERVER }) + public Project tryGetProject( + String sessionToken, + @AuthorizationGuard(guardClass = ExistingSpaceIdentifierPredicate.class) ProjectIdentifier projectIdentifier); + } -- GitLab