org.norther.tammi.core.security
Interface AuthenticatedPrincipal

All Superinterfaces:
Principal

public interface AuthenticatedPrincipal
extends Principal

An interface to an authenticated user. It defines the hasRole method used by AccessContollerMBeans when checking user's permissions to system resources.

Author:
Ilkka Priha

Method Summary
 String getDomain()
          Gets the domain of the principal.
 Object getId()
          Gets the id of the principal.
 Locale getLocale()
          Gets the locale of the principal.
 ObjectName getRealmName()
          Gets the realm of the principal.
 String getRealName()
          Gets the real name of the principal.
 boolean hasRole(String role)
          Checks whether this principal has the specified role.
 void setLocale(Locale loc)
          Sets the locale of the principal.
 
Methods inherited from interface java.security.Principal
equals, getName, hashCode, toString
 

Method Detail

hasRole

boolean hasRole(String role)
Checks whether this principal has the specified role.

Parameters:
role - the role to be checked.
Returns:
true if the pricipal has the specified role, otherwise false.

getRealmName

ObjectName getRealmName()
Gets the realm of the principal.

Returns:
the name of the realm.

getDomain

String getDomain()
Gets the domain of the principal.

Returns:
the domain or null.

getRealName

String getRealName()
Gets the real name of the principal.

Returns:
the real name or null.

getLocale

Locale getLocale()
Gets the locale of the principal.

Returns:
the locale or null.

setLocale

void setLocale(Locale loc)
Sets the locale of the principal.

Parameters:
loc - the locale.

getId

Object getId()
Gets the id of the principal.

Returns:
the id.


Copyright © 2004 The Norther Organization. All rights reserved.