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 |
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
|
void |
grantAccess(ProjectConsumer consumer,
ProjectACL.AccessLevel reqAccessLevel) |
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() |
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 boolean isLockable()
public ProjectACL.AccessLevel getAccessLevelForConsumer(ProjectConsumer consumer)
null
if no AccessLevel is specified for the consumer.consumer
- public ProjectACL.LockLevel getLockLevel()
public boolean isAccessibleFrom(ProjectConsumer consumer, ProjectACL.AccessLevel reqAccessLevel, ProjectACL.LockLevel reqLock)
ProjectConsumer
consumer
- reqAccessLevel
- reqLock
- 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 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 © 2016 ART Group, University of Rome, Tor Vergata. All rights reserved.