org.openrdf.sesame.sailimpl.omm.security
Interface Role

All Known Implementing Classes:
RoleImpl

public interface Role

Title: Knowledge Control System

Company: OntoText Lab. Sirma AI.

Version:
1.0 Interface Role. The purpose of that interface is to provide all the basic operations to manage the Role and its sequrity rules. There are two kinds of rules for a paricular Role: - rules inherited from its parents - own rules
Author:
damyan ognyanoff, borislav popov

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.
 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.
 

Method Detail

getId

public int getId()
Retireve the Id of that role

Returns:
the role's Id

setId

public void setId(int id)
Sets roles id.

Parameters:
id - the id to be set

setDescription

public void setDescription(String descr)
Sets role description

Parameters:
descr - the description of the role

getDescription

public String getDescription()
Gets the role description

Returns:
the role description

getName

public String getName()
Retireve the Name of that role

Returns:
the role's Name

setName

public void setName(String roleName)
             throws NullParameterException
Change the role Name

Parameters:
roleName - New name for the role
Throws:
NullParameterException - whenever the parameter is null

addRule

public void addRule(Rule rule)
             throws NullParameterException
Add a new security rule for the Role

Parameters:
rule - the interface to a new rule
Throws:
NullParameterException - whenever the parameter is null

removeRule

public void removeRule(Rule rule)
                throws NullParameterException
Remove a security Rule from the role

Parameters:
rule - rule to remove
Throws:
NullParameterException - whenever the parameter is null

getRules

public Set getRules(boolean direct)
Retrive a list of rules in the Role. The items in the list are Rule intrfaces. See the Rights class for all supported access Rights

Parameters:
direct - depending on this the result will contain either the own rules of this role, either all inherited rules.
Returns:
set of, either the own rules of this role, either all inherited rules, depending on the parameter.

getParentRoles

public Set getParentRoles()
Retrieve a list of roleIDs of the parent roles.

Returns:
set of roleIDs

setParentRoles

public void setParentRoles(Set parents)
                    throws NullParameterException
Parameters:
parents - set of the ids of the roles to be inherited
Throws:
NullParameterException - whenever the parameter is null

toSql

public ArrayList toSql()
Creates update queries over the roles, roles_hierarchy and roles_rules tables.

Returns:
A list of update SQL queries, to be used to mirror the objects' properties from memory to an SQL repository.

setUri

public void setUri(String uri)

getUri

public String getUri()


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.