|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.structures.ACI
public class ACI
Provides read and write access to an Access Control Item stored in the repository. Each access control item provides the
follwing privileges to a role of user:
read - statements in NamedGraph visible
add - add statements to NamedGraph
delete - delete statements in NamedGraph
insertNamedGraph - create a new NamedGraph
deleteNamedGraph - delete a NamedGraph
changeNamedGraphAcls - change the acl properties of a NamedGraph
Access Control Items (or ACIs) are an internal data structure and are grouped together to form access control lists (ACLs).
AccessControl data is cached in memory and is not persisted to the repository until commit is called or a batch commit (via
the Batchable interface) is performed.
Batchable,
ACL| Nested Class Summary | |
|---|---|
static class |
ACI.Factory
Static factory to create ACI objects |
| Nested classes/interfaces inherited from interface org.openanzo.jdbc.utils.batchable.Batchable |
|---|
Batchable.BatchGroup, Batchable.BatchOperation, Batchable.BatchOperationSet, Batchable.NullBatch |
| Field Summary |
|---|
| Fields inherited from interface org.openanzo.jdbc.utils.batchable.Batchable |
|---|
EMPTY_BATCH |
| Method Summary | |
|---|---|
void |
commit()
Commit the changes to this ACI to the database |
void |
copyTo(ACI aci,
boolean setId)
Copy all the permissions and the role for this ACI to another ACI. |
static ACI |
createACI(RepositoryConnection repositoryConnection,
java.lang.Long id)
Creates an AccessControl item, if the id is already in use in the repository then a ModelServiceException is thrown. |
java.lang.Long |
getAclId()
Get the ID of the ACL that this aci belongs |
java.lang.Long |
getId()
Get the id of this ACI |
java.lang.Long |
getModified()
Get the timestamp when the ACI was modified |
java.lang.Long |
getRoleId()
Get the role that this ACI affects |
org.openrdf.model.URI |
getURI()
Get the URI of this ACI |
boolean |
hasPrivilege(Privilege privilege)
Does this ACI contain the provided privilege |
boolean |
isStored()
Is ACI stored in DB already |
java.util.List<Batchable.BatchOperation> |
listBatchOperations()
Get the current list of batch operations for this object |
static ACI |
loadACI(RepositoryConnection repositoryConnection,
java.lang.Long id)
Given an AccessControl item's unique id, attempts to load it from repository. |
void |
remove()
Remove this ACI from DB |
void |
setACL(ACL acl)
Set the ACL that this aci belongs |
void |
setAclId(java.lang.Long id)
Set the ID of the ACL that this aci belongs |
void |
setModified(java.lang.Long modified)
Set the timestamp when the ACI was modified |
void |
setPrivilege(Privilege privilege,
boolean value)
Set the privilege in this ACI to the provided value |
void |
setRole(Role role)
Set the role that this aci affects |
void |
setRoleId(java.lang.Long roleId)
Set the role that this aci affects |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ACI loadACI(RepositoryConnection repositoryConnection,
java.lang.Long id)
throws AnzoException
repositoryConnection - The repository to load from.id - The AccessControl item's unique id.
AnzoException - Thrown if the AccessControl item was not found or if an error occured during object construction.
public static ACI createACI(RepositoryConnection repositoryConnection,
java.lang.Long id)
throws AnzoException
repositoryConnection - The repository where the AccessControl item will be stored.id - ID of the AccessControl item.
AnzoExceptionpublic boolean isStored()
isStored in interface CachableResourcepublic void remove()
public boolean hasPrivilege(Privilege privilege)
throws AnzoException
privilege -
AnzoException
public void setPrivilege(Privilege privilege,
boolean value)
throws AnzoException
privilege - privilege which is getting setvalue - the privilege in this ACI to the provided value
AnzoException
public java.lang.Long getRoleId()
throws AnzoException
AnzoException
public void setRoleId(java.lang.Long roleId)
throws AnzoException
roleId - the ID of the role that this aci affects
AnzoException
public void setRole(Role role)
throws AnzoException
role - role for this ACI
AnzoException
public java.lang.Long getModified()
throws AnzoException
AnzoException
public void setModified(java.lang.Long modified)
throws AnzoException
modified -
AnzoException
public java.lang.Long getAclId()
throws AnzoException
AnzoException
public void setAclId(java.lang.Long id)
throws AnzoException
id - the ID of the ACL that this aci belongs
AnzoException
public void setACL(ACL acl)
throws AnzoException
acl - the ACL that this aci belongs
AnzoException
public java.lang.Long getId()
throws AnzoException
getId in interface CachableResourceAnzoExceptionpublic org.openrdf.model.URI getURI()
getURI in interface CachableResource
public void commit()
throws RdbException
RdbExceptionpublic java.util.List<Batchable.BatchOperation> listBatchOperations()
Batchable
listBatchOperations in interface Batchable
public void copyTo(ACI aci,
boolean setId)
throws AnzoException
aci - ACI to copy privileges intosetId - Set destination aci's acl to this aci's aclId
AnzoException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||