public class ContentPermission
extends java.lang.Object
Content
(document) permission, a capability/role pair. Instances of
ContentPermission are immutable and may be shared.ContentCapability
Modifier and Type | Field and Description |
---|---|
static ContentCapability |
EXECUTE
Convenience reference to
ContentCapability.EXECUTE |
static ContentCapability |
INSERT
Convenience reference to
ContentCapability.INSERT |
static ContentCapability |
NODE_UPDATE
Convenience reference to
ContentCapability.NODE_UPDATE |
static ContentCapability |
READ
Convenience reference to
ContentCapability.READ |
static ContentCapability |
UPDATE
Convenience reference to
ContentCapability.UPDATE |
Constructor and Description |
---|
ContentPermission(ContentCapability capability,
java.lang.String role)
Instantiate a new permission object with the
given capability and role.
|
ContentPermission(ContentCapability capability,
java.lang.String role, java.lang.String roleId)
Instantiate a new permission object with the
given capability, role and roleId.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
ContentCapability |
getCapability()
Get this permission's capability.
|
java.lang.String |
getId()
Get the roleId of the role associated with this
permission.
|
java.lang.String |
getRole()
Get the name of the role associated with this
permission.
|
int |
hashCode() |
static ContentPermission |
newExecutePermission(java.lang.String role)
Convenience factory method to create a
permission object with execute capability and the given role.
|
static ContentPermission |
newInsertPermission(java.lang.String role)
Convenience factory method to create a
permission object with insert capability and the given role.
|
static ContentPermission |
newNodeUpdatePermission(java.lang.String role)
Convenience factory method to create a
permission object with node-update capability and the given
role.
|
static ContentPermission |
newReadPermission(java.lang.String role)
Convenience factory method to create a
permission object with read capability and the given role.
|
static ContentPermission |
newUpdatePermission(java.lang.String role)
Convenience factory method to create a
permission object with update capability and the given role.
|
java.lang.String |
toString() |
public static final ContentCapability READ
ContentCapability.READ
public static final ContentCapability INSERT
ContentCapability.INSERT
public static final ContentCapability UPDATE
ContentCapability.UPDATE
public static final ContentCapability EXECUTE
ContentCapability.EXECUTE
public static final ContentCapability NODE_UPDATE
ContentCapability.NODE_UPDATE
public ContentPermission(ContentCapability capability, java.lang.String role)
capability
- One of the capabilities defined in
the typesafe enumeration class ContentCapability
role
- A Role name.public ContentPermission(ContentCapability capability, java.lang.String role, java.lang.String roleId)
capability
- One of the capabilities defined in
the typesafe enumeration class ContentCapability
role
- A Role name.roleId
- A Role Id.public static ContentPermission newReadPermission(java.lang.String role)
role
- A Role namepublic static ContentPermission newInsertPermission(java.lang.String role)
role
- A Role namepublic static ContentPermission newUpdatePermission(java.lang.String role)
role
- A Role namepublic static ContentPermission newExecutePermission(java.lang.String role)
role
- A Role namepublic static ContentPermission newNodeUpdatePermission(java.lang.String role)
role
- A Role namepublic ContentCapability getCapability()
ContentCapability
enumeration.public java.lang.String getRole()
public java.lang.String getId()
public java.lang.String toString()
toString
in
class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in
class java.lang.Object
public int hashCode()
hashCode
in
class java.lang.Object
Copyright © 2024 MarkLogic
Corporation
Complete online documentation for MarkLogic Server,
XQuery and related components may
be found at
developer.marklogic.com