java.lang.Object
com.aoindustries.aoserv.examples.postgres.AddPostgresUser

public final class AddPostgresUser extends Object
Adds a User to the system.
Author:
AO Industries, Inc.
  • Method Details

    • addPostgresUser

      public static void addPostgresUser(SimpleAoservClient aoClient, Account.Name packageName, User.Name username, Server.Name postgresServer, String server, String password) throws IOException, SQLException
      Adds a User to the system.
      Parameters:
      aoClient - the SimpleAoservClient to use
      packageName - the name of the Package
      username - the new username to allocate
      postgresServer - the name of the PostgreSQL server
      server - the hostname of the server to add the account to
      password - the password for the new account
      Throws:
      IOException
      SQLException
    • addPostgresUser

      public static UserServer addPostgresUser(AoservConnector conn, Account.Name packageName, User.Name username, Server.Name postgresServer, String server, String password) throws IOException, SQLException
      Adds a User to the system.
      Parameters:
      conn - the AoservConnector to use
      packageName - the name of the Package
      username - the new username to allocate
      postgresServer - the name of the PostgreSQL server
      server - the hostname of the server to add the account to
      password - the password for the new account
      Returns:
      the new UserServer
      Throws:
      IOException
      SQLException