Esempio n. 1
0
 @Override
 public AccountApi self() throws RestApiException {
   if (!self.get().isIdentifiedUser()) {
     throw new AuthException("Authentication required");
   }
   return api.create(new AccountResource((IdentifiedUser) self.get()));
 }
Esempio n. 2
0
 @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);
   }
 }