package org.action;
import java.util.List;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import org.entity.Functions;
import org.entity.Role;
import org.service.IRoleFacade;
import org.service.impl.RoleFacade;
import com.opensymphony.xwork2.ActionSupport;
public class RoleAction extends ActionSupport {
/**
*
*/
private static final long serialVersionUID = 1L;
private Role r;
private List<Role> lr;
private List<Functions> lf;
private List<Integer> fid;
private IRoleFacade irf = new RoleFacade();
public String operateRole(){
lr = irf.operateRole();
return SUCCESS;
}
public String newRole(){
irf.newRole(r);
return SUCCESS;
}
public String findSingleRole(){
r = irf.findSingleRole(r);
return SUCCESS;
}
public String modifyRole(){
irf.modifyRole(r);
return SUCCESS;
}
public String removeRole(){
irf.modifyRole(r);
return SUCCESS;
}
public String authorization(){
ServletActionContext.getRequest().setAttribute("had", irf.hadRole(r));
HttpSession hs = ServletActionContext.getRequest().getSession();
hs.setAttribute("r", r);
lf = irf.authorization(r);
return SUCCESS;
}
public String changeRf(){
HttpSession hs = ServletActionContext.getRequest().getSession();
irf.changeRf(fid, (Role)hs.getAttribute("r"));
return SUCCESS;
}
public Role getR() {
return r;
}
public void setR(Role r) {
this.r = r;
}
public List<Role> getLr() {
return lr;
}
public void setLr(List<Role> lr) {
this.lr = lr;
}
public List<Functions> getLf() {
return lf;
}
public void setLf(List<Functions> lf) {
this.lf = lf;
}
public List<Integer> getFid() {
return fid;
}
public void setFid(List<Integer> fid) {
this.fid = fid;
}
public IRoleFacade getIrf() {
return irf;
}
public void setIrf(IRoleFacade irf) {
this.irf = irf;
}
}
最近下载更多
haofeichongtian LV1
2020年8月10日
jaonsang LV25
2020年2月26日
1986818968 LV1
2019年6月28日
tsoft11 LV5
2019年6月24日
2812891656 LV1
2019年6月22日
ruyiruhe123456 LV6
2019年6月16日
核核核 LV16
2019年6月12日
vvcvv_cool LV8
2019年5月27日
Chloez LV7
2019年4月26日
zixiQAQ LV3
2019年4月24日
最近浏览更多
interface LV22
2024年8月10日
uni-code_0123 LV1
2023年12月7日
六六六六六六 LV2
2022年6月7日
tangjj7260 LV18
2021年10月26日
那一年你在哪 LV13
2020年12月26日
MARTIN66666 LV1
2020年12月26日
yewentao LV5
2020年12月9日
newhaijun LV16
2020年12月3日
123456nty LV37
2020年10月21日
judy0971 LV12
2020年9月6日

