Class RestAdmin

    • Constructor Summary

      Constructors 
      Constructor Description
      RestAdmin​(AdminCredentials credentials, java.lang.String serviceUrl)
      An API session with admin privileges
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(java.lang.String username)
      Delete an existing user by username
      java.lang.String getId()
      Get the session ID
      void register​(Credentials credentials)
      Register a new user with the given credentials
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RestAdmin

        public RestAdmin​(AdminCredentials credentials,
                         java.lang.String serviceUrl)
                  throws java.lang.Exception
        An API session with admin privileges
        Parameters:
        credentials - Admin username and password used to log in and retrieve the session
        serviceUrl - URL to the API
        Throws:
        java.lang.Exception - Throws an HttpException if admin credentials or API URL are invalid
    • Method Detail

      • register

        public void register​(Credentials credentials)
                      throws java.lang.Exception
        Register a new user with the given credentials
        Specified by:
        register in interface Admin
        Parameters:
        credentials -
        Throws:
        java.lang.Exception
      • delete

        public void delete​(java.lang.String username)
                    throws java.lang.Exception
        Delete an existing user by username
        Specified by:
        delete in interface Admin
        Parameters:
        username -
        Throws:
        java.lang.Exception
      • getId

        public java.lang.String getId()
        Get the session ID
        Specified by:
        getId in interface Session
        Returns:
        session ID