List of usage examples for java.lang Boolean getBoolean
public static boolean getBoolean(String name)
From source file:org.apache.oodt.cas.workflow.instrepo.DataSourceWorkflowInstanceRepositoryFactory.java
/** * <p>//from w w w.ja va 2 s .co m * Default constructor * </p> */ public DataSourceWorkflowInstanceRepositoryFactory() throws WorkflowException { String jdbcUrl, user, pass, driver; jdbcUrl = PathUtils.replaceEnvVariables( System.getProperty("org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.url")); user = PathUtils.replaceEnvVariables( System.getProperty("org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.user")); pass = PathUtils.replaceEnvVariables( System.getProperty("org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.pass")); driver = PathUtils.replaceEnvVariables( System.getProperty("org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.driver")); try { Class.forName(driver); } catch (ClassNotFoundException e) { throw new WorkflowException("Cannot load driver: " + driver); } GenericObjectPool connectionPool = new GenericObjectPool(null); dataSource = new PoolingDataSource(connectionPool); quoteFields = Boolean.getBoolean("org.apache.oodt.cas.workflow.instanceRep.datasource.quoteFields"); pageSize = Integer.getInteger("org.apache.oodt.cas.workflow.instanceRep.pageSize", VAL); }
From source file:com.dominion.salud.nomenclator.configuration.NOMENCLATORJpaConfiguration.java
@Bean @Autowired/* ww w . j av a 2 s . c om*/ public EntityManagerFactory entityManagerFactory() { logger.info("INICIANDO EL MODULO"); HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter(); adapter.setGenerateDdl(Boolean.getBoolean(environment.getRequiredProperty("hibernate.generate_ddl"))); adapter.setShowSql(Boolean.getBoolean(environment.getRequiredProperty("hibernate.show_sql"))); adapter.setDatabasePlatform(environment.getRequiredProperty("hibernate.dialect")); logger.info(" Iniciando conexion a base de datos"); LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean(); factory.setDataSource(dataSource()); factory.setJpaVendorAdapter(adapter); factory.setPackagesToScan("com.dominion.salud.nomenclator.negocio.entities"); factory.afterPropertiesSet(); factory.setLoadTimeWeaver(new InstrumentationLoadTimeWeaver()); logger.info(" Conexion a base de datos iniciada correctamente"); return factory.getObject(); }
From source file:org.browsermob.proxy.jetty.xml.XmlParser.java
/** * Construct/*from w ww . ja v a2 s . com*/ */ public XmlParser() { try { SAXParserFactory factory = SAXParserFactory.newInstance(); boolean notValidating = Boolean.getBoolean("org.browsermob.proxy.jetty.xml.XmlParser.NotValidating"); factory.setValidating(!notValidating); _parser = factory.newSAXParser(); try { if (!notValidating) _parser.getXMLReader().setFeature("http://apache.org/xml/features/validation/schema", true); } catch (Exception e) { log.warn("Schema validation may not be supported"); log.debug("", e); notValidating = true; } _parser.getXMLReader().setFeature("http://xml.org/sax/features/validation", !notValidating); _parser.getXMLReader().setFeature("http://xml.org/sax/features/namespaces", !notValidating); _parser.getXMLReader().setFeature("http://xml.org/sax/features/namespace-prefixes", !notValidating); } catch (Exception e) { log.warn(LogSupport.EXCEPTION, e); throw new Error(e.toString()); } }
From source file:co.paralleluniverse.galaxy.Grid.java
private static Grid getInstance(String configFile, Object properties) throws InterruptedException { synchronized (lock) { Grid _instance = instance;// w w w.j a v a 2s .co m if (_instance == null) { _instance = new Grid(configFile, properties); if (_instance == null) throw new RuntimeException( "Error while creating a grid instance from configuration file " + configFile + "!"); instance = _instance; if (Boolean.getBoolean("co.paralleluniverse.galaxy.autoGoOnline")) instance.goOnline(); } return _instance; } }
From source file:net.lightbody.bmp.proxy.jetty.xml.XmlParser.java
/** * Construct//from w ww . j a va 2 s . c om */ public XmlParser() { try { SAXParserFactory factory = SAXParserFactory.newInstance(); boolean notValidating = Boolean.getBoolean("net.lightbody.bmp.proxy.jetty.xml.XmlParser.NotValidating"); factory.setValidating(!notValidating); _parser = factory.newSAXParser(); try { if (!notValidating) _parser.getXMLReader().setFeature("http://apache.org/xml/features/validation/schema", true); } catch (Exception e) { log.warn("Schema validation may not be supported"); log.debug("", e); notValidating = true; } _parser.getXMLReader().setFeature("http://xml.org/sax/features/validation", !notValidating); _parser.getXMLReader().setFeature("http://xml.org/sax/features/namespaces", !notValidating); _parser.getXMLReader().setFeature("http://xml.org/sax/features/namespace-prefixes", !notValidating); } catch (Exception e) { log.warn(LogSupport.EXCEPTION, e); throw new Error(e.toString()); } }
From source file:it.dockins.dockerslaves.drivers.CliDockerDriver.java
public CliDockerDriver(DockerHostConfig dockerHost) throws IOException, InterruptedException { this.dockerHost = dockerHost; verbose = Boolean.getBoolean(DockerDriver.class.getName() + ".verbose"); }
From source file:org.apache.stratos.common.internal.ComponentStartUpSynchronizerImpl.java
ComponentStartUpSynchronizerImpl(DistributedObjectProvider distributedObjectProvider) { componentStatusMap = distributedObjectProvider.getMap(COMPONENT_STATUS_MAP); eventListeners = new ArrayList<ComponentStartUpEventListener>(); componentStartUpSynchronizerEnabled = Boolean.getBoolean(COMPONENT_STARTUP_SYNCHRONIZER_ENABLED); log.info("Component startup synchronizer enabled: " + componentStartUpSynchronizerEnabled); componentActivationCheckInterval = Long.getLong(COMPONENT_ACTIVATION_CHECK_INTERVAL, DEFAULT_COMPONENT_ACTIVATION_CHECK_INTERVAL); log.info(String.format("Component activation check interval: %s seconds.", (componentActivationCheckInterval / 1000))); componentActivationTimeout = Long.getLong(COMPONENT_ACTIVATION_TIMEOUT, DEFAULT_COMPONENT_ACTIVATION_TIMEOUT); log.info(String.format("Component activation timeout: %s seconds.", (componentActivationTimeout / 1000))); }
From source file:org.apache.cloudstack.network.lb.CertServiceTest.java
/** * One can run the tests on Oracle JDK after installing JCE by specifying -Dcloudstack.jce.enabled=true * @return true if the jce enable property was set to true *//*from w w w.j a v a 2 s . com*/ static boolean isJCEInstalled() { return Boolean.getBoolean("cloudstack.jce.enabled"); }
From source file:org.wso2.am.integration.test.utils.APIMgtTestUtil.java
/** * create API bean obj from response//from w ww.j a v a2 s. co m * @param httpResponse * @return */ public static APIBean getAPIBeanFromHttpResponse(HttpResponse httpResponse) { JSONObject jsonObject = null; String APIName = null; String APIProvider = null; String APIVersion = null; APIBean apiBean = null; try { jsonObject = new JSONObject(httpResponse.getData()); APIName = ((JSONObject) jsonObject.get("api")).getString("name"); APIVersion = ((JSONObject) jsonObject.get("api")).getString("version"); APIProvider = ((JSONObject) jsonObject.get("api")).getString("provider"); APIIdentifier identifier = new APIIdentifier(APIProvider, APIName, APIVersion); apiBean = new APIBean(identifier); apiBean.setContext(((JSONObject) jsonObject.get("api")).getString("context")); apiBean.setDescription(((JSONObject) jsonObject.get("api")).getString("description")); apiBean.setWsdlUrl(((JSONObject) jsonObject.get("api")).getString("wsdl")); apiBean.setTags(((JSONObject) jsonObject.get("api")).getString("tags")); apiBean.setAvailableTiers(((JSONObject) jsonObject.get("api")).getString("availableTiers")); apiBean.setThumbnailUrl(((JSONObject) jsonObject.get("api")).getString("thumb")); apiBean.setSandboxUrl(((JSONObject) jsonObject.get("api")).getString("sandbox")); apiBean.setBusinessOwner(((JSONObject) jsonObject.get("api")).getString("bizOwner")); apiBean.setBusinessOwnerEmail(((JSONObject) jsonObject.get("api")).getString("bizOwnerMail")); apiBean.setTechnicalOwner(((JSONObject) jsonObject.get("api")).getString("techOwner")); apiBean.setTechnicalOwnerEmail(((JSONObject) jsonObject.get("api")).getString("techOwnerMail")); apiBean.setWadlUrl(((JSONObject) jsonObject.get("api")).getString("wadl")); apiBean.setVisibility(((JSONObject) jsonObject.get("api")).getString("visibility")); apiBean.setVisibleRoles(((JSONObject) jsonObject.get("api")).getString("roles")); apiBean.setEndpointUTUsername(((JSONObject) jsonObject.get("api")).getString("epUsername")); apiBean.setEndpointUTPassword(((JSONObject) jsonObject.get("api")).getString("epPassword")); apiBean.setEndpointSecured( (Boolean.getBoolean(((JSONObject) jsonObject.get("api")).getString("endpointTypeSecured")))); apiBean.setTransports(((JSONObject) jsonObject.get("api")).getString("transport_http")); apiBean.setTransports(((JSONObject) jsonObject.get("api")).getString("transport_https")); apiBean.setInSequence(((JSONObject) jsonObject.get("api")).getString("inSequence")); apiBean.setOutSequence(((JSONObject) jsonObject.get("api")).getString("outSequence")); apiBean.setAvailableTiers(((JSONObject) jsonObject.get("api")).getString("availableTiersDisplayNames")); //-----------Here are some of unused properties, if we need to use them add params to APIBean class //((JSONObject) jsonObject.get("api")).getString("name"); //((JSONObject) jsonObject.get("api")).getString("endpoint"); //((JSONObject) jsonObject.get("api")).getString("subscriptionAvailability"); //((JSONObject) jsonObject.get("api")).getString("subscriptionTenants"); //((JSONObject) jsonObject.get("api")).getString("endpointConfig"); //((JSONObject) jsonObject.get("api")).getString("responseCache"); //(((JSONObject) jsonObject.get("api")).getString("cacheTimeout"); //((JSONObject) jsonObject.get("api")).getString("endpointConfig"); //((JSONObject) jsonObject.get("api")).getString("version"); //((JSONObject) jsonObject.get("api")).getString("apiStores"); // ((JSONObject) jsonObject.get("api")).getString("provider"); //)((JSONObject) jsonObject.get("api")).getString("tierDescs"); //((JSONObject) jsonObject.get("api")).getString("subs"); //((JSONObject) jsonObject.get("api")).getString("context"); // apiBean.setLastUpdated(Date.parse((JSONObject); jsonObject.get("api")).getString("lastUpdated"))); // apiBean.setUriTemplates((JSONObject) jsonObject.get("api")).getString("templates")); } catch (JSONException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } return apiBean; }