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

WebLogic Server 5.1.0sp9 API Reference

## weblogic.security.acl
Interface BasicRealm

All Known Subinterfaces:
  DynamicUserAcl, ListableRealm, ManageableRealm

public interface BasicRealm

BasicRealm provides a minimal interface for realms. Different implementations of the security-related interfaces User, Group, Permission, and Acl are organized into Realms. BasicRealm is extended by ListableRealm and ManageableRealm, which add the ability to list all instances managed by the realm and the ability to create and destroy instances.

Author:
  Copyright (c) 1997-1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1999 by BEA WebXpress. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `User`, `GroupImpl`, `PermissionImpl`, `AclImpl`

Method Summary
`java.security.acl.Acl` | `getAcl(java.lang.String name)` Retrieves an Access Control List (Acl) of that name, or null.
`java.security.acl.Acl` | `getAcl(java.lang.String name, char separator)` Retrieves an Access Control List (Acl) with the best matching name, or null.
`java.security.Principal` | `getAclOwner(java.lang.Object credential)` Retrieves the owner of all ACLs in a BasicRealm, or null, depending on the validity of the passed credential.
`java.security.acl.Group` | `getGroup(java.lang.String name)` Retrieves a group of that name or null.
`java.lang.String` | `getName()` Gets the name of a BasicRealm.
`java.security.acl.Permission` | `getPermission(java.lang.String name)` Retrieves a permission of that name, or null.
`User` | `getUser(java.lang.String name)` Retrieves a User by the specified name, or null.
`User` | `getUser(UserInfo userInfo)` Checks whether some User matches the presented UserInfo and accepts its credentials.
`void` | `init(java.lang.String name, java.lang.Object ownerCredential)` Initializes a realm implementation.
`void` | `load(java.lang.String name, java.lang.Object credential)` Loads a BasicRealm from some persistent state identified in the name.
`void` | `save(java.lang.String name)` Saves the realm to some persistent state identified in the name.

Method Detail

### init

    public void init(java.lang.String name,
                     java.lang.Object ownerCredential)
              throws java.security.acl.NotOwnerException

  Initializes a realm implementation. Throws NotOwnerException on reinitialization if the owner credential is invalid.

  Parameters:
    `name` - Name of Realm
    `ownerCredential` - Credentialed owner of a BasicRealm
  Throws:
    java.security.acl.NotOwnerException - if the owner credential is invalid

### getName

    public java.lang.String getName()

  Gets the name of a BasicRealm.

  Returns:
    Name

### getUser

    public User getUser(java.lang.String name)

  Retrieves a User by the specified name, or null.

  Parameters:
    `User` - name
  Returns:
    User object

### getUser

    public User getUser(UserInfo userInfo)

  Checks whether some User matches the presented UserInfo and accepts its credentials. Typically, the UserInfo must be created from a RealmProxy for this realm.

  Parameters:
    `userInfo` - Credentials to check against
  Returns:
    Authenticated User or null

### getAclOwner

    public java.security.Principal getAclOwner(java.lang.Object credential)

  Retrieves the owner of all ACLs in a BasicRealm, or null, depending on the validity of the passed credential.

  Parameters:
    `credential` - Credentials of an owner
  Returns:
    Principal that is a BasicRealm owner

### getGroup

    public java.security.acl.Group getGroup(java.lang.String name)

  Retrieves a group of that name or null.

  Parameters:
    `name` - Name of group
  Returns:
    Group that matches name

### getAcl

    public java.security.acl.Acl getAcl(java.lang.String name)

  Retrieves an Access Control List (Acl) of that name, or null.

  Parameters:
    `name` - Name of ACL associated with a BasicRealm
  Returns:
    Acl object

### getAcl

    public java.security.acl.Acl getAcl(java.lang.String name,
                                        char separator)

  Retrieves an Access Control List (Acl) with the best matching name, or null. A name matches if it is a prefix. The longer the prefix, the better the match. The only prefixes considered are up to, but excluding the separator character. For example: `getAcl("/files/personal/bill", '.')` looks for Acls named files.personal.bill, files.personal, and files and returns the one with the longest name.

  Parameters:
    `name` - Name of the Acl to retrieve
    `separator` - Character separator
  Returns:
    Acl object

### getPermission

    public java.security.acl.Permission getPermission(java.lang.String name)

  Retrieves a permission of that name, or null.

  Parameters:
    `name` - Name of permission to retrieve
  Returns:
    Permission object

### load

    public void load(java.lang.String name,
                     java.lang.Object credential)
              throws java.lang.ClassNotFoundException,
                     java.io.IOException,
                     java.security.acl.NotOwnerException

  Loads a BasicRealm from some persistent state identified in the name. Different implementations differ in how they are stored persistently and how they interpret the name.

  Parameters:
    `name` - Name of BasicRealm to load
    `credential` - Credentialed owner of a BasicRealm
  Throws:
    java.lang.ClassNotFoundException - if the BasicRealm cannot be found
    java.io.IOException - if there is an I/O error
    java.security.acl.NotOwnerException - if the credential does not match an owner

### save

    public void save(java.lang.String name)
              throws java.io.IOException

  Saves the realm to some persistent state identified in the name. Different implementations differ in how they are stored persistently and how they interpret the name.

  Parameters:
    `name` - Name to save under
  Throws:
    java.io.IOException - if there is an I/O error

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://www.weblogic.com/docs51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD