📄 topaction.java
字号:
package com.laoer.bbscs.web.action;
import com.laoer.bbscs.sys.*;
import com.laoer.bbscs.business.*;
import com.laoer.bbscs.business.service.*;
import javax.servlet.ServletContext;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionServlet;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
/**
* <p>Title: TianYi BBS</p>
* <p>Description: TianYi BBS System</p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: LAOER.COM/TIANYISOFT.NET</p>
* @author laoer
* @version 6.0
*/
public class TopAction
extends Action {
//private SysInfo sysInfo;
//private Forbid forbid;
private WebApplicationContext wac;
private IUserInfoService userInfoService;
private IFriendService friendService;
private IUserDetailService userDetailSerivce;
private IBookMarkService bookMarkService;
private IUserOnlineService userOnlineService;
private BoardList boardList;
private IGuestBookService guestBookService;
private UserInfoCache userInfoCache;
private IBoardsService boardsService;
private IForumService forumService;
private ISubscibeService subscibeService;
//private UserCache userCache;
public void setServlet(ActionServlet actionServlet) {
super.setServlet(actionServlet);
ServletContext servletContext = actionServlet.getServletContext();
this.wac = WebApplicationContextUtils.getRequiredWebApplicationContext(
servletContext);
//this.sysInfo = (SysInfo) wac.getBean("sysInfo");
//this.sysInfo = SysInfo.getInstance();
//this.forbid = (Forbid) wac.getBean("forbid");
this.boardList = (BoardList) wac.getBean("boradList");
this.userInfoService = (IUserInfoService) wac.getBean("userInfoService");
this.friendService = (IFriendService) wac.getBean("friendService");
this.userDetailSerivce = (IUserDetailService) wac.getBean(
"userDetailService");
this.bookMarkService = (IBookMarkService) wac.getBean("bookMarkService");
this.userOnlineService = (IUserOnlineService) wac.getBean(
"userOnlineService");
this.guestBookService = (IGuestBookService) wac.getBean("guestBookService");
this.userInfoCache = (UserInfoCache) wac.getBean("userInfoCache");
this.boardsService = (IBoardsService) wac.getBean("boardsService");
this.forumService = (IForumService) wac.getBean("forumService");
this.subscibeService = (ISubscibeService) wac.getBean("subscibeService");
//this.userCache = (UserCache) wac.getBean("userCache");
}
protected WebApplicationContext getWebApplicationContext() {
return wac;
}
protected SysInfo getSysInfo() {
return SysInfo.getInstance();
//return sysInfo;
}
protected Forbid getForbid() {
return Forbid.getInstance();
//return forbid;
}
protected IUserInfoService getUserInfoService() {
return userInfoService;
}
protected IFriendService getFriendService() {
return friendService;
}
protected IUserDetailService getUserDetailService() {
return userDetailSerivce;
}
protected IBookMarkService getBookMarkService() {
return bookMarkService;
}
protected IUserOnlineService getUserOnlineService() {
return userOnlineService;
}
protected BoardList getBoardList() {
return this.boardList;
}
protected UserInfoCache getUserCache() {
return this.userInfoCache;
}
/*
protected UserCache getUserCache() {
return UserCache.getInstance(userInfoService);
}
protected UserInfoCache getUserInfoCache() {
return this.userInfoCache;
}*/
protected IGuestBookService getGuestBookService() {
return guestBookService;
}
protected IBoardsService getBoardsService() {
return this.boardsService;
}
protected IForumService getForumService() {
return this.forumService;
}
protected ISubscibeService getSubscibeService() {
return this.subscibeService;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -