public class AccountImpl extends BaseImpl<Account,AccountReader,AccountWriter> implements AccountReader, AccountWriter
apiVersion, canvasBaseUrl, canvasMessenger, masqueradeAs, masqueradeType, oauthToken, paginationPageSize, responseCallback, responseParser, serializeNulls| Constructor and Description |
|---|
AccountImpl(String canvasBaseUrl,
Integer apiVersion,
OauthToken oauthToken,
RestClient restClient,
int connectTimeout,
int readTimeout,
Integer paginationPageSize,
Boolean serializeNulls) |
| Modifier and Type | Method and Description |
|---|---|
Optional<Account> |
createAccount(String accountId,
Account account)
Create a new account in Canvas
|
Boolean |
deleteAccount(String parentAccountId,
String accountId) |
Optional<Account> |
getSingleAccount(String accountId)
Retrieve information on an individual account
|
List<Account> |
getSubAccounts(GetSubAccountsOptions options)
Return a list of sub-accounts to the given account
|
List<Account> |
listAccounts(ListAccountOptions options)
Return a list of accounts that the current user can view or manage.
|
List<Account> |
listAccountsForCourseAdmins()
List accounts that the current user can view through their admin course enrollments
|
protected Type |
listType() |
protected Class<Account> |
objectType() |
Optional<Account> |
updateAccount(Account account)
Update a account in Canvas
|
buildCanvasUrl, encode, getFromCanvas, getListFromCanvas, parseListOfResponses, readAsCanvasUser, readAsSisUser, withCallback, writeAsCanvasUser, writeAsSisUserclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadAsCanvasUser, readAsSisUser, withCallbackwriteAsCanvasUser, writeAsSisUserpublic AccountImpl(String canvasBaseUrl, Integer apiVersion, OauthToken oauthToken, RestClient restClient, int connectTimeout, int readTimeout, Integer paginationPageSize, Boolean serializeNulls)
public Optional<Account> getSingleAccount(String accountId) throws IOException
AccountReadergetSingleAccount in interface AccountReaderaccountId - accountId Required. Account's id or sis_account_idIOException - When there is an error communicating with Canvaspublic List<Account> listAccounts(ListAccountOptions options) throws IOException
AccountReaderlistAccounts in interface AccountReaderoptions - Object encapsulating parameters to the list accounts API callIOException - When there is an error communicating with Canvaspublic List<Account> getSubAccounts(GetSubAccountsOptions options) throws IOException
AccountReadergetSubAccounts in interface AccountReaderoptions - options object encapsulating parameters to the sub-accounts API callIOException - When there is an error communicating with Canvaspublic List<Account> listAccountsForCourseAdmins() throws IOException
AccountReaderlistAccountsForCourseAdmins in interface AccountReaderIOException - When there is an error communicating with Canvasprotected Type listType()
listType in class BaseImpl<Account,AccountReader,AccountWriter>protected Class<Account> objectType()
objectType in class BaseImpl<Account,AccountReader,AccountWriter>public Optional<Account> createAccount(String accountId, Account account) throws IOException
AccountWritercreateAccount in interface AccountWriteraccountId - the account ID of the account under which to place this accountaccount - A account object containing the information needed to create a account in CanvasIOException - When there is an error communicating with Canvaspublic Optional<Account> updateAccount(Account account) throws IOException
AccountWriterupdateAccount in interface AccountWriteraccount - A account object containing the information needed to update a account in CanvasIOException - When there is an error communicating with Canvaspublic Boolean deleteAccount(String parentAccountId, String accountId) throws IOException
deleteAccount in interface AccountWriterparentAccountId - The ID of the parent account to the account to delete.accountId - The ID of the account you wish to deleteIOException - When there is an error communicating with CanvasCopyright © 2021 Kansas State University, Office of Mediated Education. All rights reserved.