List of usage examples for java.lang Boolean FALSE
Boolean FALSE
To view the source code for java.lang Boolean FALSE.
Click Source Link
From source file:org.apache.streams.gnip.facebook.test.FacebookEDCSerDeTest.java
@Test public void Tests() throws Exception { xmlMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE); xmlMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE); xmlMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE); InputStream is = FacebookEDCSerDeTest.class.getResourceAsStream("/FacebookEDC.xml"); if (is == null) System.out.println("null"); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); xmlMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE); xmlMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE); xmlMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE); try {//from w ww . java2 s. c o m while (br.ready()) { String line = br.readLine(); LOGGER.debug(line); Entry xmlObject = xmlMapper.readValue(line, Entry.class); String xml = xmlMapper.writeValueAsString(xmlObject); } } catch (Exception e) { LOGGER.error(e.getMessage()); Assert.fail(); } }
From source file:io.cloudslang.engine.queue.services.recovery.MessageRecoveryServiceTest.java
@Test public void recoverMessagesBulkNoMsg() { String uuid = "uuid1"; int poolSize = 5; List<ExecutionMessage> messages = new ArrayList<>(); when(executionQueueService.pollRecovery(uuid, poolSize, ExecStatus.ASSIGNED, ExecStatus.IN_PROGRESS)) .thenReturn(messages);/*from w w w.ja v a2s .c o m*/ boolean toContinue = messageRecoveryService.recoverMessagesBulk(uuid, poolSize); assertThat("no messages, should not continue", toContinue, is(Boolean.FALSE)); verify(executionQueueService, never()).enqueue(anyList()); }
From source file:com.basp.trabajo_al_minuto.web.view.RestaurarView.java
public void restaurarClave() { FacesContext context = FacesContext.getCurrentInstance(); try {/* w w w.j a v a 2s. c om*/ Usuario u = usuarioEjb.getUsuarioByEmail(usuario.toLowerCase()); if (u != null) { if (u.getEstado()) { String nueva_clave = RandomStringUtils.random(12, true, true); if (enviarClaveRestaurada(u.getEmail(), u.getPersona().getNombre(), nueva_clave)) { u.setCambioClave(Boolean.FALSE); u.setPassword(BusinessSecurity.encrypt(nueva_clave)); usuarioEjb.updateUsuario(u); message = webMessage(CLAVE_RESTAURADA_OK); ok = Boolean.TRUE; } else { message = webMessage(CLAVE_RESTAURAD_NOT); } } else { message = webMessage(ACCESO_DENEGADO); } } else { message = webMessage(USUARIO_NO_ENCONTRADO); } } catch (BusinessException ex) { message = webMessage(USUARIO_NO_ENCONTRADO); Logger.getLogger(RestaurarView.class.getName()).log(Level.SEVERE, ex.developerException()); } finally { if (message != null) { context.addMessage(null, message); } } }
From source file:fr.itldev.koya.webscript.invitation.GetInvitationPending.java
@Override public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException { Map<String, String> urlParams = KoyaWebscript.getUrlParamsMap(req); res.setContentType("application/json"); final String invitationId = (String) urlParams.get("inviteId"); List<WorkflowTask> tasks = null; try {/*from w ww .j a v a 2s .c om*/ tasks = workflowService.getTasksForWorkflowPath(invitationId); if (tasks.size() != 1) { res.getWriter().write(Boolean.FALSE.toString()); return; } WorkflowTask task = tasks.get(0); if (taskTypeMatches(task, WorkflowModelNominatedInvitation.WF_TASK_INVITE_PENDING, WorkflowModelNominatedInvitation.WF_TASK_ACTIVIT_INVITE_PENDING)) { res.getWriter().write(Boolean.TRUE.toString()); return; } res.getWriter().write(Boolean.FALSE.toString()); return; } catch (RuntimeException rex) { } catch (Exception rex) { } res.getWriter().write(Boolean.FALSE.toString()); }
From source file:au.org.emii.geoserver.extensions.filters.layer.data.io.FilterConfigurationReaderTest.java
@Test public void readTest() throws ParserConfigurationException, SAXException, IOException { InputStream stream = null;//w w w .ja va2s.co m FilterConfigurationReader reader = new FilterConfigurationReader(""); try { stream = new ByteArrayInputStream(XML.getBytes(StandardCharsets.UTF_8)); FilterConfiguration filterConfiguration = reader.read(stream); assertEquals(4, filterConfiguration.getFilters().size()); assertEquals("integer", filterConfiguration.getFilters().get(0).getType()); assertEquals(Boolean.FALSE, filterConfiguration.getFilters().get(0).getVisualised()); assertEquals(Boolean.TRUE, filterConfiguration.getFilters().get(1).getVisualised()); assertEquals("This", filterConfiguration.getFilters().get(2).getLabel()); assertEquals("deployment_name", filterConfiguration.getFilters().get(3).getName()); assertEquals(Boolean.TRUE, filterConfiguration.getFilters().get(3).getExcludedFromDownload()); } finally { IOUtils.closeQuietly(stream); } }
From source file:com.octo.captcha.module.struts.VerifyCaptchaChallengeAction.java
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { log.debug("enter captcha challenge verification"); CaptchaService service = CaptchaServicePlugin.getInstance().getService(); String responseKey = CaptchaServicePlugin.getInstance().getResponseKey(); String captchaID;/*from ww w .j a va 2 s . co m*/ captchaID = CaptchaModuleConfigHelper.getId(httpServletRequest); // get challenge response from the request String challengeResponse = httpServletRequest.getParameter(responseKey); if (log.isDebugEnabled()) log.debug("response for id " + captchaID + " : " + challengeResponse); //cleanning the request httpServletRequest.removeAttribute(responseKey); Boolean isResponseCorrect = Boolean.FALSE; if (challengeResponse != null) { // Call the Service method try { isResponseCorrect = service.validateResponseForID(captchaID, challengeResponse); } catch (CaptchaServiceException e) { log.debug("Error during challenge verification", e); // so the user will be redirected to the error page httpServletRequest.setAttribute(CaptchaServicePlugin.getInstance().getMessageKey(), CaptchaModuleConfigHelper.getMessage(httpServletRequest)); log.debug("forward to error with message : " + CaptchaModuleConfigHelper.getMessage(httpServletRequest)); return actionMapping.findForward("error"); } } // forward user to the success URL or redirect it to the error URL if (isResponseCorrect.booleanValue()) { // clean the request and call the next action // (forward success) log.debug("correct : forward to success"); return actionMapping.findForward("success"); } else { if (log.isDebugEnabled()) { log.debug("false : forward to failure with message : " + CaptchaModuleConfigHelper.getMessage(httpServletRequest)); log.debug("in request attribute key : " + CaptchaServicePlugin.getInstance().getMessageKey()); } // If the challenge response is not specified, forward failure httpServletRequest.setAttribute(CaptchaServicePlugin.getInstance().getMessageKey(), CaptchaModuleConfigHelper.getMessage(httpServletRequest)); return actionMapping.findForward("failure") != null ? actionMapping.findForward("failure") : actionMapping.getInputForward(); } }
From source file:com.oddprints.servlets.Edit.java
@GET @Produces(MediaType.TEXT_HTML)// w w w. java 2s . co m public Viewable view(@Context HttpServletRequest req) { PersistenceManager pm = PMF.get().getPersistenceManager(); Basket basket = Basket.fromSession(req, pm); Map<String, Object> it = Maps.newHashMap(); it.put("basket", basket); req.getSession().setAttribute("basicMode", Boolean.FALSE); return new Viewable("/edit", it); }
From source file:com.inkubator.hrm.web.appraisal.PerformanceIndicatorJabatanFormController.java
@PostConstruct @Override//from w w w.ja v a 2 s . c o m public void initialization() { super.initialization(); try { isUpdate = Boolean.FALSE; String id = FacesUtil.getRequestParameter("execution"); if (StringUtils.isNotEmpty(id)) { jabatan = jabatanService.getJabatanByIdWithDetail(Long.parseLong(id.substring(1))); listPerformanceGroup = appraisalPerformanceGroupService .getAllDataFetchPerformanceIndicatorAndScoringIndex(); List<AppraisalPerformanceIndicatorJabatan> listPerformanceIndicator = appraisalPerformanceIndicatorJabatanService .getAllDataByJabatanIdFetchScoringIndex(jabatan.getId()); if (listPerformanceIndicator.size() > 0) { isUpdate = Boolean.TRUE; for (AppraisalPerformanceIndicatorJabatan appraisalPerformanceIndicatorJabatan : listPerformanceIndicator) { mapIndicatorScoreIndex.put( appraisalPerformanceIndicatorJabatan.getPerformanceIndicator().getId(), appraisalPerformanceIndicatorJabatan.getSystemScoringIndex().getId()); } } } } catch (Exception e) { LOGGER.error("error", e); } }
From source file:com.inkubator.hrm.web.appraisal.AppraisalProgramFormController.java
@PostConstruct @Override/* w ww . j a va2s .c om*/ public void initialization() { super.initialization(); try { model = new AppraisalProgramModel(); isUpdate = Boolean.FALSE; String id = FacesUtil.getRequestParameter("execution"); if (StringUtils.isNotEmpty(id)) { AppraisalProgram appraisalProgram = appraisalProgramService .getEntityByIdWithDetail(Long.parseLong(id.substring(1))); if (appraisalProgram != null) { isUpdate = Boolean.TRUE; model = getModelFromEntity(appraisalProgram); } } this.onChangeIsIndiscipline(); this.onChangeIsAchievement(); model.setListPerformanceGroup(appraisalPerformanceGroupService.getAllData()); } catch (Exception e) { LOGGER.error("error", e); } }
From source file:Main.java
/** * Sets a component's opaque status// www.java 2 s. com * * @param descriptionField * @param b */ public static JComponent setOpaque(final JComponent descriptionField, final boolean b) { descriptionField.setOpaque(b); descriptionField.putClientProperty("Synthetica.opaque", b ? Boolean.TRUE : Boolean.FALSE); return descriptionField; }