Class LdapConfig


  • public class LdapConfig
    extends java.lang.Object
    Static methods for dealing with LDAP (DN) and the "password" table.
    Since:
    3.0-Beta3
    See Also:
    SecuritySystem, LdapImpl
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getGroupAttribute​(java.lang.String key)  
      org.springframework.ldap.filter.Filter getGroupFilter()  
      java.lang.String getNewUserGroup()  
      java.lang.String getNewUserGroupOwner()  
      java.lang.String getUserAttribute​(java.lang.String key)  
      org.springframework.ldap.filter.Filter getUserFilter()  
      org.springframework.ldap.filter.Filter groupnameFilter​(java.lang.String groupname)  
      boolean isEnabled()  
      boolean isSyncOnLogin()  
      protected java.util.Map<java.lang.String,​java.lang.String> parse​(java.lang.String mapping)  
      org.springframework.ldap.core.DistinguishedName relativeDN​(java.lang.String fullDNString)
      Calculate the relative DN based on the current base.
      org.springframework.ldap.filter.Filter usernameFilter​(java.lang.String username)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LdapConfig

        public LdapConfig​(boolean enabled,
                          java.lang.String newUserGroup,
                          java.lang.String userFilter,
                          java.lang.String groupFilter,
                          java.lang.String userMapping,
                          java.lang.String groupMapping,
                          boolean syncOnLogin,
                          java.lang.String base,
                          java.lang.String newUserGroupOwner)
        Base constructor which stores all parse(String) and stores all values for later lookup.
    • Method Detail

      • usernameFilter

        public org.springframework.ldap.filter.Filter usernameFilter​(java.lang.String username)
      • groupnameFilter

        public org.springframework.ldap.filter.Filter groupnameFilter​(java.lang.String groupname)
      • relativeDN

        public org.springframework.ldap.core.DistinguishedName relativeDN​(java.lang.String fullDNString)
        Calculate the relative DN based on the current base. For example, if the base is "ou=example" and the fullDNString is "cn=myuser,ou=example", then the returned DN will be "cn=myuser". Note: if constructor argument base was null then this will throw an exception.
        Parameters:
        fullDNString - the full distinguished name, not null
        Returns:
        the corresponding relative distinguished name, not null
      • isEnabled

        public boolean isEnabled()
      • isSyncOnLogin

        public boolean isSyncOnLogin()
      • getNewUserGroup

        public java.lang.String getNewUserGroup()
      • getNewUserGroupOwner

        public java.lang.String getNewUserGroupOwner()
      • getUserFilter

        public org.springframework.ldap.filter.Filter getUserFilter()
      • getGroupFilter

        public org.springframework.ldap.filter.Filter getGroupFilter()
      • getUserAttribute

        public java.lang.String getUserAttribute​(java.lang.String key)
      • getGroupAttribute

        public java.lang.String getGroupAttribute​(java.lang.String key)
      • parse

        protected java.util.Map<java.lang.String,​java.lang.String> parse​(java.lang.String mapping)