public class AccountService extends AbstractService
AbstractService.OutputStreamResponseExtractor
mapper, restTemplate
Constructor and Description |
---|
AccountService(org.springframework.web.client.RestTemplate restTemplate)
Deprecated.
use AccountService(RestTemplate, GoodDataSettings) constructor instead
|
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.
|
void |
logout()
Performs user logout.
|
void |
removeAccount(Account account)
Delete given account
|
void |
updateAccount(Account account)
Updates account
|
extractData
public AccountService(org.springframework.web.client.RestTemplate restTemplate, GoodDataSettings settings)
restTemplate
- RESTful HTTP Spring templatesettings
- settings@Deprecated public AccountService(org.springframework.web.client.RestTemplate restTemplate)
restTemplate
- RESTful HTTP Spring templatepublic 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 foundCopyright © 2019. All rights reserved.