15 lines
371 B
Java
Raw Normal View History

package bigbank;
import org.springframework.security.access.prepost.PreAuthorize;
public interface BankService {
2015-03-23 11:21:19 -05:00
public Account readAccount(Long id);
2015-03-23 11:21:19 -05:00
public Account[] findAccounts();
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);
}