com.nesstar.api
Interface User

All Superinterfaces:
NesstarBankObject, NesstarObject

public interface User
extends NesstarBankObject

A user on a Nesstar server.

Since:
0.2

Method Summary
 void addRole(Role role)
          Add a role for the user.
 String getName()
          Returns the freetext name of the user (for example "John Smith").
 NesstarList<Role> getRoles()
          Returns the Roles associated with this user.
 String getUserId()
          Returns the user id, i.e. the id that is used to log in (for example "johnsmith").
 void removeRole(Role role)
          Remove a role from the user.
 
Methods inherited from interface com.nesstar.api.NesstarObject
getId, getLabel, getTimeStamp, reload, toURI
 

Method Detail

getUserId

String getUserId()
Returns the user id, i.e. the id that is used to log in (for example "johnsmith").

Returns:
The user id of the user.

getName

String getName()
               throws NotAuthorizedException,
                      IOException
Returns the freetext name of the user (for example "John Smith").

Returns:
The name of the user (freetext name, not the user id).
Throws:
NotAuthorizedException - If access was denied by the Nesstar server.
IOException - If a communication error occurs.

getRoles

NesstarList<Role> getRoles()
                           throws NotAuthorizedException,
                                  IOException
Returns the Roles associated with this user.

Returns:
a list of Roles associated with this user.
Throws:
NotAuthorizedException - If access was denied by the Nesstar server.
IOException - If a communication error occurs.

addRole

void addRole(Role role)
             throws NotAuthorizedException,
                    IOException
Add a role for the user.

Parameters:
role - The Role to add.
Throws:
NotAuthorizedException - If access was denied by the Nesstar server.
IOException - If a communication error occurs.

removeRole

void removeRole(Role role)
                throws NotAuthorizedException,
                       IOException
Remove a role from the user.

Parameters:
role - to be removed.
Throws:
NotAuthorizedException - If access was denied by the Nesstar server.
IOException - If a communication error occurs.


Copyright © 2011, NSD All rights reserved