|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectse.kmr.scam.rdf.util.ACLUtil
Access Control List helper.
Title:
Description:
Copyright: Copyright (c) 2002
Company:
| Field Summary | |
protected static org.apache.log4j.Category |
LOG
Log4j-logger |
| Constructor Summary | |
ACLUtil()
|
|
| Method Summary | |
static void |
addPermission(Model m,
Resource res,
RDFNode principal,
Property perm)
Add a permission for a principal. |
static void |
copyACL(Model sourceModel,
Resource source,
Model destModel,
Resource dest)
Copy the ACL-entries from one component to another. |
static Resource |
createACL(Model m,
Resource res)
Create a new ACL.acl of res or reuse existing one. |
static Resource |
getACL(Model m,
Resource res)
Get the ACL.acl resource of res. |
static boolean |
hasACL(Model m,
Resource res)
Check if res has an ACL.acl resource. |
static boolean |
hasOwner(Model m,
Resource res)
Check if resource has an ACL.owner. |
static boolean |
hasPermission(Model m,
Resource res,
Collection principals,
Property perm)
Check permission for a collection of principals. |
static boolean |
hasPermission(Model m,
Resource res,
RDFNode principal,
Property perm)
Check permission for principal on a resource. |
static boolean |
isOwner(Model m,
Resource res,
RDFNode principal)
Check if principal is the ACL.owner. |
static List |
listPermissions(Model m,
Resource res)
List all permissions. |
static List |
listPermissions(Model m,
Resource res,
RDFNode principal)
List all permissions for a specific principal. |
static List |
listPrincipals(Model m,
Resource res)
List all principals. |
static List |
listPrincipals(Model m,
Resource res,
Property perm)
List all principals with a specific permission. |
static void |
main(String[] args)
|
static void |
removePermission(Model m,
Resource res)
Remove all permissions for all principals. |
static void |
removePermission(Model m,
Resource res,
RDFNode principal)
Remove all permissions for a specific principal. |
static void |
removePermission(Model m,
Resource res,
RDFNode principal,
Property perm)
Remove permission for a specific principal. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static org.apache.log4j.Category LOG
| Constructor Detail |
public ACLUtil()
| Method Detail |
public static Resource createACL(Model m,
Resource res)
throws RDFException
res or reuse existing one.
m - Modelres - Resource
RDFException
public static Resource getACL(Model m,
Resource res)
throws RDFException
res.
m - Modelres - Resource
null if not found.
RDFException
public static boolean hasACL(Model m,
Resource res)
throws RDFException
res has an ACL.acl resource.
m - Modelres - Resource
true if exists
RDFException
public static boolean hasPermission(Model m,
Resource res,
RDFNode principal,
Property perm)
throws RDFException
m - Modelres - Resourceprincipal - Principalperm - Permission
true if principal has this permission
RDFException
public static boolean hasPermission(Model m,
Resource res,
Collection principals,
Property perm)
throws RDFException
m - Modelres - Resourceprincipals - Collection of principals (RDFNodes)perm - Permission
true if ANY principal has this permission
RDFException
public static boolean hasOwner(Model m,
Resource res)
throws RDFException
m - Modelres - Resource
true if principal is owner
RDFException
public static boolean isOwner(Model m,
Resource res,
RDFNode principal)
throws RDFException
m - Modelres - Resourceprincipal - Principal
true if principal is owner
RDFException
public static List listPermissions(Model m,
Resource res)
throws RDFException
m - Modelres - Resource
Collection of Statements
RDFException
public static List listPermissions(Model m,
Resource res,
RDFNode principal)
throws RDFException
m - Modelres - Resourceprincipal - Principal
Collection of Property
RDFException
public static List listPrincipals(Model m,
Resource res)
throws RDFException
m - Modelres - Resource
Collection of RDFNodes
RDFException
public static List listPrincipals(Model m,
Resource res,
Property perm)
throws RDFException
m - Modelres - Resourceperm - Permission
Collection of RDFNodes
RDFException
public static void addPermission(Model m,
Resource res,
RDFNode principal,
Property perm)
throws RDFException
m - Modelres - Resourceprincipal - Principalperm - Permission
RDFException
public static void removePermission(Model m,
Resource res)
throws RDFException
m - Modelres - Resource
RDFException
public static void removePermission(Model m,
Resource res,
RDFNode principal)
throws RDFException
m - Modelres - Resourceprincipal - Principal
RDFException
public static void removePermission(Model m,
Resource res,
RDFNode principal,
Property perm)
throws RDFException
m - Modelres - Resourceprincipal - Principalperm - Premission
RDFException
public static void copyACL(Model sourceModel,
Resource source,
Model destModel,
Resource dest)
throws RDFException
sourceModel - Source Modelsource - Source ComponentdestModel - Destination Modeldest - Destination Model
RDFExceptionpublic static void main(String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||