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

All Known Implementing Classes:
RuleImpl

public interface Rule

Rule.java

Title: Knowledge Control System

Company: OntoText Lab. Sirma AI.

Version:
1.0
Author:
borislav popov

Method Summary
 boolean getAddRight()
          Gets the Add right.
 boolean getAdminRight()
          Gets the Admin right.
 String getDescription()
          Gets rule's description.
 boolean getHistoryRight()
          Gets the History right.
 int getId()
          Get the Id of the rule
 String getName()
          Gets the name of the rule
 boolean getReadRight()
          Gets the Read right.
 boolean getRemoveRight()
          Gets the Remove right.
 Restriction getRestriction()
          Restrive the restriction of the rule
 String getUri()
           
 void grantRight(Right right)
          Grants a right through this rule.
 void setAddRight(boolean granted)
          Sets the Add right.
 void setAdminRight(boolean granted)
          Sets the Admin right.
 void setDescription(String descr)
          Sets rule's description.
 void setHistoryRight(boolean granted)
          Sets the History right.
 void setId(int id)
          Sets the id of the rule.
 void setName(String name)
          Sets the name of the rule.
 void setReadRight(boolean granted)
          Sets the read right.
 void setRemoveRight(boolean granted)
          Sets the Remove right.
 void setRestriction(Restriction restriction)
          Set the restriction of the Rule.
 void setUri(String uri)
           
 ArrayList toSql()
          Creates update queries over the rules table.
 

Method Detail

getId

public int getId()
Get the Id of the rule

Returns:
the id of the rule

setId

public void setId(int id)
Sets the id of the rule.

Parameters:
id - the id to be set

getName

public String getName()
Gets the name of the rule

Returns:
name of the rule

setName

public void setName(String name)
             throws NullParameterException
Sets the name of the rule.

Parameters:
name - name of the rule
Throws:
NullParameterException - whenever the parameter is null.

getDescription

public String getDescription()
Gets rule's description.

Returns:
the description of the rule

setDescription

public void setDescription(String descr)
                    throws NullParameterException
Sets rule's description.

Parameters:
descr - the description to be set
Throws:
NullParameterException - whenever the parameter is null.

setRestriction

public void setRestriction(Restriction restriction)
                    throws NullParameterException
Set the restriction of the Rule. The restriction defines the set of objects in the repository to which the access right to be applied

Parameters:
restriction - restriction
Throws:
NullParameterException - whenecer the parameter is null

getRestriction

public Restriction getRestriction()
Restrive the restriction of the rule


setReadRight

public void setReadRight(boolean granted)
Sets the read right.

Parameters:
granted - whether this right to be granted or banned.

setAddRight

public void setAddRight(boolean granted)
Sets the Add right.

Parameters:
granted - whether this right to be granted or banned.

setRemoveRight

public void setRemoveRight(boolean granted)
Sets the Remove right.

Parameters:
granted - whether this right to be granted or banned.

setHistoryRight

public void setHistoryRight(boolean granted)
Sets the History right.

Parameters:
granted - whether this right to be granted or banned.

setAdminRight

public void setAdminRight(boolean granted)
Sets the Admin right.

Parameters:
granted - whether this right to be granted or banned.

getReadRight

public boolean getReadRight()
Gets the Read right.

Returns:
whether this right is granted or banned.

getAddRight

public boolean getAddRight()
Gets the Add right.

Returns:
whether this right is granted or banned.

getRemoveRight

public boolean getRemoveRight()
Gets the Remove right.

Returns:
whether this right is granted or banned.

getHistoryRight

public boolean getHistoryRight()
Gets the History right.

Returns:
whether this right is granted or banned.

getAdminRight

public boolean getAdminRight()
Gets the Admin right.

Returns:
whether this right is granted or banned.

toSql

public ArrayList toSql()
Creates update queries over the rules table.

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

grantRight

public void grantRight(Right right)
Grants a right through this rule.

Parameters:
right - the type of the right

setUri

public void setUri(String uri)

getUri

public String getUri()


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