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

## com.bea.p13n.security.realm
Class RDBMSGroup

    java.lang.Object
      |
      +--weblogic.security.acl.DefaultGroupImpl
            |
            +--com.bea.p13n.security.realm.RDBMSGroup

public class RDBMSGroup
extends weblogic.security.acl.DefaultGroupImpl

This class is the representation of a group from the database. This class no longer extends FlatGroup. A new caching scheme has been implemented to cache the membership information. The RDBMSGroup now only concerns itself with caching its child groups, as opposed to caching all users and child groups. The RDBMSUser is now responsible for knowing what groups it belongs to. When a client invokes the isMember method, for example, RDBMSGroup will delegate to RDBMSUser to determine if the user belongs to the group. What was happening before is that FlatGroup was caching all Users for each group. This was not a problem until the group membership size grew large. Once this happened a call to update the cache could potentially do a large number of database queries.

Field Summary
`static int` | `LIFETIME_DEFAULT_SEC` Default cache lifetime, in seconds.

Method Summary
`boolean` | `addMember(java.security.Principal principal)` Add a member to this group.
`protected boolean` | `addMemberInternal(java.security.Principal principal)` Update this object's internal state when adding a member.
`boolean` | `equals(java.lang.Object o)`
`protected java.lang.Class` | `getUserClass()`
`protected boolean` | `isInternalMember(java.security.Principal member)` Determine if a principal is a member of this group *directly*, not through a group hierarchy.
`boolean` | `isMember(java.security.Principal member)` Returns true if the passed principal is a member of the group.
`java.util.Enumeration` | `members()` Returns an enumeration of the members in the group.
`boolean` | `removeMember(java.security.Principal principal)` Remove a member from this group.
`protected boolean` | `removeMemberInternal(java.security.Principal principal)` Update this object's internal state when removing a member.

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

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

Field Detail

### LIFETIME_DEFAULT_SEC

    public static final int LIFETIME_DEFAULT_SEC

  Default cache lifetime, in seconds.

Method Detail

### getUserClass

    protected java.lang.Class getUserClass()

  Returns:
    the type of user this realm knows about

### addMember

    public boolean addMember(java.security.Principal principal)

  Add a member to this group. The new member can be either a user or a group, but must belong to this realm.

  Parameters:
    `principal` - the new member
  Returns:
    true if the member was added, false if it was already a member
  Overrides:
    addMember in class weblogic.security.acl.DefaultGroupImpl

### addMemberInternal

    protected boolean addMemberInternal(java.security.Principal principal)

  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.

### removeMember

    public boolean removeMember(java.security.Principal principal)

  Remove a member from this group. The member can be either a user or a group, but must belong to this realm.

  Parameters:
    `principal` - the member to remove
  Returns:
    true if the member was removed, false if it was not a member
  Overrides:
    removeMember in class weblogic.security.acl.DefaultGroupImpl

### removeMemberInternal

    protected boolean removeMemberInternal(java.security.Principal principal)

  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.

### isMember

    public boolean isMember(java.security.Principal member)

  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 weblogic.security.acl.DefaultGroupImpl

### isInternalMember

    protected boolean isInternalMember(java.security.Principal member)

  Determine if a principal is a member of this group *directly*, not through a group hierarchy. This way we can check before we add/remove a member, because even if a user is a member of a child group, we might still want to add it to this group.

### members

    public java.util.Enumeration members()

  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 weblogic.security.acl.DefaultGroupImpl

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    equals in class java.lang.Object

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

Copyright © 2002 BEA Systems, Inc. All Rights Reserved