Interface AdminAPI
-
- All Superinterfaces:
net.anotheria.anoplass.api.API
- All Known Implementing Classes:
AdminAPIImpl
public interface AdminAPI extends net.anotheria.anoplass.api.APIAPI that provides basic admin functionality.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AdminAccountAOaddAccountStatus(net.anotheria.portalkit.services.common.AccountId accountId, int status)Adds a status to provided accountDataspaceAOcreateDataspace(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, java.util.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.AdminAccountAOgetAccountById(net.anotheria.portalkit.services.common.AccountId accountId)Returns account by accountIdPageResult<AdminAccountAO>getAccounts(int pageNumber, int itemsOnPage, java.lang.String searchTerm)Returns paginated list of created in system accounts.PageResult<AdminAccountAO>getAccounts(AccountsGetRequest request)Returns paginated list of created in system accounts.java.util.List<AdminAPIConfig.AccountStatusConfig>getAccountStatuses()Returns all account statusesjava.util.List<AdminAPIConfig.AccountTypeConfig>getAccountTypes()Returns all account typesjava.util.List<DataspaceAO>getAllDataspaces(net.anotheria.portalkit.services.common.AccountId accountId)Returns all account's dataspacesjava.util.List<AdminAPIConfig.DataspaceConfig>getDataspaces()java.lang.StringgetSignAsToken(net.anotheria.portalkit.services.common.AccountId accountId)Creates a token that can be used to log in as provided user.AdminAccountAOremoveAccountStatus(net.anotheria.portalkit.services.common.AccountId accountId, int status)Removes a status from provided accountDataspaceAOremoveDataspaceAttribute(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, java.lang.String attributeName)Removes an attribute from existing dataspace.DataspaceAOsaveDataspaceAttribute(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, java.lang.String attributeName, java.lang.String attributeValue, net.anotheria.portalkit.services.accountsettings.attribute.AttributeType type)Saves an attribute to existing dataspace.voidsetNewAccountPassword(net.anotheria.portalkit.services.common.AccountId accountId, java.lang.String newPassword)Sets a new password for provided accountAdminAccountAOupdateAccount(AccountUpdateRequest updateRequest)Updates account information.
-
-
-
Method Detail
-
getAccountStatuses
java.util.List<AdminAPIConfig.AccountStatusConfig> getAccountStatuses() throws net.anotheria.anoplass.api.APIException
Returns all account statuses- Returns:
- list of
AdminAPIConfig.AccountStatusConfig - Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
getAccountTypes
java.util.List<AdminAPIConfig.AccountTypeConfig> getAccountTypes() throws net.anotheria.anoplass.api.APIException
Returns 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, java.lang.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, java.lang.String newPassword) throws net.anotheria.anoplass.api.APIExceptionSets a new password for provided account- Parameters:
accountId- accountIdnewPassword- new password to set- Throws:
net.anotheria.anoplass.api.APIException- in case of error
-
getSignAsToken
java.lang.String getSignAsToken(net.anotheria.portalkit.services.common.AccountId accountId) throws net.anotheria.anoplass.api.APIExceptionCreates 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
java.util.List<AdminAPIConfig.DataspaceConfig> getDataspaces() throws net.anotheria.anoplass.api.APIException
- Throws:
net.anotheria.anoplass.api.APIException
-
getAllDataspaces
java.util.List<DataspaceAO> getAllDataspaces(net.anotheria.portalkit.services.common.AccountId accountId)
Returns all account's dataspaces- Parameters:
accountId- dataspaces owner- Returns:
DataspaceAO
-
createDataspace
DataspaceAO createDataspace(net.anotheria.portalkit.services.common.AccountId accountId, int dataspaceId, java.util.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, java.lang.String attributeName, java.lang.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, java.lang.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.APIExceptionRemoves dataspace completely by account and dataspace id.- Parameters:
accountId- dataspace ownerdataspaceId- dataspace type (id)- Throws:
net.anotheria.anoplass.api.APIException
-
-