|| certificateString.equals("Durao do Degree")
|| certificateString.equals(CertificateList.DURACAO_CURSO_STRING)
    public ActionForward choose(ActionMapping mapping, ActionForm form, HttpServletRequest request,            HttpServletResponse response) throws Exception {        HttpSession session = request.getSession(false);        if (session != null) {            DynaActionForm chooseDeclaration = (DynaActionForm) form;            IUserView userView = getUserView(request);            // remove sessions variables            session.removeAttribute(SessionConstants.INFO_STUDENT_CURRICULAR_PLAN);            session.removeAttribute(SessionConstants.MASTER_DEGREE_THESIS_DATA_VERSION);            session.removeAttribute(SessionConstants.MASTER_DEGREE_PROOF_HISTORY);            session.removeAttribute(SessionConstants.DEGREE_TYPE);            session.removeAttribute(SessionConstants.DATE);            session.removeAttribute(SessionConstants.DOCUMENT_REASON_LIST);            session.removeAttribute(SessionConstants.CERTIFICATE_TYPE);            // Get the Information            Integer requesterNumber = new Integer((String) chooseDeclaration.get("requesterNumber"));            String graduationType = (String) chooseDeclaration.get("graduationType");            String certificateString = (String) chooseDeclaration.get("certificateList");            String[] destination = (String[]) chooseDeclaration.get("destination");            if (destination.length != 0)                session.setAttribute(SessionConstants.DOCUMENT_REASON_LIST, destination);            session.setAttribute(SessionConstants.CERTIFICATE_TYPE, certificateString);            final Registration registration = Registration.readStudentByNumberAndDegreeType(requesterNumber, DegreeType.MASTER_DEGREE);            // inputs            InfoStudent infoStudent = InfoStudent.newInfoFromDomain(registration);            session.setAttribute(SessionConstants.DEGREE_TYPE, infoStudent.getDegreeType());            // output            List infoStudentCurricularPlanList = null;            // get informations            try {                if (certificateString.equals("Matrcula")                        || certificateString.equals("Matrcula e Inscrio")                        || certificateString.equals("Durao do Degree")                        || certificateString.equals("Inscrio")) {                    ArrayList states = new ArrayList();                    states.add(StudentCurricularPlanState.ACTIVE);                    states.add(StudentCurricularPlanState.SCHOOLPARTCONCLUDED);                    Object args[] = { infoStudent, Specialization.valueOf(graduationType), states };                    infoStudentCurricularPlanList = (List) ServiceManagerServiceFactory.executeService(                            userView, "CreateDeclaration", args);                } else {                    Object args[] = { infoStudent, Specialization.valueOf(graduationType) };                    infoStudentCurricularPlanList = (List) ServiceManagerServiceFactory.executeService(                            userView, "CreateDeclaration", args);                }            } catch (NonExistingServiceException e) {                throw new NonExistingActionException("A Declarao", e);            }            if (infoStudentCurricularPlanList == null) {                throw new NonExistingActionException("O aluno");            }            if (infoStudentCurricularPlanList.size() == 1) {                InfoStudentCurricularPlan infoStudentCurricularPlan = (InfoStudentCurricularPlan) infoStudentCurricularPlanList                        .get(0);                request.setAttribute("studentCurricularPlanID", infoStudentCurricularPlan                        .getIdInternal());                return chooseFinal(mapping, form, request, response);            }            request.setAttribute("studentCurricularPlans", infoStudentCurricularPlanList);            request.setAttribute("path", "Certificate");            return mapping.findForward("ChooseStudentCurricularPlan");        }        throw new Exception();    }