protected void validateFile(ActionRequest actionRequest, ActionResponse actionResponse, String folderName)
throws Exception {
_log.info("validateFile()");
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
long groupId = ParamUtil.getLong(actionRequest, "groupId");
FileEntry fileEntry = ExportImportHelperUtil.getTempFileEntry(groupId, themeDisplay.getUserId(), folderName);
InputStream inputStream = null;
try {
inputStream = _dlFileEntryLocalService.getFileAsStream(fileEntry.getFileEntryId(), fileEntry.getVersion(),
false);
// TODO: validate uploaded file
JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
//
// if ((weakMissingReferences != null) &&
// !weakMissingReferences.isEmpty()) {
//
// jsonObject.put("warningMessages",
// StagingUtil.getWarningMessagesJSONArray(themeDisplay.getLocale(),
// weakMissingReferences));
// }
JSONPortletResponseUtil.writeJSON(actionRequest, actionResponse, jsonObject);
} finally {
StreamUtil.cleanUp(inputStream);
}
}
ImportMeasurementsMVCActionCommand.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:ch-inofix-data-manager
作者:
评论列表
文章目录