AccessControlList (Hadoop 1.2.1 API)
Date: 2013-07-22

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.apache.hadoop.security.authorize
Class AccessControlList

    java.lang.Object
      org.apache.hadoop.security.authorize.AccessControlList

All Implemented Interfaces:
  Writable

    public class AccessControlList

extends Object
implements Writable

Class representing a configured access control list.

Field Summary
`static String` | `WILDCARD_ACL_VALUE`

Constructor Summary
`AccessControlList()` This constructor exists primarily for AccessControlList to be Writable.
`AccessControlList(String aclString)` Construct a new ACL from a String representation of the same.

Method Summary
`void` | `addUser(String user)`
`String` | `getACLString()` Returns the String representation of this ACL.
`boolean` | `isAllAllowed()`
`boolean` | `isUserAllowed(UserGroupInformation ugi)`
`void` | `readFields(DataInput in)` Deserialize the fields of this object from `in`.
`String` | `toString()`
`void` | `write(DataOutput out)` Serialize the fields of this object to `out`.

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

Field Detail

### WILDCARD_ACL_VALUE

    public static final String WILDCARD_ACL_VALUE

See Also:
  Constant Field Values

Constructor Detail

### AccessControlList

    public AccessControlList()

  This constructor exists primarily for AccessControlList to be Writable.

### AccessControlList

    public AccessControlList(String aclString)

  Construct a new ACL from a String representation of the same. The String is a a comma separated list of users and groups. The user list comes first and is separated by a space followed by the group list. For e.g. "user1,user2 group1,group2"

  Parameters:
    `aclString` - String representation of the ACL

Method Detail

### isAllAllowed

    public boolean isAllAllowed()

### addUser

    public void addUser(String user)

### isUserAllowed

    public boolean isUserAllowed(UserGroupInformation ugi)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### write

    public void write(DataOutput out)
               throws IOException

  Description copied from interface: `Writable`
  Serialize the fields of this object to `out`.

  Specified by:
    `write` in interface `Writable`
  Parameters:
    `out` - `DataOuput` to serialize this object into.
  Throws:
    `IOException`

### readFields

    public void readFields(DataInput in)
                    throws IOException

  Description copied from interface: `Writable`
  Deserialize the fields of this object from `in`.

  For efficiency, implementations should attempt to re-use storage in the existing object where possible.

  Specified by:
    `readFields` in interface `Writable`
  Parameters:
    `in` - `DataInput` to deseriablize this object from.
  Throws:
    `IOException`

### getACLString

    public String getACLString()

  Returns the String representation of this ACL. Unlike toString() method's return value, this String can be directly given to the constructor of AccessControlList to build AccessControlList object. This is the method used by the serialization method write().

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 © 2009 The Apache Software Foundation