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.adaptris.core.services.splitter.MimePartSplitterTest.java
public void testSetters() throws Exception { MimePartSplitter m = new MimePartSplitter(); assertFalse(m.preserveHeaders());//w w w .j ava2s .c om assertNull(m.getPreserveHeaders()); m.setPreserveHeaders(Boolean.TRUE); assertEquals(true, m.preserveHeaders()); assertEquals(Boolean.TRUE, m.getPreserveHeaders()); assertNull(m.getHeaderPrefix()); m.setHeaderPrefix("fred"); assertEquals("fred", m.getHeaderPrefix()); }
From source file:com.netflix.spinnaker.orca.clouddriver.pipeline.MigratePipelineStage.java
@Override public List<Step> buildSteps(Stage stage) { List<Step> steps = new ArrayList<>(); steps.add(buildStep(stage, "migratePipelineClusters", MigratePipelineClustersTask.class)); steps.add(buildStep(stage, "monitorMigration", MonitorKatoTask.class)); if (!Boolean.TRUE.equals(stage.getContext().get("dryRun"))) { steps.add(buildStep(stage, "updateMigratedPipeline", UpdateMigratedPipelineTask.class)); }//from w w w .ja v a2s . c o m return steps; }
From source file:com.snv.todo.TodoCrudService.java
public TodoCrudService() { if (!Boolean.FALSE.equals(isTodoCrudServiceImplemented)) { throw new IllegalStateException( "L'instance TodoCrudService ne peut tre implment plus d'une fois."); }/*from w w w. j av a 2 s . com*/ this.open(); isTodoCrudServiceImplemented = Boolean.TRUE; }
From source file:ch.ralscha.extdirectspring.bean.ExtDirectStoreResult.java
@SuppressWarnings("unchecked") public ExtDirectStoreResult(T record) { this((Long) null, Arrays.asList(record), Boolean.TRUE, null); }
From source file:com.snv.user.UserCrudService.java
public UserCrudService() { if (!Boolean.FALSE.equals(isUserCrudServiceImplemented)) { throw new IllegalStateException( "L'instance UserCrudService ne peut tre implment plus d'une fois."); }/*from w ww . ja v a 2s . c o m*/ this.open(); isUserCrudServiceImplemented = Boolean.TRUE; }
From source file:es.caib.sgtsic.xml.XmlManager.java
private ByteArrayOutputStream marshal(T item) throws JAXBException { return marshal(item, Boolean.TRUE); }
From source file:de.hybris.platform.acceleratorstorefrontcommons.strategy.impl.MergingCartRestorationStrategy.java
@Override public void restoreCart(final HttpServletRequest request) { // no need to merge if current cart has no entry if (!getCartFacade().hasEntries()) { super.restoreCart(request); } else {//ww w . ja va2 s . c om final String sessionCartGuid = getCartFacade().getSessionCartGuid(); final String mostRecentSavedCartGuid = getMostRecentSavedCartGuid(sessionCartGuid); if (StringUtils.isNotEmpty(mostRecentSavedCartGuid)) { getSessionService().setAttribute(WebConstants.CART_RESTORATION_SHOW_MESSAGE, Boolean.TRUE); try { getSessionService().setAttribute(WebConstants.CART_RESTORATION, getCartFacade().restoreCartAndMerge(mostRecentSavedCartGuid, sessionCartGuid)); request.setAttribute(WebConstants.CART_MERGED, Boolean.TRUE); } catch (final CommerceCartRestorationException e) { if (LOG.isDebugEnabled()) { LOG.debug(e); } getSessionService().setAttribute(WebConstants.CART_RESTORATION_ERROR_STATUS, WebConstants.CART_RESTORATION_ERROR_STATUS); } catch (final CommerceCartMergingException e) { LOG.error("User saved cart could not be merged", e); } } } }
From source file:com.pagodalabs.institute.controllers.DefaultController.java
@RequestMapping(value = "/", method = RequestMethod.GET) public String index(ModelMap map) { /*SessionFactory factory = new Configuration().configure().buildSessionFactory(); Session session = factory.openSession(); Transaction tx = null;//from w w w.ja v a 2s.c om Integer courseId = null; try{ tx = session.beginTransaction(); Course course = new Course(0,"Advanced Java","Advanced Java", Boolean.TRUE); courseId = (Integer) session.save(course); tx.commit(); }catch (HibernateException e) { if (tx!=null) tx.rollback(); e.printStackTrace(); }finally { session.close(); } */ courseDAO.insert(new Course(0, "Advanced Java", "Advanced Java", Boolean.TRUE)); return "admin/default/index"; }
From source file:cop.raml.utils.javadoc.tags.TagReturn.java
private TagReturn(Builder builder) { status = builder != null ? builder.status : -1; text = builder != null ? builder.text : null; link = builder != null ? builder.link : TagLink.NULL; array = builder != null && Boolean.TRUE.equals(builder.array); }
From source file:es.us.isa.sedl.core.analysis.datasetspecification.AbstractDatasetSpecificationTest.java
/** * Test of apply method, of class AbstractDatasetSpecification. *///from w w w .ja v a 2s. com public void testApply() { try { CSVLoader csvLoader = new CSVLoader(Boolean.TRUE); String initialDatasetContent = "Sex;Height" + NEW_LINE + "man;1.82" + NEW_LINE + "woman;1.63"; DataSet initialDataset = csvLoader.load(IOUtils.toInputStream(initialDatasetContent), "csv"); // TESTING PROJECTION APPLICATION: String expectedResultContent = "Height" + NEW_LINE + "1.82" + NEW_LINE + "1.63"; DataSet expectedResult = csvLoader.load(IOUtils.toInputStream(expectedResultContent), "csv"); DatasetSpecification datasetSpecification = new DatasetSpecification(); Projection projection = new Projection(); projection.getProjectedVariables().add("Height"); datasetSpecification.getProjections().add(projection); DataSet result = datasetSpecification.apply(initialDataset); assertEquals(expectedResult, result); // TESTING PROJECTION & FILTER APPLICATION: expectedResultContent = "Height" + NEW_LINE + "1.82"; expectedResult = csvLoader.load(IOUtils.toInputStream(expectedResultContent), "csv"); ValuationFilter filter = new ValuationFilter(); Variable var = new Outcome(); var.setName("Sex"); var.setKind(VariableKind.NOMINAL); Level l = new Level(); l.setValue("man"); VariableValuation valuation = new VariableValuation(); valuation.setVariable(var); valuation.setLevel(l); filter.getVariableValuations().add(valuation); datasetSpecification.getFilters().add(filter); result = datasetSpecification.apply(initialDataset); assertEquals(expectedResult, result); } catch (IOException ex) { Logger.getLogger(AbstractDatasetSpecificationTest.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); fail(ex.getMessage()); } }