@Override public AccountApi self() throws RestApiException { if (!self.get().isIdentifiedUser()) { throw new AuthException("Authentication required"); } return api.create(new AccountResource((IdentifiedUser) self.get())); }
@Override public AccountApi id(String id) throws RestApiException { try { return api.create(accounts.parse(TopLevelResource.INSTANCE, IdString.fromDecoded(id))); } catch (OrmException e) { throw new RestApiException("Cannot parse change", e); } }