public class AccountService extends AbstractService
AbstractService.OutputStreamResponseExtractormapper, restTemplate, WAIT_BEFORE_RETRY_IN_MILLIS| Constructor and Description |
|---|
AccountService(org.springframework.web.client.RestTemplate restTemplate)
Constructs service for GoodData account management.
|
| Modifier and Type | Method and Description |
|---|---|
Account |
createAccount(Account account,
String organizationName)
Creates new account in given organization (domain).
|
Account |
getAccountById(String id)
Get account for given account id
|
Account |
getAccountByUri(String uri)
Get account for given account id
|
Account |
getCurrent()
Gets current account of logged user.
|
void |
logout()
Performs user logout.
|
void |
removeAccount(Account account)
Delete given account
|
extractDatapublic AccountService(org.springframework.web.client.RestTemplate restTemplate)
restTemplate - RESTful HTTP Spring templatepublic Account getCurrent()
GoodDataException - when current account can't be accessed.public void logout()
GoodDataException - when logout failed.public Account createAccount(Account account, String organizationName)
account - to createorganizationName - (domain) in which account should be createdGoodDataException - when account can't be createdpublic void removeAccount(Account account)
account - to removeAccountNotFoundException - when given account wasn't foundGoodDataException - when account can't be removed for other reasonpublic Account getAccountById(String id)
id - to search forAccountNotFoundException - when account for given id can't be foundGoodDataException - when different error occurspublic Account getAccountByUri(String uri)
uri - to search forAccountNotFoundException - when account for given uri can't be foundGoodDataException - when different error occursCopyright © 2017. All Rights Reserved.