org.openanzo.server.repository.structures
Class TempACL

java.lang.Object
  extended by org.openanzo.server.repository.structures.TempACL

public class TempACL
extends java.lang.Object

Provides in memory access to a temporary 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 change the ACL itself. TempACL data is in memory and never persisted to the repository.

Author:
Joe Betz, Matthew Roy ( mroy@cambridgesemantics.com )
See Also:
Batchable, ACI, ACL

Method Summary
 ACL createAclFromTemplate(java.lang.Long modified)
          Create a new ACL using this TempACL as a template
static TempACL createTempACL(RepositoryConnection repositoryConnection, org.openrdf.model.URI aclTemplateURI)
          Create a new Temporary ACL
 void updatePrivileges(Role role, java.util.List<Privilege> addPrivileges, java.util.List<Privilege> removePrivileges)
          Adds and removes the given privileges to the given role for this ACL
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createTempACL

public static TempACL createTempACL(RepositoryConnection repositoryConnection,
                                    org.openrdf.model.URI aclTemplateURI)
                             throws AnzoException
Create a new Temporary ACL

Parameters:
repositoryConnection - Repository connection to run queries against
aclTemplateURI - URI for this ACL template
Returns:
a new Temporary ACL
Throws:
AnzoException

createAclFromTemplate

public ACL createAclFromTemplate(java.lang.Long modified)
                          throws AnzoException
Create a new ACL using this TempACL as a template

Parameters:
modified - Timestamp when new ACL was created
Returns:
new ACL using this TempACL as a template
Throws:
AnzoException

updatePrivileges

public void updatePrivileges(Role role,
                             java.util.List<Privilege> addPrivileges,
                             java.util.List<Privilege> removePrivileges)
                      throws AnzoException
Adds and removes the given privileges to the given role for this ACL

Parameters:
role - Role to add or remove the given privileges
addPrivileges - Set of privileges to add
removePrivileges - Set of privileges to remove
Throws:
AnzoException


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.