/** * Get value for property bound to the current thread context class loader. * If not found, then return default. * * @param propertyName property name. * @param dephault default value. * @return property value if found, otherwise default. */ public static String getProperty(String propertyName, String dephault) { return getProperty(getThreadContextClassLoader(), propertyName, dephault); }
/** * Set property values for <code>Properties</code> bound to the * current thread context class loader. * * @param newProperties name/value pairs to be bound */ public static void setProperties(Map<?, ?> newProperties) { setProperties(newProperties, false); }
/** * Verifies the given SPI implementation is a SPI specialization. * * @param <S> Any type extends T * @param impl The SPI instantance */ public <S extends T> void verifyAncestory(Class<S> impl) { ClassUtils.verifyAncestory(spi, impl); }
/** * as described in * sun/jdk1.3.1/docs/guide/jar/jar.html#Service Provider, * Except this uses <code>Enumeration</code> * instead of <code>Interator</code>. * * @param <T> Service Provider Interface type * @param <S> Any type extends the SPI type * @param spiClass Service Provider Interface Class * @return Enumeration of class instances ({@code S}) */ public static <T, S extends T> Enumeration<S> providers(Class<T> spiClass) { return providers(new SPInterface<T>(spiClass), null); }
public Object run() { return DiscoverSingleton.find(org.apache.commons.logging.LogFactory.class, org.apache.commons.logging.LogFactory.FACTORY_PROPERTIES, org.apache.commons.logging.LogFactory.FACTORY_DEFAULT); } });
/** * Get value for property bound to the current thread context class loader. * * @param propertyName property name. * @return property value if found, otherwise default. */ public static String getProperty(String propertyName) { return ManagedProperties.getProperty(propertyName); }
/** * Set value for property bound to the current thread context class loader. * @param propertyName property name * @param value property value (non-default) If null, remove the property. */ public static void setProperty(String propertyName, String value) { ManagedProperties.setProperty(propertyName, value); }
/** * This is an expensive operation. * * @return Returns a <code>java.util.Properties</code> instance * that is equivalent to the current state of the scoped * properties, in that getProperty() will return the same value. * However, this is a copy, so setProperty on the * returned value will not effect the scoped properties. */ public static Properties getProperties() { return ManagedProperties.getProperties(); }
public Object run() { return DiscoverSingleton.find(org.apache.commons.logging.LogFactory.class, org.apache.commons.logging.LogFactory.FACTORY_PROPERTIES, org.apache.commons.logging.LogFactory.FACTORY_DEFAULT); } });
/** * Get value for property bound to the current thread context class loader. * If not found, then return default. * * @param propertyName property name. * @param dephault default value. * @return property value if found, otherwise default. */ public static String getProperty(String propertyName, String dephault) { return ManagedProperties.getProperty(propertyName, dephault); }
/** * Get value for property bound to the current thread context class loader. * * @param propertyName property name. * @return property value if found, otherwise default. */ public static String getProperty(String propertyName) { return getProperty(getThreadContextClassLoader(), propertyName); }
/** * Set property values for <code>Properties</code> bound to the * current thread context class loader. * * @param newProperties name/value pairs to be bound */ public static void setProperties(Map newProperties) { ManagedProperties.setProperties(newProperties); }
/** * Set value for property bound to the current thread context class loader. * @param propertyName property name * @param value property value (non-default) If null, remove the property. */ public static void setProperty(String propertyName, String value) { setProperty(propertyName, value, false); }
/** * This is an expensive operation. * * @return Returns a <code>java.util.Properties</code> instance * that is equivalent to the current state of the scoped * properties, in that getProperty() will return the same value. * However, this is a copy, so setProperty on the * returned value will not effect the scoped properties. */ public static Properties getProperties() { return ManagedProperties.getProperties(); }
/** * <p>Private singleton constructor.</p> */ private VersionOneGenerator() { super(); manager = (NodeManager) DiscoverSingleton.find( NodeManager.class, DEFAULT_NODEMANAGER_IMPL); }
/** * Get value for property bound to the current thread context class loader. * If not found, then return default. * * @param propertyName property name. * @param dephault default value. * @return property value if found, otherwise default. */ public static String getProperty(String propertyName, String dephault) { return ManagedProperties.getProperty(propertyName, dephault); }
/** * Set property values for <code>Properties</code> bound to the * current thread context class loader. * * @param newProperties name/value pairs to be bound */ public static void setProperties(Map newProperties) { ManagedProperties.setProperties(newProperties); }
/** * Set value for property bound to the current thread context class loader. * @param propertyName property name * @param value property value (non-default) If null, remove the property. */ public static void setProperty(String propertyName, String value) { ManagedProperties.setProperty(propertyName, value); }
/** * Get value for property bound to the current thread context class loader. * * @param propertyName property name. * @return property value if found, otherwise default. */ public static String getProperty(String propertyName) { return ManagedProperties.getProperty(propertyName); }
/** * Get value for property bound to the current thread context class loader. * If not found, then return default. * * @param propertyName property name. * @param dephault default value. * @return property value if found, otherwise default. */ public static String getProperty(String propertyName, String dephault) { return ManagedProperties.getProperty(propertyName, dephault); }