List of usage examples for java.lang Boolean TRUE
Boolean TRUE
To view the source code for java.lang Boolean TRUE.
Click Source Link
From source file:com.panet.imeta.job.entry.validator.LongValidator.java
public boolean validate(CheckResultSourceInterface source, String propertyName, List<CheckResultInterface> remarks, ValidatorContext context) { Object result = null;/*from ww w . j a va 2 s.com*/ String value = null; value = getValueAsString(source, propertyName); if (GenericValidator.isBlankOrNull(value)) { return Boolean.TRUE; } result = GenericTypeValidator.formatLong(value); if (result == null) { addFailureRemark(source, propertyName, VALIDATOR_NAME, remarks, getLevelOnFail(context, VALIDATOR_NAME)); return false; } return true; }
From source file:de.hybris.platform.b2bacceleratorfacades.order.populators.ScheduledCartPopulator.java
@Override public void populate(final CartToOrderCronJobModel source, final ScheduledCartData prototype) throws ConversionException { addCartData(source, prototype);// w w w . j a va2 s .c om addTriggerData(source, prototype); prototype.setJobCode(source.getCode()); prototype.setActive(Boolean.TRUE.equals(source.getActive())); prototype.setFirstOrderDate(getFirstOrderDate(source, prototype)); }
From source file:hu.petabyte.redflags.web.ctrl.FilterCtrl.java
@RequestMapping(value = "/filter/{id}", method = RequestMethod.POST) public String saveModifications(@PathVariable long id, @RequestParam(value = "name", required = true) String name, @RequestParam(value = "subscribe", required = false) Boolean subscribe) { filter.saveSettings(id, name, Boolean.TRUE.equals(subscribe)); return "redirect:/filters"; }
From source file:org.pmedv.jake.JakeUtil.java
/** * Updates the {@link RecentFileList} with a new file * //from w w w.ja va2 s .c o m * @param filename the name to append to the list */ public static void updateRecentFiles(String filename) { RecentFileList fileList = null; try { String inputDir = System.getProperty("user.home") + "/." + AppContext.getName() + "/"; String inputFileName = "recentFiles.xml"; File inputFile = new File(inputDir + inputFileName); if (inputFile.exists()) { Unmarshaller u = JAXBContext.newInstance(RecentFileList.class).createUnmarshaller(); fileList = (RecentFileList) u.unmarshal(inputFile); } if (fileList == null) fileList = new RecentFileList(); } catch (JAXBException e) { e.printStackTrace(); } if (fileList.getRecentFiles().size() >= 5) { fileList.getRecentFiles().remove(0); } if (!fileList.getRecentFiles().contains(filename)) fileList.getRecentFiles().add(filename); Marshaller m; try { String outputDir = System.getProperty("user.home") + "/." + AppContext.getName() + "/"; String outputFileName = "recentFiles.xml"; m = JAXBContext.newInstance(RecentFileList.class).createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); File output = new File(outputDir + outputFileName); m.marshal(fileList, output); } catch (JAXBException e) { e.printStackTrace(); } }
From source file:ch.ralscha.extdirectspring.controller.ApiControllerWithXMLConfig3Test.java
@Test public void testGroup2() throws Exception { Configuration config = new Configuration(); config.setTimeout(15111);/*from ww w .java 2 s . c om*/ config.setEnableBuffer(Boolean.TRUE); config.setMaxRetries(6); config.setStreamResponse(true); ApiRequestParams params = ApiRequestParams.builder().apiNs("test").group("group2").configuration(config) .build(); ApiControllerTest.runTest(mockMvc, params, ApiControllerTest.group2Apis(null)); ApiControllerTest.runTest(mockMvc, params, ApiControllerTest.group2Apis(null)); }
From source file:ch.ralscha.extdirectspring.bean.ExtDirectStoreResult.java
public ExtDirectStoreResult(Collection<T> records) { this((Long) null, records, Boolean.TRUE, null); }
From source file:com.shadows.liquiblq.webapi.controllers.UsersController.java
@RequestMapping(value = "/register", method = RequestMethod.POST) public JSONResponse doRegister(@RequestParam("Email") String Email, @RequestParam("Password") String Password, @RequestParam("Name") String Name) { try {/* w w w.j a v a 2s .co m*/ String Salt = HashManager.GenerateStringSalt(); UserData Data = new UserData(); Data.Email = Email; Data.Password = HashManager.GeneratePassword(Password, Salt); Data.Salt = Salt; Data.Name = Name; Integer Id = Context.getUsersSet().Add(Data); return new RegisterResponse(Boolean.TRUE, Id, Email); } catch (Exception ex) { return new ErrorResponse(ex); } }
From source file:Compile.java
/** * Compiles an XSL stylesheet into a translet, wraps the translet * inside a Templates object and dumps it to a file. *///from w w w .j av a 2s . c o m public void run(String xsl) { try { // Set XSLTC's TransformerFactory implementation as the default System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"); // Get an input stream for the XSL stylesheet StreamSource stylesheet = new StreamSource(xsl); // The TransformerFactory will compile the stylesheet and // put the translet classes inside the Templates object TransformerFactory factory = TransformerFactory.newInstance(); factory.setAttribute("generate-translet", Boolean.TRUE); Templates templates = factory.newTemplates(stylesheet); } catch (Exception e) { System.err.println("Exception: " + e); e.printStackTrace(); } System.exit(0); }
From source file:com.wickettasks.business.entities.user.repository.TestUserRepository.java
@Test public void testSaveUser() { User user = new User(); user.setEmail("test@email"); user.setPassword("password"); this.userRepository.save(user); assertEquals(Boolean.TRUE, Boolean.valueOf(user.getId() != null)); }
From source file:nu.yona.server.rest.HibernateStatisticsController.java
@RequestMapping(value = "/enable/", params = { "enable" }, method = RequestMethod.POST) @ResponseBody/*from w w w . j ava 2s . c om*/ public ResponseEntity<Void> enable(@RequestParam(value = "enable", defaultValue = "false") String enableStr) { if (!yonaProperties.isEnableHibernateStatsAllowed()) { return createResponse(HttpStatus.NOT_FOUND); } hibernateStatisticsService.setEnabled(Boolean.TRUE.toString().equals(enableStr)); return createOkResponse(); }