org.outerj.daisy.repository.commonimpl
Class AuthenticatedUserImpl

java.lang.Object
  extended byorg.outerj.daisy.repository.commonimpl.AuthenticatedUserImpl
All Implemented Interfaces:
AuthenticatedUser

public class AuthenticatedUserImpl
extends java.lang.Object
implements AuthenticatedUser


Constructor Summary
AuthenticatedUserImpl(long userId, java.lang.String password, long[] activeRoleIds, long[] availableRoleIds, java.lang.String login)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticatedUserImpl

public AuthenticatedUserImpl(long userId,
                             java.lang.String password,
                             long[] activeRoleIds,
                             long[] availableRoleIds,
                             java.lang.String login)
Method Detail

getId

public long getId()
Specified by:
getId in interface AuthenticatedUser

getLogin

public java.lang.String getLogin()
Description copied from interface: AuthenticatedUser
The login string for this user. See the explanation for AuthenticatedUser.getPassword() for why this can sometimes be needed.

Specified by:
getLogin in interface AuthenticatedUser

getPassword

public java.lang.String getPassword()
Description copied from interface: AuthenticatedUser
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.

Specified by:
getPassword in interface AuthenticatedUser

getActiveRoleIds

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

Specified by:
getActiveRoleIds in interface AuthenticatedUser

getAvailableRoleIds

public long[] getAvailableRoleIds()
Description copied from interface: AuthenticatedUser
The roles this user has. These are the roles that can be supplied to the AuthenticatedUser.setActiveRoleIds(long[]) method.

Specified by:
getAvailableRoleIds in interface AuthenticatedUser

isInRole

public boolean isInRole(long roleId)
Specified by:
isInRole in interface AuthenticatedUser

isInAdministratorRole

public boolean isInAdministratorRole()
Specified by:
isInAdministratorRole in interface AuthenticatedUser

setActiveRoleIds

public void setActiveRoleIds(long[] roleIds)
Description copied from interface: AuthenticatedUser
Changes the active roles.

Specified by:
setActiveRoleIds in interface AuthenticatedUser

getXml

public org.outerx.daisy.x10.UserInfoDocument getXml()
Specified by:
getXml in interface AuthenticatedUser


Copyright © -2005 . All Rights Reserved.