@Override public Authorization createAuthorization(String id, String accountId, String hwInstanceId) { if (repo.accountExists(accountId) && repo.hwInstanceExists(hwInstanceId)) { Authorization authorization = new Authorization(id, accountId, hwInstanceId); repo.addAuthorization(authorization); return authorization; } else { return null; } }
@Override public boolean authorizationExists(String accountId, String hwInstanceId) { return repo.authorizationExists(accountId, hwInstanceId); }
@Override public boolean authorizationExists(String id) { return repo.authorizationExists(id); }
@Override public void destroyAuthorization(String id) { repo.deleteAuthorization(id); }
@Override public Authorization getAuthorization(String authorizationId) { return repo.getAuthorization(authorizationId); }
@Override public List<Authorization> getAllAuthorizations() { return repo.getAuthorizations(); }