public class AccountService extends AbstractService
AbstractService.OutputStreamResponseExtractor| Modifier and Type | Field and Description |
|---|---|
protected static org.springframework.web.util.UriTemplate |
ACCOUNT_TEMPLATE |
protected static org.springframework.web.util.UriTemplate |
ACCOUNTS_TEMPLATE |
protected static org.springframework.web.util.UriTemplate |
LOGIN_TEMPLATE |
protected static org.springframework.web.util.UriTemplate |
SEPARATORS_TEMPLATE |
mapper, restTemplate| Constructor and Description |
|---|
AccountService(org.springframework.web.client.RestTemplate restTemplate,
GoodDataSettings settings)
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.
|
SeparatorSettings |
getSeparatorSettings(Account account)
Returns default thousand and decimal separator settings for the given account.
|
void |
logout()
Performs user logout.
|
void |
removeAccount(Account account)
Delete given account
|
void |
updateAccount(Account account)
Updates account
|
extractDataprotected static final org.springframework.web.util.UriTemplate ACCOUNT_TEMPLATE
protected static final org.springframework.web.util.UriTemplate ACCOUNTS_TEMPLATE
protected static final org.springframework.web.util.UriTemplate LOGIN_TEMPLATE
protected static final org.springframework.web.util.UriTemplate SEPARATORS_TEMPLATE
public AccountService(org.springframework.web.client.RestTemplate restTemplate,
GoodDataSettings settings)
restTemplate - RESTful HTTP Spring templatesettings - settingspublic Account getCurrent()
com.gooddata.GoodDataException - when current account can't be accessed.public void logout()
com.gooddata.GoodDataException - when logout failed.public Account createAccount(Account account, String organizationName)
account - to createorganizationName - (domain) in which account should be createdcom.gooddata.GoodDataException - when account can't be createdpublic void removeAccount(Account account)
account - to removeAccountNotFoundException - when given account wasn't foundcom.gooddata.GoodDataException - 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 foundcom.gooddata.GoodDataException - when different error occurspublic Account getAccountByUri(String uri)
uri - to search forAccountNotFoundException - when account for given uri can't be foundcom.gooddata.GoodDataException - when different error occurspublic void updateAccount(Account account)
account - to be updatedAccountNotFoundException - when account for given uri can't be foundpublic SeparatorSettings getSeparatorSettings(Account account)
account - accountSeparatorSettings for the accountCopyright © 2019. All rights reserved.