| | |
| | | } |
| | | } |
| | | |
| | | // 첨부 파일을 등록한다. - API 에서 사용 |
| | | @Override |
| | | @Transactional |
| | | public List<AttachedFile> addAttachedFile(Workspace workspace, Issue issue, List<Map<String, Object>> files) { |
| | | if (workspace == null) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.WORKSPACE_NOT_EXIST)); |
| | | } |
| | | |
| | | if (issue == null) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.ISSUE_NOT_EXIST)); |
| | | } |
| | | |
| | | if (files != null && files.size() > 0) { |
| | | List<Map<String, Object>> convertFileMaps = Lists.newArrayList(); |
| | | |
| | | for (Map<String, Object> file : files) { |
| | | String fileName = MapUtil.getString(file, "fileName"); |
| | | String fileStr = MapUtil.getString(file, "file"); |
| | | String contentType = MapUtil.getString(file, "contentType"); |
| | | convertFileMaps.add(CommonUtil.makeFileMap(fileName, fileStr, contentType)); |
| | | } |
| | | |
| | | return this.addAttachedFiles(workspace, convertFileMaps, issue, null, AttachedType.SUMMER); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 첨부 파일을 등록한다. - 이슈 생성, 수정에서 사용 |
| | | @Override |
| | | @Transactional |