org.outerj.daisy.repository.commonimpl
Interface AuthenticatedUser

All Known Implementing Classes:
AuthenticatedUserImpl

public interface AuthenticatedUser

A user object representing an authenticated user.

This user object is obtained after successful authentication from the UserAuthenticator. This user object is different from User which is used for managing users, while this user object is rather a proof of successful authentication used inside the implementation. If you are a user of the repository API, you should never be in contact with this object, this object is only relevant to the internal implementation.


Method Summary
 long[] getActiveRoleIds()
          The currently active role of the user.
 long[] getAvailableRoleIds()
          The roles this user has.
 long getId()
           
 java.lang.String getLogin()
          The login string for this user.
 java.lang.String getPassword()
          The password can sometimes be needed if the the Repository implementation itself needs to connect to other services using this user.
 org.outerx.daisy.x10.UserInfoDocument getXml()
           
 boolean isInAdministratorRole()
           
 boolean isInRole(long roleId)
           
 void setActiveRoleIds(long[] roleIds)
          Changes the active roles.
 

Method Detail

getId

public long getId()

getLogin

public java.lang.String getLogin()
The login string for this user. See the explanation for getPassword() for why this can sometimes be needed.


getPassword

public java.lang.String getPassword()
The password can sometimes be needed if the the Repository implementation itself needs to connect to other services using this user. This is the case e.g. for remote implementations of the repository API. If it's known to be unneeded, this method may return null.


getActiveRoleIds

public long[] getActiveRoleIds()
The currently active role of the user. While a user can have multiple roles, there can only be one role 'active' at a time.


isInRole

public boolean isInRole(long roleId)

isInAdministratorRole

public boolean isInAdministratorRole()

getAvailableRoleIds

public long[] getAvailableRoleIds()
The roles this user has. These are the roles that can be supplied to the setActiveRoleIds(long[]) method.


setActiveRoleIds

public void setActiveRoleIds(long[] roleIds)
Changes the active roles.


getXml

public org.outerx.daisy.x10.UserInfoDocument getXml()


Copyright © -2005 . All Rights Reserved.