|
WebLogic Server 6.0 Code Examples, BEA Systems, Inc. | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.security.acl.AbstractListableRealm | +--weblogic.security.acl.AbstractManageableRealm | +--examples.security.rdbmsrealm.RDBMSRealm
This class represents empty groups or ACLs. For historical reasons, the database schema in the RDBMS code example does not allow empty groups or ACLs to be represented in the database. If you need to be able to represent empty groups or ACLs, you must rearrange the schema which may require some code changes to this class and the RDBMSDelegate class.
This realm class does not implement some realm methods (notably ACL creation and deletion).
Field Summary | |
(package private) weblogic.logging.LogOutputStream |
log
The debugging log. |
Constructor Summary | |
RDBMSRealm()
Creates a new RDBMS realm object. |
Method Summary | |
(package private) boolean |
addGroupMember(RDBMSGroup group,
java.security.Principal member)
Adds a member to a group. |
protected weblogic.security.acl.User |
authUserPassword(java.lang.String name,
java.lang.String passwd)
Authenticates the given user. |
(package private) RDBMSGroup |
createGroup(java.lang.String name,
java.util.Hashtable members)
Factory method for creating new group objects. |
protected weblogic.security.utils.Pool |
createPool(int size)
Creates a pool of delegates. |
(package private) weblogic.security.acl.User |
createUser(java.lang.String name,
java.lang.String passwd)
Factory method for creating new user objects. |
void |
deleteGroup(java.security.acl.Group group)
Deletes a group. |
void |
deleteUser(weblogic.security.acl.User user)
Deletes a user. |
java.security.acl.Acl |
getAcl(java.lang.String name)
Returns the ACL with the given name. |
java.util.Enumeration |
getAcls()
Returns an enumeration of all ACLs in the database. |
weblogic.logging.LogOutputStream |
getDebugLog()
Obtains the debug log, if it is enabled. |
protected RDBMSDelegate |
getDelegate()
Obtains a delegate from the pool. |
java.security.acl.Group |
getGroup(java.lang.String name)
Returns the group with the given name. |
protected java.util.Hashtable |
getGroupMembersInternal(java.lang.String name)
|
java.util.Enumeration |
getGroups()
Returns an enumeration of all groups in the database. |
java.security.acl.Permission |
getPermission(java.lang.String name)
Gets a Permission that matches the specified name. |
java.util.Enumeration |
getPermissions()
Returns an enumeration of all permissions in the database. |
protected java.security.Principal |
getPrincipal(java.lang.String name)
Returns the principal with the given name. |
weblogic.security.acl.User |
getUser(java.lang.String name)
Returns the user with the given name. |
java.util.Enumeration |
getUsers()
Returns an enumeration of all users in the database. |
weblogic.security.acl.User |
newUser(java.lang.String name,
java.lang.Object credential,
java.lang.Object constraints)
Creates a new User. |
(package private) boolean |
removeGroupMember(RDBMSGroup group,
java.security.Principal member)
Removes a member from a group. |
protected void |
returnDelegate(RDBMSDelegate delegate)
Returns a delegate to the pool. |
void |
setDebug(boolean enable)
Enables or disables debug logging. |
Methods inherited from class weblogic.security.acl.AbstractManageableRealm |
deleteAcl, deletePermission, newAcl, newGroup, newPermission, setPermission |
Methods inherited from class weblogic.security.acl.AbstractListableRealm |
authCertificates, authenticate, authInternal, authSSLCertificates, getAcl, getAclOwner, getDelegator, getGroupMembers, getName, getUser, init, load, save, setDelegator |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface weblogic.security.acl.BasicRealm |
getAcl, getAclOwner, getName, getUser, init, load, save |
Field Detail |
weblogic.logging.LogOutputStream log
Constructor Detail |
public RDBMSRealm()
Method Detail |
boolean addGroupMember(RDBMSGroup group, java.security.Principal member)
group
- the group to add toprincipal
- the principal to addRDBMSException
- an error occurred in communicating with
the databaseprotected weblogic.security.acl.User authUserPassword(java.lang.String name, java.lang.String passwd)
authUserPassword
in class weblogic.security.acl.AbstractListableRealm
RDBMSException
- an error occurred in communicating with
the databaseRDBMSGroup createGroup(java.lang.String name, java.util.Hashtable members)
protected weblogic.security.utils.Pool createPool(int size)
size
- the number of pool instances to maintainweblogic.security.acl.User createUser(java.lang.String name, java.lang.String passwd)
public void deleteGroup(java.security.acl.Group group) throws java.lang.SecurityException
Warning: Due to the database schema, if you delete a group that is the only member of one or more ACLs, those ACLs will also disappear! This may cause unexpected exceptions at runtime.
deleteGroup
in class weblogic.security.acl.AbstractManageableRealm
group
- the group to deletejava.lang.SecurityException
- invalid grouppublic void deleteUser(weblogic.security.acl.User user) throws java.lang.SecurityException
Warning: Due to the database schema, if you delete a user that is the only member of one or more groups or ACLs those groups or ACLs will also disappear! This may cause unexpected exceptions at runtime.
deleteUser
in class weblogic.security.acl.AbstractManageableRealm
user
- the user to deletejava.lang.SecurityException
- invalid userpublic java.security.acl.Acl getAcl(java.lang.String name)
getAcl
in class weblogic.security.acl.AbstractListableRealm
name
- the name to obtainRDBMSException
- an error occurred in communicating with
the databasepublic java.util.Enumeration getAcls()
getAcls
in class weblogic.security.acl.AbstractListableRealm
RDBMSException
- an error occurred in communicating with
the databaseAcl
public weblogic.logging.LogOutputStream getDebugLog()
getDebugLog
in interface weblogic.security.acl.DebuggableRealm
protected RDBMSDelegate getDelegate()
RDBMSException
- an error occurred in communicating with
the databasereturnDelegate(examples.security.rdbmsrealm.RDBMSDelegate)
public java.security.acl.Group getGroup(java.lang.String name)
getGroup
in class weblogic.security.acl.AbstractListableRealm
name
- the name to obtainRDBMSException
- an error occurred in communicating with
the databaseprotected java.util.Hashtable getGroupMembersInternal(java.lang.String name)
getGroupMembersInternal
in class weblogic.security.acl.AbstractListableRealm
public java.util.Enumeration getGroups()
getGroups
in class weblogic.security.acl.AbstractListableRealm
RDBMSException
- an error occurred in communicating with
the databaseGroup
public java.security.acl.Permission getPermission(java.lang.String name)
getPermission
in class weblogic.security.acl.AbstractListableRealm
name
- the name of the permissionRDBMSException
- an error occurred in communicating with
the databasepublic java.util.Enumeration getPermissions()
getPermissions
in class weblogic.security.acl.AbstractListableRealm
RDBMSException
- an error occurred in communicating with
the databasePermission
protected java.security.Principal getPrincipal(java.lang.String name)
name
- the name to obtainRDBMSException
- an error occurred in communicating with
the databasepublic weblogic.security.acl.User getUser(java.lang.String name)
getUser
in class weblogic.security.acl.AbstractListableRealm
name
- the name to obtainRDBMSException
- an error occurred in communicating with
the databasepublic java.util.Enumeration getUsers()
getUsers
in class weblogic.security.acl.AbstractListableRealm
RDBMSException
- an error occurred in communicating with
the databaseUser
public weblogic.security.acl.User newUser(java.lang.String name, java.lang.Object credential, java.lang.Object constraints) throws java.lang.SecurityException
newUser
in class weblogic.security.acl.AbstractManageableRealm
name
- the name of the new usercredential
- the credential for the user (must be a plaintext password)constraints
- null, for this realmjava.lang.SecurityException
- invalid credential or constraintboolean removeGroupMember(RDBMSGroup group, java.security.Principal member)
group
- the group to remove fromprincipal
- the principal to removeRDBMSException
- an error occurred in communicating with
the databaseprotected void returnDelegate(RDBMSDelegate delegate)
getDelegate()
public void setDebug(boolean enable)
setDebug
in interface weblogic.security.acl.DebuggableRealm
|
Documentation is available at http://e-docs.bea.com/wls/docs60 |
|||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |