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
|
|
|
|
2015-03-23 11:21:19 -05:00
|
|
|
public Account readAccount(Long id);
|
2008-10-30 04:10:54 +00:00
|
|
|
|
2015-03-23 11:21:19 -05:00
|
|
|
public Account[] findAccounts();
|
2008-10-30 04:10:54 +00:00
|
|
|
|
2015-03-23 11:21:19 -05:00
|
|
|
@PreAuthorize("hasRole('supervisor') or "
|
|
|
|
|
+ "hasRole('teller') and (#account.balance + #amount >= -#account.overdraft)")
|
|
|
|
|
public Account post(Account account, double amount);
|
2007-12-14 02:27:48 +00:00
|
|
|
}
|