public final class ACE extends Object implements Serializable, Cloneable
Optionally, the assignment can be denied instead of being granted.
Modifier and Type | Class and Description |
---|---|
static class |
ACE.ACEBuilder |
static class |
ACE.Status |
Modifier and Type | Field and Description |
---|---|
static ACE |
BLOCK
An ACE that blocks all permissions for everyone.
|
protected static Pattern |
ID_PATTERN |
Constructor and Description |
---|
ACE() |
ACE(String username,
String permission)
Constructs an ACE for a given username and permission.
|
ACE(String username,
String permission,
boolean isGranted)
Constructs an ACE for a given username and permission, and specifies whether to grant or deny it.
|
Modifier and Type | Method and Description |
---|---|
static ACE.ACEBuilder |
builder(String username,
String permission) |
Object |
clone() |
boolean |
equals(Object obj) |
static ACE |
fromId(String aceId)
Create an ACE from an id.
|
Calendar |
getBegin() |
Serializable |
getContextData(String key) |
String |
getCreator() |
Calendar |
getEnd() |
String |
getId()
Returns this ACE id.
|
Long |
getLongStatus()
Returns a Long value of this ACE status.
|
String |
getPermission() |
ACE.Status |
getStatus()
Returns the status of this ACE.
|
String |
getUsername() |
int |
hashCode() |
boolean |
isArchived() |
boolean |
isDenied()
Checks if this privilege is denied.
|
boolean |
isEffective() |
boolean |
isGranted()
Checks if this privilege is granted.
|
boolean |
isPending() |
void |
putContextData(String key,
Serializable value) |
void |
setBegin(Calendar begin)
Sets the begin date of this ACE.
|
void |
setCreator(String creator) |
void |
setEnd(Calendar end)
Sets the end date of this ACE.
|
String |
toString() |
protected static final Pattern ID_PATTERN
public ACE()
public ACE(String username, String permission, boolean isGranted)
public String getUsername()
public String getPermission()
public boolean isGranted()
public boolean isDenied()
public void setBegin(Calendar begin)
Sets the Calendar.MILLISECOND
part of the Calendar to 0.
public void setEnd(Calendar end)
Sets the Calendar.MILLISECOND
part of the Calendar to 0.
public String getCreator()
public void setCreator(String creator)
public ACE.Status getStatus()
public Long getLongStatus()
It returns null
if there is no begin and end date, which means the ACE is effective. Otherwise, it
returns 0 for PENDING, 1 for EFFECTIVE and 2 for ARCHIVED.
public boolean isEffective()
public boolean isPending()
public boolean isArchived()
public Serializable getContextData(String key)
public void putContextData(String key, Serializable value)
public static ACE.ACEBuilder builder(String username, String permission)
Copyright © 2018 Nuxeo. All rights reserved.