Overview | Package | Class | Tree | Deprecated | Index | Help
| XCC/J 4.2-9
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.marklogic.xcc
Class ContentPermission

    java.lang.Object
      com.marklogic.xcc.ContentPermission

    public class ContentPermission

extends Object

An individual `Content` (document) permission, a capability/role pair. Instances of ContentPermission are immutable and may be shared.

See Also:
  `ContentCapability`

Field Summary
`static ContentCapability` | `EXECUTE` Convenience reference to `ContentCapability.EXECUTE`
`static ContentCapability` | `INSERT` Convenience reference to `ContentCapability.INSERT`
`static ContentCapability` | `READ` Convenience reference to `ContentCapability.READ`
`static ContentCapability` | `UPDATE` Convenience reference to `ContentCapability.UPDATE`

Constructor Summary
`ContentPermission(ContentCapability capability, String role)` Instantiate a new permission object with the given capability and role.

Method Summary
`ContentCapability` | `getCapability()` Get this permission's capability.
`String` | `getRole()` Get the name of the role associated with this permission.
`static ContentPermission` | `newExecutePermission(String role)` Convenience factory method to create a permission object with execute capability and the given role.
`static ContentPermission` | `newInsertPermission(String role)` Convenience factory method to create a permission object with insert capability and the given role.
`static ContentPermission` | `newReadPermission(String role)` Convenience factory method to create a permission object with read capability and the given role.
`static ContentPermission` | `newUpdatePermission(String role)` Convenience factory method to create a permission object with update capability and the given role.
`String` | `toString()`

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

Field Detail

### READ

    public static final ContentCapability READ

  Convenience reference to `ContentCapability.READ`

### INSERT

    public static final ContentCapability INSERT

  Convenience reference to `ContentCapability.INSERT`

### UPDATE

    public static final ContentCapability UPDATE

  Convenience reference to `ContentCapability.UPDATE`

### EXECUTE

    public static final ContentCapability EXECUTE

  Convenience reference to `ContentCapability.EXECUTE`

Constructor Detail

### ContentPermission

    public ContentPermission(ContentCapability capability,
                             String role)

  Instantiate a new permission object with the given capability and role.

  Parameters:
    `capability` - One of the capabilities defined in the typesafe enumeration class `ContentCapability`
    `role` - A Role name.

Method Detail

### newReadPermission

    public static ContentPermission newReadPermission(String role)

  Convenience factory method to create a permission object with read capability and the given role.

  Parameters:
    `role` - A Role name
  Returns:
    A new, immutable ContentPermission instance.

### newInsertPermission

    public static ContentPermission newInsertPermission(String role)

  Convenience factory method to create a permission object with insert capability and the given role.

  Parameters:
    `role` - A Role name
  Returns:
    A new, immutable ContentPermission instance.

### newUpdatePermission

    public static ContentPermission newUpdatePermission(String role)

  Convenience factory method to create a permission object with update capability and the given role.

  Parameters:
    `role` - A Role name
  Returns:
    A new, immutable ContentPermission instance.

### newExecutePermission

    public static ContentPermission newExecutePermission(String role)

  Convenience factory method to create a permission object with execute capability and the given role.

  Parameters:
    `role` - A Role name
  Returns:
    A new, immutable ContentPermission instance.

### getCapability

    public ContentCapability getCapability()

  Get this permission's capability.

  Returns:
    A member of the `ContentCapability` enumeration.

### getRole

    public String getRole()

  Get the name of the role associated with this permission.

  Returns:
    The role name as a String.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| XCC/J 4.2-9
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 MarkLogic Corporation, All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com