Class AddPostgresUser
java.lang.Object
com.aoindustries.aoserv.examples.postgres.AddPostgresUser
Adds a
User to the system.- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic UserServeraddPostgresUser(AoservConnector conn, Account.Name packageName, User.Name username, Server.Name postgresServer, String server, String password) Adds aUserto the system.static voidaddPostgresUser(SimpleAoservClient aoClient, Account.Name packageName, User.Name username, Server.Name postgresServer, String server, String password) Adds aUserto the system.
-
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 aUserto the system.- Parameters:
aoClient- theSimpleAoservClientto usepackageName- the name of thePackageusername- the new username to allocatepostgresServer- the name of the PostgreSQL serverserver- the hostname of the server to add the account topassword- the password for the new account- Throws:
IOExceptionSQLException
-
addPostgresUser
public static UserServer addPostgresUser(AoservConnector conn, Account.Name packageName, User.Name username, Server.Name postgresServer, String server, String password) throws IOException, SQLException Adds aUserto the system.- Parameters:
conn- theAoservConnectorto usepackageName- the name of thePackageusername- the new username to allocatepostgresServer- the name of the PostgreSQL serverserver- the hostname of the server to add the account topassword- the password for the new account- Returns:
- the new
UserServer - Throws:
IOExceptionSQLException
-
