X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=Workspace%2FSiman-Common%2Fsrc%2Forg%2Fsplat%2Fservice%2FStudyService.java;h=507a5f3ff5244896b3d05df764685c8ee339dba7;hb=452711f3c334e2c58386bd3af4c60643e9aaaeef;hp=347a0db89ff01f0803e66f352560fcf70affecda;hpb=19da6bc3492c002aa5837a58a819e980dc36fccc;p=tools%2Fsiman.git diff --git a/Workspace/Siman-Common/src/org/splat/service/StudyService.java b/Workspace/Siman-Common/src/org/splat/service/StudyService.java index 347a0db..507a5f3 100644 --- a/Workspace/Siman-Common/src/org/splat/service/StudyService.java +++ b/Workspace/Siman-Common/src/org/splat/service/StudyService.java @@ -28,6 +28,7 @@ import org.splat.kernel.MultiplyDefinedException; import org.splat.service.dto.DocToCompareDTO; import org.splat.service.dto.DocumentDTO; import org.splat.service.dto.StudyFacadeDTO; +import org.splat.service.dto.UserDTO; import org.splat.service.dto.StudyFacadeDTO.ScenarioDTO; /** @@ -351,4 +352,30 @@ public interface StudyService { */ String compare(List docsList, final String userName) throws IncompatibleDataException; + + /** + * Get readers of a given study. + * @param studyId the study id. + * @return list of user DTO corresponding to the study readers. + * @throws InvalidParameterException if no study with such id has been found in the database. + */ + List getReaders(final long studyId) throws InvalidParameterException; + + /** + * Add reader to a given study. + * @param studyId the study id. + * @param userId the user id. + * @return true if the user has been added as a reader + * @throws InvalidParameterException if no study or user with such id has been found in the database. + */ + boolean addReader(final long studyId, final long userId) throws InvalidParameterException; + + /** + * Remove reader from a given study. + * @param studyId the study id. + * @param userId the user id. + * @return true if the relation has been found and removed + * @throws InvalidParameterException if no study or user with such id has been found in the database. + */ + boolean removeReader(final long studyId, final long userId) throws InvalidParameterException; }