Package com.aoindustries.aoserv.examples
Class CreateAccount
java.lang.Object
com.aoindustries.aoserv.examples.CreateAccount
Code to create an basic, but complete account with one web
site. This is only representative of how to create an account.
AO Industries is not responsible for maintaining this code.
- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createAccount
(AoservConnector conn, PrintWriter out, Account.Name accountingTemplate, String server, Account.Name parentAccount, String packageDefinitionCategory, String packageDefinitionName, String packageDefinitionVersion, User.Name jvmUsername, String jvmPassword, User.Name ftpUsername, String ftpPassword, Group.Name groupName, String siteNameTemplate, User.Name mysqlAdminUsername, User.Name mysqlAppUsername, String mysqlAppPassword, InetAddress ipAddress, String netDevice, boolean ownsIpAddress, Email serverAdmin, DomainName primaryHttpHostname, DomainName[] altHttpHostnames, String tomcatVersion) Creates an account, automatically allocating as many resources as possible.
-
Method Details
-
createAccount
public static void createAccount(AoservConnector conn, PrintWriter out, Account.Name accountingTemplate, String server, Account.Name parentAccount, String packageDefinitionCategory, String packageDefinitionName, String packageDefinitionVersion, User.Name jvmUsername, String jvmPassword, User.Name ftpUsername, String ftpPassword, Group.Name groupName, String siteNameTemplate, User.Name mysqlAdminUsername, User.Name mysqlAppUsername, String mysqlAppPassword, InetAddress ipAddress, String netDevice, boolean ownsIpAddress, Email serverAdmin, DomainName primaryHttpHostname, DomainName[] altHttpHostnames, String tomcatVersion) throws IOException, SQLException, ValidationException Creates an account, automatically allocating as many resources as possible. More control of account layout may be obtained by customizing this code.- Parameters:
conn
- theAoservConnector
to communicate without
- if provided, verbose output is displayed during account creationaccountingTemplate
- the beginning part of the accounting codeserver
- the hostname of the server to set up the account onparentAccount
- the accounting code of the parent businesspackageDefinitionCategory
- the category for thePackageDefinition
packageDefinitionName
- the name of thePackageDefinition
packageDefinitionVersion
- the version of thePackageDefinition
. Please note that the combination of parentBusiness, packageDefinitionCategory, packageDefinitionName, and packageDefinitionVersion uniquely identifies onePackageDefinition
jvmUsername
- the username the JVM will run asjvmPassword
- the password for the JVMftpUsername
- the username that will be allowed to FTP only to the siteftpPassword
- the password for the FTP accessgroupName
- the name of the Linux group that the JVM and FTP accounts sharesiteNameTemplate
- the template used for site name creationmysqlAdminUsername
- the username of the existing User that is allowed to admin the new DBmysqlAppUsername
- the username that will have limited access to the databasemysqlAppPassword
- the password associated with the newly created application user accountipAddress
- the IP address the site will respond toownsIpAddress
- iftrue
, the IP address ownership will be changed to the newly createdPackage
serverAdmin
- the email address of the business_administrator who is responsible for web site maintenanceprimaryHttpHostname
- the primary hostname for the HTTP serveraltHttpHostnames
- the alternate hostnames for the HTTP servertomcatVersion
- the version of Tomcat to install- Throws:
IOException
SQLException
ValidationException
-