From 9875982681c20bca9ba3c7dfdee4ca9151f9d3e6 Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Mon, 17 Nov 2014 10:07:27 +0000 Subject: [PATCH] SSDM-1071 : PAPER - Empty Trashcan (Reverting Changes) SVN: 32836 --- .../v1/GeneralInformationChangingService.java | 52 +------------------ ...neralInformationChangingServiceLogger.java | 15 +----- .../openbis/public/resources/js/openbis.js | 27 ---------- .../IGeneralInformationChangingService.java | 14 ----- 4 files changed, 2 insertions(+), 106 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingService.java index 40b899d91cd..f8e647ff692 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingService.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingService.java @@ -62,7 +62,7 @@ public class GeneralInformationChangingService extends AbstractServer<IGeneralInformationChangingService> implements IGeneralInformationChangingService { - public static final int MINOR_VERSION = 7; + public static final int MINOR_VERSION = 6; @Resource(name = ch.systemsx.cisd.openbis.generic.shared.ResourceNames.COMMON_SERVER) private ICommonServer server; @@ -335,54 +335,4 @@ public class GeneralInformationChangingService extends server.deletePermanentlyForced(sessionToken, TechId.createList(deletionIds)); } - @Override - public List<ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Deletion> listOriginalDeletions(String sessionToken) { - List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Deletion> deletions = server.listOriginalDeletions(sessionToken); - return translate(deletions); - } - - @Override - public List<ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Deletion> listDeletions(String sessionToken, boolean withDeletedEntities) { - List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Deletion> deletions = server.listDeletions(sessionToken, withDeletedEntities); - return translate(deletions); - } - - private List<ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Deletion> translate(List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Deletion> deletionDTOs) { - List<ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Deletion> infos = new ArrayList<ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Deletion>(); - for(ch.systemsx.cisd.openbis.generic.shared.basic.dto.Deletion deletionDTO:deletionDTOs) { - ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Deletion deletionV1 = new ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Deletion(); - deletionV1.setId(deletionDTO.getId()); - deletionV1.setTotalSamplesCount(deletionDTO.getTotalSamplesCount()); - deletionV1.setTotalExperimentsCount(deletionDTO.getTotalExperimentsCount()); - deletionV1.setTotalDatasetsCount(deletionDTO.getTotalDatasetsCount()); - deletionV1.setReasonOrNull(deletionDTO.getReason()); - for(IEntityInformationHolderWithIdentifier deleteIdentifier:deletionDTO.getDeletedEntities()) { - ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.DeletedEntity deletedEntity = new ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.DeletedEntity(); - ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.EntityKind entityKind = null; - switch(deleteIdentifier.getEntityKind()) { - case MATERIAL: - entityKind = ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.EntityKind.MATERIAL; - break; - case EXPERIMENT: - entityKind = ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.EntityKind.EXPERIMENT; - break; - case SAMPLE: - entityKind = ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.EntityKind.SAMPLE; - break; - case DATA_SET: - entityKind = ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.EntityKind.DATA_SET; - break; - } - deletedEntity.setEntityKind(entityKind); - deletedEntity.setEntityType(deleteIdentifier.getEntityType().getCode()); - deletedEntity.setId(deleteIdentifier.getId()); - deletedEntity.setPermId(deleteIdentifier.getPermId()); - deletedEntity.setIdentifier(deleteIdentifier.getIdentifier()); - deletedEntity.setCode(deleteIdentifier.getCode()); - deletionV1.getDeletedEntities().add(deletedEntity); - } - infos.add(deletionV1); - } - return infos; - } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceLogger.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceLogger.java index f1bc10a7f3b..3e717e3561c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceLogger.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationChangingServiceLogger.java @@ -231,18 +231,5 @@ class GeneralInformationChangingServiceLogger extends AbstractServerLogger imple { return 0; } - - @Override - public List<Deletion> listOriginalDeletions(String sessionToken) - { - logAccess(sessionToken, "listOriginalDeletions"); - return null; - } - - @Override - public List<Deletion> listDeletions(String sessionToken, boolean withDeletedEntities) - { - logAccess(sessionToken, "listDeletions", "withDeletedEntities(%s)", withDeletedEntities); - return null; - } + } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js index 4da74b7f0fa..0fd23a9d66d 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js @@ -1406,33 +1406,6 @@ openbis.prototype.deletePermanentlyForced = function(deletionIds, action) { }); } -/** - * @see listOriginalDeletions(String) - * @method - */ -openbis.prototype.listOriginalDeletions = function(action) { - this._internal.ajaxRequest({ - url: this._internal.generalInfoChangingServiceUrl, - data: { "method" : "listOriginalDeletions", - "params" : [ this.getSession() ] }, - success: action - }); -} - -/** - * @see listDeletions(String) - * @method - */ -openbis.prototype.listDeletions = function(withDeletedEntities, action) { - this._internal.ajaxRequest({ - url: this._internal.generalInfoChangingServiceUrl, - data: { "method" : "listDeletions", - "params" : [ this.getSession(), - withDeletedEntities ] }, - success: action - }); -} - /** * ============================================================================ * ch.systemsx.cisd.openbis.plugin.query.shared.api.v1.IQueryApiServer methods diff --git a/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/IGeneralInformationChangingService.java b/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/IGeneralInformationChangingService.java index 8281a256cf2..78016a1f8f2 100644 --- a/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/IGeneralInformationChangingService.java +++ b/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/IGeneralInformationChangingService.java @@ -262,18 +262,4 @@ public interface IGeneralInformationChangingService extends IRpcService */ public void deletePermanentlyForced(String sessionToken, List<Long> deletionIds); - /** - * List deleted entities - * - * @since 1.7 - */ - public List<Deletion> listDeletions(String sessionToken, boolean withDeletedEntities); - - /** - * List original deleted entities - * - * @since 1.7 - */ - public List<Deletion> listOriginalDeletions(String sessionToken); - } -- GitLab