|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.sesame.sailimpl.omm.security.RoleImpl
RoleImpl.java
Title: Knowledge Control System
Company: OntoText Lab. Sirma AI.
| Constructor Summary | |
RoleImpl()
Create a Role with the first free id. |
|
RoleImpl(int id,
String name,
String description)
Create a Role given an id, a name and a description. |
|
| Method Summary | |
void |
addRule(Rule rule)
Add a new security rule for the Role |
String |
getDescription()
Gets the role description |
int |
getId()
Retireve the Id of that role |
String |
getName()
Retireve the Name of that role |
Set |
getParentRoles()
Retrieve a list of roleIDs of the parent roles. |
Set |
getRules(boolean direct)
Retrive a list of rules in the Role. |
static Set |
getRules(Set roles,
boolean direct)
Retrieve the set of rules defined for the given set of roles. |
String |
getUri()
|
void |
removeRule(Rule rule)
Remove a security Rule from the role |
void |
setDescription(String descr)
Sets role description |
void |
setId(int id)
Sets roles id. |
void |
setName(String roleName)
Change the role Name |
void |
setParentRoles(Set parents)
|
void |
setUri(String uri)
|
ArrayList |
toSql()
Creates update queries over the roles, roles_hierarchy and roles_rules tables. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RoleImpl(int id,
String name,
String description)
throws NullParameterException
id - the role id to be set
NullParameterException - whenever a the id is nullpublic RoleImpl()
| Method Detail |
public void setDescription(String descr)
Role
setDescription in interface Roledescr - the description of the rolepublic String getDescription()
Role
getDescription in interface Role
public void addRule(Rule rule)
throws NullParameterException
Role
addRule in interface Rolerule - the interface to a new rule
NullParameterException - whenever the parameter is null
public void removeRule(Rule rule)
throws NullParameterException
Role
removeRule in interface Rolerule - rule to remove
NullParameterException - whenever the parameter is nullpublic Set getRules(boolean direct)
Role
getRules in interface Roledirect - depending on this the result will contain either the own rules of this role,
either all inherited rules.
public Set getParentRoles()
Role
getParentRoles in interface Role
public void setParentRoles(Set parents)
throws NullParameterException
setParentRoles in interface Roleparents - set of the ids of the roles to be inherited
NullParameterException - whenever the parameter is nullpublic int getId()
Role
getId in interface Rolepublic void setId(int id)
Role
setId in interface Roleid - the id to be setpublic String getName()
Role
getName in interface Role
public void setName(String roleName)
throws NullParameterException
Role
setName in interface RoleroleName - New name for the role
NullParameterException - whenever the parameter is nullpublic ArrayList toSql()
Role
toSql in interface Role
public static Set getRules(Set roles,
boolean direct)
roles - direct - direct or transtive closure
public void setUri(String uri)
setUri in interface Rolepublic String getUri()
getUri in interface Role
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||