Package services.gui
Class ResultRemover
- java.lang.Object
-
- services.gui.ResultRemover
-
@Singleton public class ResultRemover extends java.lang.ObjectService class that removes ComponentResults or StudyResults. It's used by controllers or other services.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidremoveComponentResults(java.util.List<java.lang.Long> componentResultIdList, User user, boolean removeEmptyStudyResults)Retrieves all ComponentResults that correspond to the IDs in the given String, checks them and if yes, removes them.voidremoveStudyResults(java.util.List<java.lang.Long> studyResultIdList, User user)Retrieves all StudyResults that correspond to the IDs in the given String, checks if the given user is allowed to remove them and if yes, removes them.
-
-
-
Method Detail
-
removeComponentResults
public void removeComponentResults(java.util.List<java.lang.Long> componentResultIdList, User user, boolean removeEmptyStudyResults) throws NotFoundException, ForbiddenExceptionRetrieves all ComponentResults that correspond to the IDs in the given String, checks them and if yes, removes them. Ignores IDs that do not point to a result. Removes result upload files.- Parameters:
componentResultIdList- List of IDs of ComponentResultsuser- For each ComponentResult it will be checked that the given user is a user of the study that the ComponentResult belongs to.- Throws:
NotFoundExceptionForbiddenException
-
removeStudyResults
public void removeStudyResults(java.util.List<java.lang.Long> studyResultIdList, User user) throws NotFoundException, ForbiddenExceptionRetrieves all StudyResults that correspond to the IDs in the given String, checks if the given user is allowed to remove them and if yes, removes them. Removes result upload files.- Parameters:
studyResultIdList- List of IDs of StudyResults.user- For each StudyResult it will be checked that the given user is a user of the study that the StudyResult belongs too.- Throws:
NotFoundExceptionForbiddenException
-
-