本文整理汇总了Java中com.liferay.exportimport.kernel.exception.LARTypeException类的典型用法代码示例。如果您正苦于以下问题:Java LARTypeException类的具体用法?Java LARTypeException怎么用?Java LARTypeException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LARTypeException类属于com.liferay.exportimport.kernel.exception包,在下文中一共展示了LARTypeException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doProcessAction
import com.liferay.exportimport.kernel.exception.LARTypeException; //导入依赖的package包/类
@Override
protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
_log.info("doProcessAction()");
String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
_log.info("cmd = " + cmd);
String redirect = ParamUtil.getString(actionRequest, "redirect");
try {
if (cmd.equals(Constants.ADD_TEMP)) {
addTempFileEntry(actionRequest, ExportImportHelper.TEMP_FOLDER_NAME);
validateFile(actionRequest, actionResponse, ExportImportHelper.TEMP_FOLDER_NAME);
hideDefaultSuccessMessage(actionRequest);
} else if (cmd.equals(Constants.DELETE)) {
deleteBackgroundTasks(actionRequest, actionResponse);
sendRedirect(actionRequest, actionResponse, redirect);
} else if (cmd.equals(Constants.DELETE_TEMP)) {
deleteTempFileEntry(actionRequest, actionResponse, ExportImportHelper.TEMP_FOLDER_NAME);
hideDefaultSuccessMessage(actionRequest);
} else if (cmd.equals(Constants.IMPORT)) {
importData(actionRequest, ExportImportHelper.TEMP_FOLDER_NAME);
sendRedirect(actionRequest, actionResponse, redirect);
}
} catch (Exception e) {
if (cmd.equals(Constants.ADD_TEMP) || cmd.equals(Constants.DELETE_TEMP)) {
hideDefaultSuccessMessage(actionRequest);
handleUploadException(actionRequest, actionResponse, ExportImportHelper.TEMP_FOLDER_NAME, e);
} else {
// TODO: remove dependencies to LARFile*
if (e instanceof LARFileException || e instanceof LARFileSizeException
|| e instanceof LARTypeException) {
SessionErrors.add(actionRequest, e.getClass());
} else if (e instanceof LayoutPrototypeException || e instanceof LocaleException) {
SessionErrors.add(actionRequest, e.getClass(), e);
} else {
_log.error(e, e);
SessionErrors.add(actionRequest, LayoutImportException.class.getName());
}
}
}
}
示例2: doProcessAction
import com.liferay.exportimport.kernel.exception.LARTypeException; //导入依赖的package包/类
@Override
protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
_log.info("doProcessAction()");
String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
_log.info("cmd = " + cmd);
String redirect = ParamUtil.getString(actionRequest, "redirect");
try {
if (cmd.equals(Constants.ADD_TEMP)) {
addTempFileEntry(actionRequest, ExportImportHelper.TEMP_FOLDER_NAME);
validateFile(actionRequest, actionResponse, ExportImportHelper.TEMP_FOLDER_NAME);
hideDefaultSuccessMessage(actionRequest);
} else if (cmd.equals(Constants.DELETE)) {
deleteBackgroundTasks(actionRequest, actionResponse);
hideDefaultSuccessMessage(actionRequest);
if (Validator.isNotNull(redirect)) {
sendRedirect(actionRequest, actionResponse, redirect);
}
} else if (cmd.equals(Constants.DELETE_TEMP)) {
deleteTempFileEntry(actionRequest, actionResponse, ExportImportHelper.TEMP_FOLDER_NAME);
hideDefaultSuccessMessage(actionRequest);
} else if (cmd.equals(Constants.IMPORT)) {
hideDefaultSuccessMessage(actionRequest);
importData(actionRequest, ExportImportHelper.TEMP_FOLDER_NAME);
sendRedirect(actionRequest, actionResponse, redirect);
}
} catch (Exception e) {
if (cmd.equals(Constants.ADD_TEMP) || cmd.equals(Constants.DELETE_TEMP)) {
hideDefaultSuccessMessage(actionRequest);
handleUploadException(actionRequest, actionResponse, ExportImportHelper.TEMP_FOLDER_NAME, e);
} else {
// TODO: remove dependencies to LARFile*
if (e instanceof LARFileException || e instanceof LARFileSizeException
|| e instanceof LARTypeException) {
SessionErrors.add(actionRequest, e.getClass());
} else if (e instanceof LayoutPrototypeException || e instanceof LocaleException) {
SessionErrors.add(actionRequest, e.getClass(), e);
} else {
_log.error(e, e);
SessionErrors.add(actionRequest, LayoutImportException.class.getName());
}
}
}
}
示例3: doProcessAction
import com.liferay.exportimport.kernel.exception.LARTypeException; //导入依赖的package包/类
@Override
protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
_log.info("doProcessAction()");
String cmd = ParamUtil.getString(actionRequest, Constants.CMD);
_log.info("cmd = " + cmd);
String redirect = ParamUtil.getString(actionRequest, "redirect");
try {
if (cmd.equals(Constants.ADD_TEMP)) {
addTempFileEntry(actionRequest, ExportImportHelper.TEMP_FOLDER_NAME);
validateFile(actionRequest, actionResponse, ExportImportHelper.TEMP_FOLDER_NAME);
hideDefaultSuccessMessage(actionRequest);
} else if (cmd.equals(Constants.DELETE)) {
deleteBackgroundTasks(actionRequest, actionResponse);
sendRedirect(actionRequest, actionResponse, redirect);
} else if (cmd.equals(Constants.DELETE_TEMP)) {
deleteTempFileEntry(actionRequest, actionResponse, ExportImportHelper.TEMP_FOLDER_NAME);
hideDefaultSuccessMessage(actionRequest);
} else if (cmd.equals(Constants.IMPORT)) {
importData(actionRequest, ExportImportHelper.TEMP_FOLDER_NAME);
sendRedirect(actionRequest, actionResponse, redirect);
} else if (cmd.equals("importDataFromURL")) {
_log.info("importDataFromURL");
importDataFromURL(actionRequest, ExportImportHelper.TEMP_FOLDER_NAME);
sendRedirect(actionRequest, actionResponse, redirect);
}
} catch (Exception e) {
if (cmd.equals(Constants.ADD_TEMP) || cmd.equals(Constants.DELETE_TEMP)) {
hideDefaultSuccessMessage(actionRequest);
handleUploadException(actionRequest, actionResponse, ExportImportHelper.TEMP_FOLDER_NAME, e);
} else {
// TODO: remove dependencies to LARFile*
if (e instanceof LARFileException || e instanceof LARFileSizeException
|| e instanceof LARTypeException) {
SessionErrors.add(actionRequest, e.getClass());
} else if (e instanceof LayoutPrototypeException || e instanceof LocaleException) {
SessionErrors.add(actionRequest, e.getClass(), e);
} else {
_log.error(e, e);
SessionErrors.add(actionRequest, LayoutImportException.class.getName());
}
}
}
}