From c466a2e1212921b03787c765854f440fc5187483 Mon Sep 17 00:00:00 2001 From: mka Date: Wed, 6 Mar 2013 07:56:27 +0000 Subject: [PATCH] Compare method signature and DocToCompareDTO are added. --- .../src/org/splat/service/StudyService.java | 10 +++ .../org/splat/service/StudyServiceImpl.java | 6 ++ .../splat/service/dto/DocToCompareDTO.java | 78 +++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java diff --git a/Workspace/Siman-Common/src/org/splat/service/StudyService.java b/Workspace/Siman-Common/src/org/splat/service/StudyService.java index a7353d6..aea1958 100644 --- a/Workspace/Siman-Common/src/org/splat/service/StudyService.java +++ b/Workspace/Siman-Common/src/org/splat/service/StudyService.java @@ -23,6 +23,7 @@ import org.splat.exception.InvalidParameterException; import org.splat.kernel.InvalidPropertyException; import org.splat.kernel.MissedPropertyException; import org.splat.kernel.MultiplyDefinedException; +import org.splat.service.dto.DocToCompareDTO; /** * This class defines all methods for creation, modification the study. @@ -303,4 +304,13 @@ public interface StudyService { * @return true if succeeded, false if study doesn't have a description. */ boolean removeDescription(final Long studyId) throws InvalidParameterException; + + /** + * Compare the studies and generate the file that contains the result chart. + * @param docsList the list of dtos each contains information: + * StudyTitle, ScenarioTitle, PathToFile in vault. + * + * @return path to result file in the vault. + */ + String compare (List docsList); } diff --git a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java index 1826adb..7cc8ace 100644 --- a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java @@ -52,6 +52,7 @@ import org.splat.kernel.InvalidPropertyException; import org.splat.kernel.MissedPropertyException; import org.splat.kernel.MultiplyDefinedException; import org.splat.log.AppLogger; +import org.splat.service.dto.DocToCompareDTO; import org.splat.service.technical.IndexService; import org.splat.service.technical.ProjectSettingsService; import org.splat.service.technical.ProjectSettingsServiceImpl; @@ -1127,6 +1128,11 @@ public class StudyServiceImpl implements StudyService { } return study.removeAttribute(study.getAttribute(DescriptionAttribute.class)); } + + @Override + public String compare (final List docsList) { + return "Result file path"; + } /** * Get project settings. diff --git a/Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java b/Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java new file mode 100644 index 0000000..2925ece --- /dev/null +++ b/Workspace/Siman-Common/src/org/splat/service/dto/DocToCompareDTO.java @@ -0,0 +1,78 @@ +/***************************************************************************** + * Company EURIWARE + * Application SIMAN + * File $Id$ + * Creation date 06.03.2013 + * @author Author: Maria KRUCHININA + * @version Revision: + *****************************************************************************/ + +package org.splat.service.dto; + +/** + * DTO contains information about documents that can be compared + * in the frame of "Compare the Studies" operation. + * @author Maria KRUCHININA + * + */ +public class DocToCompareDTO { + + /** + * Study title. + */ + private String _studyTitle; + /** + * Scenario title. + */ + private String _scenarioTitle; + /** + * Path to comparable file in vault. + */ + private String _pathToFile; + + + /** + * Get the studyTitle. + * @return the studyTitle + */ + public String getStudyTitle() { + return _studyTitle; + } + /** + * Set the studyTitle. + * @param studyTitle the studyTitle to set + */ + public void setStudyTitle(final String studyTitle) { + _studyTitle = studyTitle; + } + /** + * Get the scenarioTitle. + * @return the scenarioTitle + */ + public String getScenarioTitle() { + return _scenarioTitle; + } + /** + * Set the scenarioTitle. + * @param scenarioTitle the scenarioTitle to set + */ + public void setScenarioTitle(final String scenarioTitle) { + _scenarioTitle = scenarioTitle; + } + /** + * Get the pathToFile. + * @return the pathToFile + */ + public String getPathToFile() { + return _pathToFile; + } + /** + * Set the pathToFile. + * @param pathToFile the pathToFile to set + */ + public void setPathToFile(final String pathToFile) { + _pathToFile = pathToFile; + } + + +} -- 2.39.2