org.janux.bus.security
Interface AccountService


public interface AccountService

Used to create, save, retrieve, update and delete Account objects from persistent storage

Since:
0.1
Author:
Philippe Paravicini

Method Summary
 void deleteAccount(Account account)
           
 Account findAccountByName(String name)
          Returns an Account by names, or null if the Account is not found.
 Role findRoleByName(String name)
          Returns a Role by names, or null if the Role is not found.
 Account loadAccountByName(String name)
          loads an Account object, or throws exception if Account with that name is not found
 SortedSet<Account> loadAllAccounts(boolean initializeAccounts)
          Loads all Accounts defined in the system
 SortedSet<PermissionContext> loadAllPermissionContexts()
          Loads all PermissionContexts defined in the system
 SortedSet<Role> loadAllRoles()
          Loads all Roles defined in the system
 Role loadRoleByName(String name)
          loads an Role object, or throws exception if Role with that name is not found
 Account newAccount()
          returns a new Account instance
 void saveAccount(Account account)
           
 void saveOrUpdateAccount(Account account)
           
 void setAccountPassword(Account account, String passwordToEncrypt)
           
 

Method Detail

findAccountByName

Account findAccountByName(String name)
Returns an Account by names, or null if the Account is not found.

Parameters:
name - the Account name

loadAccountByName

Account loadAccountByName(String name)
                          throws EntityNotFoundException
loads an Account object, or throws exception if Account with that name is not found

Parameters:
name - a name that uniquely identifies this Account
Throws:
EntityNotFoundException - if a Account object with that name is not found

loadAllAccounts

SortedSet<Account> loadAllAccounts(boolean initializeAccounts)
Loads all Accounts defined in the system


newAccount

Account newAccount()
returns a new Account instance


saveAccount

void saveAccount(Account account)

saveOrUpdateAccount

void saveOrUpdateAccount(Account account)

deleteAccount

void deleteAccount(Account account)

findRoleByName

Role findRoleByName(String name)
Returns a Role by names, or null if the Role is not found.

Parameters:
name - the Role name

loadRoleByName

Role loadRoleByName(String name)
                    throws EntityNotFoundException
loads an Role object, or throws exception if Role with that name is not found

Parameters:
name - a name that uniquely identifies this Role
Throws:
EntityNotFoundException - if a Role object with that name is not found

loadAllRoles

SortedSet<Role> loadAllRoles()
Loads all Roles defined in the system


loadAllPermissionContexts

SortedSet<PermissionContext> loadAllPermissionContexts()
Loads all PermissionContexts defined in the system


setAccountPassword

void setAccountPassword(Account account,
                        String passwordToEncrypt)


Copyright © 2005-2013 Janux. All Rights Reserved.