Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.plumtree.remote.prc
Interface IACL

public interface IACL

Represents an Access Control List (ACL) that specifies which groups and users can access this object. Note: Adding a non-existent user or group ID will succeed until the ACL has been applied via the ObjectManager/DocumentManager update(int, IACL) method, after which the IACL instance will have all its contained entries refreshed.

Method Summary
`IACLEntry` | `addUserEntry(int userID, AccessLevel accessLevel)` Adds a user entry to this ACL.
`IACLEntry` | `addUserGroupEntry(int groupID, AccessLevel accessLevel)` Adds a group entry to this ACL.
`boolean` | `contains(IACLEntry entry)` Determines whether a specific ACLEntry is contained in this ACL.
`IACLEntry[]` | `entries()` All ACLEntry's contained within this ACL.
`IACLEntry` | `getUserEntry(int userID)` Gets a user entry contained in this ACL.
`IACLEntry` | `getUserGroupEntry(int groupID)` Gets a group entry contained in this ACL.
`IACLEntry` | `removeEntry(IACLEntry aclEntry)` Removes an entry from the ACL, if present.
`IACLEntry` | `removeUserEntry(int userID)` Removes a user entry from the ACL (ignored if no entry is present).
`IACLEntry` | `removeUserGroupEntry(int groupID)` Removes a user entry from the ACL (ignored if no entry is present).

Method Detail

### entries

    public IACLEntry[] entries()

  All ACLEntry's contained within this ACL.

  Returns:
    all contained entries

### addUserEntry

    public IACLEntry addUserEntry(int userID,
                                  AccessLevel accessLevel)

  Adds a user entry to this ACL.

  Parameters:
    `userID` - the user ID of the user to add
    `accessLevel` - the access level to grant
  Returns:
    the previous ACLEntry specified for this user, null if there was no previous entry
  Throws:
    `ACLEntryReadOnlyException` - if the user already has a read-only entry set
    `java.lang.IllegalArgumentException` - if an invalid user ID was passed

### addUserGroupEntry

    public IACLEntry addUserGroupEntry(int groupID,
                                       AccessLevel accessLevel)

  Adds a group entry to this ACL.

  Parameters:
    `groupID` - the group ID of the group to add
    `accessLevel` - the access level to grant
  Returns:
    the previous ACLEntry specified for this group, null if there was no previous entry
  Throws:
    `ACLEntryReadOnlyException` - if the group already has a read-only entry set
    `java.lang.IllegalArgumentException` - if an invalid group ID was passed

### removeEntry

    public IACLEntry removeEntry(IACLEntry aclEntry)

  Removes an entry from the ACL, if present. Note: An ACLEntry will only be removed if it is present in full, meaning that the access level is equal as well as both the principal ID & class.

  Parameters:
    `aclEntry` - the entry to remove
  Returns:
    the removed ACLEntry, null if no entry was removed
  Throws:
    `ACLEntryReadOnlyException` - if the entry contained is read-only

### removeUserEntry

    public IACLEntry removeUserEntry(int userID)

  Removes a user entry from the ACL (ignored if no entry is present).

  Parameters:
    `userID` - the user ID of the user to remove
  Returns:
    the removed ACLEntry, null if no entry was removed
  Throws:
    `ACLEntryReadOnlyException` - if the entry is present and read-only
    `java.lang.IllegalArgumentException` - if an invalid user ID was passed

### removeUserGroupEntry

    public IACLEntry removeUserGroupEntry(int groupID)

  Removes a user entry from the ACL (ignored if no entry is present).

  Parameters:
    `groupID` - the group ID of the group to remove
  Returns:
    the removed ACLEntry, null if no entry was removed
  Throws:
    `ACLEntryReadOnlyException` - if the entry is present and read-only
    `java.lang.IllegalArgumentException` - if an invalid group ID was passed

### getUserEntry

    public IACLEntry getUserEntry(int userID)

  Gets a user entry contained in this ACL.

  Parameters:
    `userID` - the user ID of the user whose ACLEntry should be retrieved
  Returns:
    the ACLEntry for the user
  Throws:
    `java.lang.IllegalArgumentException` - if an invalid user ID was passed

### getUserGroupEntry

    public IACLEntry getUserGroupEntry(int groupID)

  Gets a group entry contained in this ACL.

  Parameters:
    `groupID` - the group ID of the group whose ACLEntry should be retrieved
  Returns:
    the ACLEntry for the group
  Throws:
    `java.lang.IllegalArgumentException` - if an invalid group ID was passed

### contains

    public boolean contains(IACLEntry entry)

  Determines whether a specific ACLEntry is contained in this ACL. If an entry with a non-existent ID is added, then contains will return true for the added entry until the ACL is saved, after which all invalid entries will be removed.

  Parameters:
    `entry` - the ACLEntry to query for; cannot be null
  Returns:
    true if and only if this entry is contained in the ACL
  Throws:
    `java.lang.NullPointerException` - if an a null ACLEntry was passed

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

For additional information on the IDK, including tutorials, blogs, code samples and more, see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.