|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.server.repository.structures.ACL
public class ACL
Provides read and write access to an access control list (ACL) stored in the repository. ACLs are composed of access control items (or ACIs, see the AccessControl class) which grant rights to NamedGraphs in the repository as well as the ownership right needed to change the ACL itself. ACL 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,
ACI| Nested Class Summary |
|---|
| 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 |
| Constructor Summary | |
|---|---|
ACL(RepositoryConnection repositoryConnection,
java.lang.Long id)
New ACL with given ID, and RepositoryConnection |
|
| Method Summary | |
|---|---|
void |
commit()
Commit changes to this ACL to the database |
ACL |
createAclFromTemplate(org.openrdf.model.URI namedGraphUri,
TransactionUpdateResults updateResults)
Create a new ACL object based on the contents of an AclTemplate |
static ACL |
createAclInstance(RepositoryConnection repositoryConnection,
java.lang.Long modified,
java.lang.Long aclId,
java.lang.Long roleId,
boolean template,
boolean read,
boolean add,
boolean remove,
boolean changeNamedGraphAcl,
boolean insertNamedGraph,
boolean removeNamedGraph)
Create an instance of an ACL |
java.lang.Long |
getId()
Get the unique id of this ACL |
org.openrdf.model.URI |
getURI()
Get the URI of this ACL |
boolean |
hasPrivilege(Privilege privilege,
java.lang.Long userId)
Does the given userId has the provided privilege |
ClosableIterator<java.lang.Long> |
listACIs()
List the ACIs for this ACL |
java.util.List<Batchable.BatchOperation> |
listBatchOperations()
Get the current list of batch operations for this object |
void |
remove(java.lang.Long modified)
Remove this ACL from the database |
void |
setId(long id)
Set the unique id for this ACL |
ACI |
updatePrivileges(Role role,
java.util.List<Privilege> addPrivileges,
java.util.List<Privilege> removePrivileges,
java.lang.Long modified)
Adds and removes the given privileges to the given role for this ACI and returns the ACI containing the updated privileges which must be committed by the caller. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ACL(RepositoryConnection repositoryConnection,
java.lang.Long id)
repositoryConnection - connection to the databaseid - id of the ACL| Method Detail |
|---|
public ACL createAclFromTemplate(org.openrdf.model.URI namedGraphUri,
TransactionUpdateResults updateResults)
throws AnzoException
namedGraphUri - URI of NamedGraph to apply new ACLupdateResults - UpdateResults to which update results are written
AnzoExceptionpublic java.lang.Long getId()
public org.openrdf.model.URI getURI()
public void setId(long id)
id - the unique id for this ACL
public void remove(java.lang.Long modified)
throws AnzoException
modified - Timestamp when ACL was removed
AnzoException
public boolean hasPrivilege(Privilege privilege,
java.lang.Long userId)
throws AnzoException
privilege - privilege to checkuserId - id of user to check
AnzoException
public void commit()
throws RdbException
RdbExceptionpublic java.util.List<Batchable.BatchOperation> listBatchOperations()
Batchable
listBatchOperations in interface Batchable
public ClosableIterator<java.lang.Long> listACIs()
throws AnzoException
AnzoException
public ACI updatePrivileges(Role role,
java.util.List<Privilege> addPrivileges,
java.util.List<Privilege> removePrivileges,
java.lang.Long modified)
throws AnzoException
role - role whose privileges are being changedaddPrivileges - set of privileges to add to this role for the given userremovePrivileges - set of privileges to remove to this role for the given usermodified - timestamp that this modification took place
AnzoException
public static ACL createAclInstance(RepositoryConnection repositoryConnection,
java.lang.Long modified,
java.lang.Long aclId,
java.lang.Long roleId,
boolean template,
boolean read,
boolean add,
boolean remove,
boolean changeNamedGraphAcl,
boolean insertNamedGraph,
boolean removeNamedGraph)
throws AnzoException
repositoryConnection - connection to the databasemodified - timestamp for aclaclId - id of aclroleId - id for roletemplate - is this acl a templateread - canRead permissionadd - canAdd permissionremove - canRemove permissionchangeNamedGraphAcl - canChangeNamedGraphAcl permissioninsertNamedGraph - canInsertNamedGraph permissionremoveNamedGraph - canRemoveNamedGraph permission
AnzoException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||