|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.p13n.security.realm.RDBMSDelegate
An instance of this class communicates with a single database connection. A pool of instances is then maintained by RDBMSRealm to provide high performance.
Field Summary | |
protected java.sql.Connection |
conn
The main connection to the database. |
protected RDBMSRealm |
realm
The realm with which this delegate is associated. |
protected static com.bea.p13n.i18n.RealmExceptionTextFormatter |
textFormatter
Exception class |
Constructor Summary | |
protected |
RDBMSDelegate(RDBMSRealm realm)
Creates a new delegate associated with the given realm. |
Method Summary | |
boolean |
addGroupMember(RDBMSGroup group,
java.security.Principal member)
Add a member to a group. |
void |
close()
Cleans up by closing all statements and connections. |
protected void |
close(java.sql.PreparedStatement stmt)
Close a prepared statement |
protected void |
close(java.sql.ResultSet rs)
Close a result set. |
void |
deleteGroup(RDBMSGroup group)
Deletes a group from the database. |
void |
deleteUser(com.bea.p13n.security.realm.RDBMSUser user)
Deletes a user from the database. |
protected void |
finalize()
Cleans up. |
java.security.acl.Group |
getGroup(java.lang.String name)
Gets the named group from the database. |
java.util.Map |
getGroupGroups(RDBMSGroup pGroup)
Gets the direct child groups for a given group. |
java.util.Hashtable |
getGroupMembers(RDBMSGroup group)
Get the membership information for a group. |
java.util.Enumeration |
getGroups()
Gets all groups from the database. |
java.util.Map |
getGroupUsers(RDBMSGroup pGroup)
Gets all users for a particular group from the database. |
protected long |
getNextGroupId()
Get the next unique group id for a new group. |
protected long |
getNextUserId()
Get the next unique user id for a new user. |
java.security.Principal |
getPrincipal(java.lang.String name)
Resolves a name to a User or Group. |
weblogic.security.acl.User |
getUser(java.lang.String name)
Gets a user from the database. |
java.util.Map |
getUserGroups(java.lang.String pUserName)
|
java.util.Enumeration |
getUsers()
Gets all users from the database. |
boolean |
isValid()
Check to see if this delegate's connection is still open |
java.security.acl.Group |
newGroup(java.lang.String name)
Create a new group record in the database. |
weblogic.security.acl.User |
newUser(java.lang.String name,
java.lang.String passwd)
Create a new user in the database. |
protected java.sql.PreparedStatement |
prepare(java.lang.String propKey)
A shorthand convenience function for preparing an SQL statement. |
boolean |
removeGroupMember(RDBMSGroup group,
java.security.Principal member)
Remove a member from a group. |
void |
setPassword(java.lang.String name,
java.lang.String password)
Set the password for a user in the database. |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final com.bea.p13n.i18n.RealmExceptionTextFormatter textFormatter
protected RDBMSRealm realm
protected java.sql.Connection conn
Constructor Detail |
protected RDBMSDelegate(RDBMSRealm realm)
Method Detail |
protected java.sql.PreparedStatement prepare(java.lang.String propKey) throws java.sql.SQLException
name
- the name of the statement to preparepublic boolean isValid()
public weblogic.security.acl.User getUser(java.lang.String name) throws java.sql.SQLException
name
- the usernamepublic java.util.Enumeration getUsers() throws java.sql.SQLException
public java.util.Map getGroupUsers(RDBMSGroup pGroup) throws java.sql.SQLException
pGroup
- the group that we are interested in.public java.security.acl.Group getGroup(java.lang.String name) throws java.sql.SQLException
name
- the group namepublic java.util.Enumeration getGroups() throws java.sql.SQLException
public java.util.Map getUserGroups(java.lang.String pUserName) throws java.sql.SQLException
public java.util.Map getGroupGroups(RDBMSGroup pGroup) throws java.sql.SQLException
pGroup
- the group that we are interested inpublic java.util.Hashtable getGroupMembers(RDBMSGroup group) throws java.sql.SQLException
group
- the group to querypublic weblogic.security.acl.User newUser(java.lang.String name, java.lang.String passwd) throws java.sql.SQLException, java.lang.SecurityException
name
- the new usernamepasswd
- the user's password, *not* encryptedpublic void setPassword(java.lang.String name, java.lang.String password) throws java.sql.SQLException, java.lang.SecurityException
name
- the name of the user to updatepassword
- the new password, already encryptedpublic java.security.acl.Group newGroup(java.lang.String name) throws java.sql.SQLException, java.lang.SecurityException
the
- new group namepublic void deleteUser(com.bea.p13n.security.realm.RDBMSUser user) throws java.sql.SQLException
user
- the user to deletepublic void deleteGroup(RDBMSGroup group) throws java.sql.SQLException
user
- the user to deletepublic boolean addGroupMember(RDBMSGroup group, java.security.Principal member) throws java.sql.SQLException
group
- the group to add a member tomember
- the new group memberpublic boolean removeGroupMember(RDBMSGroup group, java.security.Principal member) throws java.sql.SQLException
group
- the group to remove frommember
- the member to removepublic java.security.Principal getPrincipal(java.lang.String name) throws java.sql.SQLException
protected long getNextUserId() throws java.sql.SQLException
protected long getNextGroupId() throws java.sql.SQLException
protected void finalize()
public void close()
protected void close(java.sql.PreparedStatement stmt)
protected void close(java.sql.ResultSet rs)
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |