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

All Known Implementing Classes:
UserImpl

public interface User

User.java

Title: Knowledge Control System

Company: OntoText Lab. Sirma AI.

Version:
1.0 Interface User. The purpose of this interface is to provide all the basic operations to manage the user information and the assigned roles.
Author:
damyan ognyanoff, borislav popov

Method Summary
 int getId()
          Retrieve the ID of the user
 String getLogin()
           
 String getName()
           
 String getPassword()
          Retrieve the user password
 Set getRoles()
          Retieve a set of the roles assigned to the user.
 Set getRules()
          Retrieve the security rules assigned to the user
 String getUri()
           
 UserInfo getUserInfo()
          Gets the user info.
 void setId(int id)
          Set the Id of the user
 void setLogin(String login)
           
 void setName(String name)
           
 void setPassword(String password)
          Change the user password.
 void setRoles(Set roleIDs)
          Assign new Roles to the user.
 void setRules(Set rules)
          Assign new security rules to the user, as an alternative to assigning roles
 void setUri(String uri)
           
 void setUserInfo(UserInfo ui)
          Sets the user info.
 ArrayList toSql()
          Creates update queries over the user_rules users_roles tables.
 

Method Detail

getId

public int getId()
Retrieve the ID of the user

Returns:
userID

setId

public void setId(int id)
Set the Id of the user

Parameters:
id - The user's id.

getLogin

public String getLogin()

setLogin

public void setLogin(String login)

getName

public String getName()

setName

public void setName(String name)

getPassword

public String getPassword()
Retrieve the user password

Returns:
the password of the user

setPassword

public void setPassword(String password)
                 throws NullParameterException
Change the user password.

Parameters:
password - new user password.
Throws:
NullParameterException - if the password is null.

getRoles

public Set getRoles()
Retieve a set of the roles assigned to the user.


setRoles

public void setRoles(Set roleIDs)
              throws NullParameterException
Assign new Roles to the user. The previous role assignment is overidden.

Parameters:
roleIDs - Set of roleIDs to be assigned to the user
Throws:
NullParameterException - if the set is null.

getRules

public Set getRules()
Retrieve the security rules assigned to the user

Returns:
Set of the rules assigned to the user

setRules

public void setRules(Set rules)
              throws NullParameterException
Assign new security rules to the user, as an alternative to assigning roles

Parameters:
rules - set of the rules to be set
Throws:
NullParameterException - if the set is null.

setUserInfo

public void setUserInfo(UserInfo ui)
                 throws NullParameterException
Sets the user info.

Parameters:
ui - the user info to be set
Throws:
NullParameterException - if the parameter is null.

getUserInfo

public UserInfo getUserInfo()
Gets the user info.

Returns:
the user info.

toSql

public ArrayList toSql()
Creates update queries over the user_rules users_roles 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.