📄 actionmanagerimpl.java
字号:
package org.appfuse.service.impl;
import java.util.List;
import org.appfuse.service.*;
import org.appfuse.dao.ActionDAO;
import org.appfuse.model.Action;
import org.appfuse.util.exception.*;
public class ActionManagerImpl
extends BaseManager implements ActionManager{
private ActionDAO dao;
/**
* Set the DAO for communication with the data layer.
*
* @param dao
*/
public void setActionDAO(ActionDAO dao) {
this.dao = dao;
}
/**
* @see org.appfuse.service.UserManager#getUser(java.lang.String)
*/
public Action getAction(int actionid) throws AppSystemException,
AppBusinessException {
Action action = null;
try {
action = dao.getAction(actionid);
}
catch (Exception e) {
log.error("获取模块信息失败!", e);
throw new AppBusinessException(e.getMessage(), e, ExceptionConstants.SYS_GENERAL_ERR);
}
return action;
}
/**
* @see org.appfuse.service.UserManager#getUsers(org.appfuse.model.User)
*/
public List getActions(Action action) throws AppSystemException,
AppBusinessException {
List list = null;
try {
list = dao.getActions(action);
}
catch (Exception e) {
log.error("获取模块列表失败!", e);
throw new AppBusinessException(e.getMessage(), e, ExceptionConstants.SYS_GENERAL_ERR);
}
return list;
}
/**
* @see org.appfuse.service.UserManager#saveUser(org.appfuse.model.User)
*/
public void saveAction(Action action) throws AppSystemException,
AppBusinessException {
try {
dao.saveAction(action);
}
catch (Exception e) {
log.error("保存模块失败!", e);
throw new AppBusinessException(e.getMessage(), e,
ExceptionConstants.SYS_GENERAL_ERR);
}
}
/**
* @see org.appfuse.service.UserManager#removeUser(java.lang.String)
*/
public void removeAction(int actionid) throws AppSystemException,
AppBusinessException {
if (log.isDebugEnabled()) {
log.debug("removing user: " + actionid);
}
try {
dao.removeAction(actionid);
}
catch (Exception e) {
log.error("删除模块失败!", e);
throw new AppBusinessException(e.getMessage(), e,
ExceptionConstants.SYS_GENERAL_ERR);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -