|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.repository.security.PermissionManager
public class PermissionManager
Deals with storing permissions for data and so on.
Constructor Summary | |
---|---|
PermissionManager(RulesRepository repo)
|
Method Summary | |
---|---|
void |
createUser(String userName)
|
static javax.jcr.Node |
getNode(javax.jcr.Node node,
String name,
String nodeType)
Gets or creates a node. |
static javax.jcr.Node |
getRootNode(RulesRepository repo)
The root node of the repository |
static javax.jcr.Node |
getUserInfoNode(String userName,
RulesRepository repo)
get the specified user info node (it is an nt:folder type) |
static javax.jcr.Node |
getUsersRootNode(javax.jcr.Node root)
Get the top node for "user_info" |
Map<String,List<String>> |
listUsers()
Returns a list of users and their permissions types for display. |
void |
removeUserPermissions(String userName)
|
Map<String,List<String>> |
retrieveUserPermissions(String userName)
obtain a mapping of permissions for a given user. |
void |
updateUserPermissions(String userName,
Map<String,List<String>> perms)
Save the users permissions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermissionManager(RulesRepository repo)
Method Detail |
---|
public void updateUserPermissions(String userName, Map<String,List<String>> perms)
userName
- = obviously, the user name.perms
- - a map of the role type to the targets that it applies to.
eg: package.admin => PACKAGE UUID
analyst => category path
ADMIN => empty (no list needed for admin)
javax.jcr.RepositoryException
public void createUser(String userName)
public static javax.jcr.Node getUserInfoNode(String userName, RulesRepository repo) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static javax.jcr.Node getRootNode(RulesRepository repo) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static javax.jcr.Node getUsersRootNode(javax.jcr.Node root) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public Map<String,List<String>> retrieveUserPermissions(String userName)
javax.jcr.RepositoryException
public static javax.jcr.Node getNode(javax.jcr.Node node, String name, String nodeType) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public Map<String,List<String>> listUsers()
javax.jcr.RepositoryException
public void removeUserPermissions(String userName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |