Package org.nuxeo.ecm.core.api.security
Class ACE
java.lang.Object
org.nuxeo.ecm.core.api.security.ACE
- All Implemented Interfaces:
Serializable
,Cloneable
Access control entry, assigning a permission to a user.
Optionally, the assignment can be denied instead of being granted.
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ACE.ACEBuilder
static ACE.ACEBuilder
clone()
boolean
static ACE
Create an ACE from an id.getBegin()
getContextData
(String key) getEnd()
getId()
Returns this ACE id.Returns a Long value of this ACE status.Returns the status of this ACE.int
hashCode()
boolean
boolean
isDenied()
Checks if this privilege is denied.boolean
boolean
Checks if this privilege is granted.boolean
void
putContextData
(String key, Serializable value) void
Sets the begin date of this ACE.void
setCreator
(String creator) void
Sets the end date of this ACE.toString()
-
Field Details
-
BLOCK
An ACE that blocks all permissions for everyone.- Since:
- 6.0
-
ID_PATTERN
-
-
Constructor Details
-
ACE
public ACE() -
ACE
Constructs an ACE for a given username and permission, and specifies whether to grant or deny it. -
ACE
Constructs an ACE for a given username and permission.The ACE is granted.
- Since:
- 6.0
-
-
Method Details
-
fromId
Create an ACE from an id.- Since:
- 7.4
-
getId
Returns this ACE id.This id is unique inside a given ACL.
- Since:
- 7.4
-
getUsername
-
getPermission
-
isGranted
public boolean isGranted()Checks if this privilege is granted.- Returns:
- true if the privilege is granted
-
isDenied
public boolean isDenied()Checks if this privilege is denied.- Returns:
- true if privilege is denied
-
getBegin
-
setBegin
Sets the begin date of this ACE.Sets the
Calendar.MILLISECOND
part of the Calendar to 0. -
getEnd
-
setEnd
Sets the end date of this ACE.Sets the
Calendar.MILLISECOND
part of the Calendar to 0. -
getCreator
-
setCreator
-
getStatus
Returns the status of this ACE.- Since:
- 7.4
-
getLongStatus
Returns a Long value of this ACE status.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.- Since:
- 7.4
-
isEffective
public boolean isEffective() -
isPending
public boolean isPending() -
isArchived
public boolean isArchived() -
getContextData
-
putContextData
-
equals
-
hashCode
public int hashCode() -
toString
-
clone
-
builder
- Since:
- 11.3
-
builder
-