7,22 → 7,31 |
import org.apache.struts.action.ActionMapping; |
import org.apache.struts.action.ActionForm; |
import org.apache.struts.action.ActionForward; |
import ak.strutsx.ErrorHandlerX; |
|
import ak.hostcaptain.core.model.User; |
import ak.hostcaptain.core.model.SystemUserManager; |
import ak.hostcaptain.core.model.InetDomainManager; |
import ak.hostcaptain.core.model.MailboxManager; |
import ak.hostcaptain.core.model.MailAliasManager; |
|
public final class IndexAction |
extends Action |
implements ErrorHandlerX |
{ |
public void handleErrors(ActionMapping mapping, ActionForm form, |
HttpServletRequest request, HttpServletResponse response) |
throws Exception |
{ |
} |
|
public ActionForward execute(ActionMapping mapping, ActionForm form, |
HttpServletRequest request, HttpServletResponse response) |
throws Exception |
{ |
User user = (User)request.getSession().getAttribute("user"); |
|
request.setAttribute("showSystemUsers", |
new Boolean(SystemUserManager.getInstance().areSystemUsersAvailable(user))); |
request.setAttribute("showInetDomains", |
new Boolean(InetDomainManager.getInstance().areInetDomainsAvailable(user))); |
request.setAttribute("showMailboxes", |
new Boolean(MailboxManager.getInstance().areMailboxesAvailable(user))); |
request.setAttribute("showMailAliases", |
new Boolean(MailAliasManager.getInstance().areMailAliasesAvailable(user))); |
|
return mapping.findForward("success"); |
} |
} |