List of usage examples for org.apache.commons.configuration Configuration getString
String getString(String key);
From source file:com.parallax.server.blocklypropauth.services.impl.AuthenticationServiceImpl.java
@Inject public void setConfiguration(Configuration configuration) { this.configuration = configuration; authenticateService = new CloudSessionAuthenticateService(configuration.getString("cloudsession.server"), configuration.getString("cloudsession.baseurl")); authenticationTokenService = new CloudSessionAuthenticationTokenService( configuration.getString("cloudsession.server"), configuration.getString("cloudsession.baseurl")); }
From source file:cz.cas.lib.proarc.common.process.ExternalProcess.java
protected List<String> buildCmdLine(Configuration conf) { String exec = conf.getString(PROP_EXEC); if (exec == null) { throw new IllegalStateException("Missing 'exec'!"); }/*from www . ja va 2s. c o m*/ String[] args = conf.getStringArray(PROP_ARG); List<String> cmdLine = new ArrayList<String>(); cmdLine.add(exec); cmdLine.addAll(Arrays.asList(args)); return cmdLine; }
From source file:fr.dudie.acrachilisync.utils.ConfigurationManager.java
/** * Constructor. Load the configuration elements. *//*from ww w . j a v a 2s. c o m*/ private ConfigurationManager(final Configuration pConf) { CHILIPROJECT_HOST = getURL(pConf.getString("chiliproject.host")); CHILIPROJECT_API_KEY = pConf.getString("chiliproject.api.key"); CHILIPROJECT_PROJECT_ID = pConf.getInt("chiliproject.project.id"); CHILIPROJECT_TRACKER_ID = pConf.getInt("chiliproject.tracker.id"); CHILIPROJECT_STACKTRACE_MD5_CF_ID = pConf.getInt("chiliproject.stacktraceMD5CustomField.id"); CHILIPROJECT_STATUS_CLOSED_ID = pConf.getInt("chiliproject.issue.status.closed.id"); CHILIPROJECT_RELATION_DUPLICATE_NAME = pConf.getString("chiliproject.issue.relation.duplicate.name"); final String documentKey = pConf.getString("google.spreadsheet.document.key"); final String worksheetId = pConf.getString("google.spreadsheet.worksheet.id"); final String url = String.format(AcraToChiliprojectSyncer.WORKSHEET_URL_FORMAT, documentKey, worksheetId); SPREADSHEET_FEED_URL = getURL(url); GOOGLE_LOGIN = pConf.getString("google.account.username"); GOOGLE_PASSWORD = pConf.getString("google.account.password"); }
From source file:com.linkedin.pinot.transport.conf.TransportClientConf.java
public void init(Configuration cfg) throws ConfigurationException { if (cfg.containsKey(ROUTING_MODE_KEY)) { _routingMode = RoutingMode.valueOf(cfg.getString(ROUTING_MODE_KEY)); }//from w w w.ja v a 2 s. c o m if ((_routingMode == RoutingMode.CONFIG)) { _cfgBasedRouting.init(cfg.subset(CFG_BASED_ROUTING)); } Configuration connPoolCfg = cfg.subset(CONNECTION_POOL_CONFIG); if (connPoolCfg != null) { _connPool.init(connPoolCfg); } }
From source file:com.boozallen.cognition.ingest.storm.bolt.starter.CsvHdfsBolt.java
void configureHadoop(Configuration conf) throws ConfigurationException { hadoopConfDirectory = conf.getString(HADOOP_CONF_DIRECTORY); Configuration hadoopConfigSubset = conf.subset(HADOOP_CONFIG); for (Iterator itr = hadoopConfigSubset.getKeys(); itr.hasNext();) { String key = (String) itr.next(); String value = hadoopConfigSubset.getString(key); _hadoopConfig.put(key, value);/* w w w .j ava2s .co m*/ } if (isBlank(hadoopConfDirectory) && _hadoopConfig.isEmpty()) { throw new ConfigurationException( String.format("Missing Hadoop configuration. Configure with either %s or %s.", HADOOP_CONFIG, HADOOP_CONF_DIRECTORY)); } }
From source file:com.microrisc.simply.network.spi.SPINetworkLayerFactory.java
@Override public NetworkLayer getNetworkLayer(NetworkConnectionStorage connectionStorage, Configuration configProps) throws Exception { String networkLayerType = configProps.getString("networkLayer.type"); // only for "spi" layer type if (!networkLayerType.equals("spi")) { throw new SimplyException("Network layer must be of 'spi' type."); }/*from w w w. ja va 2 s. co m*/ NetworkLayerParams networkParams = createNetworkLayerParams(connectionStorage, configProps); return createSPINetworkLayer(networkParams); }
From source file:com.microrisc.simply.network.usbcdc.CDCNetworkLayerFactory.java
@Override public NetworkLayer getNetworkLayer(NetworkConnectionStorage connectionStorage, Configuration configProps) throws Exception { String networkLayerType = configProps.getString("networkLayer.type"); // only for "cdc" layer type if (!networkLayerType.equals("cdc")) { throw new SimplyException("Network layer must be of 'cdc' type."); }/* w w w . j a v a 2 s. c o m*/ NetworkLayerParams networkParams = createNetworkLayerParams(connectionStorage, configProps); return createCDCNetworkLayer(networkParams); }
From source file:com.parallax.server.blocklyprop.servlets.NewOAuthUserServlet.java
@Inject public void setConfiguration(Configuration configuration) { this.configuration = configuration; userService = new CloudSessionUserService(configuration.getString("cloudsession.server")); oauthService = new CloudSessionOAuthService(configuration.getString("cloudsession.server"), configuration.getString("cloudsession.baseurl")); }
From source file:com.appeligo.alerts.CheckAlertsThread.java
private void refreshDidYouMeanIndex() throws IOException { Configuration config = ConfigUtils.getSystemConfig(); String luceneIndex = config.getString("compositeIndex"); String spellIndex = config.getString("spellIndex"); DidYouMeanIndexer.createDefaultSpellIndex(luceneIndex, spellIndex); }
From source file:eu.scape_project.pw.idp.bean.CreateAccountView.java
/** * Initializes the instance for use./*from www .j a v a 2 s. com*/ */ @PostConstruct public void init() { user = new IdpUser(); Configuration config = configurationLoader.load(); reCaptcha = ReCaptchaFactory.newReCaptcha(config.getString("recaptcha.publickey"), config.getString("recaptcha.privatekey"), false); addUserSuccessful = false; }