Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.security.acl
Class FlatGroup

    java.lang.Object
      |
      +--weblogic.security.acl.DefaultGroupImpl
            |
            +--weblogic.security.acl.FlatGroup

Deprecated. Deprecated in WebLogic Server 7.0. Replaced by the rules-based Authorization Provider in the Pluggable Security Infrastructure.

public abstract class FlatGroup
extends DefaultGroupImpl

Caching group implementation. Cooperates with classes that inherit from AbstractListableRealm, to provide a group implementation that remains up-to-date when its backing store changes.

FlatGroup attempts to avoid the problem of a Group object being created with a snapshot of the "real" group which is never afterwards updated. For example, if you store group information in a remote server and create a WebLogic ACL that refers to that group, the ACL will become out of date if the membership of that group ever changes on the remote server.

FlatGroup avoids that problem by maintaining its group membership in a cache, instead of a never-changing set. When the cache expires, this group implementation will query the realm that created it to obtain the most recent membership information. This query is performed by calling the FlatGroup.Source.getGroupMembers method (which is implemented by AsbtractListableRealm).

As a result of caching its membership information, a FlatGroup can occasionally become temporarily out-of-date with respect to its backing store, but this caching is necessary to maintain reasonable WebLogic Server performance.

By default, group membership information is cached for 5 minutes. If necessary, you can change this value by setting the `weblogic.security.groupCacheTTL` system property to the number of seconds you need (this value must be greater than zero).

Author:
  Copyright (c) 2000 BEA Systems, Inc. All Rights Reserved.
See Also:
  `AbstractListableRealm`

Inner Class Summary
`static interface` | `FlatGroup.Source` Deprecated. Deprecated in WebLogic Server 7.0.

Field Summary
`static int` | `LIFETIME_DEFAULT_SEC` Deprecated. Default cache lifetime, in seconds.
`protected java.util.Hashtable` | `members` Deprecated.

Constructor Summary
`protected` | `FlatGroup(java.lang.String name, FlatGroup.Source source)` Deprecated. Create a new group, with no membership information.
`protected` | `FlatGroup(java.lang.String name, FlatGroup.Source source, java.util.Hashtable members)` Deprecated. Create a new group, with the given membership information.

Method Summary
`protected boolean` | `addMemberInternal(java.security.Principal principal)` Deprecated. Update this object's internal state when adding a member.
`void` | `clearCache()` Deprecated. Invalidate the membership cache, which will force it to be refreshed on next use.
`protected void` | `ensureFreshness()` Deprecated. Important method for implementors.
`boolean` | `equals(java.lang.Object obj)` Deprecated.
`static long` | `getCacheTTLMillis()` Deprecated. Get the current group membership cache TTL, in milliseconds
`java.util.Hashtable` | `getMembersHashtable()` Deprecated.
`protected abstract java.lang.Class` | `getUserClass()` Deprecated. Return the class object used by users in this realm.
`int` | `hashCode()` Deprecated.
`boolean` | `isMember(java.security.Principal member)` Deprecated. Returns true if the passed principal is a member of the group.
`java.util.Enumeration` | `members()` Deprecated. Returns an enumeration of the members in the group.
`protected boolean` | `removeMemberInternal(java.security.Principal principal)` Deprecated. Update this object's internal state when removing a member.
`protected static void` | `setCacheTTL(long millis)` Deprecated. Set this group's membership cache TTL.
`java.lang.String` | `toString()` Deprecated.

Methods inherited from class weblogic.security.acl.DefaultGroupImpl
`addMember, getName, removeMember`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### LIFETIME_DEFAULT_SEC

    public static final int LIFETIME_DEFAULT_SEC

  Deprecated.
  Default cache lifetime, in seconds.

### members

    protected java.util.Hashtable members

  Deprecated.

Constructor Detail

### FlatGroup

    protected FlatGroup(java.lang.String name,
                        FlatGroup.Source source)

  Deprecated.
  Create a new group, with no membership information. The membership cache won't be populated until the first relevant method is called.

### FlatGroup

    protected FlatGroup(java.lang.String name,
                        FlatGroup.Source source,
                        java.util.Hashtable members)

  Deprecated.
  Create a new group, with the given membership information. The membership cache is immediately populated.

Method Detail

### ensureFreshness

    protected final void ensureFreshness()

  Deprecated.
  Important method for implementors. If you override any methods in this class, you should call this method inside a synchronized(this) block before doing anything else, otherwise you risk group membership information being either out-of-date or completely nonexistent.

### isMember

    public boolean isMember(java.security.Principal member)

  Deprecated.
  Returns true if the passed principal is a member of the group. This method does a recursive search, so if a principal belongs to a group which is a member of this group, true is returned.

  Parameters:
    `member` - the principal whose membership is to be checked.
  Returns:
    true if the principal is a member of this group, false otherwise.
  Overrides:
    isMember in class DefaultGroupImpl

### members

    public java.util.Enumeration members()

  Deprecated.
  Returns an enumeration of the members in the group. The returned objects can be instances of either Principal or Group (which is a subclass of Principal).

  Returns:
    an enumeration of the group members.
  Overrides:
    members in class DefaultGroupImpl

### toString

    public java.lang.String toString()

  Deprecated.

  Overrides:
    toString in class DefaultGroupImpl

### hashCode

    public int hashCode()

  Deprecated.

  Overrides:
    hashCode in class java.lang.Object

### equals

    public boolean equals(java.lang.Object obj)

  Deprecated.

  Overrides:
    equals in class java.lang.Object

### getUserClass

    protected abstract java.lang.Class getUserClass()

  Deprecated.
  Return the class object used by users in this realm. This is used to perform fast and safe membership checks.

### addMemberInternal

    protected boolean addMemberInternal(java.security.Principal principal)

  Deprecated.
  Update this object's internal state when adding a member. You should call this if you write a new implementation of addMember, performing the call after your add succeeds.

### removeMemberInternal

    protected boolean removeMemberInternal(java.security.Principal principal)

  Deprecated.
  Update this object's internal state when removing a member. You should call this if you write a new implementation of removeMember, performing the call after your remove succeeds.

### setCacheTTL

    protected static final void setCacheTTL(long millis)

  Deprecated.
  Set this group's membership cache TTL. Note that this is a server-wide property, so changing this value will affect all objects that inherit from FlatGroup.

  Parameters:
    `millis` - new TTL, in milliseconds (must be positive)

### getCacheTTLMillis

    public static final long getCacheTTLMillis()

  Deprecated.
  Get the current group membership cache TTL, in milliseconds

### getMembersHashtable

    public java.util.Hashtable getMembersHashtable()

  Deprecated.

### clearCache

    public void clearCache()

  Deprecated.
  Invalidate the membership cache, which will force it to be refreshed on next use.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference