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 fb44cf7d7a06f3ac537954a2497852130050f770..a6e1eca6b9fb416fb65734e05a193ed74e71ab9d 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); + }