Class LdapProperties


  • public final class LdapProperties
    extends java.lang.Object
    LdapProperties attempts to load the configuration properties from a properties file in the classpath for a PropertyConfig object. 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.String PROPERTIES_FILE
      Default file to read properties from, value is "/ldap.properties".
    • Constructor Summary

      Constructors 
      Constructor Description
      LdapProperties​(PropertyConfig pc)
      This will create a new LdapProperties for the supplied properties config.
      LdapProperties​(PropertyConfig pc, java.io.InputStream is)
      This will create a new LdapProperties with the supplied properties properties config and input stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configure()
      java.util.Properties getProperties()
      This returns the name of the properties being used by this LdapProperties.
      boolean isPropertySet​(java.lang.String key)
      This returns whether the supplied key has already been set.
      void setProperty​(java.lang.String key, java.lang.String value)
      This sets the supplied key and value in the ldap properties.
      void useDefaultPropertiesFile()
      This will load properties from the default properties file.
      void useProperties​(java.io.InputStream is)
      This will load properties from the supplied input stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 new LdapProperties for the supplied properties config.
        Parameters:
        pc - object to set properties for
      • LdapProperties

        public LdapProperties​(PropertyConfig pc,
                              java.io.InputStream is)
        This will create a new LdapProperties with the supplied properties properties config and input stream.
        Parameters:
        pc - object to set properties for
        is - InputStream containing 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 - InputStream containing properties
      • getProperties

        public java.util.Properties getProperties()
        This returns the name of the properties being used by this LdapProperties.
        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 - String
        value - 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