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

## org.acegisecurity.acl.basic
Class SimpleAclEntry

    java.lang.Object
      org.acegisecurity.acl.basic.AbstractBasicAclEntry
          org.acegisecurity.acl.basic.SimpleAclEntry

All Implemented Interfaces:
  Serializable, AclEntry, BasicAclEntry

    public class SimpleAclEntry

extends AbstractBasicAclEntry

Stores some privileges typical of a domain object.

Version:
  $Id: SimpleAclEntry.java,v 1.2 2005/11/17 00:55:47 benalex Exp $
Author:
  Ben Alex
See Also:
  Serialized Form

Field Summary
`static int` | `ADMINISTRATION`
`static int` | `CREATE`
`static int` | `DELETE`
`static int` | `NOTHING`
`static int` | `READ`
`static int` | `READ_WRITE`
`static int` | `READ_WRITE_CREATE`
`static int` | `READ_WRITE_CREATE_DELETE`
`static int` | `READ_WRITE_DELETE`
`static int` | `WRITE`

Constructor Summary
`SimpleAclEntry()` Allows `BasicAclDao` implementations to construct this object using `newInstance()`.
`SimpleAclEntry(Object recipient, AclObjectIdentity aclObjectIdentity, AclObjectIdentity aclObjectParentIdentity, int mask)`

Method Summary
`int[]` | `getValidPermissions()` Subclasses must indicate the permissions they support.
`String` | `printPermissionsBlock(int i)` Outputs the permissions in a human-friendly format.

Methods inherited from class org.acegisecurity.acl.basic.AbstractBasicAclEntry
`addPermission, addPermissions, deletePermission, deletePermissions, getAclObjectIdentity, getAclObjectParentIdentity, getMask, getRecipient, isPermitted, isPermitted, printPermissionsBlock, setAclObjectIdentity, setAclObjectParentIdentity, setMask, setRecipient, togglePermission, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NOTHING

    public static final int NOTHING

See Also:
  Constant Field Values

### ADMINISTRATION

    public static final int ADMINISTRATION

### READ

    public static final int READ

### WRITE

    public static final int WRITE

### CREATE

    public static final int CREATE

### DELETE

    public static final int DELETE

### READ_WRITE_CREATE_DELETE

    public static final int READ_WRITE_CREATE_DELETE

### READ_WRITE_CREATE

    public static final int READ_WRITE_CREATE

### READ_WRITE

    public static final int READ_WRITE

### READ_WRITE_DELETE

    public static final int READ_WRITE_DELETE

Constructor Detail

### SimpleAclEntry

    public SimpleAclEntry()

  Allows `BasicAclDao` implementations to construct this object using `newInstance()`.

  Normal classes should not use this default constructor.

### SimpleAclEntry

    public SimpleAclEntry(Object recipient,
                          AclObjectIdentity aclObjectIdentity,
                          AclObjectIdentity aclObjectParentIdentity,
                          int mask)

Method Detail

### getValidPermissions

    public int[] getValidPermissions()

  Description copied from class: `AbstractBasicAclEntry`
  Subclasses must indicate the permissions they support. Each base permission should be an integer with a base 2. ie: the first permission is 2^^0 (1), the second permission is 2^^1 (2), the third permission is 2^^2 (4) etc. Each base permission should be exposed by the subclass as a `public static final int`. It is further recommended that valid combinations of permissions are also exposed as `public static final int`s.

  This method returns all permission integers that are allowed to be used together. This must include any combinations of valid permissions. So if the permissions indicated by 2^^2 (4) and 2^^1 (2) can be used together, one of the integers returned by this method must be 6 (4 + 2). Otherwise attempts to set the permission will be rejected, as the final resulting mask will be rejected.

  Whilst it may seem unduly time onerous to return every valid permission combination, doing so delivers maximum flexibility in ensuring ACLs only reflect logical combinations. For example, it would be inappropriate to grant a "read" and "write" permission along with an "unrestricted" permission, as the latter implies the former permissions.

  Specified by:
    `getValidPermissions` in class `AbstractBasicAclEntry`
  Returns:
    every valid combination of permissions

### printPermissionsBlock

    public String printPermissionsBlock(int i)

  Description copied from class: `AbstractBasicAclEntry`
  Outputs the permissions in a human-friendly format. For example, this method may return "CR-D" to indicate the passed integer permits create, permits read, does not permit update, and permits delete.

  Specified by:
    `printPermissionsBlock` in class `AbstractBasicAclEntry`
  Parameters:
    `i` - the integer containing the mask which should be printed
  Returns:
    the human-friend formatted block

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

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.