List of usage examples for java.lang Boolean valueOf
public static Boolean valueOf(String s)
From source file:manage.appli.patri.awb.webapp.TechnicalInfo.java
@PostConstruct protected void initialize() { primeFaces = "Developed by : Attijariwafa"; primeFacesExt = "version: 1.0 "; jsfImpl = ""; server = "mail : a.zarrafa@gmail.com "; revision = " "; DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm"); Calendar calendar = Calendar.getInstance(); //calendar.getTime(); //calendar.setTimeInMillis(Long.valueOf(appProperties.get("timestamp"))); buildTime = "Date: " + formatter.format(calendar.getTime()); online = Boolean.valueOf(true); }
From source file:com.fluidops.iwb.widget.WidgetConfig.java
@Override public int hashCode() { return value.hashCode() ^ widget.hashCode() ^ input.hashCode() ^ Boolean.valueOf(applyToInstances).hashCode(); }
From source file:com.googlecode.psiprobe.controllers.connectors.ListConnectorsController.java
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { boolean workerThreadNameSupported = false; List connectors = containerListenerBean.getConnectors(includeRequestProcessors); if (connectors.size() > 0 && ((Connector) connectors.get(0)).getRequestProcessors().size() > 0) { workerThreadNameSupported = ((RequestProcessor) ((Connector) connectors.get(0)).getRequestProcessors() .get(0)).isWorkerThreadNameSupported(); }/*from w ww. j ava 2s. c o m*/ return new ModelAndView(getViewName()).addObject("connectors", connectors) .addObject("workerThreadNameSupported", Boolean.valueOf(workerThreadNameSupported)) .addObject("collectionPeriod", new Long(getCollectionPeriod())); }
From source file:de.hybris.platform.util.OneToManyRelationOrderTest.java
@Before public void prepareComposite() { jobEntryOne = modelService.create(CompositeJobModel.class); jobEntryOne.setCode("rootJob"); modelService.save(jobEntryOne);//from ww w . j a va2s . co m mainCompositeCronJob = createCompositeCronJob(jobEntryOne, "ourHero"); legacyMode = StringUtils.isEmpty(Config.getParameter("relation.handle.legacy")) ? null : Boolean.valueOf(Config.getParameter("relation.handle.legacy")); Config.setParameter("relation.handle.legacy", Boolean.FALSE.toString()); }
From source file:info.magnolia.debug.DumpHeadersFilter.java
@Override public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { long nr = count++; LoggingResponse wrappedResponse = new LoggingResponse(response); log.info("{} uri: {}", Long.toString(nr), request.getRequestURI()); log.info("{} session: {}", Long.toString(nr), Boolean.valueOf(request.getSession(false) != null)); StringBuffer params = new StringBuffer(); for (Enumeration paramEnum = request.getParameterNames(); paramEnum.hasMoreElements();) { String name = (String) paramEnum.nextElement(); params.append(name).append(" = ").append(StringUtils.join(request.getParameterValues(name), ",")); if (paramEnum.hasMoreElements()) { params.append("; "); }//from w w w . j a va2s .c o m } log.info("{} parameters: {}", Long.toString(nr), params); log.info("{} method: {}", Long.toString(nr), request.getMethod()); for (Enumeration en = request.getHeaderNames(); en.hasMoreElements();) { String name = (String) en.nextElement(); log.info("{} header: {}={}", new String[] { String.valueOf(nr), name, request.getHeader(name) }); } chain.doFilter(request, wrappedResponse); log.info("{} response status: {}", Long.toString(nr), Integer.toString(wrappedResponse.getStatus())); log.info("{} response length: {}", Long.toString(nr), Long.toString(wrappedResponse.getLength())); log.info("{} response mime type: {}", Long.toString(nr), wrappedResponse.getContentType()); for (Iterator iter = wrappedResponse.getHeaders().keySet().iterator(); iter.hasNext();) { String name = (String) iter.next(); log.info(request.getRequestURI() + " response: " + name + " = " + wrappedResponse.getHeaders().get(name)); } }
From source file:com.atolcd.alfresco.audit.web.scripts.ConnectionLogsGet.java
@Override protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache) { try {//from w ww . ja va2 s . co m // Map that will be passed to the template Map<String, Object> model = new HashMap<String, Object>(); // If there is at least a parameter if (req.getParameterNames().length > 1) { boolean noAdmin = false; int limit = -1; Calendar start = null, end = null; String noadminParam = req.getParameter("noadmin"); if (noadminParam != null) noAdmin = Boolean.valueOf(noadminParam); String hasLimit = req.getParameter("limit"); if (hasLimit != null) limit = Integer.parseInt(hasLimit); System.out.println("Limite : " + limit); String startDate = req.getParameter("start"); String endDate = req.getParameter("end"); if (startDate != null && endDate != null) { start = getDateFromString(startDate, "-"); end = getDateFromString(endDate, "-"); } List<Object[]> listres = auditQueriesService.getConnectionLogs("authenticate", start, end, noAdmin, limit); Map<Date, String[]> logs = new HashMap<Date, String[]>(); for (int i = 0; i < listres.size(); i++) { String fail = (listres.get(i)[2]).toString(); String[] tab = { (String) listres.get(i)[1], fail }; logs.put((Date) listres.get(i)[0], tab); } // Insert into the map model.put("connectionLogs", logs.entrySet()); } return model; } catch (Exception e) { throw new WebScriptException("[ConnectionLogsGet] Error in executeImpl function"); } }
From source file:org.jasig.portlet.announcements.mvc.servlet.ApproveAjaxController.java
@Override protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { Long annId = Long.valueOf(request.getParameter("annId")); Boolean approval = Boolean.valueOf(request.getParameter("approval")); Announcement ann = announcementService.getAnnouncement(annId); Date startDisplay = ann.getStartDisplay(); Date endDisplay = ann.getEndDisplay(); if (endDisplay == null) { // Unspecified end date means the announcement does not expire; we // will substitute a date in the future each time this item is // evaluated. long aYearFromNow = System.currentTimeMillis() + Announcement.MILLISECONDS_IN_A_YEAR; endDisplay = new Date(aYearFromNow); }/*from w ww. j av a 2 s . c om*/ Date now = new Date(); int status = 3; /** * Scheduled = 0 * Expired = 1 * Showing = 2 * Pending = 3 */ if (startDisplay.after(now) && endDisplay.after(now) && approval) { status = 0; } else if (startDisplay.before(now) && endDisplay.after(now) && approval) { status = 2; } else if (endDisplay.before(now)) { status = 1; } ann.setPublished(approval); cacheManager.getCacheManager().getCache("guestAnnouncementCache").flush(); announcementService.addOrSaveAnnouncement(ann); return new ModelAndView("ajaxApprove", "status", status); }
From source file:com.gargoylesoftware.htmlunit.html.HtmlImageTest.java
private void isMapClick(final String imgId, final Boolean samePage, final String urlSuffixClick, final String urlSuffixClickXY) throws Exception { final String htmlContent = "<html>\n" + "<head><title>foo</title></head>\n" + "<body>\n" + " <a href='http://server/foo'>\n" + " <img id='img1' src='foo.png' ismap>\n" + " <img id='img2' src='foo.png'>\n" + " </a>\n" + " <img id='img3' src='foo.png' ismap>\n" + " <img id='img4' src='foo.png'>\n" + "</body></html>"; final HtmlPage page = loadPage(htmlContent); final HtmlImage img = page.getHtmlElementById(imgId); final Page page2 = img.click(); assertEquals("same page after click", samePage, Boolean.valueOf(page == page2)); if (!samePage.booleanValue()) { assertEquals("http://server/foo" + urlSuffixClick, page2.getUrl()); }/* w w w .j a va 2 s . c o m*/ final Page page3 = img.click(25, 30); assertEquals("same page after click(25, 30)", samePage, Boolean.valueOf(page == page3)); if (!samePage.booleanValue()) { assertEquals("http://server/foo" + urlSuffixClickXY, page3.getUrl()); } }
From source file:com.meltmedia.cadmium.email.TestingMessageTransformer.java
public static boolean getBooleanSystemProperty(String systemProperty, boolean defaultValue) { String propertyValue = System.getProperty(systemProperty); return propertyValue != null ? Boolean.valueOf(propertyValue).booleanValue() : defaultValue; }
From source file:org.jasypt.spring31.xml.encryption.AbstractEncryptablePropertyLoadingBeanDefinitionParser.java
@Override protected void doParse(final Element element, final BeanDefinitionBuilder builder) { String location = element.getAttribute("location"); if (StringUtils.hasLength(location)) { String[] locations = StringUtils.commaDelimitedListToStringArray(location); builder.addPropertyValue("locations", locations); }/*from ww w.j a v a2s .c om*/ String propertiesRef = element.getAttribute("properties-ref"); if (StringUtils.hasLength(propertiesRef)) { builder.addPropertyReference("properties", propertiesRef); } String fileEncoding = element.getAttribute("file-encoding"); if (StringUtils.hasLength(fileEncoding)) { builder.addPropertyReference("fileEncoding", fileEncoding); } String order = element.getAttribute("order"); if (StringUtils.hasLength(order)) { builder.addPropertyValue("order", Integer.valueOf(order)); } builder.addPropertyValue("ignoreResourceNotFound", Boolean.valueOf(element.getAttribute("ignore-resource-not-found"))); builder.addPropertyValue("localOverride", Boolean.valueOf(element.getAttribute("local-override"))); builder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); }