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

## weblogic.security.acl
Class FlatGroup

    java.lang.Object
      weblogic.security.acl.DefaultGroupImpl
          weblogic.security.acl.FlatGroup

All Implemented Interfaces:
  Group, Principal

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).

See Also:
  `AbstractListableRealm`

Nested 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 Hashtable` | `members` Deprecated.

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

Method Summary
`protected boolean` | `addMemberInternal(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(Object obj)` Deprecated.
`static long` | `getCacheTTLMillis()` Deprecated. Get the current group membership cache TTL, in milliseconds
`Hashtable` | `getMembersHashtable()` Deprecated.
`protected abstract Class` | `getUserClass()` Deprecated. Return the class object used by users in this realm.
`int` | `hashCode()` Deprecated.
`boolean` | `isMember(Principal member)` Deprecated. Returns true if the passed principal is a member of the group.
`Enumeration` | `members()` Deprecated. Returns an enumeration of the members in the group.
`protected boolean` | `removeMemberInternal(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.
`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.

  See Also:
    Constant Field Values

### members

    protected Hashtable members

  Deprecated.

Constructor Detail

### FlatGroup

    protected FlatGroup(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(String name,
                        FlatGroup.Source source,
                        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(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.

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

### members

    public 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).

  Specified by:
    `members` in interface `Group`
  Specified by:
    `members` in class `DefaultGroupImpl`
  Returns:
    an enumeration of the group members.

### toString

    public String toString()

  Deprecated.
  Specified by:
    `toString` in interface `Principal`
  Overrides:
    `toString` in class `DefaultGroupImpl`

### hashCode

    public int hashCode()

  Deprecated.
  Specified by:
    `hashCode` in interface `Principal`
  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Deprecated.
  Specified by:
    `equals` in interface `Principal`
  Overrides:
    `equals` in class `Object`

### getUserClass

    protected abstract 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(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(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 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/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD