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:gov.nih.nci.integration.caaers.invoker.CaAERSServiceInvocationStrategyFactory.java
private static synchronized void init(final String[] caaersLibLocation, final String... caaersConfig) { final ExecutorCompletionService<Boolean> ecs = new ExecutorCompletionService<Boolean>( Executors.newSingleThreadExecutor()); ecs.submit(new Callable<Boolean>() { @Override/*from w ww . j a va 2 s . c o m*/ public Boolean call() throws MalformedURLException, BeansException { final CustomClasspathXmlApplicationContext ctx = new CustomClasspathXmlApplicationContext( caaersLibLocation, caaersConfig); caaersRegistrationServiceInvocationStrategy = (ServiceInvocationStrategy) ctx .getBean("caAersRegistrationServiceInvocationStrategy"); caaersUpdateRegistrationServiceInvocationStrategy = (ServiceInvocationStrategy) ctx .getBean("caAersUpdateRegistrationServiceInvocationStrategy"); caaersAdverseEventServiceInvocationStrategy = (ServiceInvocationStrategy) ctx .getBean("caAersAdverseEventServiceInvocationStrategy"); return Boolean.TRUE; } }); try { initStatus = ecs.take().get(); // CHECKSTYLE:OFF } catch (Exception e) { // NOPMD LOG.error("CaAERSServiceInvocationStrategyFactory.Exception inside init(). ", e); initStatus = Boolean.FALSE; } }
From source file:it.larusba.neo4j.jdbc.http.driver.Neo4jResponseTest.java
@Test public void hasErrorShoudlReturnTrue() throws SQLException { Neo4jResponse response = generateNeo4jResponse(Boolean.TRUE); Assert.assertTrue(response.hasErrors()); }
From source file:com.github.rvesse.airline.parser.options.StandardOptionParser.java
@Override public ParseState<T> parseOptions(PeekingIterator<String> tokens, ParseState<T> state, List<OptionMetadata> allowedOptions) { OptionMetadata option = findOption(state, allowedOptions, tokens.peek()); if (option == null) { return null; }// w ww. j a v a 2s . c om tokens.next(); state = state.pushContext(Context.OPTION).withOption(option); if (option.getArity() == 0) { state = state.withOptionValue(option, Boolean.TRUE.toString()).popContext(); } else if (option.getArity() == 1) { if (tokens.hasNext()) { state = state.withOptionValue(option, tokens.next()).popContext(); } } else { int count = 0; boolean hasSeparator = false; boolean foundNextOption = false; String argsSeparator = state.getParserConfiguration().getArgumentsSeparator(); while (count < option.getArity() && tokens.hasNext() && !hasSeparator) { String peekedToken = tokens.peek(); hasSeparator = peekedToken.equals(argsSeparator); foundNextOption = findOption(state, allowedOptions, peekedToken) != null; if (hasSeparator || foundNextOption) break; state = state.withOptionValue(option, tokens.next()); ++count; } if (count != option.getArity()) { throw new ParseOptionMissingValueException( "Too few option values received for option %s (%d values expected but only found %d)", option.getTitle(), option.getOptions().iterator().next(), option.getArity(), count); } state = state.popContext(); } return state; }
From source file:com.dulion.astatium.mesh.shredder.XmlShredder.java
public XmlShredder(MetaGraph metaGraph) { this.manager = (ContextManager) metaGraph; this.factory = ThreadLocal.withInitial(() -> { XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE); factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE); factory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.TRUE); return factory; });//from w ww . j a va 2s . c om }
From source file:com.bg.jtown.social.twitter.TweetAfterSignInInterceptor.java
public void preConnect(ConnectionFactory<Twitter> provider, MultiValueMap<String, String> parameters, WebRequest request) {//w ww . ja v a 2s.c o m logger.debug("Twitter PreConnect"); if (StringUtils.hasText(request.getParameter(POST_TWEET_PARAMETER))) { request.setAttribute(POST_TWEET_ATTRIBUTE, Boolean.TRUE, WebRequest.SCOPE_SESSION); } }
From source file:io.brooklyn.ambari.cluster.ClusterStateEventListener.java
@Override public void onEvent(SensorEvent<String> sensorEvent) { Boolean installed = entity.getAttribute(AmbariCluster.CLUSTER_SERVICES_INSTALLED); if (StringUtils.isNotBlank(sensorEvent.getValue()) && sensorEvent.getValue().equals("COMPLETED") && !Boolean.TRUE.equals(installed)) { try {//www .j a v a2s . co m entity.postDeployCluster(); } catch (ExtraServiceException ex) { ServiceStateLogic.ServiceNotUpLogic.updateNotUpIndicator((EntityLocal) entity, "ambari.extra.service", ex.getMessage()); throw ex; } } }
From source file:org.urlshortener.core.converter.UrlShortenerMessageConverter.java
/** * {@inheritDoc} */ public boolean canRead(Class<?> clazz, MediaType mediaType) { return Boolean.TRUE; }
From source file:ToolBarButton.java
/** * @see javax.swing.JButton#updateUI()/*w w w. j a v a2s . c o m*/ */ public void updateUI() { super.updateUI(); setRolloverEnabled(true); putClientProperty("JToolBar.isRollover", Boolean.TRUE); }
From source file:com.epam.cme.storefront.interceptors.beforecontroller.BeforeControllerInterceptor.java
@Override public boolean preHandle(final HttpServletRequest request, final HttpServletResponse response, final Object handler) throws Exception { if (request.getAttribute(INTERCEPTOR_ONCE_KEY) == null) { // Set the flag so that we are not executed multiple times request.setAttribute(INTERCEPTOR_ONCE_KEY, Boolean.TRUE); // Call the pre handler once for the request for (final BeforeControllerHandler beforeControllerHandler : getBeforeControllerHandlers()) { if (!beforeControllerHandler.beforeController(request, response)) { // Return false immediately if a handler returns false return false; }//w w w .j a v a2 s . c om } } return true; }
From source file:com.gargoylesoftware.htmlunit.html.HtmlImageTest.java
/** * @throws Exception if the test fails/*from w w w . j a v a 2 s. co m*/ */ @Test public void isMapClick() throws Exception { isMapClick("img1", Boolean.FALSE, "?0,0", "?25,30"); isMapClick("img2", Boolean.FALSE, "", ""); isMapClick("img3", Boolean.TRUE, "", ""); isMapClick("img3", Boolean.TRUE, "", ""); }