/* * Created on Feb 23, 2005 * */ package net.sourceforge.fenixedu.presentationTier.Action.projectsManagement; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sourceforge.fenixedu.applicationTier.IUserView; import net.sourceforge.fenixedu.applicationTier.Filtro.exception.FenixFilterException; import net.sourceforge.fenixedu.applicationTier.Servico.exceptions.FenixServiceException; import net.sourceforge.fenixedu.dataTransferObject.projectsManagement.InfoRubric; import net.sourceforge.fenixedu.framework.factory.ServiceManagerServiceFactory; import net.sourceforge.fenixedu.presentationTier.Action.base.FenixAction; import net.sourceforge.fenixedu.util.StringUtils; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import pt.ist.fenixWebFramework.security.UserView; /** * @author Susana Fernandes * */ public class InstitucionalProjectManagerIndexAction extends FenixAction { @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws FenixFilterException, FenixServiceException { final IUserView userView = UserView.getUser(); final Boolean it = StringUtils.isEmpty(request.getParameter("it")) ? false : true; request.setAttribute("it", it); ServiceManagerServiceFactory.executeService("ReviewProjectAccess", new Object[] { userView.getPerson(), mapping.getModuleConfig().getPrefix(), it }); List infoCostCenterList = (List) ServiceManagerServiceFactory.executeService("ReadUserCostCenters", new Object[] { userView.getPerson(), mapping.getModuleConfig().getPrefix(), false }); request.setAttribute("infoCostCenterList", infoCostCenterList); request.setAttribute("infoCostCenter", new InfoRubric()); return mapping.findForward("success"); } }