@Override public void removeRepo(String url) throws Exception { LOGGER.log(Level.INFO, "Removing repository " + url + "..."); getRepositoryAdmin().removeRepository(url); // Removing repos from installed Repos list installedRepos.remove(url); // Updating configuration service with installed repos config.update(installedRepos); LOGGER.log(Level.INFO, "Repository '" + url + "' removed!"); }
@SuppressWarnings("rawtypes") @Override public void propertyAction(Dictionary props) { props.remove(prop); } }
static void clearAutoProperties( Dictionary<String, Object> properties ) { for(final String p : AUTO_PROPS) { properties.remove( p ); } }
static void clearAutoProperties( Dictionary<String, Object> properties ) { for(final String p : AUTO_PROPS) { properties.remove( p ); } }
/** * @param property * @param obj */ public void setProperty(String property, Object obj) { properties.remove(property); properties.put(property, obj); }
public void setImmediateCommit(Boolean state) { if (state != null) { config.put(IMMEDIATE_COMMIT, state); } else { config.remove(IMMEDIATE_COMMIT); } }
private static void replaceProperty(Dictionary<String, Object> properties, String key, String value) { if (value == null) { properties.remove(key); } else { properties.put(key, value); } }
/** * @param property * @param obj */ public void setProperty(String property, Object obj) { properties.remove(property); properties.put(property, obj); }
static protected void replaceProperty( Dictionary<String, Object> properties, String key, String value ) { if ( value == null ) { properties.remove( key ); } else { properties.put( key, value ); } }
public void setMaxBooleanClauses(Integer integer) { if (integer == null || integer.intValue() <= 0) { config.remove(MAX_BOOLEAN_CLAUSES); } else { config.put(MAX_BOOLEAN_CLAUSES, integer); } }
@Override public void deleteConnection(String connection) throws Exception { Configuration configuration = configurationAdmin.getConfiguration(CONFIG_PID); Dictionary<String, Object> properties = configuration.getProperties(); if (properties != null) { properties.remove(connection + ".jmx"); properties.remove(connection + ".instance"); properties.remove(connection + ".username"); properties.remove(connection + ".password"); configuration.update(properties); } }
static void setAutoProperties( Dictionary<String, Object> properties, String pid, String factoryPid ) { replaceProperty( properties, Constants.SERVICE_PID, pid ); replaceProperty( properties, ConfigurationAdmin.SERVICE_FACTORYPID, factoryPid ); properties.remove( ConfigurationAdmin.SERVICE_BUNDLELOCATION ); properties.remove( PROPERTY_LOCKED ); properties.remove( PROPERTY_REVISION ); }
static void setAutoProperties( Dictionary<String, Object> properties, String pid, String factoryPid ) { replaceProperty( properties, Constants.SERVICE_PID, pid ); replaceProperty( properties, ConfigurationAdmin.SERVICE_FACTORYPID, factoryPid ); properties.remove( ConfigurationAdmin.SERVICE_BUNDLELOCATION ); properties.remove( PROPERTY_LOCKED ); properties.remove( PROPERTY_REVISION ); }
protected void doExecute(ConfigurationAdmin admin) throws Exception { Dictionary props = getEditedProps(); if (props == null) { System.err.println("No configuration is being edited. Run the edit command first"); } else { props.remove(prop); } }
@Override public void on(DbServiceInitialized event) { synchronized (asyncInitializers) { asyncInitializers.remove(event.source()); if (asyncInitializers.isEmpty()) { daoInitializer.run(); } } } });
@Override public void on(DbServiceInitialized event) { synchronized (asyncInitializers) { asyncInitializers.remove(event.source()); if (asyncInitializers.isEmpty()) { daoInitializer.run(); } } } });
/** * Removes the CacheEntry corresponding to the request. */ public synchronized void remove(Request request) { System.out.println("**** Removing from cache") ; CacheEntry ce = (CacheEntry) entries.remove(getNormalizedURL(request)) ; if(ce == null) return ; lruList.remove(ce) ; }
public Dictionary invoke(Dictionary args) throws Exception { Long newValue = (Long) args.get(NEW_TIME_VALUE); Long oldValue = (Long) ((TimeStateVariable) time).getCurrentValue(); ((TimeStateVariable) time).setCurrentTime(newValue.longValue()); ClockDevice.notifier.propertyChange(new PropertyChangeEvent(time,"Time",oldValue,newValue)); args.remove(NEW_TIME_VALUE); args.put(NEW_RESULT_VALUE,((TimeStateVariable) time).getCurrentTime()); return args; } }
public SimpleCacheEntry retrieve(Request request) { String url = getNormalizedURL(request) ; SimpleCacheEntry ce = (SimpleCacheEntry) entries.get(url) ; if(ce==null) return null ; if(!ce.isFresh()) { lruList.remove(ce) ; entries.remove(url) ; } lruList.toHead(ce) ; return ce ; }
public void removeCredential(String key, String username) { try { User user = (User) ac.getUserAdmin().getRole(username); user.getCredentials().remove(key); } catch (NullPointerException npe) { ac.debug("UserAdmin not available. "); } catch (Exception e) { ac.error("unexpected exception", e); } }