public ActionForward deleteLearnerFile(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
HttpSession ss = SessionManager.getSession();
UserDTO currentUser = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER);
Long detailID = WebUtil.readLongParam(request, "detailId");
if (submitFilesService == null) {
submitFilesService = getSubmitFilesService();
}
FileDetailsDTO fileDetail = submitFilesService.getFileDetails(detailID, request.getLocale());
if (fileDetail.getOwner().getUserID().equals(currentUser.getUserID()) && (StringUtils.isBlank(fileDetail.getMarks()))) {
submitFilesService.removeLearnerFile(detailID,null);
} else {
response.sendError(HttpServletResponse.SC_FORBIDDEN, "You are not allowed to delete this item");
}
return null;
}
LearnerAction.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:lams
作者:
评论列表
文章目录