Class LDAPCache

java.lang.Object
org.imixs.workflow.ldap.LDAPCache
All Implemented Interfaces:
Serializable

public class LDAPCache extends Object implements Serializable
This singleton ejb provides a cache to lookup ldap user informations. The cache is used by the LDAPGroupLookupService EJB. The bean reads its configuration from the configuration property file located in the glassfish domains config folder (GLASSFISH_DOMAIN/config/imixs-office-ldap.properties). cache-size = maximum number of entries cache-expires = milliseconds after the cache is discarded The cache-size should be set to the value of minimum concurrent user sessions. cache-expires specifies the expire time of the cache in milliseconds.
Version:
1.0
Author:
rsoika
See Also:
  • Constructor Details

    • LDAPCache

      public LDAPCache()
  • Method Details

    • resetCache

      public void resetCache()
      resets the ldap cache object and reads the config params....
    • contains

      public boolean contains(String key)
      returns true if the key is contained in the cache. This does not mean that the object is useable!
    • getUser

      public org.imixs.workflow.ItemCollection getUser(String key)
      Returns a cached user object. The value is stored as a Map<String, List> and converted into a ItemCollection.
      Parameters:
      key -
      Returns:
      Map<String, List> user items, can be converted into ItemCollection
    • putUser

      public void putUser(String key, org.imixs.workflow.ItemCollection user)
      The method puts a user ItemCollection into the cache. The method puts only the internal items of the ItemCollection into the cache, because the ItemCollection is not serializable.
      Parameters:
      key -
      user -
    • getGroups

      public String[] getGroups(String key)
      Returns a cached list of group names associated with a userId.
      Parameters:
      key -
      Returns:
    • putGroups

      public void putGroups(String key, String[] groups)
      Stores a list of group names for a given userId.
      Parameters:
      key -
      groups -