com.beasys.commerce.axiom.contact.security
Class RDBMSRealm
java.lang.Object
|
+--weblogic.security.acl.AbstractListableRealm
|
+--weblogic.security.acl.AbstractManageableRealm
|
+--com.beasys.commerce.axiom.contact.security.RDBMSRealm
- All Implemented Interfaces:
- weblogic.security.acl.BasicRealm, weblogic.security.acl.DebuggableRealm, weblogic.security.acl.DelegatedRealm, weblogic.security.acl.FlatGroup.Source, weblogic.security.acl.ListableRealm, weblogic.security.acl.ManageableRealm
- public class RDBMSRealm
- extends weblogic.security.acl.AbstractManageableRealm
- implements weblogic.security.acl.DebuggableRealm
RDBMS realm class. This is the default realm to handle user/group
information for the user management section of the Commerce Server.
- Author:
- Copyright (c) 1998-1999 by BEA Systems. All Rights Reserved.
Field Summary |
protected weblogic.utils.reuse.Pool |
delegatePool
We maintain a pool of delegates, each with its own connection to
the database. |
Constructor Summary |
RDBMSRealm()
Create a new RDBMS realm object. |
Method Summary |
protected weblogic.security.acl.User |
authUserPassword(java.lang.String name,
java.lang.String passwd)
Authenticate the given user. |
weblogic.logging.LogOutputStream |
getDebugLog()
Obtain the debug log, if it is enabled. |
protected com.beasys.commerce.axiom.contact.security.RDBMSDelegate |
getDelegate()
Obtain a delegate from the pool. |
java.security.acl.Group |
getGroup(java.lang.String name)
Return the group with the given name, or null if the group does
not exist in the database. |
protected java.util.Hashtable |
getGroupMembersInternal(java.lang.String name)
|
java.util.Enumeration |
getGroups()
Return an enumeration of all groups in the database. |
weblogic.security.acl.User |
getUser(java.lang.String name)
Return the user with the given name, or null if the user does not
exist in the database. |
java.util.Enumeration |
getUsers()
Return an enumeration of all users in the database. |
protected void |
returnDelegate(com.beasys.commerce.axiom.contact.security.RDBMSDelegate delegate)
Return a delegate to the pool. |
void |
setDebug(boolean enable)
Enable or disable debug logging. |
Methods inherited from class weblogic.security.acl.AbstractManageableRealm |
deleteAcl, deleteGroup, deletePermission, deleteUser, newAcl, newGroup, newPermission, newUser, setPermission |
Methods inherited from class weblogic.security.acl.AbstractListableRealm |
authCertificates, authenticate, authInternal, authSSLCertificates, getAcl, getAcl, getAclOwner, getAcls, getDelegator, getGroupMembers, getName, getPermission, getPermissions, getUser, init, load, save, setDelegator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface weblogic.security.acl.ListableRealm |
getAcls, getPermissions |
Methods inherited from interface weblogic.security.acl.BasicRealm |
getAcl, getAcl, getAclOwner, getName, getPermission, getUser, init, load, save |
delegatePool
protected weblogic.utils.reuse.Pool delegatePool
- We maintain a pool of delegates, each with its own connection to
the database. Access to the pool itself is synchronized, but
since only one thread will obtain a given delegate from the pool
at any time, we don't need to synchronize any other method calls.
- See Also:
getDelegate()
,
returnDelegate(com.beasys.commerce.axiom.contact.security.RDBMSDelegate)
RDBMSRealm
public RDBMSRealm()
- Create a new RDBMS realm object.
getDelegate
protected com.beasys.commerce.axiom.contact.security.RDBMSDelegate getDelegate()
- Obtain a delegate from the pool. If the pool is empty, this may
cause a new delegate to be created and handed back to us. If a
fatal error occurs when you are using a delegate, do not return
it to the pool. You can do this by setting your reference to the
delegate to null and calling returnDelegate() as usual; it will
do the right thing.
- Throws:
RDBMSException
- an error occurred in communicating with
the database- See Also:
returnDelegate(com.beasys.commerce.axiom.contact.security.RDBMSDelegate)
returnDelegate
protected void returnDelegate(com.beasys.commerce.axiom.contact.security.RDBMSDelegate delegate)
- Return a delegate to the pool. If the delegate was set to null
because of errors, nothing is done.
- See Also:
getDelegate()
getUser
public weblogic.security.acl.User getUser(java.lang.String name)
- Return the user with the given name, or null if the user does not
exist in the database.
- Overrides:
getUser
in class weblogic.security.acl.AbstractListableRealm
- Parameters:
name
- the name to obtain- Returns:
- the user, or null if none
- Throws:
RDBMSException
- an error occurred in communicating with
the database
getGroupMembersInternal
protected java.util.Hashtable getGroupMembersInternal(java.lang.String name)
- Overrides:
getGroupMembersInternal
in class weblogic.security.acl.AbstractListableRealm
getGroup
public java.security.acl.Group getGroup(java.lang.String name)
- Return the group with the given name, or null if the group does
not exist in the database.
- Overrides:
getGroup
in class weblogic.security.acl.AbstractListableRealm
- Parameters:
name
- the name to obtain- Returns:
- the group, or null if none
- Throws:
RDBMSException
- an error occurred in communicating with
the database
getUsers
public java.util.Enumeration getUsers()
- Return an enumeration of all users in the database. Each element
of the Enumeration is a User object.
- Overrides:
getUsers
in class weblogic.security.acl.AbstractListableRealm
- Returns:
- all users
- Throws:
RDBMSException
- an error occurred in communicating with
the database- See Also:
User
getGroups
public java.util.Enumeration getGroups()
- Return an enumeration of all groups in the database. Each
element of the Enumeration is a Group object. Note that in this
realm, empty groups cannot currently exist.
- Overrides:
getGroups
in class weblogic.security.acl.AbstractListableRealm
- Returns:
- all groups
- Throws:
RDBMSException
- an error occurred in communicating with
the database- See Also:
Group
authUserPassword
protected weblogic.security.acl.User authUserPassword(java.lang.String name,
java.lang.String passwd)
- Authenticate the given user. If the authentication step passes,
a User object is returned for that user, otherwise null is
returned. This will always fail for users that came from an
external (non-RDBMS) realm.
- Overrides:
authUserPassword
in class weblogic.security.acl.AbstractListableRealm
- Returns:
- the authenticated user, or null
- Throws:
RDBMSException
- an error occurred in communicating with
the database
setDebug
public void setDebug(boolean enable)
- Enable or disable debug logging.
- Specified by:
setDebug
in interface weblogic.security.acl.DebuggableRealm
getDebugLog
public weblogic.logging.LogOutputStream getDebugLog()
- Obtain the debug log, if it is enabled.
- Specified by:
getDebugLog
in interface weblogic.security.acl.DebuggableRealm
Copyright © 2000 BEA Systems, Inc. All Rights Reserved