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:com.sisrni.managedbean.OpcionesAdmMB.java
@PostConstruct public void init() { try {//from w w w. ja va 2 s . c o m user = new CurrentUserSessionBean(); usuario = user.getSessionUser(); listadoOpciones = new ArrayList<SsOpciones>(); ssOpciones = new SsOpciones(); listRoles = ssRolesService.findAll(); visible = Boolean.FALSE; setActualizar(false); getMenus(); } catch (Exception e) { } }
From source file:org.apache.streams.gnip.facebook.test.FacebookEDCAsActivityTest.java
@Ignore @Test/* ww w .ja v a 2s . c o m*/ public void Tests() throws Exception { InputStream is = FacebookEDCAsActivityTest.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); jsonMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE); jsonMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE); jsonMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE); try { while (br.ready()) { String line = br.readLine(); if (!StringUtils.isEmpty(line)) { LOGGER.debug(line); Object activityObject = xmlMapper.readValue(line, Object.class); String jsonString = jsonMapper.writeValueAsString(activityObject); JSONObject jsonObject = new JSONObject(jsonString); JSONObject fixedObject = GnipActivityFixer.fix(jsonObject); Activity activity = null; try { activity = jsonMapper.readValue(fixedObject.toString(), Activity.class); } catch (Exception e) { LOGGER.error(jsonObject.toString()); LOGGER.error(fixedObject.toString()); e.printStackTrace(); Assert.fail(); } //LOGGER.info(activity); } } } catch (Exception e) { LOGGER.error(e.getMessage()); Assert.fail(); } }
From source file:com.inkubator.hrm.web.recruitment.RecruitAdvertisementMediaFormController.java
@PostConstruct @Override//from w w w . j a va 2s .c om public void initialization() { super.initialization(); try { String recruitAdvertisementMediaId = FacesUtil.getRequestParameter("recruitmentId"); model = new RecruitAdvertisementMediaModel(); isUpdate = Boolean.FALSE; if (StringUtils.isNotEmpty(recruitAdvertisementMediaId)) { RecruitAdvertisementMedia recruitAdvertisementMedia = recruitAdvertisementMediaService .getEntiyByPK(Long.parseLong(recruitAdvertisementMediaId)); if (recruitAdvertisementMedia != null) { model = getModelFromEntity(recruitAdvertisementMedia); isUpdate = Boolean.TRUE; } } listAdvertisementCategory = recruitAdvertisementCategoryService.getAllData(); for (RecruitAdvertisementCategory advCategory : listAdvertisementCategory) { dropDownAdvCategory.put(advCategory.getName(), advCategory.getId()); } } catch (Exception e) { LOGGER.error("Error", e); } }
From source file:com.nfwork.dbfound.json.JSONDynaBean.java
public Object get(String name) { Object value = dynaValues.get(name); if (value != null) { return value; }/*from w ww . jav a 2 s .co m*/ Class type = getDynaProperty(name).getType(); if (type == null) { throw new NullPointerException("Unspecified property type for " + name); } if (!type.isPrimitive()) { return value; } if (type == Boolean.TYPE) { return Boolean.FALSE; } else if (type == Byte.TYPE) { return new Byte((byte) 0); } else if (type == Character.TYPE) { return new Character((char) 0); } else if (type == Short.TYPE) { return new Short((short) 0); } else if (type == Integer.TYPE) { return new Integer(0); } else if (type == Long.TYPE) { return new Long(0); } else if (type == Float.TYPE) { return new Float(0.0); } else if (type == Double.TYPE) { return new Double(0); } return null; }
From source file:org.resthub.rpc.AMQPProxy.java
/** * Handles the object invocation.// ww w. ja v a 2 s. co m * * @param proxy the proxy object to invoke * @param method the method to call * @param args the arguments to the proxy object */ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String methodName = method.getName(); Class<?>[] params = method.getParameterTypes(); // equals and hashCode are special cased if (methodName.equals("equals") && params.length == 1 && params[0].equals(Object.class)) { Object value = args[0]; if (value == null || !Proxy.isProxyClass(value.getClass())) { return Boolean.FALSE; } AMQPProxy handler = (AMQPProxy) Proxy.getInvocationHandler(value); return _factory.equals(handler._factory); } else if (methodName.equals("hashCode") && params.length == 0) { return _factory.hashCode(); } else if (methodName.equals("toString") && params.length == 0) { return "[HessianProxy " + proxy.getClass() + "]"; } ConnectionFactory connectionFactory = _factory.getConnectionFactory(); Message response = sendRequest(connectionFactory, method, args); if (response == null) { throw new TimeoutException(); } MessageProperties props = response.getMessageProperties(); boolean compressed = "deflate".equals(props.getContentEncoding()); InputStream is = new ByteArrayInputStream(response.getBody()); if (compressed) { is = new InflaterInputStream(is, new Inflater(true)); } return _factory.getSerializationHandler().readObject(method.getReturnType(), is); }
From source file:com.adito.extensions.actions.GetApplicationFileAction.java
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (response instanceof GZIPResponseWrapper) { ((GZIPResponseWrapper) response).setCompress(false); }/*from w w w . ja va 2 s. c om*/ request.setAttribute(Constants.REQ_ATTR_COMPRESS, Boolean.FALSE); String application = request.getParameter("name"); String file = request.getParameter("file").replace('\\', '/'); String ticket = request.getParameter("ticket"); if (file.equalsIgnoreCase("adito.cert")) { processApplicationCertRequest(application, ticket, response); } else { processApplicationFileRequest(application, file, ticket, request, response); } return null; }
From source file:biz.c24.io.spring.integration.validation.C24ValidatingMessageProcessor.java
@Override public Map<String, ?> processMessage(Message<?> message) { Map<String, Object> result = new HashMap<String, Object>(); Object payload = message.getPayload(); ComplexDataObject cdo;//ww w .j ava2 s .co m try { cdo = (ComplexDataObject) payload; } catch (ClassCastException e) { throw new MessagingException( "Cannot validate payload of type [" + payload != null ? payload.getClass().getName() : "null" + "]. Only ComplexDataObject is supported.", e); } ValidationManager manager = new ValidationManager(); ValidationEventCollector vec = new ValidationEventCollector(); manager.addValidationListener(vec); if (manager.validateByEvents(cdo)) { result.put(VALID, Boolean.TRUE); } else { result.put(VALID, Boolean.FALSE); } if (isAddFailEvents()) { result.put(FAIL_EVENTS, new ArrayList<ValidationEvent>(Arrays.asList(vec.getFailEvents()))); } if (isAddPassEvents()) { result.put(PASS_EVENTS, new ArrayList<ValidationEvent>(Arrays.asList(vec.getPassEvents()))); } if (isAddStatistics()) { result.put(STATISTICS, manager.getStatistics()); } return result; }
From source file:com.janrain.backplane2.server.BackplaneMessage.java
public BackplaneMessage(String clientSourceUrl, int defaultExpireSeconds, int maxExpireSeconds, Map<String, Object> data) throws BackplaneServerException, SimpleDBException { checkUpstreamExtraFields(data);/*from www . j av a 2 s.c om*/ Map<String, String> d = new LinkedHashMap<String, String>(toStringMap(data)); String id = generateMessageId(new Date()); d.put(Field.ID.getFieldName(), id); d.put(Field.SOURCE.getFieldName(), clientSourceUrl); if (data.containsKey(Field.PAYLOAD.getFieldName())) { d.put(Field.PAYLOAD.getFieldName(), extractFieldValueAsJsonString(Field.PAYLOAD, data)); } Object sticky = data.get(Field.STICKY.getFieldName()); d.put(Field.STICKY.getFieldName(), sticky != null ? sticky.toString() : Boolean.FALSE.toString()); d.put(Field.EXPIRE.getFieldName(), DateTimeUtils.processExpireTime(sticky, data.get(Field.EXPIRE.getFieldName()), defaultExpireSeconds, maxExpireSeconds)); super.init(id, d); }
From source file:ar.com.init.agros.reporting.dj.ReportExporter.java
public static void exportReportXLS(JasperPrint jp, String path) throws JRException, FileNotFoundException { JRXlsExporter exporter = new JRXlsExporter(); File outputFile = new File(path); File parentFile = outputFile.getParentFile(); if (parentFile != null) { parentFile.mkdirs();/*from w w w .ja v a 2 s . c o m*/ } FileOutputStream fos = new FileOutputStream(outputFile); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, fos); exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_IGNORE_GRAPHICS, Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_IGNORE_GRAPHICS, Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IGNORE_PAGE_MARGINS, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_IGNORE_CELL_BORDER, Boolean.TRUE); exporter.exportReport(); logger.info("XLS Report exported: " + path); }
From source file:ch.ralscha.extdirectspring.util.JsonHandlerTest.java
@Test public void testserializeObject() { JsonHandler jsonHandler = new JsonHandler(); assertEquals("null", jsonHandler.writeValueAsString(null)); assertEquals("\"a\"", jsonHandler.writeValueAsString("a")); assertEquals("1", jsonHandler.writeValueAsString(1)); assertEquals("true", jsonHandler.writeValueAsString(Boolean.TRUE)); Map<String, Object> map = new LinkedHashMap<String, Object>(); map.put("one", 1); map.put("two", "2"); map.put("three", null); map.put("four", Boolean.FALSE); map.put("five", new int[] { 1, 2 }); String expected = "{\"one\":1,\"two\":\"2\",\"three\":null,\"four\":false,\"five\":[1,2]}"; assertEquals(expected, jsonHandler.writeValueAsString(map)); JsonTestBean testBean = new JsonTestBean(1, "2", null, Boolean.FALSE, new Integer[] { 1, 2 }); expected = "{\"a\":1,\"b\":\"2\",\"c\":null,\"d\":false,\"e\":[1,2]}"; assertEquals(expected, jsonHandler.writeValueAsString(testBean)); }