本文整理匯總了Java中com.liferay.exportimport.kernel.staging.StagingUtil類的典型用法代碼示例。如果您正苦於以下問題:Java StagingUtil類的具體用法?Java StagingUtil怎麽用?Java StagingUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
StagingUtil類屬於com.liferay.exportimport.kernel.staging包,在下文中一共展示了StagingUtil類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handleException
import com.liferay.exportimport.kernel.staging.StagingUtil; //導入依賴的package包/類
@Override
public String handleException(BackgroundTask backgroundTask, Exception e) {
JSONObject jsonObject = StagingUtil.getExceptionMessagesJSONObject(getLocale(backgroundTask), e,
getExportImportConfiguration(backgroundTask));
return jsonObject.toString();
}
示例2: handleUploadException
import com.liferay.exportimport.kernel.staging.StagingUtil; //導入依賴的package包/類
protected void handleUploadException(ActionRequest actionRequest, ActionResponse actionResponse, String folderName,
Exception e) throws Exception {
_log.info("handleUploadException()");
HttpServletResponse response = _portal.getHttpServletResponse(actionResponse);
response.setContentType(ContentTypes.TEXT_HTML);
response.setStatus(HttpServletResponse.SC_OK);
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
deleteTempFileEntry(themeDisplay.getScopeGroupId(), folderName);
JSONObject jsonObject = StagingUtil.getExceptionMessagesJSONObject(themeDisplay.getLocale(), e,
(ExportImportConfiguration) null);
JSONPortletResponseUtil.writeJSON(actionRequest, actionResponse, jsonObject);
}