public class ProjectACL extends Object
Project
. It consists in:
ProjectConsumer
s, together with their access permissions.ProjectConsumer
, and with which modalityModifier and Type | Class and Description |
---|---|
static class |
ProjectACL.AccessLevel |
static class |
ProjectACL.LockLevel |
Modifier and Type | Field and Description |
---|---|
static String |
ACL |
static String |
LOCKLEVEL |
static String |
WILDCARD_CONSUMER |
Modifier and Type | Method and Description |
---|---|
ProjectACL.AccessLevel |
getAccessLevelForConsumer(ProjectConsumer consumer)
This method returns the AccessLevel granted from the project that is owning this ACL to the given
consumer.
|
ProjectACL.LockLevel |
getLockLevel()
Returns the lock level of the project that is owning this ACL
|
ProjectACL.AccessLevel |
getUniversalAccessLevel()
Returns the AccessLevel granted from the project that is owning this ACL to all the consumers ("*" consumer).
|
void |
grantAccess(ProjectConsumer consumer,
ProjectACL.AccessLevel reqAccessLevel) |
void |
grantUniversalAccess(ProjectACL.AccessLevel reqAccessLevel)
Grants universally (to all consumer) the given access level
|
boolean |
hasInACL(ProjectConsumer consumer)
this method tells if consumer
consumer is listed in the ACL of the current project. |
boolean |
isAccessibleFrom(ProjectConsumer consumer,
ProjectACL.AccessLevel reqAccessLevel,
ProjectACL.LockLevel reqLock)
this method tells if the project that is owning this ACL can be accessed with the desired access/lock
level specifications.
|
boolean |
isLockable() |
boolean |
isUniversallyAccessible()
Tells if the project that is owning this ACL can be universally accessed with any level
|
boolean |
isUniversallyAccessible(ProjectACL.AccessLevel reqAccessLevel)
Tells if the project that is owning this ACL can be universally accessed with the given level
|
void |
revokeAccess(ProjectConsumer consumer) |
void |
revokeUniversalAccess()
Revokes the universal access level
|
static String |
serializeACL(Map<String,ProjectACL.AccessLevel> acl)
serialization of the whole ACL (of a project), containing all of its consumers and access levels
|
static String |
serializeACL(String consumerName,
ProjectACL.AccessLevel accessLevel)
serialization of the ACL for a specific consumer.
|
void |
setLockableWithLevel(ProjectACL.LockLevel lockLevel) |
public static final String ACL
public static final String LOCKLEVEL
public static final String WILDCARD_CONSUMER
public boolean isLockable()
public ProjectACL.AccessLevel getAccessLevelForConsumer(ProjectConsumer consumer)
null
if no AccessLevel is specified for the consumer.consumer
- public ProjectACL.AccessLevel getUniversalAccessLevel()
null
if no AccessLevel is specified.public ProjectACL.LockLevel getLockLevel()
public boolean isAccessibleFrom(ProjectConsumer consumer, ProjectACL.AccessLevel reqAccessLevel, ProjectACL.LockLevel reqLock)
ProjectConsumer
consumer
- reqAccessLevel
- reqLock
- public boolean isUniversallyAccessible()
public boolean isUniversallyAccessible(ProjectACL.AccessLevel reqAccessLevel)
public boolean hasInACL(ProjectConsumer consumer)
consumer
is listed in the ACL of the current project. This
does not tell anything about the ProjectACL.AccessLevel
nor the ProjectACL.LockLevel
which would be accepted
for a request from consumerconsumer
- public void grantAccess(ProjectConsumer consumer, ProjectACL.AccessLevel reqAccessLevel) throws ProjectUpdateException, ReservedPropertyUpdateException
public void grantUniversalAccess(ProjectACL.AccessLevel reqAccessLevel) throws ProjectUpdateException, ReservedPropertyUpdateException
reqAccessLevel
- ProjectUpdateException
ReservedPropertyUpdateException
public void revokeAccess(ProjectConsumer consumer) throws ProjectUpdateException, ReservedPropertyUpdateException
public void revokeUniversalAccess() throws ProjectUpdateException, ReservedPropertyUpdateException
public void setLockableWithLevel(ProjectACL.LockLevel lockLevel) throws ProjectUpdateException, ReservedPropertyUpdateException
public static String serializeACL(String consumerName, ProjectACL.AccessLevel accessLevel)
consumerName
- accessLevel
- public static String serializeACL(Map<String,ProjectACL.AccessLevel> acl)
acl
- Copyright © 2023 ART Group, University of Rome, Tor Vergata. All rights reserved.