Interface AdminAPI
- All Superinterfaces:
net.anotheria.anoplass.api.API
- All Known Implementing Classes:
AdminAPIImpl
public interface AdminAPI
extends net.anotheria.anoplass.api.API
API that provides basic admin functionality.
-
Method Summary
Modifier and TypeMethodDescriptionaddAccountStatus(net.anotheria.portalkit.services.common.AccountId accountId, int status) Adds a status to provided accountcreateDataspace(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, List<DataspaceAttributeAO> attributes) Creates dataspace with for account with specific id and attributes.voiddeleteDataspace(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId) Removes dataspace completely by account and dataspace id.getAccountById(net.anotheria.portalkit.services.common.AccountId accountId) Returns account by accountIdgetAccounts(int pageNumber, int itemsOnPage, String searchTerm) Returns paginated list of created in system accounts.getAccounts(AccountsGetRequest request) Returns paginated list of created in system accounts.Returns all account statusesReturns all account typesgetAllDataspaces(net.anotheria.portalkit.services.common.AccountId accountId) Returns all account's dataspacesgetSignAsToken(net.anotheria.portalkit.services.common.AccountId accountId) Creates a token that can be used to log in as provided user.removeAccountStatus(net.anotheria.portalkit.services.common.AccountId accountId, int status) Removes a status from provided accountremoveDataspaceAttribute(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, String attributeName) Removes an attribute from existing dataspace.saveDataspaceAttribute(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, String attributeName, String attributeValue, net.anotheria.portalkit.services.accountsettings.attribute.AttributeType type) Saves an attribute to existing dataspace.voidsetNewAccountPassword(net.anotheria.portalkit.services.common.AccountId accountId, String newPassword) Sets a new password for provided accountupdateAccount(AccountUpdateRequest updateRequest) Updates account information.Methods inherited from interface net.anotheria.anoplass.api.API
deInit, init
-
Method Details
-
getAccountStatuses
List<AdminAPIConfig.AccountStatusConfig> getAccountStatuses() throws net.anotheria.anoplass.api.APIExceptionReturns all account statuses- Returns:
- list of
AdminAPIConfig.AccountStatusConfig - Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
getAccountTypes
List<AdminAPIConfig.AccountTypeConfig> getAccountTypes() throws net.anotheria.anoplass.api.APIExceptionReturns all account types- Returns:
- list of
AdminAPIConfig.AccountTypeConfig - Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
getAccounts
PageResult<AdminAccountAO> getAccounts(int pageNumber, int itemsOnPage, String searchTerm) throws net.anotheria.anoplass.api.APIException Returns paginated list of created in system accounts.- Parameters:
pageNumber- number of pageitemsOnPage- amount of items on pagesearchTerm- some term like email, name to filter accounts- Returns:
- list of paginated
AdminAccountAO - Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
getAccounts
PageResult<AdminAccountAO> getAccounts(AccountsGetRequest request) throws net.anotheria.anoplass.api.APIException Returns paginated list of created in system accounts.- Parameters:
request- criteria request- Returns:
- list of paginated
AdminAccountAO - Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
getAccountById
AdminAccountAO getAccountById(net.anotheria.portalkit.services.common.AccountId accountId) throws net.anotheria.anoplass.api.APIException Returns account by accountId- Parameters:
accountId- accountId- Returns:
AdminAccountAO- Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
updateAccount
AdminAccountAO updateAccount(AccountUpdateRequest updateRequest) throws net.anotheria.anoplass.api.APIException Updates account information. Only email, name, brand, type or tenant can be updated.- Parameters:
updateRequest-AccountUpdateRequest- Returns:
AdminAccountAO- Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
addAccountStatus
AdminAccountAO addAccountStatus(net.anotheria.portalkit.services.common.AccountId accountId, int status) throws net.anotheria.anoplass.api.APIException Adds a status to provided account- Parameters:
accountId- accountIdstatus- status to add- Returns:
AdminAccountAO- Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
removeAccountStatus
AdminAccountAO removeAccountStatus(net.anotheria.portalkit.services.common.AccountId accountId, int status) throws net.anotheria.anoplass.api.APIException Removes a status from provided account- Parameters:
accountId- accountIdstatus- status to remove- Returns:
AdminAccountAO- Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
setNewAccountPassword
void setNewAccountPassword(net.anotheria.portalkit.services.common.AccountId accountId, String newPassword) throws net.anotheria.anoplass.api.APIException Sets a new password for provided account- Parameters:
accountId- accountIdnewPassword- new password to set- Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
getSignAsToken
String getSignAsToken(net.anotheria.portalkit.services.common.AccountId accountId) throws net.anotheria.anoplass.api.APIException Creates a token that can be used to log in as provided user.- Parameters:
accountId- account whose token will be created to perform log in- Returns:
- authToken
- Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
getDataspaces
- Throws:
net.anotheria.anoplass.api.APIException
-
getAllDataspaces
Returns all account's dataspaces- Parameters:
accountId- dataspaces owner- Returns:
DataspaceAO
-
createDataspace
DataspaceAO createDataspace(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, List<DataspaceAttributeAO> attributes) throws net.anotheria.anoplass.api.APIException Creates dataspace with for account with specific id and attributes.- Parameters:
accountId- owner of dataspacedataspaceId- id of dataspaceattributes- list of attributes- Returns:
DataspaceAO- Throws:
net.anotheria.anoplass.api.APIException
-
saveDataspaceAttribute
DataspaceAO saveDataspaceAttribute(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, String attributeName, String attributeValue, net.anotheria.portalkit.services.accountsettings.attribute.AttributeType type) throws net.anotheria.anoplass.api.APIException Saves an attribute to existing dataspace. If there is no dataspace with provided id, exception will be thrown.- Parameters:
accountId- dataspace ownerdataspaceId- id of dataspaceattributeName- name of attributeattributeValue- value of attributetype- type of attribute- Returns:
DataspaceAO- Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
removeDataspaceAttribute
DataspaceAO removeDataspaceAttribute(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, String attributeName) throws net.anotheria.anoplass.api.APIException Removes an attribute from existing dataspace. If there is no dataspace with provided id, exception will be thrown.- Parameters:
accountId- dataspace ownerdataspaceId- id of dataspaceattributeName- name of attribute- Returns:
DataspaceAO- Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
deleteDataspace
void deleteDataspace(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId) throws net.anotheria.anoplass.api.APIException Removes dataspace completely by account and dataspace id.- Parameters:
accountId- dataspace ownerdataspaceId- dataspace type (id)- Throws:
net.anotheria.anoplass.api.APIException
-