Package edu.vt.middleware.ldap.props
Class LdapProperties
- java.lang.Object
-
- edu.vt.middleware.ldap.props.LdapProperties
-
public final class LdapProperties extends java.lang.ObjectLdapPropertiesattempts to load the configuration properties from a properties file in the classpath for aPropertyConfigobject. The default properties file is '/ldap.properties'.- Version:
- $Revision: 1743 $ $Date: 2010-11-19 18:00:18 +0100 (Fri, 19 Nov 2010) $
- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTIES_FILEDefault file to read properties from, value is "/ldap.properties".
-
Constructor Summary
Constructors Constructor Description LdapProperties(PropertyConfig pc)This will create a newLdapPropertiesfor the supplied properties config.LdapProperties(PropertyConfig pc, java.io.InputStream is)This will create a newLdapPropertieswith the supplied properties properties config and input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure()java.util.PropertiesgetProperties()This returns the name of the properties being used by thisLdapProperties.booleanisPropertySet(java.lang.String key)This returns whether the supplied key has already been set.voidsetProperty(java.lang.String key, java.lang.String value)This sets the supplied key and value in the ldap properties.voiduseDefaultPropertiesFile()This will load properties from the default properties file.voiduseProperties(java.io.InputStream is)This will load properties from the supplied input stream.
-
-
-
Field Detail
-
PROPERTIES_FILE
public static final java.lang.String PROPERTIES_FILE
Default file to read properties from, value is "/ldap.properties".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LdapProperties
public LdapProperties(PropertyConfig pc)
This will create a newLdapPropertiesfor the supplied properties config.- Parameters:
pc- object to set properties for
-
LdapProperties
public LdapProperties(PropertyConfig pc, java.io.InputStream is)
This will create a newLdapPropertieswith the supplied properties properties config and input stream.- Parameters:
pc- object to set properties foris-InputStreamcontaining properties
-
-
Method Detail
-
useDefaultPropertiesFile
public void useDefaultPropertiesFile()
This will load properties from the default properties file.
-
useProperties
public void useProperties(java.io.InputStream is)
This will load properties from the supplied input stream.- Parameters:
is-InputStreamcontaining properties
-
getProperties
public java.util.Properties getProperties()
This returns the name of the properties being used by thisLdapProperties.- Returns:
Properties
-
setProperty
public void setProperty(java.lang.String key, java.lang.String value)This sets the supplied key and value in the ldap properties. The key will be prepended with the appropriate namespace.- Parameters:
key-Stringvalue-String
-
isPropertySet
public boolean isPropertySet(java.lang.String key)
This returns whether the supplied key has already been set. The key will be prepended with the appropriate namespace.- Parameters:
key-String- Returns:
boolean
-
configure
public void configure()
-
-