From 33ebbf559e046267c5a9937c67980f2a9bc72945 Mon Sep 17 00:00:00 2001 From: tpylak <tpylak> Date: Wed, 3 Mar 2010 14:07:34 +0000 Subject: [PATCH] LMS-1375 GroupIdentifierPredicate -> SpaceIdentifierPredicate SVN: 15015 --- .../openbis/generic/shared/ICommonServer.java | 10 +++++----- .../generic/shared/IETLLIMSService.java | 6 +++--- .../predicate/ExperimentUpdatesPredicate.java | 8 ++++---- .../ListSamplesByPropertyPredicate.java | 10 +++++----- .../predicate/NewExperimentPredicate.java | 2 +- .../NullableGroupIdentifierPredicate.java | 4 ++-- .../predicate/ProjectUpdatesPredicate.java | 12 ++++++------ .../SampleOwnerIdentifierPredicate.java | 8 ++++---- .../predicate/SampleUpdatesPredicate.java | 8 ++++---- ...cate.java => SpaceIdentifierPredicate.java} | 4 ++-- .../plugin/generic/shared/IGenericServer.java | 4 ++-- .../generic/shared/ICommonServer.java.expected | 10 +++++----- .../shared/IETLLIMSService.java.expected | 6 +++--- .../predicate/AbstractTechIdPredicateTest.java | 2 +- .../NewSamplesWithTypePredicateTest.java | 2 +- ....java => SpaceIdentifierPredicateTest.java} | 18 +++++++++--------- 16 files changed, 57 insertions(+), 57 deletions(-) rename openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/{GroupIdentifierPredicate.java => SpaceIdentifierPredicate.java} (95%) rename openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/{GroupIdentifierPredicateTest.java => SpaceIdentifierPredicateTest.java} (90%) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java index 52ac134a7f0..ad8c45f1af7 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java @@ -28,7 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.ReturnVa import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodePredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSampleCriteriaPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ProjectUpdatesPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleTechIdPredicate; @@ -203,7 +203,7 @@ public interface ICommonServer extends IServer public void registerSpaceRole( String sessionToken, RoleCode roleCode, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier identifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) GroupIdentifier identifier, Grantee grantee); /** @@ -223,7 +223,7 @@ public interface ICommonServer extends IServer public void deleteSpaceRole( String sessionToken, RoleCode roleCode, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier groupIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) GroupIdentifier identifier, Grantee grantee); /** @@ -265,7 +265,7 @@ public interface ICommonServer extends IServer public List<Experiment> listExperiments( final String sessionToken, ExperimentType experimentType, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier project); + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ProjectIdentifier project); /** * For given sample {@link TechId} returns the corresponding list of {@link ExternalData}. @@ -498,7 +498,7 @@ public interface ICommonServer extends IServer @DatabaseCreateOrDeleteModification(value = ObjectKind.PROJECT) public void registerProject( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier projectIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ProjectIdentifier projectIdentifier, String description, String leaderId, Collection<NewAttachment> attachments); /** diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java index 0da8dc6a2ee..3753580d571 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/IETLLIMSService.java @@ -27,7 +27,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.ReturnVa import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodePredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; 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; @@ -86,7 +86,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleSet.ETL_SERVER) public Experiment tryToGetExperiment( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) throws UserFailureException; /** @@ -213,7 +213,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleSet.ETL_SERVER) public void registerDataSet( final String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) final ExperimentIdentifier experimentIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) final ExperimentIdentifier experimentIdentifier, final NewExternalData externalData) throws UserFailureException; /** diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java index 4960959eced..038b0f2bd04 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ExperimentUpdatesPredicate.java @@ -36,18 +36,18 @@ public class ExperimentUpdatesPredicate extends AbstractPredicate<ExperimentUpda { private final ExperimentTechIdPredicate experimentTechIdPredicate; - private final GroupIdentifierPredicate groupPredicate; + private final SpaceIdentifierPredicate spacePredicate; public ExperimentUpdatesPredicate() { this.experimentTechIdPredicate = new ExperimentTechIdPredicate(); - this.groupPredicate = new GroupIdentifierPredicate(); + this.spacePredicate = new SpaceIdentifierPredicate(); } public final void init(IAuthorizationDataProvider provider) { experimentTechIdPredicate.init(provider); - groupPredicate.init(provider); + spacePredicate.init(provider); } @Override @@ -69,7 +69,7 @@ public class ExperimentUpdatesPredicate extends AbstractPredicate<ExperimentUpda { return status; } - status = groupPredicate.doEvaluation(person, allowedRoles, updates.getProjectIdentifier()); + status = spacePredicate.doEvaluation(person, allowedRoles, updates.getProjectIdentifier()); return status; } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java index b1431fb98c1..f8035c17385 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSamplesByPropertyPredicate.java @@ -34,16 +34,16 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE; public class ListSamplesByPropertyPredicate extends AbstractPredicate<ListSamplesByPropertyCriteria> { - private final GroupIdentifierPredicate groupPredicate; + private final SpaceIdentifierPredicate spacePredicate; public ListSamplesByPropertyPredicate() { - this.groupPredicate = new GroupIdentifierPredicate(); + this.spacePredicate = new SpaceIdentifierPredicate(); } public final void init(IAuthorizationDataProvider provider) { - groupPredicate.init(provider); + spacePredicate.init(provider); } @Override @@ -56,7 +56,7 @@ public class ListSamplesByPropertyPredicate extends Status doEvaluation(final PersonPE person, final List<RoleWithIdentifier> allowedRoles, final ListSamplesByPropertyCriteria criteria) { - assert groupPredicate.initialized : "Predicate has not been initialized"; - return groupPredicate.doEvaluation(person, allowedRoles, criteria.getGroupIdentifier()); + assert spacePredicate.initialized : "Predicate has not been initialized"; + return spacePredicate.doEvaluation(person, allowedRoles, criteria.getGroupIdentifier()); } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentPredicate.java index d756cfdad29..dcb007fc8fb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewExperimentPredicate.java @@ -31,7 +31,7 @@ public final class NewExperimentPredicate extends { public NewExperimentPredicate() { - super(new GroupIdentifierPredicate()); + super(new SpaceIdentifierPredicate()); } // diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NullableGroupIdentifierPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NullableGroupIdentifierPredicate.java index 94ae9934737..5d7edcd3b84 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NullableGroupIdentifierPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NullableGroupIdentifierPredicate.java @@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.generic.shared.authorization.predicate; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier; /** - * An <code>IPredicate</code> implementation based on {@link GroupIdentifierPredicate} which allows + * An <code>IPredicate</code> implementation based on {@link SpaceIdentifierPredicate} which allows * the identifier to be null. * * @author Tomasz Pylak @@ -29,7 +29,7 @@ public class NullableGroupIdentifierPredicate extends { public NullableGroupIdentifierPredicate() { - super(new GroupIdentifierPredicate()); + super(new SpaceIdentifierPredicate()); } @Override diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java index 89030bab6e8..959a0021a71 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ProjectUpdatesPredicate.java @@ -34,16 +34,16 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier; */ public class ProjectUpdatesPredicate extends AbstractPredicate<ProjectUpdatesDTO> { - private final GroupIdentifierPredicate groupPredicate; + private final SpaceIdentifierPredicate spacePredicate; public ProjectUpdatesPredicate() { - this.groupPredicate = new GroupIdentifierPredicate(); + this.spacePredicate = new SpaceIdentifierPredicate(); } public final void init(IAuthorizationDataProvider provider) { - groupPredicate.init(provider); + spacePredicate.init(provider); } @Override @@ -56,9 +56,9 @@ public class ProjectUpdatesPredicate extends AbstractPredicate<ProjectUpdatesDTO Status doEvaluation(final PersonPE person, final List<RoleWithIdentifier> allowedRoles, final ProjectUpdatesDTO updates) { - assert groupPredicate.initialized : "Predicate has not been initialized"; + assert spacePredicate.initialized : "Predicate has not been initialized"; Status status; - status = groupPredicate.doEvaluation(person, allowedRoles, updates.getIdentifier()); + status = spacePredicate.doEvaluation(person, allowedRoles, updates.getIdentifier()); if (status.equals(Status.OK) == false) { return status; @@ -69,7 +69,7 @@ public class ProjectUpdatesPredicate extends AbstractPredicate<ProjectUpdatesDTO GroupIdentifier newGroupIdentifier = new GroupIdentifier(updates.getIdentifier().getDatabaseInstanceCode(), newGroupCode); - status = groupPredicate.doEvaluation(person, allowedRoles, newGroupIdentifier); + status = spacePredicate.doEvaluation(person, allowedRoles, newGroupIdentifier); } return status; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java index 80d855c5599..848a0fe98ea 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleOwnerIdentifierPredicate.java @@ -31,7 +31,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleOwnerIdentif */ public final class SampleOwnerIdentifierPredicate extends AbstractPredicate<SampleOwnerIdentifier> { - private final GroupIdentifierPredicate groupIdentifierPredicate; + private final SpaceIdentifierPredicate spacePredicate; private final DatabaseInstanceIdentifierPredicate databaseInstanceIdentifierPredicate; @@ -42,7 +42,7 @@ public final class SampleOwnerIdentifierPredicate extends AbstractPredicate<Samp public SampleOwnerIdentifierPredicate(boolean isReadAccess) { - groupIdentifierPredicate = new GroupIdentifierPredicate(); + spacePredicate = new SpaceIdentifierPredicate(); databaseInstanceIdentifierPredicate = new DatabaseInstanceIdentifierPredicate(isReadAccess); } @@ -52,7 +52,7 @@ public final class SampleOwnerIdentifierPredicate extends AbstractPredicate<Samp public final void init(IAuthorizationDataProvider provider) { - groupIdentifierPredicate.init(provider); + spacePredicate.init(provider); databaseInstanceIdentifierPredicate.init(provider); } @@ -72,7 +72,7 @@ public final class SampleOwnerIdentifierPredicate extends AbstractPredicate<Samp .getDatabaseInstanceLevel()); } else { - return groupIdentifierPredicate.doEvaluation(person, allowedRoles, value + return spacePredicate.doEvaluation(person, allowedRoles, value .getGroupLevel()); } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java index 1174ac7bd20..36e0c003202 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SampleUpdatesPredicate.java @@ -35,21 +35,21 @@ public class SampleUpdatesPredicate extends AbstractPredicate<SampleUpdatesDTO> { private final SampleTechIdPredicate sampleTechIdPredicate; - private final GroupIdentifierPredicate groupPredicate; + private final SpaceIdentifierPredicate spacePredicate; private final SampleOwnerIdentifierPredicate samplePredicate; public SampleUpdatesPredicate() { this.sampleTechIdPredicate = new SampleTechIdPredicate(); - this.groupPredicate = new GroupIdentifierPredicate(); + this.spacePredicate = new SpaceIdentifierPredicate(); this.samplePredicate = new SampleOwnerIdentifierPredicate(); } public final void init(IAuthorizationDataProvider provider) { sampleTechIdPredicate.init(provider); - groupPredicate.init(provider); + spacePredicate.init(provider); samplePredicate.init(provider); } @@ -73,7 +73,7 @@ public class SampleUpdatesPredicate extends AbstractPredicate<SampleUpdatesDTO> if (updates.getExperimentIdentifierOrNull() != null) { status = - groupPredicate.doEvaluation(person, allowedRoles, updates + spacePredicate.doEvaluation(person, allowedRoles, updates .getExperimentIdentifierOrNull()); if (status.equals(Status.OK) == false) return status; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicate.java similarity index 95% rename from openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicate.java rename to openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicate.java index 02acb0dfd41..2bdb9c78e43 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicate.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicate.java @@ -30,9 +30,9 @@ import ch.systemsx.cisd.openbis.generic.shared.util.GroupCodeHelper; * * @author Christian Ribeaud */ -public class GroupIdentifierPredicate extends AbstractGroupPredicate<GroupIdentifier> +public class SpaceIdentifierPredicate extends AbstractGroupPredicate<GroupIdentifier> { - public GroupIdentifierPredicate() + public SpaceIdentifierPredicate() { } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/shared/IGenericServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/shared/IGenericServer.java index 7ac4533d6b1..c01ef8a8f95 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/shared/IGenericServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/shared/IGenericServer.java @@ -31,7 +31,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetUpdatesPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ExperimentUpdatesPredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewExperimentPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplePredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.NewSamplesWithTypePredicate; @@ -98,7 +98,7 @@ public interface IGenericServer extends IServer @RolesAllowed(RoleSet.OBSERVER) public Experiment getExperimentInfo( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ExperimentIdentifier identifier); + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ExperimentIdentifier identifier); /** * For given {@link TechId} returns the corresponding {@link Experiment}. diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected index 52ac134a7f0..ad8c45f1af7 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected @@ -28,7 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.ReturnVa import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodePredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ListSampleCriteriaPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.ProjectUpdatesPredicate; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SampleTechIdPredicate; @@ -203,7 +203,7 @@ public interface ICommonServer extends IServer public void registerSpaceRole( String sessionToken, RoleCode roleCode, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier identifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) GroupIdentifier identifier, Grantee grantee); /** @@ -223,7 +223,7 @@ public interface ICommonServer extends IServer public void deleteSpaceRole( String sessionToken, RoleCode roleCode, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier groupIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) GroupIdentifier identifier, Grantee grantee); /** @@ -265,7 +265,7 @@ public interface ICommonServer extends IServer public List<Experiment> listExperiments( final String sessionToken, ExperimentType experimentType, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier project); + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ProjectIdentifier project); /** * For given sample {@link TechId} returns the corresponding list of {@link ExternalData}. @@ -498,7 +498,7 @@ public interface ICommonServer extends IServer @DatabaseCreateOrDeleteModification(value = ObjectKind.PROJECT) public void registerProject( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier projectIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ProjectIdentifier projectIdentifier, String description, String leaderId, Collection<NewAttachment> attachments); /** 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 0da8dc6a2ee..3753580d571 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 @@ -27,7 +27,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.ReturnVa import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RoleSet; import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAllowed; import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.DataSetCodePredicate; -import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.GroupIdentifierPredicate; +import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.SpaceIdentifierPredicate; 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; @@ -86,7 +86,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleSet.ETL_SERVER) public Experiment tryToGetExperiment( String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) ExperimentIdentifier experimentIdentifier) throws UserFailureException; /** @@ -213,7 +213,7 @@ public interface IETLLIMSService extends IServer, ISessionProvider @RolesAllowed(RoleSet.ETL_SERVER) public void registerDataSet( final String sessionToken, - @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) final ExperimentIdentifier experimentIdentifier, + @AuthorizationGuard(guardClass = SpaceIdentifierPredicate.class) final ExperimentIdentifier experimentIdentifier, final NewExternalData externalData) throws UserFailureException; /** diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java index 12d073e4e5e..b6b3b4a1b2d 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java @@ -35,7 +35,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE; /** * Test cases for corresponding {@link AbstractTechIdPredicate} class implementation. * - * @see GroupIdentifierPredicateTest + * @see SpaceIdentifierPredicateTest * @author Piotr Buczek */ public final class AbstractTechIdPredicateTest extends AuthorizationTestCase diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicateTest.java index a2b56b47319..18d60a6fb3b 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicateTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplesWithTypePredicateTest.java @@ -42,7 +42,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleOwnerIdentif public class NewSamplesWithTypePredicateTest extends AuthorizationTestCase { - IPredicate<SampleOwnerIdentifier> delegate; + private IPredicate<SampleOwnerIdentifier> delegate; @Override @BeforeMethod diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java similarity index 90% rename from openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicateTest.java rename to openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java index 00a531fa5f4..abf3a280580 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/GroupIdentifierPredicateTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java @@ -31,16 +31,16 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE; import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier; /** - * Test cases for corresponding {@link GroupIdentifierPredicate} class. + * Test cases for corresponding {@link SpaceIdentifierPredicate} class. * * @author Christian Ribeaud */ -public final class GroupIdentifierPredicateTest extends AuthorizationTestCase +public final class SpaceIdentifierPredicateTest extends AuthorizationTestCase { @Test public final void testDoEvaluationWithoutDAOFactory() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); boolean fail = true; try { @@ -57,7 +57,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test(expectedExceptions = UserFailureException.class) public final void testExceptionBecauseInstanceDoesNotExist() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(INSTANCE_CODE, null, Collections.<GroupPE> emptyList()); predicate.init(provider); predicate.doEvaluation(createPerson(), createRoles(false), new GroupIdentifier( @@ -68,7 +68,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test(expectedExceptions = UserFailureException.class) public final void testExceptionBecauseGroupDoesNotExist() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(INSTANCE_CODE, createDatabaseInstance(), Collections.<GroupPE> emptyList()); predicate.init(provider); predicate.doEvaluation(createPerson(), createRoles(false), new GroupIdentifier( @@ -79,7 +79,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test public final void testSuccessfulEvaluation() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(INSTANCE_CODE, createDatabaseInstance(), createGroups()); predicate.init(provider); final Status evaluation = @@ -92,7 +92,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test public final void testSuccessfulEvaluationWithHomeGroup() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(INSTANCE_CODE, createDatabaseInstance(), createGroups()); predicate.init(provider); final PersonPE person = createPerson(); @@ -108,7 +108,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase @Test public final void testFailedEvaluation() { - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); prepareProvider(ANOTHER_INSTANCE_CODE, createAnotherDatabaseInstance(), createGroups()); predicate.init(provider); final Status evaluation = @@ -125,7 +125,7 @@ public final class GroupIdentifierPredicateTest extends AuthorizationTestCase public final void testAccessAnotherGroup() { final DatabaseInstancePE homeDatabaseInstance = createDatabaseInstance(); - final GroupIdentifierPredicate predicate = new GroupIdentifierPredicate(); + final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate(); final List<GroupPE> groups = createGroups(); groups.add(createGroup(ANOTHER_GROUP_CODE, homeDatabaseInstance)); prepareProvider(INSTANCE_CODE, createDatabaseInstance(), groups); -- GitLab