Example usage for java.util Properties remove

List of usage examples for java.util Properties remove

Introduction

In this page you can find the example usage for java.util Properties remove.

Prototype

@Override
    public synchronized Object remove(Object key) 

Source Link

Usage

From source file:org.eclipse.ecr.core.storage.sql.TestSQLBinariesIndexing.java

protected void restoreEventAsyncPoolSizes() {
    Properties properties = System.getProperties();
    if (originalPoolSize == null) {
        properties.remove("org.eclipse.ecr.core.event.async.poolSize");
    } else {//from ww w.  j  a v  a  2 s . c om
        properties.put("org.eclipse.ecr.core.event.async.poolSize", originalPoolSize);
    }
    if (originalMaxPoolSize == null) {
        properties.remove("org.eclipse.ecr.core.event.async.maxPoolSize");
    } else {
        properties.put("org.eclipse.ecr.core.event.async.maxPoolSize", originalMaxPoolSize);
    }
}

From source file:ch.entwine.weblounge.common.impl.site.I18nDictionaryImpl.java

/**
 * {@inheritDoc}/*  www .j  a v a 2s . co m*/
 * 
 * @see ch.entwine.weblounge.common.site.I18nDictionary#remove(java.lang.String)
 */
public void remove(String key) {
    defaults.remove(key);
    for (Properties p : i18n.values()) {
        p.remove(key);
    }
}

From source file:org.mousephenotype.dcc.exportlibrary.impressexamplesgeneration.App.java

private void setup(String connection) throws HibernateException {
    Properties properties = null;
    try {//from   ww  w . jav a 2 s . c  o m
        reader = new Reader(connection == null ? DEFAULT_DB_CONNECTION : connection);
    } catch (ConfigurationException ex) {
        logger.error("", ex);
    }

    properties = reader.getProperties();
    properties.remove("hibernate.hbm2ddl.auto");
    impressHibernateManager = new HibernateManager(properties, persistenceUnitname);
}

From source file:org.ow2.proactive.scheduler.authentication.ManageUsers.java

private static void deleteAccount(UserInfo userInfo, String loginFilePath, String groupFilePath,
        Properties props, Multimap<String, String> groupsMap) throws ManageUsersException {
    if (!userInfo.isLoginSet()) {
        warnWithMessage(PROVIDED_USERNAME + IS_EMPTY_SKIPPING);
        return;//from  ww  w  .jav  a  2s.c  o m
    }
    if (!props.containsKey(userInfo.getLogin())) {
        warnWithMessage(USER_HEADER + userInfo.getLogin() + DOES_NOT_EXIST_IN_LOGIN_FILE + loginFilePath);
    }
    if (!groupsMap.containsKey(userInfo.getLogin())) {
        warnWithMessage(USER_HEADER + userInfo.getLogin() + DOES_NOT_EXIST_IN_GROUP_FILE + groupFilePath);
    }
    props.remove(userInfo.getLogin());
    groupsMap.removeAll(userInfo.getLogin());
    System.out.println("Deleted user " + userInfo.getLogin());
}

From source file:och.service.props.impl.FileProps.java

private synchronized void putObjVal(String key, String val) {

    Properties props = state;// w  w  w  . j a va 2  s  .c o  m

    Properties newProps = new Properties();
    newProps.putAll(props);
    if (val == null)
        newProps.remove(key);
    else
        newProps.put(key, val);
    saveToFile(newProps);

    fireChangedEvent(singleton(key));
}

From source file:org.apache.rave.commoncontainer.ConfigurablePropertiesModule.java

private void bindNonConstantProperties() {
    Properties p = getProperties();
    for (String overridableProperty : constantGuiceProperties()) {
        p.remove(overridableProperty);
    }//from   w ww  .j  a  va  2 s. c  o m
    Names.bindProperties(this.binder(), p);
}

From source file:org.xdi.service.PythonService.java

private Properties getPreProperties() {
    Properties props = System.getProperties();
    Properties clonedProps = (Properties) props.clone();
    clonedProps.setProperty("java.class.path", ".");
    clonedProps.setProperty("java.library.path", "");
    clonedProps.remove("javax.net.ssl.trustStore");
    clonedProps.remove("javax.net.ssl.trustStorePassword");

    return clonedProps;
}

From source file:com.properned.model.MultiLanguageProperties.java

public void deleteMessageKey(String messageKey) {
    logger.info("Delete the message key '" + messageKey + "'");
    listMessageKey.remove(messageKey);//from w ww . ja va  2s.c o m
    Set<Locale> setLocale = mapPropertiesFileByLocale.keySet();
    for (Locale locale : setLocale) {
        Properties properties = mapPropertiesByLocale.get(locale);
        properties.remove(messageKey);
        this.setIsDirty(true);
    }
}

From source file:org.freeplane.main.application.UserPropertiesUpdater.java

private void removeOpenedMaps(File userPreferencesFile) {
    try {/*  ww w .j  av a2s  .  co m*/
        Properties userProp = loadProperties(userPreferencesFile);
        userProp.remove("lastOpened_1.0.20");
        userProp.remove("openedNow_1.0.20");
        userProp.remove("browse_url_storage");
        userProp.remove("single_backup_directory_path");
        saveProperties(userProp, userPreferencesFile);
    } catch (IOException e) {
    }
}

From source file:com.manydesigns.elements.blobs.Blob.java

protected void safeSetProperty(Properties metaProperties, String key, String value) {
    if (value == null) {
        metaProperties.remove(key);
    } else {/* w  w w.  j a v a 2s.  co  m*/
        metaProperties.setProperty(key, value);
    }
}