TipoAula shiftType = ((InfoSiteGroupProperties) siteView.getComponent()) .getInfoGroupProperties().getShiftType(); String shiftTypeName = "Sem Shift"; if (shiftType != null) { shiftTypeName = shiftType.getFullNameTipoAula();
TipoAula shiftType = ((InfoSiteGroupProperties)siteView.getComponent()).getInfoGroupProperties().getShiftType(); String shiftTypeName = "Sem Turno"; if(shiftType!=null){ shiftTypeName = shiftType.getFullNameTipoAula();
    public ActionForward prepareImportGroupProperties(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException,            FenixFilterException {        HttpSession session = request.getSession(false);        UserView userView = (UserView) session.getAttribute(SessionConstants.U_VIEW);        String groupPropertiesCodeString = request.getParameter("groupPropertiesCode");        Integer groupPropertiesCode = new Integer(groupPropertiesCodeString);        Integer objectCode = getObjectCode(request);        ISiteComponent viewGroupProperties = new InfoSiteGroupProperties();        SiteView siteView = readSiteView(request, viewGroupProperties, null, groupPropertiesCode, null);        if (((InfoSiteGroupProperties) siteView.getComponent()).getInfoGroupProperties() == null) {            ActionErrors actionErrors = new ActionErrors();            ActionError error = null;            error = new ActionError("error.noGroupProperties.ProjectProposal");            actionErrors.add("error.noGroupProperties.ProjectProposal", error);            saveErrors(request, actionErrors);            return viewNewProjectProposals(mapping, form, request, response);        }        Object args[] = { objectCode, groupPropertiesCode };        Boolean result;        try {            result = (Boolean) ServiceManagerServiceFactory.executeService(userView,                    "VerifyIfGroupPropertiesHasProjectProposal", args);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        if (!result.booleanValue()) {            ActionErrors actionErrors = new ActionErrors();            ActionError error = null;            error = new ActionError("error.noProjectProposal");            actionErrors.add("error.noProjectProposal", error);            saveErrors(request, actionErrors);            return viewNewProjectProposals(mapping, form, request, response);        }        String enrolmentPolicyName = ((InfoSiteGroupProperties) siteView.getComponent())                .getInfoGroupProperties().getEnrolmentPolicy().getTypeFullName();        request.setAttribute("enrolmentPolicyName", enrolmentPolicyName);        TipoAula shiftType = ((InfoSiteGroupProperties) siteView.getComponent())                .getInfoGroupProperties().getShiftType();        String shiftTypeName = "Sem Shift";        if (shiftType != null) {            shiftTypeName = shiftType.getFullNameTipoAula();        }        request.setAttribute("shiftTypeName", shiftTypeName);        return mapping.findForward("importGroupProperties");    }