本文整理了Java中org.apache.commons.configuration.Configuration.clearProperty()
方法的一些代码示例,展示了Configuration.clearProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.clearProperty()
方法的具体详情如下:
包路径:org.apache.commons.configuration.Configuration
类名称:Configuration
方法名:clearProperty
[英]Remove a property from the configuration.
[中]从配置中删除属性。
代码示例来源:origin: thinkaurelius/titan
@Override
public void remove(String key) {
config.clearProperty(key);
}
代码示例来源:origin: JanusGraph/janusgraph
@Override
public void remove(String key) {
config.clearProperty(key);
}
代码示例来源:origin: thinkaurelius/titan
@Override
public <O> void set(String key, O value) {
if (value==null) {
config.clearProperty(key);
} else if (Duration.class.isAssignableFrom(value.getClass())) {
config.setProperty(key,((Duration)value).toMillis());
} else {
config.setProperty(key,value);
}
}
代码示例来源:origin: JanusGraph/janusgraph
@Override
public <O> void set(String key, O value) {
if (value==null) {
config.clearProperty(key);
} else if (Duration.class.isAssignableFrom(value.getClass())) {
config.setProperty(key,((Duration)value).toMillis());
} else {
config.setProperty(key,value);
}
}
代码示例来源:origin: thinkaurelius/titan
localbc.clearProperty(Graph.GRAPH);
copyInputKeys(hadoopConf, localbc);
代码示例来源:origin: apache/tinkerpop
graphComputerConfiguration.clearProperty(Constants.GREMLIN_HADOOP_GRAPH_FILTER);
graphComputerConfiguration.clearProperty(Constants.GREMLIN_HADOOP_VERTEX_PROGRAM_INTERCEPTOR);
graphComputerConfiguration.clearProperty(GREMLIN_SPARK_SKIP_GRAPH_CACHE);
graphComputerConfiguration.clearProperty(GREMLIN_SPARK_SKIP_PARTITIONER);
return new DefaultComputerResult(InputOutputHelper.getOutputGraph(graphComputerConfiguration, this.resultGraph, this.persist), finalMemory.asImmutable());
} finally {
代码示例来源:origin: com.netflix.archaius/archaius-core
/**
* Delegates to the underlying configuration.
*/
@Override
public void clearProperty(String key) {
config.clearProperty(key);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-configuration
@Override
public void clearProperty(String key)
{
configuration.clearProperty(key);
}
代码示例来源:origin: org.jboss.forge/forge-shell
@Override
public void clearProperty(final String key)
{
delegate.clearProperty(key);
}
代码示例来源:origin: org.apache.commons/org.motechproject.org.apache.commons.configuration
@Override
public void clearProperty(String key)
{
configuration.clearProperty(key);
}
代码示例来源:origin: com.netflix.archaius/archaius-legacy
/**
* Delegates to the underlying configuration.
*/
@Override
public void clearProperty(String key) {
config.clearProperty(key);
}
代码示例来源:origin: org.apache.marmotta/marmotta-user
@Override
public void removeUserConfiguration(UserAccount user, String key) {
Preconditions.checkNotNull(user);
Preconditions.checkNotNull(key);
getUserConfiguration(user).clearProperty(key);
}
代码示例来源:origin: apache/marmotta
@Override
public void removeUserConfiguration(UserAccount user, String key) {
Preconditions.checkNotNull(user);
Preconditions.checkNotNull(key);
getUserConfiguration(user).clearProperty(key);
}
代码示例来源:origin: org.hawkular.titan/titan-core
@Override
public <O> void set(String key, O value) {
if (value==null) config.clearProperty(key);
else config.setProperty(key,value);
}
代码示例来源:origin: com.thinkaurelius.titan/titan-core
@Override
public <O> void set(String key, O value) {
if (value==null) {
config.clearProperty(key);
} else if (Duration.class.isAssignableFrom(value.getClass())) {
config.setProperty(key,((Duration)value).toMillis());
} else {
config.setProperty(key,value);
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-platform-api
@Override
public void clearProperty(final String key) {
ConfigurationNode configurationNode = subset(key);
Iterator<String> keysIt = configurationNode.getKeys();
while(keysIt.hasNext()){
String subkey = keysIt.next();
ConfigurationNode node = configurationNode.subset(subkey);
node.clear();
}
String childNodeKey = childNodeKey(key);
configuration.clearProperty(childNodeKey);
}
代码示例来源:origin: prezi/pride
public void saveConfiguration(Configuration configuration, Collection<M> modules) {
for (String moduleKey : Iterators.toArray(configuration.getKeys(MODULES_KEY), String.class)) {
configuration.clearProperty(moduleKey);
}
int id = 0;
for (M module : modules) {
String moduleId = MODULES_KEY + "." + id;
saveModule(configuration, moduleId, module);
id++;
}
}
代码示例来源:origin: ff4j/ff4j
/** {@inheritDoc} */
@Override
public void deleteProperty(String name) {
if (!existProperty(name)) {
throw new PropertyNotFoundException(name);
}
conf().clearProperty(name);
}
代码示例来源:origin: apache/atlas
private static void startLocalSolr() {
if (isEmbeddedSolr()) {
try {
LocalSolrRunner.start();
Configuration configuration = ApplicationProperties.get();
configuration.clearProperty(SOLR_ZOOKEEPER_URL);
configuration.setProperty(SOLR_ZOOKEEPER_URL, LocalSolrRunner.getZookeeperUrls());
} catch (Exception e) {
throw new RuntimeException("Failed to start embedded solr cloud server. Aborting!", e);
}
}
}
代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core
@Test
public void testErrorUrl() {
String testUrl = "test";
Configuration config = Config.copyConfiguration(originalConfig);
// Clear current property (if exists)
config.clearProperty(ConfigurationProperties.STEP_ERROR_URL);
// Set redirect url
config.addProperty(ConfigurationProperties.STEP_ERROR_URL, testUrl);
Config.setConfiguration(config);
Assert.assertEquals("Incorrect error url returned", testUrl, StepCountUtil.getErrorUrl());
}
内容来源于网络,如有侵权,请联系作者删除!