org.janux.bus.security
Interface Account

All Superinterfaces:
Comparable, PermissionsCapable, Persistent

public interface Account
extends Persistent, PermissionsCapable, Comparable

Represents a login account in the application, could also have been called a User or a Principal, see more below.

Note that what we call an Account here is what many applications call a 'User'. We chose to use the term 'Account' because we believe that the semantics of the term 'User' are closer to those of a Person or Organization, which are represented by the biz.janux.people.Party interface and its sub-interfaces and implementing classes. If necessary, the Person or Organization that 'owns' the Account can be referenced by the getParty field. Thus, the user can be considered to be the Party for whom the Account was created, although in many cases such a Party may not be a Person or may not even exist (such as is the case for a 'system' account).

In an Authentication and Authorization context, another term for an Account is a Principal representing an identity (the account name) and a set of credentials auntenticating that identity (a password, or digital certificate). We chose the term Account because we feel it is most accessible to every day business people than the more technical term Principal.

Since:
0.1
Author:
Philippe Paravicini

Field Summary
 
Fields inherited from interface org.janux.bus.persistence.Persistent
UNSAVED_ID
 
Method Summary
 Date getExpiration()
          if not null, the date of expiration of the account
 String getName()
          A unique name that identifies this Account - returns the same value as the getUsername inherited frmo the UserDetails interface
 Date getPasswordExpiration()
          if not null, the date of expiration of the password
 List<Role> getRoles()
          The Roles that have been granted to this Account
 Set<AccountSetting> getSettings()
          This Account's settings, if any
 void setAccountNonLocked(boolean b)
          unlocks account
 void setEnabled(boolean enabled)
          indicates whether the account is valid and can be used
 void setExpiration(Date date)
           
 void setName(String name)
           
 void setPassword(String password)
          A password that can be used for password authentication
 void setPasswordExpiration(Date date)
           
 void setRoles(List<Role> roles)
           
 void setSettings(Set<AccountSetting> settings)
           
 
Methods inherited from interface org.janux.bus.persistence.Persistent
getId, setId
 
Methods inherited from interface org.janux.bus.security.PermissionsCapable
denyPermissions, getPermissionContexts, getPermissions, getPermissionsValue, grantPermissions, hasPermissions, hasPermissions, hasPermissions
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getName

String getName()
A unique name that identifies this Account - returns the same value as the getUsername inherited frmo the UserDetails interface


setName

void setName(String name)

setPassword

void setPassword(String password)
A password that can be used for password authentication


setEnabled

void setEnabled(boolean enabled)
indicates whether the account is valid and can be used


setAccountNonLocked

void setAccountNonLocked(boolean b)
unlocks account


getExpiration

Date getExpiration()
if not null, the date of expiration of the account


setExpiration

void setExpiration(Date date)

getPasswordExpiration

Date getPasswordExpiration()
if not null, the date of expiration of the password


setPasswordExpiration

void setPasswordExpiration(Date date)

getRoles

List<Role> getRoles()
The Roles that have been granted to this Account


setRoles

void setRoles(List<Role> roles)

getSettings

Set<AccountSetting> getSettings()
This Account's settings, if any


setSettings

void setSettings(Set<AccountSetting> settings)


Copyright © 2005-2013 Janux. All Rights Reserved.