From b5f034db0c06e5ec8e9f031fcf0c1b81fa9820a7 Mon Sep 17 00:00:00 2001 From: jakubs <jakubs> Date: Mon, 13 Feb 2012 14:11:25 +0000 Subject: [PATCH] LMS-2767: refactor to mark dataset for postregistration on confirming storage SVN: 24439 --- .../cisd/openbis/generic/server/ETLService.java | 15 +-------------- .../openbis/generic/server/ETLServiceLogger.java | 5 ----- .../openbis/generic/shared/IETLLIMSService.java | 11 ++--------- .../generic/shared/IETLLIMSService.java.expected | 11 ++--------- 4 files changed, 5 insertions(+), 37 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLService.java index e5e82eb54c4..120d5a95485 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLService.java @@ -1593,20 +1593,7 @@ public class ETLService extends AbstractCommonServer<IETLLIMSService> implements dataBO.loadByCode(dataSetCode); dataBO.setStorageConfirmed(); - } - - public void markDataSetForRegistration(String sessionToken, String dataSetCode) - { - assert sessionToken != null : "Unspecified session token."; - - final Session session = getSession(sessionToken); - - final IDataBO dataBO = businessObjectFactory.createDataBO(session); - dataBO.loadByCode(dataSetCode); - DataPE data = dataBO.getData(); - - daoFactory.getPostRegistrationDAO().addDataSet(data); - + daoFactory.getPostRegistrationDAO().addDataSet(dataBO.getData()); } public void markSuccessfulPostRegistration(String sessionToken, String dataSetCode) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceLogger.java index fff64efe892..43123b64146 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceLogger.java @@ -554,11 +554,6 @@ public class ETLServiceLogger extends AbstractServerLogger implements IETLLIMSSe logAccess(sessionToken, "setStorageConfirmed", "DATA_SET_CODE(%s)", dataSetCode); } - public void markDataSetForRegistration(String sessionToken, String dataSetCode) - { - logAccess(sessionToken, "setStorageConfirmed", "DATA_SET_CODE(%s)", dataSetCode); - } - public void markSuccessfulPostRegistration(String sessionToken, String dataSetCode) { logAccess(sessionToken, "markSuccessfulPostRegistration", "DATA_SET_CODE(%s)", dataSetCode); 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 1db88abf324..0266a1b05b0 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 @@ -776,22 +776,15 @@ public interface IETLLIMSService extends IServer, ISessionProvider public List<String> getTrustedCrossOriginDomains(String sessionToken); /** - * Marks the storage of dataset as confirmed. + * Marks the storage of dataset as confirmed. Adds the given dataset to post-registration queue */ @Transactional @RolesAllowed(RoleWithHierarchy.SPACE_ETL_SERVER) @DatabaseUpdateModification(value = { ObjectKind.DATA_SET }) - public void setStorageConfirmed(String sessionToken, String dataSetCode); - - /** - * Adds the given dataset to post-registration queue. - */ - @Transactional - @RolesAllowed(RoleWithHierarchy.SPACE_ETL_SERVER) @DatabaseCreateOrDeleteModification(value = { ObjectKind.POSTREGISTRATION_QUEUE }) - public void markDataSetForRegistration(String token, String dataSetCode); + public void setStorageConfirmed(String sessionToken, String dataSetCode); /** * Informs that the post-registration task for a given dataset was performed, and it should be 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 1db88abf324..0266a1b05b0 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 @@ -776,22 +776,15 @@ public interface IETLLIMSService extends IServer, ISessionProvider public List<String> getTrustedCrossOriginDomains(String sessionToken); /** - * Marks the storage of dataset as confirmed. + * Marks the storage of dataset as confirmed. Adds the given dataset to post-registration queue */ @Transactional @RolesAllowed(RoleWithHierarchy.SPACE_ETL_SERVER) @DatabaseUpdateModification(value = { ObjectKind.DATA_SET }) - public void setStorageConfirmed(String sessionToken, String dataSetCode); - - /** - * Adds the given dataset to post-registration queue. - */ - @Transactional - @RolesAllowed(RoleWithHierarchy.SPACE_ETL_SERVER) @DatabaseCreateOrDeleteModification(value = { ObjectKind.POSTREGISTRATION_QUEUE }) - public void markDataSetForRegistration(String token, String dataSetCode); + public void setStorageConfirmed(String sessionToken, String dataSetCode); /** * Informs that the post-registration task for a given dataset was performed, and it should be -- GitLab