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 Details

    • getAccountStatuses

      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

      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, String searchTerm) throws net.anotheria.anoplass.api.APIException
      Returns paginated list of created in system accounts.
      Parameters:
      pageNumber - number of page
      itemsOnPage - amount of items on page
      searchTerm - 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 - accountId
      status - 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 - accountId
      status - 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 - accountId
      newPassword - 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

      List<AdminAPIConfig.DataspaceConfig> getDataspaces() throws net.anotheria.anoplass.api.APIException
      Throws:
      net.anotheria.anoplass.api.APIException
    • getAllDataspaces

      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, List<DataspaceAttributeAO> attributes) throws net.anotheria.anoplass.api.APIException
      Creates dataspace with for account with specific id and attributes.
      Parameters:
      accountId - owner of dataspace
      dataspaceId - id of dataspace
      attributes - 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 owner
      dataspaceId - id of dataspace
      attributeName - name of attribute
      attributeValue - value of attribute
      type - 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 owner
      dataspaceId - id of dataspace
      attributeName - 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 owner
      dataspaceId - dataspace type (id)
      Throws:
      net.anotheria.anoplass.api.APIException