diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/RelationshipService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/RelationshipService.java index 387261109be492b75c7d7dd8a300779e7f13030c..7db4fe39bdeeb26fa64ab99605e13763126213c3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/RelationshipService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/RelationshipService.java @@ -39,8 +39,8 @@ public class RelationshipService implements IRelationshipService private DAOFactory daoFactory; @Override - public void reassignProject(IAuthSession session, ProjectIdentifier projectId, - ExperimentIdentifier experimentId) + public void assignExperimentToProject(IAuthSession session, ExperimentIdentifier experimentId, + ProjectIdentifier projectId) { ProjectPE previousProject = diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java index a9a21e73db7e4385e06f3ff0396ea54105aa0d9e..d613d13646e8e38db7c48ab6e88c4ea209bee25c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java @@ -426,11 +426,10 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper ProjectPE previousProject = experiment.getProject(); if (project.equals(previousProject) == false) { - relationshipService.reassignProject(session, updates.getProjectIdentifier(), - new ExperimentIdentifier(new ProjectIdentifier(previousProject.getSpace() - .getDatabaseInstance().getCode(), previousProject.getSpace().getCode(), - previousProject.getCode()), experiment - .getCode())); + relationshipService.assignExperimentToProject(session, new ExperimentIdentifier( + new ProjectIdentifier(previousProject.getSpace().getDatabaseInstance() + .getCode(), previousProject.getSpace().getCode(), previousProject + .getCode()), experiment.getCode()), updates.getProjectIdentifier()); } for (NewAttachment attachment : updates.getAttachments()) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentTable.java index b609589d2db09172ba5ba328da0a318b8731cb35..5cbab927c9386552abdd3bb46549e1f9a7de7d89 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentTable.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentTable.java @@ -255,10 +255,8 @@ public final class ExperimentTable extends AbstractBusinessObject implements IEx .getCode(), previousProject.getSpace().getCode(), previousProject .getCode()); - relationshipService - .reassignProject(session, updates.getProjectIdentifier(), - new ExperimentIdentifier(previousProjectId, experiment - .getCode())); + relationshipService.assignExperimentToProject(session, new ExperimentIdentifier( + previousProjectId, experiment.getCode()), updates.getProjectIdentifier()); } }