2007-12-14 02:27:48 +00:00
|
|
|
package bigbank;
|
|
|
|
|
|
2009-05-11 05:18:20 +00:00
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
2008-10-30 04:10:54 +00:00
|
|
|
|
2007-12-14 02:27:48 +00:00
|
|
|
|
|
|
|
|
public interface BankService {
|
2008-10-30 04:10:54 +00:00
|
|
|
|
|
|
|
|
public Account readAccount(Long id);
|
|
|
|
|
|
|
|
|
|
public Account[] findAccounts();
|
|
|
|
|
|
|
|
|
|
@PreAuthorize(
|
2011-05-03 22:23:55 +01:00
|
|
|
"hasRole('supervisor') or " +
|
|
|
|
|
"hasRole('teller') and (#account.balance + #amount >= -#account.overdraft)" )
|
2008-10-30 04:10:54 +00:00
|
|
|
public Account post(Account account, double amount);
|
2007-12-14 02:27:48 +00:00
|
|
|
}
|