- java.lang.Object
-
- com.aoindustries.aoserv.client.SimpleAOClient
-
public final class SimpleAOClient extends Object
SimpleAOClientis a simplified interface into the client code. Not all information is available, but less knowledge is required to accomplish some common tasks. All methods are invoked using standard data types. The underlying implementation changes over time, but this access point does not change as frequently.Most of the
AOSHcommands resolve to these method calls.- Author:
- AO Industries, Inc.
- See Also:
AOSH,AOServConnector
-
-
Constructor Summary
Constructors Constructor Description SimpleAOClient(AOServConnector connector)Creates a newSimpleAOClientusing the providedAOServConnector.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAccount(Account.Name accounting, String contractVersion, String defaultServer, Account.Name parent, boolean can_add_backup_servers, boolean can_add_businesses, boolean can_see_prices, boolean billParent)Adds a newAccountto the system.intaddAccountHost(Account.Name accounting, String host)voidaddAdministrator(User.Name username, String name, String title, Date birthday, boolean isPrivate, String workPhone, String homePhone, String cellPhone, String fax, Email email, String address1, String address2, String city, String state, String country, String zip, boolean enableEmailSupport)Adds a newAdministratorto anAccount.intaddBackupHost(String hostname, String farm, Account.Name owner, String description, int backup_hour, String os_type, String os_version, String architecture, User.Name username, String password, String contact_phone, String contact_email)Adds a new backupHost.intaddCvsRepository(String aoServer, PosixPath path, User.Name username, Group.Name group, long mode)Adds a newCvsRepositoryto aServer.intaddDNSRecord(String zone, String domain, String type, int priority, int weight, int port, String destination, int ttl)voidaddDNSZone(Account.Name packageName, String zone, InetAddress ip, int ttl)Adds a newZoneto a system.intaddEmailDomain(DomainName domain, String aoServer, Account.Name packageName)intaddEmailForwarding(String address, DomainName domain, String aoServer, Email destination)Forwards email addressed to an address at aDomainto a different email address.intaddEmailList(String aoServer, PosixPath path, User.Name username, Group.Name group)Adds a newListto the system.intaddEmailListAddress(String address, DomainName domain, PosixPath path, String aoServer)intaddEmailPipe(String aoServer, String command, Account.Name packageName)Adds a newPipeto the system.intaddEmailPipeAddress(String address, DomainName domain, int pkey)Adds an address to the list of email addresses that will be piped to anPipe.intaddEmailSmtpRelay(Account.Name packageName, String aoServer, HostAddress host, String type, long duration)Grants access to the SMTP server.intaddFileBackupSetting(int replication, String path, boolean backupEnabled, boolean required)Adds aFileReplicationSettingto aFileReplication.voidaddFTPGuestUser(User.Name username)intaddHttpdJBossSite(String aoServer, String siteName, Account.Name packageName, User.Name jvmUsername, Group.Name groupName, Email serverAdmin, boolean useApache, InetAddress ipAddress, String netDevice, DomainName primaryHttpHostname, DomainName[] altHttpHostnames, String jBossVersion)Adds a newSiteto the system.intaddHttpdSharedTomcat(String name, String aoServer, String version, User.Name linuxServerAccount, Group.Name linuxServerGroup)Adds a newSharedTomcatto a server.intaddHttpdSiteAuthenticatedLocation(String siteName, String aoServer, String path, boolean isRegularExpression, String authName, PosixPath authGroupFile, PosixPath authUserFile, String require, String handler)intaddHttpdSiteURL(int hsbPKey, DomainName hostname)Adds a newVirtualHostNameto aVirtualHost.intaddHttpdTomcatContext(String siteName, String aoServer, String className, boolean cookies, boolean crossContext, PosixPath docBase, boolean override, String path, boolean privileged, boolean reloadable, boolean useNaming, String wrapperClass, int debug, PosixPath workDir, boolean serverXmlConfigured)intaddHttpdTomcatDataSource(String siteName, String aoServer, String path, String name, String driverClassName, String url, String username, String password, int maxActive, int maxIdle, int maxWait, String validationQuery)Adds a new data source to aContext.intaddHttpdTomcatParameter(String siteName, String aoServer, String path, String name, String value, boolean override, String description)Adds a new parameter to aContext.intaddHttpdTomcatSharedSite(String aoServer, String siteName, Account.Name packageName, User.Name jvmUsername, Group.Name groupName, Email serverAdmin, boolean useApache, InetAddress ipAddress, String netDevice, DomainName primaryHttpHostname, DomainName[] altHttpHostnames, String sharedTomcatName)Adds a newSharedTomcatSiteto the system.intaddHttpdTomcatSiteJkMount(String siteName, String aoServer, String path, boolean mount)intaddHttpdTomcatStdSite(String aoServer, String siteName, Account.Name packageName, User.Name jvmUsername, Group.Name groupName, Email serverAdmin, boolean useApache, InetAddress ipAddress, String netDevice, DomainName primaryHttpHostname, DomainName[] altHttpHostnames, String tomcatVersion)Adds a newPrivateTomcatSiteto the system.voidaddIpReputation(String identifier, String host, String confidence, String reputationType, short score)intaddLinuxAccAddress(String address, DomainName domain, String aoServer, User.Name username)voidaddLinuxAccount(User.Name username, Group.Name primary_group, User.Gecos name, User.Gecos office_location, User.Gecos office_phone, User.Gecos home_phone, String type, PosixPath shell)Adds a newUserthe system.voidaddLinuxGroup(Group.Name name, Account.Name packageName, String type)Adds aGroupto the system.intaddLinuxGroupAccount(Group.Name group, User.Name username)intaddLinuxServerAccount(User.Name username, String aoServer, PosixPath home)intaddLinuxServerGroup(Group.Name group, String aoServer)intaddMajordomoList(DomainName domain, String aoServer, String listName)Adds a newMajordomoListto aMajordomoServer.voidaddMajordomoServer(DomainName domain, String aoServer, User.Name linux_account, Group.Name linux_group, String version)Adds a newMajordomoServerto anDomain.intaddMySQLDatabase(Database.Name name, Server.Name mysqlServer, String aoServer, Account.Name packageName)Adds a newDatabaseto the system.intaddMySQLDBUser(Database.Name name, Server.Name mysqlServer, String aoServer, User.Name username, boolean canSelect, boolean canInsert, boolean canUpdate, boolean canDelete, boolean canCreate, boolean canDrop, boolean canReference, boolean canIndex, boolean canAlter, boolean canCreateTempTable, boolean canLockTables, boolean canCreateView, boolean canShowView, boolean canCreateRoutine, boolean canAlterRoutine, boolean canExecute, boolean canEvent, boolean canTrigger)Grants aUserServerpermission to access aDatabase.intaddMySQLServerUser(User.Name username, Server.Name mysqlServer, String aoServer, String host)voidaddMySQLUser(User.Name username)Adds aUserto the system.intaddNetBind(String server, Account.Name packageName, InetAddress ipAddress, String net_device, Port port, String appProtocol, boolean monitoringEnabled, Set<FirewallZone.Name> firewalldZoneNames)Adds a network bind to the system.intaddNoticeLog(Account.Name accounting, String billingContact, Email emailAddress, String type, int transid)Whenever a credit card transaction fails, or when an account has not been paid for over month, the billing contact for theAccountis notified.intaddPackage(Account.Name packageName, Account.Name accounting, int packageDefinition)intaddPostgresDatabase(Database.Name name, Server.Name postgres_server, String aoServer, User.Name datdba, String encoding, boolean enablePostgis)Adds a newDatabaseto the system.intaddPostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer)voidaddPostgresUser(User.Name username)Adds aUserto the system.intaddProfile(Account.Name business, String name, boolean isPrivate, String phone, String fax, String address1, String address2, String city, String state, String country, String zip, boolean sendInvoice, String billingContact, Set<Email> billingEmail, String billingEmailFormat, String technicalContact, Set<Email> technicalEmail, String technicalEmailFormat)intaddSpamEmailMessage(int email_relay, String message)Adds aSpamMessage.intaddTransaction(int timeType, Timestamp time, Account.Name account, Account.Name sourceAccount, User.Name administrator, String type, String description, int quantity, Money rate, String paymentType, String paymentInfo, String processor, byte payment_confirmed)Adds a newTransactionto aAccount.voidaddUsername(Account.Name packageName, User.Name username)intareLinuxAccountPasswordsSet(User.Name username)Determines if aUsercurrently has passwords set.intareMySQLUserPasswordsSet(User.Name username)Determines if aUsercurrently has passwords set.intarePostgresUserPasswordsSet(User.Name username)Determines if aUsercurrently has passwords set.intareUsernamePasswordsSet(User.Name username)Determines if aUsercurrently has passwords set.voidcancelAccount(Account.Name accounting, String reason)Cancels anAccount.static List<PasswordChecker.Result>checkAdministratorPassword(User.Name username, String password)Checks the strength of a password that will be used for aAdministrator.voidcheckDNSZone(String zone)Checks the format of aZone.voidcheckEmailListPath(String aoServer, PosixPath path)Checks the format of an email list path.List<PasswordChecker.Result>checkLinuxAccountPassword(User.Name username, String password)Checks the strength of a password that will be used for aUserorUserServer.static voidcheckMajordomoListName(String listName)Checks the format of a Majordomo list name.static List<PasswordChecker.Result>checkMySQLPassword(User.Name username, String password)Checks the strength of a password that will be used for aUserServer.static List<PasswordChecker.Result>checkPostgresPassword(User.Name username, String password)Checks the strength of a password that will be used for aUserServer.static voidcheckSharedTomcatName(String tomcatName)Checks the format of anSharedTomcatname.static voidcheckSiteName(String siteName)Checks the format of anSitename.List<Certificate.Check>checkSslCertificate(String aoServer, String keyFileOrCertbotName, boolean allowCached)List<PasswordChecker.Result>checkUsernamePassword(User.Name username, String password)Checks the strength of a password that will be used for aUser.booleancompareLinuxServerAccountPassword(User.Name username, String aoServer, String password)Checks if a password matches aUserServer.longcopyHomeDirectory(User.Name username, String from_ao_server, String to_ao_server)Copies the contents of user's home directory from one server to another.voidcopyLinuxServerAccountPassword(User.Name from_username, String from_ao_server, User.Name to_username, String to_ao_server)Copies the password from oneUserServerto another.StringcreateVirtualServer(String virtualServer)static Stringcrypt(String password, String salt)Deprecated.Please useHashedPasswordinstead.voiddeclineCreditCard(int pkey, String reason)Disables aCreditCard.StringdestroyVirtualServer(String virtualServer)intdisableAccount(Account.Name accounting, String disableReason)Disables a business, recursively disabling all of its enabled child components.intdisableAdministrator(User.Name username, String disableReason)Disables aAdministrator.intdisableCvsRepository(int pkey, String disableReason)Disables aCvsRepository.intdisableEmailList(PosixPath path, String aoServer, String disableReason)Disables anList.intdisableEmailPipe(int pkey, String disableReason)Disables anPipe.intdisableEmailSmtpRelay(int pkey, String disableReason)Disables aSmtpRelay.intdisableHttpdSharedTomcat(String name, String aoServer, String disableReason)Disables aSharedTomcat.intdisableHttpdSite(String name, String aoServer, String disableReason)Disables aSite.intdisableHttpdSiteBind(int pkey, String disableReason)Disables aVirtualHost.intdisableLinuxAccount(User.Name username, String disableReason)Disables aUser.intdisableLinuxServerAccount(User.Name username, String aoServer, String disableReason)Disables aUserServer.intdisableMySQLServerUser(User.Name username, Server.Name mysqlServer, String aoServer, String disableReason)Disables aUserServer.intdisableMySQLUser(User.Name username, String disableReason)Disables aUser.intdisablePackage(Account.Name name, String disableReason)Disables a package, recursively disabling all of its enabled child components.intdisablePostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer, String disableReason)Disables aUserServer.intdisablePostgresUser(User.Name username, String disableReason)Disables aUser.intdisableUsername(User.Name username, String disableReason)Disables aUserand all uses of the username.voiddumpMySQLDatabase(Database.Name name, Server.Name mysqlServer, String aoServer, boolean gzip, StreamHandler streamHandler)Dumps the contents of aDatabaseto anOutputStream, optionally gzipped.voiddumpMySQLDatabase(Database.Name name, Server.Name mysqlServer, String aoServer, Writer out)voiddumpPostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer, boolean gzip, StreamHandler streamHandler)Dumps the contents of aDatabaseto anOutputStream, optionally gzipped.voiddumpPostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer, Writer out)voidenableAccount(Account.Name accounting)Enables a business, recursively enabling all of its disabled child components.voidenableAdministrator(User.Name username)Enables anAdministrator.voidenableCvsRepository(int pkey)Enables aCvsRepository.voidenableEmailList(PosixPath path, String aoServer)Enables anList.voidenableEmailPipe(int pkey)Enables anPipe.voidenableEmailSmtpRelay(int pkey)Enables aSmtpRelay.voidenableHttpdSharedTomcat(String name, String aoServer)Enables aSharedTomcat.voidenableHttpdSite(String name, String aoServer)Enables aSite.voidenableHttpdSiteBind(int pkey)Enables aVirtualHost.voidenableLinuxAccount(User.Name username)Enables aUser.voidenableLinuxServerAccount(User.Name username, String aoServer)Enables aUserServer.voidenableMySQLServerUser(User.Name username, Server.Name mysqlServer, String aoServer)Enables aUserServer.voidenableMySQLUser(User.Name username)Enables aUser.voidenablePackage(Account.Name name)Enables a package, recursively enabling all of its disabled child components.voidenablePostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer)Enables aUserServer.voidenablePostgresUser(User.Name username)Enables aUser.voidenableUsername(User.Name username)Enables aUserand all uses of the username.Account.NamegenerateAccountingCode(Account.Name accountingTemplate)Generates a unique accounting code that may be used to create a newAccount.Database.NamegenerateMySQLDatabaseName(String template_base, String template_added)Generates a unique MySQL database name.Account.NamegeneratePackageName(Account.Name template)Generates a uniquePackagename.StringgeneratePassword()Generates a random, valid password.Database.NamegeneratePostgresDatabaseName(String template_base, String template_added)Generates a unique PostgreSQL database name.StringgenerateSharedTomcatName(String template)Generates a uniqueSharedTomcatname.StringgenerateSiteName(String template)Generates a uniqueSitename.StringgetAutoresponderContent(User.Name username, String aoServer)Gets the autoresponder content.voidgetAWStatsFile(String siteName, String aoServer, String path, String queryString, OutputStream out)Gets the contents of an AWStats file.longgetBackupPartitionTotalSize(String aoServer, String path)Gets the total size of aBackupPartition.longgetBackupPartitionUsedSize(String aoServer, String path)Gets the used size of aBackupPartition.AOServConnectorgetConnector()Gets theAOServConnectorused for communication with the server.StringgetCronTable(User.Name username, String aoServer)Gets a user's cron table on one server.StringgetEmailListAddressList(PosixPath path, String aoServer)Gets the list of email addresses that anListwill be forwarded to.FileReplication.ActivitygetFailoverFileReplicationActivity(String fromServer, String toServer, String path)Gets the last reported activity for aFileReplication.intgetHttpdServerConcurrency(String aoServer, String name)long[]getImapFolderSizes(User.Name username, String aoServer, String[] folderNames)Gets the IMAP folder sizes for an inbox.InboxAttributesgetInboxAttributes(User.Name username, String aoServer)Gets the attributes of an inbox.StringgetMajordomoInfoFile(DomainName domain, String aoServer, String listName)Gets the info file for aMajordomoList.StringgetMajordomoIntroFile(DomainName domain, String aoServer, String listName)Gets the intro file for aMajordomoList.voidgetMrtgFile(String aoServer, String filename, OutputStream out)Gets the contents of a MRTG file.StringgetPrimaryVirtualServer(String virtualServer)Account.NamegetRootAccount()StringgetSecondaryVirtualServer(String virtualServer)StringgetUpsStatus(String aoServer)Gets the current status of the UPS.intgetVirtualServerStatus(String virtualServer)voidinvalidate(int tableID, String server)Invalidates a table, causing all caches of the table to be removed and all configurations based on the table to be reevaluated.booleanisAccountingAvailable(Account.Name accounting)Determines if an accounting code is available.booleanisAdministratorPasswordSet(User.Name username)Determines if aAdministratorcurrently has a password set.booleanisDNSZoneAvailable(String zone)Determines if aZoneis available.booleanisEmailDomainAvailable(DomainName domain, String aoServer)Determines if aDomainis available.booleanisIPAddressUsed(InetAddress ipAddress, String server, String net_device)Determines if anIpAddressis currently being used.booleanisLinuxGroupNameAvailable(Group.Name groupname)Determines if a groupname is available.booleanisLinuxServerAccountPasswordSet(User.Name username, String aoServer)Determines if aUserServercurrently has a password set.intisLinuxServerAccountProcmailManual(User.Name username, String aoServer)Determines if aUserServeris currently in manual procmail mode.booleanisMySQLDatabaseNameAvailable(Database.Name name, Server.Name mysqlServer, String aoServer)booleanisMySQLServerNameAvailable(Server.Name name, String aoServer)booleanisMySQLServerUserPasswordSet(User.Name username, Server.Name mysqlServer, String aoServer)Determines if aUserServercurrently has a password set.booleanisPackageNameAvailable(Account.Name packageName)Determines if aPackagename is available.booleanisPostgresDatabaseNameAvailable(Database.Name name, Server.Name postgresServer, String aoServer)booleanisPostgresServerNameAvailable(Server.Name name, String aoServer)booleanisPostgresServerUserPasswordSet(User.Name username, Server.Name postgresServer, String aoServer)Determines if aUserServercurrently has a password set.booleanisSharedTomcatNameAvailable(String name)Determines if a name is available for use as aSharedTomcat.booleanisSiteNameAvailable(String siteName)Determines if a site name is available.booleanisUsernameAvailable(User.Name username)Determines if aUseris available.voidmoveAccount(Account.Name business, String from, String to, TerminalWriter out)voidmoveIPAddress(InetAddress ip_address, String from_server, String from_net_device, String to_server)StringpauseVirtualServer(String virtualServer)intping()Times the latency of the communication with the server.voidprintZoneFile(String zone, PrintWriter out)Prints the contents of aZoneas used by thenamedprocess.StringrebootVirtualServer(String virtualServer)voidrefreshEmailSmtpRelay(int pkey, long minDuration)Refreshes the time window for SMTP server access by resetting the expiration to 24 hours from the current time.voidremoveAccountHost(Account.Name accounting, String server)voidremoveAdministrator(User.Name username)Removes anAdministratorfrom the system.voidremoveBlackholeEmailAddress(String address, DomainName domain, String aoServer)Removes aBlackholeAddressfrom the system.voidremoveCreditCard(int pkey)Removes aCreditCard.voidremoveCvsRepository(String aoServer, PosixPath path)Removes aCvsRepository.voidremoveDNSRecord(int pkey)Removes one record from aZone.voidremoveDNSRecord(String zone, String domain, String type, String destination)voidremoveDNSZone(String zone)Completely removes aZonefrom the servers.voidremoveEmailAddress(String address, DomainName domain, String aoServer)Removes anAddressfrom the system.voidremoveEmailDomain(DomainName domain, String aoServer)voidremoveEmailForwarding(String address, DomainName domain, String aoServer, Email destination)Removes anForwardingfrom the system.voidremoveEmailList(PosixPath path, String aoServer)Removes anListfrom the system.voidremoveEmailListAddress(String address, DomainName domain, PosixPath path, String aoServer)Removes anListAddressfrom the system.voidremoveEmailPipe(int pkey)Removes anPipefrom the system.voidremoveEmailPipeAddress(String address, DomainName domain, int pipe)Removes anPipeAddressfrom the system.voidremoveEmailSmtpRelay(int pkey)Removes anSmtpRelayfrom the system, revoking access to the SMTP server from one IP address.voidremoveFileBackupSetting(int replication, String path)Removes aFileReplicationSettingfrom the system.voidremoveFTPGuestUser(User.Name username)voidremoveHttpdSharedTomcat(String name, String aoServer)Completely removes aSharedTomcatfrom the servers.voidremoveHttpdSite(String name, String aoServer)Completely removes aSitefrom the servers.voidremoveHttpdSiteURL(int pkey)Removes aVirtualHostNamefrom the servers.voidremoveHttpdTomcatContext(int pkey)Removes aContextfrom the servers.voidremoveHttpdTomcatDataSource(int pkey)Removes aContextDataSourcefrom aContext.voidremoveHttpdTomcatParameter(int pkey)Removes aContextParameterfrom aContext.voidremoveHttpdTomcatSiteJkMount(String siteName, String aoServer, String path)voidremoveLinuxAccAddress(String address, DomainName domain, String aoServer, User.Name username)Removes aInboxAddressfrom the system.voidremoveLinuxAccount(User.Name username)Removes aUserand all related data from the system.voidremoveLinuxGroup(Group.Name name)Removes aGroupand all related data from the system.voidremoveLinuxGroupAccount(Group.Name group, User.Name username)voidremoveLinuxServerAccount(User.Name username, String aoServer)Removes aUserServerfrom aServer.voidremoveLinuxServerGroup(Group.Name group, String aoServer)Removes aGroupServerfrom aServer.voidremoveMajordomoServer(DomainName domain, String aoServer)Removes aMajordomoServerand all of itsMajordomoLists.voidremoveMySQLDatabase(Database.Name name, Server.Name mysqlServer, String aoServer)Removes aDatabasefrom the system.voidremoveMySQLDBUser(Database.Name name, Server.Name mysqlServer, String aoServer, User.Name username)Removes aDatabaseUserfrom the system.voidremoveMySQLServerUser(User.Name username, Server.Name mysqlServer, String aoServer)Removes aUserServerfrom a the system..voidremoveMySQLUser(User.Name username)Removes aUserfrom a the system.voidremoveNetBind(int pkey)Removes aBindfrom a the system.voidremovePostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer)Removes aDatabasefrom the system.voidremovePostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer)Removes aUserServerfrom a the system..voidremovePostgresUser(User.Name username)Removes aUserfrom a the system..voidremoveUsername(User.Name username)Removes aUserfrom the system.voidrestartApache(String aoServer)Restarts the Apache web server.voidrestartCron(String aoServer)Restarts the cron doggie.voidrestartMySQL(Server.Name mysqlServer, String aoServer)Restarts the MySQL database server.voidrestartPostgreSQL(Server.Name postgresServer, String aoServer)Restarts the PostgreSQL database server.voidrestartXfs(String aoServer)Restarts the X Font Server.voidrestartXvfb(String aoServer)Restarts the X Virtual Frame Buffer.voidsetAccountAccounting(Account.Name oldAccounting, Account.Name newAccounting)Sets the accounting code for the business.voidsetAdministratorPassword(User.Name username, String password)Sets the password for anAdministrator.voidsetAdministratorProfile(User.Name username, String name, String title, Date birthday, boolean isPrivate, String workPhone, String homePhone, String cellPhone, String fax, Email email, String address1, String address2, String city, String state, String country, String zip)Sets the profile of anAdministrator, which is all of their contact information and other details.voidsetAutoresponder(User.Name username, String aoServer, String address, DomainName domain, String subject, String content, boolean enabled)Sets the autoresponder behavior for a Linux server account.voidsetCronTable(User.Name username, String aoServer, String cronTable)Sets a user's cron table on one server.voidsetCvsRepositoryMode(String aoServer, PosixPath path, long mode)Sets the permissions for a CVS repository directory.voidsetDefaultAccountHost(Account.Name accounting, String server)voidsetDNSZoneTTL(String zone, int ttl)Completely removes aZonefrom the servers.voidsetEmailListAddressList(PosixPath path, String aoServer, String addresses)Sets the list of addresses that anListwill forward messages to.voidsetFileBackupSetting(int replication, String path, boolean backupEnabled, boolean required)Sets the settings contained by oneFileReplicationSettingvoidsetHttpdSharedTomcatAutoDeploy(String name, String aoServer, boolean autoDeploy)Sets theautoDeploysetting for aSharedTomcatvoidsetHttpdSharedTomcatIsManual(String name, String aoServer, boolean isManual)Sets theis_manualflag for aSharedTomcatvoidsetHttpdSharedTomcatMaxPostSize(String name, String aoServer, int maxPostSize)Sets themaxPostSizefor aSharedTomcatvoidsetHttpdSharedTomcatTomcatAuthentication(String name, String aoServer, boolean autoDeploy)Sets thetomcatAuthenticationsetting for aSharedTomcatvoidsetHttpdSharedTomcatUnpackWARs(String name, String aoServer, boolean unpackWARs)Sets theunpackWARssetting for aSharedTomcatvoidsetHttpdSharedTomcatVersion(String name, String aoServer, String version)Sets the Tomcat version for aSharedTomcatvoidsetHttpdSiteAuthenticatedLocationAttributes(String siteName, String aoServer, String path, boolean isRegularExpression, String authName, PosixPath authGroupFile, PosixPath authUserFile, String require, String handler)Updates aLocation.voidsetHttpdSiteBindIsManual(int pkey, boolean isManual)Sets theis_manualflag for aVirtualHostvoidsetHttpdSiteBindRedirectToPrimaryHostname(int pkey, boolean redirectToPrimaryHostname)Sets theredirect_to_primary_hostnameflag for aVirtualHostvoidsetHttpdSiteBlockCoreDumps(String siteName, String aoServer, boolean blockCoreDumps)Sets theblock_core_dumpsflag for aSitevoidsetHttpdSiteBlockEditorBackups(String siteName, String aoServer, boolean blockEditorBackups)Sets theblock_editor_backupsflag for aSitevoidsetHttpdSiteBlockScm(String siteName, String aoServer, boolean blockScm)Sets theblock_scmflag for aSitevoidsetHttpdSiteBlockTraceTrack(String siteName, String aoServer, boolean blockTraceTrack)Sets theblock_trace_trackflag for aSitevoidsetHttpdSiteEnableAnonymousFtp(String siteName, String aoServer, boolean enableAnonymousFtp)Sets theenable_anonymous_ftpflag for aSitevoidsetHttpdSiteEnableCgi(String siteName, String aoServer, boolean enableCgi)Sets theenable_cgiflag for aSitevoidsetHttpdSiteEnableFollowSymlinks(String siteName, String aoServer, boolean enableFollowSymlinks)Sets theenable_follow_symlinksflag for aSitevoidsetHttpdSiteEnableHtaccess(String siteName, String aoServer, boolean enableHtaccess)Sets theenable_htaccessflag for aSitevoidsetHttpdSiteEnableIndexes(String siteName, String aoServer, boolean enableIndexes)Sets theenable_indexesflag for aSitevoidsetHttpdSiteEnableSsi(String siteName, String aoServer, boolean enableSsi)Sets theenable_ssiflag for aSitevoidsetHttpdSiteIsManual(String siteName, String aoServer, boolean isManual)Sets theis_manualflag for aSitevoidsetHttpdSitePhpVersion(String siteName, String aoServer, String phpVersion)Sets the PHP version for aSitevoidsetHttpdSiteServerAdmin(String siteName, String aoServer, Email emailAddress)Sets the administrative email address for aSite.voidsetHttpdTomcatContextAttributes(String siteName, String aoServer, String oldPath, String className, boolean cookies, boolean crossContext, PosixPath docBase, boolean override, String newPath, boolean privileged, boolean reloadable, boolean useNaming, String wrapperClass, int debug, PosixPath workDir, boolean serverXmlConfigured)Sets the attributes for aContext.voidsetHttpdTomcatSiteBlockWebinf(String siteName, String aoServer, boolean blockWebinf)Sets theblock_webinfflag for aSitevoidsetHttpdTomcatStdSiteAutoDeploy(String siteName, String aoServer, boolean autoDeploy)Sets theautoDeploysetting for aPrivateTomcatSitevoidsetHttpdTomcatStdSiteMaxPostSize(String siteName, String aoServer, int maxPostSize)Sets themaxPostSizefor aPrivateTomcatSitevoidsetHttpdTomcatStdSiteTomcatAuthentication(String siteName, String aoServer, boolean tomcatAuthentication)Sets thetomcatAuthenticationsetting for aPrivateTomcatSitevoidsetHttpdTomcatStdSiteUnpackWARs(String siteName, String aoServer, boolean unpackWARs)Sets theunpackWARssetting for aPrivateTomcatSitevoidsetHttpdTomcatStdSiteVersion(String siteName, String aoServer, String version)Sets the Tomcat version for aPrivateTomcatSitevoidsetIPAddressDHCPAddress(int ipAddress, InetAddress dhcpAddress)Sets the IP address of a DHCP-enabledIpAddress.voidsetIPAddressHostname(InetAddress ipAddress, String server, String net_device, DomainName hostname)Sets the hostname of anIpAddress.voidsetIPAddressMonitoringEnabled(InetAddress ipAddress, String server, String net_device, boolean enabled)Sets the monitoring status of anIpAddress.voidsetIPAddressPackage(InetAddress ipAddress, String server, String net_device, Account.Name newPackage)Sets the ownership of anIpAddress.voidsetLinuxAccountHomePhone(User.Name username, User.Gecos phone)Sets the home phone number associated with aUser.voidsetLinuxAccountName(User.Name username, User.Gecos name)Sets the full name associated with aUser.voidsetLinuxAccountOfficeLocation(User.Name username, User.Gecos location)Sets the office location associated with aUser.voidsetLinuxAccountOfficePhone(User.Name username, User.Gecos phone)Sets the office phone number associated with aUser.voidsetLinuxAccountPassword(User.Name username, String password)Sets the password for aUserby setting the password for each one of itsUserServers.voidsetLinuxAccountShell(User.Name username, PosixPath path)Sets the shell used by aUser.voidsetLinuxServerAccountJunkEmailRetention(User.Name username, String aoServer, int days)Sets the number of days junk email is kept.voidsetLinuxServerAccountPassword(User.Name username, String aoServer, String password)Sets the password for aUserServer.voidsetLinuxServerAccountSpamAssassinIntegrationMode(User.Name username, String aoServer, String mode)Sets the SpamAssassin integration mode for an email account.voidsetLinuxServerAccountSpamAssassinRequiredScore(User.Name username, String aoServer, float required_score)Sets the SpamAssassin required score for an email account.voidsetLinuxServerAccountTrashEmailRetention(User.Name username, String aoServer, int days)Sets the number of days trash email is kept.voidsetLinuxServerAccountUseInbox(User.Name username, String aoServer, boolean useInbox)Sets theuse_inboxflag on aUserServer.voidsetMajordomoInfoFile(DomainName domain, String aoServer, String listName, String file)Sets the info file for aMajordomoList.voidsetMajordomoIntroFile(DomainName domain, String aoServer, String listName, String file)Sets the intro file for aMajordomoList.voidsetMySQLServerUserPassword(User.Name username, Server.Name mysqlServer, String aoServer, String password)Sets the password for aUserServer.voidsetMySQLUserPassword(User.Name username, String password)Sets the password for aUserby settings the password for all of itsUserServers.voidsetNetBindFirewalldZones(int pkey, Set<FirewallZone.Name> firewalldZones)Sets the firewalld zones enable for aBind.voidsetNetBindMonitoringEnabled(int pkey, boolean enabled)Sets the monitoring status for aBindvoidsetPostgresServerUserPassword(User.Name username, Server.Name postgresServer, String aoServer, String password)Sets the password for aUserServer.voidsetPostgresUserPassword(User.Name username, String password)Sets the password for aUserby settings the password for all of itsUserServers.voidsetPrimaryHttpdSiteURL(int pkey)Sets the primary URL for aVirtualHost.voidsetPrimaryLinuxGroupAccount(Group.Name group_name, User.Name username)Sets the primary group for aUser.voidsetUsernamePassword(User.Name username, String password)Sets the password for aUser.StringshutdownVirtualServer(String virtualServer)voidstartApache(String aoServer)Starts the Apache web server if it is not already running.voidstartCron(String aoServer)Starts the cron process if it is not already running.voidstartDistro(String aoServer, boolean includeUser)Starts the distribution on a server and/or changes the setting of the user file scanning.StringstartJVM(String siteName, String aoServer)Starts and/or restarts the Tomcat or JBoss Java VM for the provided site.voidstartMySQL(Server.Name mysqlServer, String aoServer)Starts the MySQL database server if it is not already running.voidstartPostgreSQL(Server.Name postgresServer, String aoServer)Starts the PostgreSQL database server if it is not already running.voidstartXfs(String aoServer)Starts the X Font Server if it is not already running.voidstartXvfb(String aoServer)Starts the X Virtual Frame Buffer if it is not already running.voidstopApache(String aoServer)Stops the Apache web server if it is running.voidstopCron(String aoServer)Stops the cron daemon if it is running.StringstopJVM(String siteName, String aoServer)Stops the Tomcat or JBoss Java VM for the provided site.voidstopMySQL(Server.Name mysqlServer, String aoServer)Stops the MySQL database server if it is running.voidstopPostgreSQL(Server.Name postgresServer, String aoServer)Stops the PostgreSQL database server if it is running.voidstopXfs(String aoServer)Stops the X Font Server if it is running.voidstopXvfb(String aoServer)Stops the X Virtual Frame Buffer if it is running.StringunpauseVirtualServer(String virtualServer)voidupdateHttpdTomcatDataSource(String siteName, String aoServer, String path, String oldName, String newName, String driverClassName, String url, String username, String password, int maxActive, int maxIdle, int maxWait, String validationQuery)Updates aContextdata source.voidupdateHttpdTomcatParameter(String siteName, String aoServer, String path, String oldName, String newName, String value, boolean override, String description)Updates aContextparameter.longverifyVirtualDisk(String virtualServer, String device)Begins a verification of the redundancy of the virtual disk.voidwaitForHttpdSiteRebuild(String aoServer)Waits for any processing or pending updates of the Apache configurations to complete.voidwaitForLinuxAccountRebuild(String aoServer)Waits for any processing or pending updates of the Linux account configurations to complete.voidwaitForMySQLDatabaseRebuild(String aoServer)Waits for any processing or pending updates of the MySQL configurations to complete.voidwaitForMySQLDBUserRebuild(String aoServer)Waits for any processing or pending updates of the MySQL configurations to complete.voidwaitForMySQLServerRebuild(String aoServer)Waits for any processing or pending updates of the MySQL server configurations to complete.voidwaitForMySQLUserRebuild(String aoServer)Waits for any processing or pending updates of the MySQL configurations to complete.voidwaitForPostgresDatabaseRebuild(String aoServer)Waits for any processing or pending updates of the PostgreSQL configurations to complete.voidwaitForPostgresServerRebuild(String aoServer)Waits for any processing or pending updates of the PostgreSQL server configurations to complete.voidwaitForPostgresUserRebuild(String aoServer)Waits for any processing or pending updates of the PostgreSQL configurations to complete.
-
-
-
Constructor Detail
-
SimpleAOClient
public SimpleAOClient(AOServConnector connector)
Creates a newSimpleAOClientusing the providedAOServConnector.- Parameters:
connector- theAOServConnectorthat will be used for communication with the server.- See Also:
AOServConnector.getConnector(),TCPConnector.getTCPConnector(com.aoapps.net.HostAddress, com.aoapps.net.InetAddress, com.aoapps.net.Port, com.aoindustries.aoserv.client.account.User.Name, com.aoindustries.aoserv.client.account.User.Name, java.lang.String, com.aoapps.net.DomainName, int, long),SSLConnector.getSSLConnector(com.aoapps.net.HostAddress, com.aoapps.net.InetAddress, com.aoapps.net.Port, com.aoindustries.aoserv.client.account.User.Name, com.aoindustries.aoserv.client.account.User.Name, java.lang.String, com.aoapps.net.DomainName, int, long, java.lang.String, java.lang.String)
-
-
Method Detail
-
addBackupHost
public int addBackupHost(String hostname, String farm, Account.Name owner, String description, int backup_hour, String os_type, String os_version, String architecture, User.Name username, String password, String contact_phone, String contact_email) throws IllegalArgumentException, IOException, SQLException
Adds a new backupHost.- Parameters:
hostname- the desired hostname for the serverfarm- the farm the server is part ofowner- the package the server belongs todescription- a description of the serverbackup_hour- the hour the backup will be run if used in daemon mode, expressed in server-local timeos_type- the type of operating system on the serveros_version- the version of operating system on the serverarchitecture- the type of CPU(s) on the serverusername- the desired backup account usernamepassword- the desired backup account passwordcontact_phone- the phone number to call for anything related to this servercontact_email- the email address to contact for anything related to this server- Throws:
IOException- if unable to communicate with the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerFarm,Account,Architecture,OperatingSystem, orOperatingSystemVersion- See Also:
Host,HostTable.addBackupHost(java.lang.String, com.aoindustries.aoserv.client.infrastructure.ServerFarm, com.aoindustries.aoserv.client.billing.Package, java.lang.String, int, com.aoindustries.aoserv.client.distribution.OperatingSystemVersion, com.aoindustries.aoserv.client.account.User.Name, java.lang.String, java.lang.String, java.lang.String)
-
addAccount
public void addAccount(Account.Name accounting, String contractVersion, String defaultServer, Account.Name parent, boolean can_add_backup_servers, boolean can_add_businesses, boolean can_see_prices, boolean billParent) throws IllegalArgumentException, SQLException, IOException
Adds a newAccountto the system.- Parameters:
accounting- the accounting code of the new businesscontractVersion- the version number of the digitally signed contractdefaultServer- the hostname of the default serverparent- the parent business of the new businesscan_add_backup_servers- allows backup servers to be added to the systemcan_add_businesses- iftrue, the new business is allowed to add additional businessesbillParent- iftruethe parent account will be billed instead of this account- Throws:
IOException- if unable to communicate with the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find the server or parent business- See Also:
Account,Host.addAccount(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, com.aoindustries.aoserv.client.account.Account, boolean, boolean, boolean, boolean)
-
addAdministrator
public void addAdministrator(User.Name username, String name, String title, Date birthday, boolean isPrivate, String workPhone, String homePhone, String cellPhone, String fax, Email email, String address1, String address2, String city, String state, String country, String zip, boolean enableEmailSupport) throws IllegalArgumentException, IOException, SQLException
Adds a newAdministratorto anAccount.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theUser- See Also:
Administrator,Account,User.addAdministrator(java.lang.String, java.lang.String, java.sql.Date, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.aoapps.net.Email, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
-
addProfile
public int addProfile(Account.Name business, String name, boolean isPrivate, String phone, String fax, String address1, String address2, String city, String state, String country, String zip, boolean sendInvoice, String billingContact, Set<Email> billingEmail, String billingEmailFormat, String technicalContact, Set<Email> technicalEmail, String technicalEmailFormat) throws IllegalArgumentException, IOException, SQLException
Adds a newProfileto anAccount. The profile is a complete set of contact information about a business. New profiles can be added, and they are used as the contact information, but old profiles are still available.- Throws:
IllegalArgumentException- if unable to find theAccountIOExceptionSQLException- See Also:
Profile,Account,Account.addProfile(java.lang.String, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String, java.util.Set<com.aoapps.net.Email>, com.aoindustries.aoserv.client.account.Profile.EmailFormat, java.lang.String, java.util.Set<com.aoapps.net.Email>, com.aoindustries.aoserv.client.account.Profile.EmailFormat)
-
addAccountHost
public int addAccountHost(Account.Name accounting, String host) throws IllegalArgumentException, SQLException, IOException
- Parameters:
accounting- the accounting code of the businesshost- the hostname of the server- Returns:
- the pkey of the new
AccountHost - Throws:
IOException- if unable to communicate with the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find the business or server- See Also:
AccountHost,Account.addAccountHost(com.aoindustries.aoserv.client.net.Host)
-
addCvsRepository
public int addCvsRepository(String aoServer, PosixPath path, User.Name username, Group.Name group, long mode) throws IllegalArgumentException, IOException, SQLException
Adds a newCvsRepositoryto aServer.- Parameters:
aoServer- the hostname of the serverpath- the full path of the repositoryusername- the name of the shell account that owns the directorygroup- the group that owns the directorymode- the permissions of the directory- Returns:
- the
idof the newCvsRepository - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,UserServer, orGroupServer- See Also:
Server.addCvsRepository(com.aoindustries.aoserv.client.linux.PosixPath, com.aoindustries.aoserv.client.linux.UserServer, com.aoindustries.aoserv.client.linux.GroupServer, long)
-
addDNSRecord
public int addDNSRecord(String zone, String domain, String type, int priority, int weight, int port, String destination, int ttl) throws IllegalArgumentException, IOException, SQLException
- Parameters:
zone- the zone, in thename.topleveldomain.format. Please note the trailing period (.)domain- the part of the name before the zone or@for the zone itself. For example, the domain for the hostname ofwww.aoindustries.com.in theaoindustries.com.zone iswww.type- theRecordTypepriority- if aRecordType.MXorRecordType.SRVtype, then the value is the priority of the record, otherwise it isRecord.NO_PRIORITY.weight- if aRecordType.SRVtype, then the value is the weight of the record, otherwise it isRecord.NO_WEIGHT.port- if aRecordType.SRVtype, then the value is the port of the record, otherwise it isRecord.NO_PORT.- Returns:
- the
idof the newRecord - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the priority is provided for a non-RecordType.MXand non-RecordType.SRVrecord, the priority is not provided for aRecordType.MXorRecordType.SRVrecord, if the weight is provided for a non-RecordType.SRVrecord, the weight is not provided for aRecordType.SRVrecord, if the port is provided for a non-RecordType.SRVrecord, the port is not provided for aRecordType.SRVrecord, the destination is not the correct format for theRecordType, or unable to find theZoneorRecordType- See Also:
Zone.addDNSRecord(java.lang.String, com.aoindustries.aoserv.client.dns.RecordType, int, int, int, java.lang.String, int),Record,addDNSZone(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, com.aoapps.net.InetAddress, int),RecordType.checkDestination(java.lang.String)
-
addDNSZone
public void addDNSZone(Account.Name packageName, String zone, InetAddress ip, int ttl) throws IllegalArgumentException, IOException, SQLException
Adds a newZoneto a system. AZoneis one unique domain in the name servers. It is always one host up from a top level domain. Inmydomain.com.comis the top level domain, which are defined byTopLevelDomains.- Parameters:
packageName- the name of thePackagethat owns this domainzone- the complete domain of the newZoneip- the IP address that will be used for the defaultRecords- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find thePackageor either parameter is not in the proper format.- See Also:
Package.addDNSZone(java.lang.String, com.aoapps.net.InetAddress, int),Zone,addDNSRecord(java.lang.String, java.lang.String, java.lang.String, int, int, int, java.lang.String, int),IpAddress,TopLevelDomain
-
addEmailForwarding
public int addEmailForwarding(String address, DomainName domain, String aoServer, Email destination) throws IllegalArgumentException, IOException, SQLException
Forwards email addressed to an address at aDomainto a different email address. The destination email address may be any email address, not just those in aDomain.- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@aoServer- the hostname of the server hosting the domaindestination- the completed email address of the final delivery address- Throws:
IOException- if unable to communicate with the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable find theDomain- See Also:
Address.addEmailForwarding(com.aoapps.net.Email),Domain
-
addEmailList
public int addEmailList(String aoServer, PosixPath path, User.Name username, Group.Name group) throws IllegalArgumentException, IOException, SQLException
Adds a newListto the system. When an email is sent to anList, it is immediately forwarded to all addresses contained in the list. The list may accept mail on any number of addresses and forward to any number of recipients.Even though the
Listmay receive email on any number of addresses, each address must be part of aDomainthat is hosted on the sameServeras theList. If email in a domain on anotherServeris required to be sent to this list, it must be forwarded from the otherServervia aForwarding.The list of destinations for the
Listis stored on theServerin a flat file of one address per line. This file may be either manipulated through the API or used directly on the filesystem.- Parameters:
aoServer- the hostname of the server the list is hosted onpath- the name of the file that stores the list- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find find theServer,UserServer, orGroupServer- See Also:
checkEmailListPath(java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),addEmailListAddress(java.lang.String, com.aoapps.net.DomainName, com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String),ListAddress,Domain,Forwarding,Host,UserServer,GroupServer
-
addEmailListAddress
public int addEmailListAddress(String address, DomainName domain, PosixPath path, String aoServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@path- the path of the listaoServer- the hostname of the server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomainorList- See Also:
addEmailList(java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name),List,Address,Domain
-
addEmailPipe
public int addEmailPipe(String aoServer, String command, Account.Name packageName) throws IllegalArgumentException, IOException, SQLException
Adds a newPipeto the system. When an email is sent to anPipe, a process is invoked with the email pipes into the process' standard input.- Parameters:
aoServer- the hostname of the server that the process exists oncommand- the full command line of the program to launchpackageName- the package that thisPipebelongs to- Returns:
- the pkey of the new pipe
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find find theServerorPackage- See Also:
addEmailPipeAddress(java.lang.String, com.aoapps.net.DomainName, int),Server.addEmailPipe(java.lang.String, com.aoindustries.aoserv.client.billing.Package)
-
addEmailPipeAddress
public int addEmailPipeAddress(String address, DomainName domain, int pkey) throws IllegalArgumentException, IOException, SQLException
Adds an address to the list of email addresses that will be piped to anPipe.- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@pkey- the pkey of theList- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomainorPipe- See Also:
addEmailPipe(java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name),Pipe,Address,Domain
-
addFileBackupSetting
public int addFileBackupSetting(int replication, String path, boolean backupEnabled, boolean required) throws IllegalArgumentException, IOException, SQLExceptionAdds aFileReplicationSettingto aFileReplication.- Parameters:
replication- the pkey of the FailoverFileReplicationpath- the path that is being configuredbackupEnabled- the enabled flag for the prefix- Returns:
- the pkey of the newly created
FileReplicationSetting - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theFileReplication, orPackage- See Also:
FileReplication.addFileBackupSetting(java.lang.String, boolean, boolean),FileReplicationSetting
-
addFTPGuestUser
public void addFTPGuestUser(User.Name username) throws IllegalArgumentException, IOException, SQLException
Flags aUseras being aGuestUser. Once flagged, FTP connections as that user will be limited to transfers in their home directory.- Parameters:
username- the username of theUser- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),User.addFTPGuestUser()
-
addHttpdJBossSite
public int addHttpdJBossSite(String aoServer, String siteName, Account.Name packageName, User.Name jvmUsername, Group.Name groupName, Email serverAdmin, boolean useApache, InetAddress ipAddress, String netDevice, DomainName primaryHttpHostname, DomainName[] altHttpHostnames, String jBossVersion) throws IllegalArgumentException, SQLException, IOException
Adds a newSiteto the system. AnSiteis anSitethat uses the Tomcat servlet engine and JBoss as an EJB container.- Parameters:
aoServer- the hostname of theServersiteName- the name of thePrivateTomcatSitepackageName- the name of thePackagejvmUsername- the username of theUserthat the Java VM will run asgroupName- the name of theGroupthat the web site will be owned byserverAdmin- the email address of the person who is responsible for the site content and reliabilityuseApache- instructs the system to host static content, shtml, CGI, and PHP using Apache, comes at the price of less request control through TomcatipAddress- theIpAddressthat the web site will bind to. In order for HTTP requests to succeed,Recordentries must point the hostnames of thisPrivateTomcatSiteto thisIpAddress. Ifnull, the system will assign a shared IP address.primaryHttpHostname- the primary hostname of thePrivateTomcatSitefor the HTTP protocolaltHttpHostnames- any number of alternate hostnames for the HTTP protocol ornullfor nonejBossVersion- the version number ofJBossto install in the site- Returns:
- the
idof the newPrivateTomcatSite - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find a referenced object or a parameter is not in the right format- See Also:
Site
-
addHttpdSharedTomcat
public int addHttpdSharedTomcat(String name, String aoServer, String version, User.Name linuxServerAccount, Group.Name linuxServerGroup) throws IllegalArgumentException, SQLException, IOException
Adds a newSharedTomcatto a server.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theUserServer, theGroupServer, or theServer- See Also:
SharedTomcat,UserServer,GroupServer,Host
-
addHttpdSiteURL
public int addHttpdSiteURL(int hsbPKey, DomainName hostname) throws IllegalArgumentException, IOException, SQLExceptionAdds a newVirtualHostNameto aVirtualHost.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theVirtualHost
-
addHttpdSiteAuthenticatedLocation
public int addHttpdSiteAuthenticatedLocation(String siteName, String aoServer, String path, boolean isRegularExpression, String authName, PosixPath authGroupFile, PosixPath authUserFile, String require, String handler) throws IllegalArgumentException, IOException, SQLException
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theSite
-
setHttpdSiteAuthenticatedLocationAttributes
public void setHttpdSiteAuthenticatedLocationAttributes(String siteName, String aoServer, String path, boolean isRegularExpression, String authName, PosixPath authGroupFile, PosixPath authUserFile, String require, String handler) throws IllegalArgumentException, IOException, SQLException
Updates aLocation.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theSite
-
addHttpdTomcatContext
public int addHttpdTomcatContext(String siteName, String aoServer, String className, boolean cookies, boolean crossContext, PosixPath docBase, boolean override, String path, boolean privileged, boolean reloadable, boolean useNaming, String wrapperClass, int debug, PosixPath workDir, boolean serverXmlConfigured) throws IllegalArgumentException, IOException, SQLException
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServer,Site, orSite
-
addHttpdTomcatDataSource
public int addHttpdTomcatDataSource(String siteName, String aoServer, String path, String name, String driverClassName, String url, String username, String password, int maxActive, int maxIdle, int maxWait, String validationQuery) throws IllegalArgumentException, IOException, SQLException
Adds a new data source to aContext.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServer,Site,SiteorContext.
-
addHttpdTomcatParameter
public int addHttpdTomcatParameter(String siteName, String aoServer, String path, String name, String value, boolean override, String description) throws IllegalArgumentException, IOException, SQLException
Adds a new parameter to aContext.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServer,Site,SiteorContext.
-
addHttpdTomcatSiteJkMount
public int addHttpdTomcatSiteJkMount(String siteName, String aoServer, String path, boolean mount) throws IllegalArgumentException, IOException, SQLException
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServer,Site, orSite- See Also:
Site.addJkMount(java.lang.String, boolean)
-
removeHttpdTomcatSiteJkMount
public void removeHttpdTomcatSiteJkMount(String siteName, String aoServer, String path) throws IllegalArgumentException, IOException, SQLException
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServer,Site, orSite- See Also:
JkMount.remove()
-
addHttpdTomcatSharedSite
public int addHttpdTomcatSharedSite(String aoServer, String siteName, Account.Name packageName, User.Name jvmUsername, Group.Name groupName, Email serverAdmin, boolean useApache, InetAddress ipAddress, String netDevice, DomainName primaryHttpHostname, DomainName[] altHttpHostnames, String sharedTomcatName) throws IllegalArgumentException, SQLException, IOException
Adds a newSharedTomcatSiteto the system. AnSharedTomcatSiteis anSitethat uses a shared Tomcat servlet engine in a virtual-hosting configuration. It hosts multiple sites per Java VM.- Parameters:
aoServer- the hostname of theServersiteName- the name of theSharedTomcatSitepackageName- the name of thePackagejvmUsername- the username of theUserthat the Java VM will run asgroupName- the name of theGroupthat the web site will be owned byserverAdmin- the email address of the person who is responsible for the site content and reliabilityuseApache- instructs the system to host static content, shtml, CGI, and PHP using Apache, comes at the price of less request control through TomcatipAddress- theIpAddressthat the web site will bind to. In order for HTTP requests to succeed,Recordentries must point the hostnames of thisSharedTomcatSiteto thisIpAddress. Ifnull, the system will assign a shared IP address.primaryHttpHostname- the primary hostname of theSharedTomcatSitefor the HTTP protocolaltHttpHostnames- any number of alternate hostnames for the HTTP protocol ornullfor nonesharedTomcatName- the shared Tomcat JVM under which this site runs- Returns:
- the
idof the newSharedTomcatSite - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find a referenced object or a parameter is not in the right format- See Also:
Server.addHttpdTomcatSharedSite(java.lang.String, com.aoindustries.aoserv.client.billing.Package, com.aoindustries.aoserv.client.linux.User, com.aoindustries.aoserv.client.linux.Group, com.aoapps.net.Email, boolean, com.aoindustries.aoserv.client.net.IpAddress, com.aoapps.net.DomainName, com.aoapps.net.DomainName[], java.lang.String),SharedTomcatSite,Site,Site
-
addHttpdTomcatStdSite
public int addHttpdTomcatStdSite(String aoServer, String siteName, Account.Name packageName, User.Name jvmUsername, Group.Name groupName, Email serverAdmin, boolean useApache, InetAddress ipAddress, String netDevice, DomainName primaryHttpHostname, DomainName[] altHttpHostnames, String tomcatVersion) throws IllegalArgumentException, SQLException, IOException
Adds a newPrivateTomcatSiteto the system. AnPrivateTomcatSiteis anSitethat contains a Tomcat servlet engine in the standard configuration. It only hosts one site per Java VM, but is arranged in the stock Tomcat structure and uses no special code.- Parameters:
aoServer- the hostname of theServersiteName- the name of thePrivateTomcatSitepackageName- the name of thePackagejvmUsername- the username of theUserthat the Java VM will run asgroupName- the name of theGroupthat the web site will be owned byserverAdmin- the email address of the person who is responsible for the site content and reliabilityuseApache- instructs the system to host static content, shtml, CGI, and PHP using Apache, comes at the price of less request control through TomcatipAddress- theIpAddressthat the web site will bind to. In order for HTTP requests to succeed,Recordentries must point the hostnames of thisPrivateTomcatSiteto thisIpAddress. Ifnull, the system will assign a shared IP address.primaryHttpHostname- the primary hostname of thePrivateTomcatSitefor the HTTP protocolaltHttpHostnames- any number of alternate hostnames for the HTTP protocol ornullfor nonetomcatVersion- the version number ofTomcatto install in the site- Returns:
- the
idof the newPrivateTomcatSite - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find a referenced object or a parameter is not in the right format- See Also:
Server.addHttpdTomcatStdSite(java.lang.String, com.aoindustries.aoserv.client.billing.Package, com.aoindustries.aoserv.client.linux.User, com.aoindustries.aoserv.client.linux.Group, com.aoapps.net.Email, boolean, com.aoindustries.aoserv.client.net.IpAddress, com.aoapps.net.DomainName, com.aoapps.net.DomainName[], com.aoindustries.aoserv.client.web.tomcat.Version),PrivateTomcatSite,Site,Site
-
addLinuxAccAddress
public int addLinuxAccAddress(String address, DomainName domain, String aoServer, User.Name username) throws IllegalArgumentException, IOException, SQLException
Adds anAddressto aUser. Not allUsers may be used as an email inbox. TheUserTypeof the account determines which accounts may store email. When email is allowed for the account, anAddressis associated with the account as aInboxAddress.- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@aoServer- the hostname of the server storing the email accountusername- the username of theUserto route the emails to- Returns:
- the pkey of the new LinuxAccAddress
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomainorUser- See Also:
UserServer.addEmailAddress(com.aoindustries.aoserv.client.email.Address),InboxAddress,addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),addEmailDomain(com.aoapps.net.DomainName, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name),Address
-
addLinuxAccount
public void addLinuxAccount(User.Name username, Group.Name primary_group, User.Gecos name, User.Gecos office_location, User.Gecos office_phone, User.Gecos home_phone, String type, PosixPath shell) throws IllegalArgumentException, IOException, SQLException
Adds a newUserthe system. AUserdoes not grant access to anyservers,addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)must be used after theUserhas been created.- Parameters:
username- the username of the newUserprimary_group- the primary group of the new accountname- the account's full nameoffice_location- optional office location available via the Unixfingercommandoffice_phone- optional phone number available via the Unixfingercommandhome_phone- optional home phone number available vie the Unixfingercommandtype- theUserTypeshell- the loginShell- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the name is not a valid format or unable to find theUser,UserType, orShell- See Also:
User.addLinuxAccount(com.aoindustries.aoserv.client.linux.Group, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.UserType, com.aoindustries.aoserv.client.linux.Shell),addUsername(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.User.Name),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),User,UserType,UserServer
-
addLinuxGroup
public void addLinuxGroup(Group.Name name, Account.Name packageName, String type) throws IllegalArgumentException, IOException, SQLException
Adds aGroupto the system. After adding theGroup, the group may be added to aServervia aGroupServer. Also,Users may be granted access to the group usingGroupUser.- Parameters:
name- the name of the newGrouppackageName- the name of thePackagethat the group belongs totype- theGroupType- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find thePackageorGroupType- See Also:
Package.addLinuxGroup(com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.GroupType),Group,GroupType,Package,addLinuxServerGroup(com.aoindustries.aoserv.client.linux.Group.Name, java.lang.String),addLinuxGroupAccount(com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Name)
-
addLinuxGroupAccount
public int addLinuxGroupAccount(Group.Name group, User.Name username) throws IllegalArgumentException, IOException, SQLException
Once aUserand aGrouphave been established, permission for theUserto access theGroupmay be granted using aGroupUser.- Parameters:
group- the name of theGroupusername- the username of theUser- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theGrouporUser- See Also:
Group.addLinuxAccount(com.aoindustries.aoserv.client.linux.User),GroupUser,Group,User,UserServer,GroupServer
-
addLinuxServerAccount
public int addLinuxServerAccount(User.Name username, String aoServer, PosixPath home) throws IllegalArgumentException, IOException, SQLException
Grants aUseraccess to aServer. The primaryGroupfor this account must already have aGroupServerfor theServer.- Parameters:
username- the username of theUseraoServer- the hostname of theServerhome- the home directory of the user, typically/home/username. Ifnull, the default home directory forusernameis used.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser,HostorServer- See Also:
User.addLinuxServerAccount(com.aoindustries.aoserv.client.linux.Server, com.aoindustries.aoserv.client.linux.PosixPath),addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),addLinuxGroupAccount(com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Name),addLinuxServerGroup(com.aoindustries.aoserv.client.linux.Group.Name, java.lang.String),Server
-
addLinuxServerGroup
public int addLinuxServerGroup(Group.Name group, String aoServer) throws IllegalArgumentException, IOException, SQLException
Grants aGroupaccess to aServer. If the group is the primaryGroupfor anyUserthat will be added to theServer, theGroupmust be added to theServerfirst via aGroupServer.- Parameters:
group- the name of theGroupaoServer- the hostname of theServer- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theGrouporServer- See Also:
Group.addLinuxServerGroup(com.aoindustries.aoserv.client.linux.Server),addLinuxGroup(com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.account.Account.Name, java.lang.String),addLinuxGroupAccount(com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Name),Host
-
addMajordomoList
public int addMajordomoList(DomainName domain, String aoServer, String listName) throws IllegalArgumentException, IOException, SQLException
Adds a newMajordomoListto aMajordomoServer.- Parameters:
domain- the domain of theMajordomoServeraoServer- the hostname of theServerlistName- the name of the new list- Returns:
- the pkey of the new
List - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the name is not valid or unable to find theServer,Domain, orMajordomoServer- See Also:
MajordomoServer.addMajordomoList(java.lang.String),removeEmailList(com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String)
-
addMajordomoServer
public void addMajordomoServer(DomainName domain, String aoServer, User.Name linux_account, Group.Name linux_group, String version) throws IllegalArgumentException, IOException, SQLException
Adds a newMajordomoServerto anDomain.- Parameters:
domain- the domain of theDomainaoServer- the hostname of theServerlinux_account- the username of theUserlinux_group- the naem of theGroupversion- the version of theMajordomoVersion- Throws:
IllegalArgumentException- if unable to find theServer,Domain,UserServer,GroupServer, orMajordomoVersionIOExceptionSQLException- See Also:
Domain.addMajordomoServer(com.aoindustries.aoserv.client.linux.UserServer, com.aoindustries.aoserv.client.linux.GroupServer, com.aoindustries.aoserv.client.email.MajordomoVersion),removeMajordomoServer(com.aoapps.net.DomainName, java.lang.String)
-
addMySQLDatabase
public int addMySQLDatabase(Database.Name name, Server.Name mysqlServer, String aoServer, Account.Name packageName) throws IllegalArgumentException, IOException, SQLException
Adds a newDatabaseto the system. Once added,Users may be granted access to theDatabaseusing aDatabaseUser.Because updates the the MySQL configurations are batched, the database may not be immediately created in the MySQL system. To ensure the database is ready for use, call
waitForMySQLDatabaseRebuild(java.lang.String).- Parameters:
name- the name of the new databaseaoServer- the hostname of theServerpackageName- the name of thePackagethat owns the database- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the database name is not valid or unable to find theServerorPackage- See Also:
Server.addMySQLDatabase(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.billing.Package),addMySQLUser(com.aoindustries.aoserv.client.mysql.User.Name),addMySQLServerUser(com.aoindustries.aoserv.client.mysql.User.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, java.lang.String),addMySQLDBUser(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.mysql.User.Name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean),removeMySQLDatabase(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String),waitForMySQLDatabaseRebuild(java.lang.String)
-
addMySQLDBUser
public int addMySQLDBUser(Database.Name name, Server.Name mysqlServer, String aoServer, User.Name username, boolean canSelect, boolean canInsert, boolean canUpdate, boolean canDelete, boolean canCreate, boolean canDrop, boolean canReference, boolean canIndex, boolean canAlter, boolean canCreateTempTable, boolean canLockTables, boolean canCreateView, boolean canShowView, boolean canCreateRoutine, boolean canAlterRoutine, boolean canExecute, boolean canEvent, boolean canTrigger) throws IllegalArgumentException, IOException, SQLException
Grants aUserServerpermission to access aDatabase.- Parameters:
name- the name of theDatabaseaoServer- the hostname of theServerusername- the username of theUsercanSelect- grants the userSELECTprivilegescanInsert- grants the userINSERTprivilegescanUpdate- grants the userUPDATEprivilegescanDelete- grants the userDELETEprivilegescanCreate- grants the userCREATEprivilegescanDrop- grants the userDROPprivilegescanIndex- grants the userINDEXprivilegescanAlter- grants the userALTERprivilegescanCreateTempTable- grants the userCREATE TEMPORARY TABLEprivilegescanLockTables- grants the userLOCK TABLEprivileges- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Database, orUserServer- See Also:
Database.addMySQLServerUser(com.aoindustries.aoserv.client.mysql.UserServer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean),addMySQLUser(com.aoindustries.aoserv.client.mysql.User.Name),addMySQLServerUser(com.aoindustries.aoserv.client.mysql.User.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, java.lang.String),addMySQLDatabase(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name)
-
addMySQLServerUser
public int addMySQLServerUser(User.Name username, Server.Name mysqlServer, String aoServer, String host) throws IllegalArgumentException, IOException, SQLException
- Parameters:
username- the username of theUseraoServer- the hostname of theServerhost- the host the user is allowed to connect from, almost alwaysUserServer.ANY_LOCAL_HOSTbecause the host limitation is provided on a per-database level byDatabaseUser- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorServer- See Also:
User.addMySQLServerUser(com.aoindustries.aoserv.client.mysql.Server, java.lang.String),UserServer.ANY_LOCAL_HOST,addMySQLUser(com.aoindustries.aoserv.client.mysql.User.Name),addMySQLDBUser(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.mysql.User.Name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)
-
addMySQLUser
public void addMySQLUser(User.Name username) throws IllegalArgumentException, IOException, SQLException
Adds aUserto the system. AUserdoes not exist on anyServer, it merely indicates that aUserwill be used for accessing aDatabase. In order to grant the newUseraccess to aDatabase, first add aUserServeron the sameServeras theDatabase, then add aDatabaseUsergranting permission to theDatabase.- Parameters:
username- theUserthat will be used for accessing MySQL- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.addMySQLUser(),addUsername(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.User.Name),addMySQLServerUser(com.aoindustries.aoserv.client.mysql.User.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, java.lang.String),addMySQLDatabase(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name),addMySQLDBUser(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.mysql.User.Name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean),User
-
addNetBind
public int addNetBind(String server, Account.Name packageName, InetAddress ipAddress, String net_device, Port port, String appProtocol, boolean monitoringEnabled, Set<FirewallZone.Name> firewalldZoneNames) throws IllegalArgumentException, SQLException, IOException
Adds a network bind to the system.- Throws:
IOException- if unable to access the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find a referenced object.- See Also:
Host.addNetBind(com.aoindustries.aoserv.client.billing.Package, com.aoindustries.aoserv.client.net.IpAddress, com.aoapps.net.Port, com.aoindustries.aoserv.client.net.AppProtocol, boolean, java.util.Set<com.aoindustries.aoserv.client.net.FirewallZone.Name>)
-
addNoticeLog
public int addNoticeLog(Account.Name accounting, String billingContact, Email emailAddress, String type, int transid) throws IllegalArgumentException, IOException, SQLException
Whenever a credit card transaction fails, or when an account has not been paid for over month, the billing contact for theAccountis notified. The details of this notification are logged as aNoticeLog.- Parameters:
accounting- the accounting code of theAccountbillingContact- the name of the person who was contactedemailAddress- the email address that the email was sent totype- theNoticeTypetransid- the transaction ID associated with this notification orNoticeLog.NO_TRANSACTIONfor none- Throws:
IOException- if unable to access the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theAccount,NoticeType, orTransaction.- See Also:
NoticeLogTable.addNoticeLog(com.aoindustries.aoserv.client.account.Account, java.lang.String, com.aoapps.net.Email, com.aoindustries.aoserv.client.billing.NoticeType, com.aoindustries.aoserv.client.billing.Transaction),NoticeType,Account,Transaction
-
addPackage
public int addPackage(Account.Name packageName, Account.Name accounting, int packageDefinition) throws IllegalArgumentException, IOException, SQLException
EachAccountcan have multiplePackages associated with it. EachPackageis an allotment of resources with a monthly charge.To determine if this connection can set prices:
SimpleAOClient client=new SimpleAOClient(); boolean canSetPrices=client .getConnector() .getCurrentAdministrator() .getUsername() .getPackage() .getAccount() .canSetPrices();- Parameters:
packageName- the name for the new packageaccounting- the accounting code of theAccountpackageDefinition- the unique identifier of thePackageDefinition- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find- See Also:
addAccount(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, boolean, boolean, boolean, boolean),PackageDefinition
-
addPostgresDatabase
public int addPostgresDatabase(Database.Name name, Server.Name postgres_server, String aoServer, User.Name datdba, String encoding, boolean enablePostgis) throws IllegalArgumentException, SQLException, IOException
Adds a newDatabaseto the system. Because updates the the PostgreSQL configurations are batched, the database may not be immediately created in the PostgreSQL system. To ensure the database is ready for use, callwaitForPostgresDatabaseRebuild(java.lang.String).- Parameters:
name- the name of the new databaseaoServer- the hostname of theServerdatdba- the username of theUserServerwho owns the databaseencoding- the encoding of the database- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the database name is not valid or unable to find theServer,User,UserServer, orEncoding- See Also:
Server.addPostgresDatabase(com.aoindustries.aoserv.client.postgresql.Database.Name, com.aoindustries.aoserv.client.postgresql.UserServer, com.aoindustries.aoserv.client.postgresql.Encoding, boolean),addPostgresUser(com.aoindustries.aoserv.client.postgresql.User.Name),addPostgresServerUser(com.aoindustries.aoserv.client.postgresql.User.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String),removePostgresDatabase(com.aoindustries.aoserv.client.postgresql.Database.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String),waitForPostgresDatabaseRebuild(java.lang.String),Encoding
-
addPostgresServerUser
public int addPostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
username- the username of theUserpostgresServer- the name of the PostgreSQL serveraoServer- the hostname of theServer- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorServer- See Also:
User.addPostgresServerUser(com.aoindustries.aoserv.client.postgresql.Server),addPostgresUser(com.aoindustries.aoserv.client.postgresql.User.Name)
-
addPostgresUser
public void addPostgresUser(User.Name username) throws IllegalArgumentException, IOException, SQLException
Adds aUserto the system. AUserdoes not exist on anyServer, it merely indicates that aUserwill be used for accessing aDatabase. In order to grant the newUseraccess to aDatabase, first add aUserServeron the sameServeras theDatabase, then use the PostgreSQLgrantandrevokecommands.- Parameters:
username- theUserthat will be used for accessing PostgreSQL- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.addPostgresUser(),addUsername(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.User.Name),addPostgresServerUser(com.aoindustries.aoserv.client.postgresql.User.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String),addPostgresDatabase(com.aoindustries.aoserv.client.postgresql.Database.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.postgresql.User.Name, java.lang.String, boolean),User
-
addEmailDomain
public int addEmailDomain(DomainName domain, String aoServer, Account.Name packageName) throws IllegalArgumentException, IOException, SQLException
Adds a newDomainto aServer. Once added, theServerwill accept email for the provided domain. In order for the email to function, however, a DNSRecordType.MXentry for the domain must point to a hostname that resolves to anIpAddresson theServer.- Parameters:
domain- the email domain that will be hostedaoServer- the hostname of theServerthat is being addedpackageName- the name of thePackagethat owns the email domain- Throws:
IOException- if unable to access the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the domain is not in the correct format or unable to find thePackage- See Also:
Server.addEmailDomain(com.aoapps.net.DomainName, com.aoindustries.aoserv.client.billing.Package),addDNSRecord(java.lang.String, java.lang.String, java.lang.String, int, int, int, java.lang.String, int),addEmailForwarding(java.lang.String, com.aoapps.net.DomainName, java.lang.String, com.aoapps.net.Email),addEmailListAddress(java.lang.String, com.aoapps.net.DomainName, com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String),addEmailPipeAddress(java.lang.String, com.aoapps.net.DomainName, int),addLinuxAccAddress(java.lang.String, com.aoapps.net.DomainName, java.lang.String, com.aoindustries.aoserv.client.linux.User.Name)
-
addEmailSmtpRelay
public int addEmailSmtpRelay(Account.Name packageName, String aoServer, HostAddress host, String type, long duration) throws IllegalArgumentException, SQLException, IOException
Grants access to the SMTP server. Access to the SMTP server is granted when an email client successfully logs into either the IMAP or POP3 servers. If desired, access to the SMTP server may also be granted from the API. In either case, the SMTP access will be revoked after 24 hours unless refresh.- Parameters:
packageName- the name of thePackagethat is granted accessaoServer- the hostname of theServerhost- the hostname or IP address that is being configured- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the IP address is for valid or unable to find thePackageorServer- See Also:
Package.addEmailSmtpRelay(com.aoindustries.aoserv.client.linux.Server, com.aoapps.net.HostAddress, com.aoindustries.aoserv.client.email.SmtpRelayType, long)
-
addSpamEmailMessage
public int addSpamEmailMessage(int email_relay, String message) throws IllegalArgumentException, IOException, SQLExceptionAdds aSpamMessage.- Returns:
- the pkey of the
SpamMessagethat was created - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to theSmtpRelay- See Also:
SmtpRelay.addSpamEmailMessage(java.lang.String)
-
addTransaction
public int addTransaction(int timeType, Timestamp time, Account.Name account, Account.Name sourceAccount, User.Name administrator, String type, String description, int quantity, Money rate, String paymentType, String paymentInfo, String processor, byte payment_confirmed) throws IllegalArgumentException, IOException, SQLExceptionAdds a newTransactionto aAccount.- Parameters:
account- the accounting code of theAccountsourceAccount- the accounting code of the originatingAccountadministrator- the username of theAdministratormaking thisTransactiontype- the type as found inPackageDefinitionLimitdescription- the descriptionquantity- the quantity in thousandthsrate- the rate in hundredthspayment_confirmed- the confirmation status of the transaction- Returns:
- the transid of the new
Transaction - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Account,Administrator,PackageDefinitionLimit,PaymentType, orpayment_confirmed- See Also:
Account.addTransaction(int, java.sql.Timestamp, com.aoindustries.aoserv.client.account.Account, com.aoindustries.aoserv.client.account.Administrator, com.aoindustries.aoserv.client.billing.TransactionType, java.lang.String, int, com.aoapps.lang.i18n.Money, com.aoindustries.aoserv.client.payment.PaymentType, java.lang.String, com.aoindustries.aoserv.client.payment.Processor, byte),Transaction,addAccount(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, boolean, boolean, boolean, boolean),Account,addAdministrator(com.aoindustries.aoserv.client.account.User.Name, java.lang.String, java.lang.String, java.sql.Date, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.aoapps.net.Email, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean),Administrator,TransactionType
-
addUsername
public void addUsername(Account.Name packageName, User.Name username) throws IllegalArgumentException, IOException, SQLException
Adds a newUserto aPackage. A username is unique to the system, regardless of which service(s) it is used for. For example, if a username is allocated for use as a MySQL user for business A, business B may not use the username as a PostgreSQL user.- Parameters:
packageName- the name of thePackagethat owns theUserusername- the username to add- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the username is not a valid username or unable to find thePackage- See Also:
Package.addUsername(com.aoindustries.aoserv.client.account.User.Name),User,addPackage(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.Account.Name, int),Package
-
areLinuxAccountPasswordsSet
public int areLinuxAccountPasswordsSet(User.Name username) throws IllegalArgumentException, IOException, SQLException
Determines if aUsercurrently has passwords set.- Parameters:
username- the username of the account- Returns:
- an
intcontainingPasswordProtected.NONE,PasswordProtected.SOME, orPasswordProtected.ALL - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theUseris not found- See Also:
User.arePasswordsSet(),setLinuxAccountPassword(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String),User,PasswordProtected
-
areMySQLUserPasswordsSet
public int areMySQLUserPasswordsSet(User.Name username) throws IllegalArgumentException, IOException, SQLException
Determines if aUsercurrently has passwords set.- Parameters:
username- the username of the user- Returns:
- an
intcontainingPasswordProtected.NONE,PasswordProtected.SOME, orPasswordProtected.ALL - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theUseris not found- See Also:
User.arePasswordsSet(),setMySQLUserPassword(com.aoindustries.aoserv.client.mysql.User.Name, java.lang.String),User,PasswordProtected
-
arePostgresUserPasswordsSet
public int arePostgresUserPasswordsSet(User.Name username) throws IllegalArgumentException, IOException, SQLException
Determines if aUsercurrently has passwords set.- Parameters:
username- the username of the user- Returns:
- an
intcontainingPasswordProtected.NONE,PasswordProtected.SOME, orPasswordProtected.ALL - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theUseris not found- See Also:
User.arePasswordsSet(),setPostgresUserPassword(com.aoindustries.aoserv.client.postgresql.User.Name, java.lang.String),User,PasswordProtected
-
areUsernamePasswordsSet
public int areUsernamePasswordsSet(User.Name username) throws IllegalArgumentException, IOException, SQLException
Determines if aUsercurrently has passwords set.- Parameters:
username- the username- Returns:
- an
intcontainingPasswordProtected.NONE,PasswordProtected.SOME, orPasswordProtected.ALL - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theUseris not found- See Also:
User.arePasswordsSet(),setUsernamePassword(com.aoindustries.aoserv.client.account.User.Name, java.lang.String),User,PasswordProtected
-
cancelAccount
public void cancelAccount(Account.Name accounting, String reason) throws IllegalArgumentException, IOException, SQLException
- Parameters:
accounting- the accounting code of the businessreason- the reason the account is being canceled- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theAccount- See Also:
Account.cancel(java.lang.String)
-
checkAdministratorPassword
public static List<PasswordChecker.Result> checkAdministratorPassword(User.Name username, String password) throws IOException, SQLException
Checks the strength of a password that will be used for aAdministrator.- Parameters:
username- the username of theAdministratorwhose password will be setpassword- the new password- Returns:
- a description of why the password is weak or
nullif all checks succeed - Throws:
IOExceptionSQLException- See Also:
setAdministratorPassword(com.aoindustries.aoserv.client.account.User.Name, java.lang.String),Administrator.checkPassword(java.lang.String)
-
checkDNSZone
public void checkDNSZone(String zone) throws IllegalArgumentException, IOException, SQLException
Checks the format of aZone.- Parameters:
zone- the new DNS zone name, some examples includeaoindustries.com.andnetspade.co.uk.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the format is not valid- See Also:
ZoneTable.checkDNSZone(java.lang.String),Zone
-
checkEmailListPath
public void checkEmailListPath(String aoServer, PosixPath path) throws IllegalArgumentException, IOException, SQLException
Checks the format of an email list path.- Parameters:
aoServer- the hostname of the server the list would be hosted onpath- the path of the list- Throws:
IllegalArgumentException- if the name is not in a valid formatIOExceptionSQLException- See Also:
List.isValidRegularPath(com.aoindustries.aoserv.client.linux.PosixPath, int)
-
checkLinuxAccountPassword
public List<PasswordChecker.Result> checkLinuxAccountPassword(User.Name username, String password) throws IllegalArgumentException, IOException, SQLException
Checks the strength of a password that will be used for aUserorUserServer.- Parameters:
username- the username of the account that will have its password setpassword- the new password for the account- Returns:
- a
Stringdescribing why the password is not secure ornullif the password is strong - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.checkPassword(java.lang.String),setLinuxAccountPassword(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String),setLinuxServerAccountPassword(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, java.lang.String),PasswordChecker
-
checkMySQLPassword
public static List<PasswordChecker.Result> checkMySQLPassword(User.Name username, String password) throws IOException
Checks the strength of a password that will be used for aUserServer.- Parameters:
username- the username of theUserServerwhos password will be setpassword- the new password- Returns:
- a description of why the password is weak or
nullif all checks succeed - Throws:
IOException- if unable to load the dictionary resource- See Also:
setMySQLUserPassword(com.aoindustries.aoserv.client.mysql.User.Name, java.lang.String),setMySQLServerUserPassword(com.aoindustries.aoserv.client.mysql.User.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, java.lang.String),User.checkPassword(java.lang.String)
-
checkPostgresPassword
public static List<PasswordChecker.Result> checkPostgresPassword(User.Name username, String password) throws IOException
Checks the strength of a password that will be used for aUserServer.- Parameters:
username- the username of theUserServerwhos password will be setpassword- the new password- Returns:
- a description of why the password is weak or
nullif all checks succeed - Throws:
IOException- if unable to load the dictionary resource- See Also:
setPostgresUserPassword(com.aoindustries.aoserv.client.postgresql.User.Name, java.lang.String),setPostgresServerUserPassword(com.aoindustries.aoserv.client.postgresql.User.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String, java.lang.String),User.checkPassword(java.lang.String)
-
checkMajordomoListName
public static void checkMajordomoListName(String listName) throws IllegalArgumentException
Checks the format of a Majordomo list name.- Throws:
IllegalArgumentException- if the domain is not in a valid format- See Also:
MajordomoList.isValidListName(java.lang.String),addMajordomoList(com.aoapps.net.DomainName, java.lang.String, java.lang.String)
-
checkSharedTomcatName
public static void checkSharedTomcatName(String tomcatName) throws IllegalArgumentException
Checks the format of anSharedTomcatname.- Parameters:
tomcatName- the name of theSharedTomcat- Throws:
IllegalArgumentException- if the name is not in a valid format- See Also:
SharedTomcat.isValidSharedTomcatName(java.lang.String),addHttpdSharedTomcat(java.lang.String, java.lang.String, java.lang.String, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name),addHttpdTomcatSharedSite(java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoapps.net.Email, boolean, com.aoapps.net.InetAddress, java.lang.String, com.aoapps.net.DomainName, com.aoapps.net.DomainName[], java.lang.String)
-
checkSiteName
public static void checkSiteName(String siteName) throws IllegalArgumentException
Checks the format of anSitename.- Parameters:
siteName- the name of theSite- Throws:
IllegalArgumentException- if the name is not in a valid format- See Also:
Site.isValidSiteName(java.lang.String),addHttpdTomcatStdSite(java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoapps.net.Email, boolean, com.aoapps.net.InetAddress, java.lang.String, com.aoapps.net.DomainName, com.aoapps.net.DomainName[], java.lang.String)
-
checkUsernamePassword
public List<PasswordChecker.Result> checkUsernamePassword(User.Name username, String password) throws IllegalArgumentException, IOException, SQLException
Checks the strength of a password that will be used for aUser. The strength requirement is based on which services use theUser.- Parameters:
username- the username whos password will be setpassword- the new password- Returns:
- a description of why the password is weak or
nullif all checks succeed - Throws:
IOException- if unable to load the dictionary resource or unable to access the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theUser- See Also:
setUsernamePassword(com.aoindustries.aoserv.client.account.User.Name, java.lang.String),User.checkPassword(java.lang.String)
-
compareLinuxServerAccountPassword
public boolean compareLinuxServerAccountPassword(User.Name username, String aoServer, String password) throws IllegalArgumentException, IOException, SQLException
Checks if a password matches aUserServer.- Parameters:
username- the username of the accountaoServer- the hostname of the server to checkpassword- the password to compare against- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if theUser,Host,Server, orUserServeris not found- See Also:
UserServer.passwordMatches(java.lang.String),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
copyHomeDirectory
public long copyHomeDirectory(User.Name username, String from_ao_server, String to_ao_server) throws IllegalArgumentException, IOException, SQLException
Copies the contents of user's home directory from one server to another.- Parameters:
username- the username of theUserfrom_ao_server- the server to get the data fromto_ao_server- the server to put the data on- Returns:
- the number of bytes transferred
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find the sourceUserServeror destinationServer- See Also:
UserServer.copyHomeDirectory(com.aoindustries.aoserv.client.linux.Server),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),removeLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String)
-
copyLinuxServerAccountPassword
public void copyLinuxServerAccountPassword(User.Name from_username, String from_ao_server, User.Name to_username, String to_ao_server) throws IllegalArgumentException, IOException, SQLException
Copies the password from oneUserServerto another.- Parameters:
from_username- the username to copy fromfrom_ao_server- the server to get the data fromto_username- the username to copy toto_ao_server- the server to put the data on- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find aUserServer- See Also:
UserServer.copyPassword(com.aoindustries.aoserv.client.linux.UserServer),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),removeLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String)
-
crypt
@Deprecated public static String crypt(String password, String salt)
Deprecated.Please useHashedPasswordinstead.Encrypts a password using a pure Java implementation of the standard Unixcryptfunction.- Parameters:
password- the password that is to be encryptedsalt- the two character salt for the encryption process, ifnull, a random salt will be used- See Also:
HashedPassword
-
declineCreditCard
public void declineCreditCard(int pkey, String reason) throws IllegalArgumentException, IOException, SQLException- Parameters:
pkey- the unique identifier of theCreditCardreason- the reason the card is being disabled- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theCreditCard- See Also:
CreditCard.declined(java.lang.String),Transaction,CreditCard
-
disableAccount
public int disableAccount(Account.Name accounting, String disableReason) throws IllegalArgumentException, IOException, SQLException
Disables a business, recursively disabling all of its enabled child components.- Parameters:
accounting- the accounting code to disabledisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find the necessaryAOServObjects
-
disablePackage
public int disablePackage(Account.Name name, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables a package, recursively disabling all of its enabled child components.- Parameters:
name- the name of the packagedisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find the necessaryAOServObjects
-
disableHttpdSharedTomcat
public int disableHttpdSharedTomcat(String name, String aoServer, String disableReason) throws IllegalArgumentException, IOException, SQLException
Disables aSharedTomcat.- Parameters:
name- the name of the tomcat JVMaoServer- the server that hosts the JVMdisableReason- the reason the JVM is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer, orSharedTomcat
-
disableEmailPipe
public int disableEmailPipe(int pkey, String disableReason) throws IllegalArgumentException, SQLException, IOExceptionDisables anPipe.- Parameters:
pkey- the pkey of the pipedisableReason- the reason the pipe is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find thePipe
-
disableHttpdSite
public int disableHttpdSite(String name, String aoServer, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables aSite.- Parameters:
name- the name of the siteaoServer- the server that hosts the sitedisableReason- the reason the site is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer, orSite
-
disableHttpdSiteBind
public int disableHttpdSiteBind(int pkey, String disableReason) throws IllegalArgumentException, SQLException, IOExceptionDisables aVirtualHost.- Parameters:
pkey- the pkey of the binddisableReason- the reason the bind is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theVirtualHost
-
disableEmailList
public int disableEmailList(PosixPath path, String aoServer, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables anList.- Parameters:
path- the path of the listaoServer- the server the list is part ofdisableReason- the reason the bind is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theList
-
disableEmailSmtpRelay
public int disableEmailSmtpRelay(int pkey, String disableReason) throws IllegalArgumentException, SQLException, IOExceptionDisables aSmtpRelay.- Parameters:
pkey- the pkey of the relaydisableReason- the reason the bind is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theSmtpRelay
-
disableUsername
public int disableUsername(User.Name username, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables aUserand all uses of the username.- Parameters:
username- the username to disabledisableReason- the reason the bind is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser
-
disableLinuxAccount
public int disableLinuxAccount(User.Name username, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables aUser.- Parameters:
username- the username to disabledisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorUser
-
disableLinuxServerAccount
public int disableLinuxServerAccount(User.Name username, String aoServer, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables aUserServer.- Parameters:
username- the username to disableaoServer- the server the account is ondisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser,User, orUserServer
-
disableCvsRepository
public int disableCvsRepository(int pkey, String disableReason) throws IllegalArgumentException, SQLException, IOExceptionDisables aCvsRepository.- Parameters:
pkey- the pkey of the repository to disabledisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theCvsRepository
-
disableMySQLUser
public int disableMySQLUser(User.Name username, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables aUser.- Parameters:
username- the username to disabledisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorUser
-
disableMySQLServerUser
public int disableMySQLServerUser(User.Name username, Server.Name mysqlServer, String aoServer, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables aUserServer.- Parameters:
username- the username to disableaoServer- the server the account is ondisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUser
-
disablePostgresUser
public int disablePostgresUser(User.Name username, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables aUser.- Parameters:
username- the username to disabledisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorUser
-
disablePostgresServerUser
public int disablePostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables aUserServer.- Parameters:
username- the username to disablepostgresServer- the name of the PostgresServeraoServer- the server the account is ondisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUser
-
disableAdministrator
public int disableAdministrator(User.Name username, String disableReason) throws IllegalArgumentException, SQLException, IOException
Disables aAdministrator.- Parameters:
username- the username to disabledisableReason- the reason the account is being disabled- Returns:
- the pkey of the new
DisableLog - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorAdministrator
-
enableAccount
public void enableAccount(Account.Name accounting) throws IllegalArgumentException, IOException, SQLException
Enables a business, recursively enabling all of its disabled child components.- Parameters:
accounting- the accounting code to enable- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find the necessaryaccounts
-
enablePackage
public void enablePackage(Account.Name name) throws IllegalArgumentException, SQLException, IOException
Enables a package, recursively enabling all of its disabled child components.- Parameters:
name- the name of the package- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find the necessaryAOServObjects
-
enableHttpdSharedTomcat
public void enableHttpdSharedTomcat(String name, String aoServer) throws IllegalArgumentException, SQLException, IOException
Enables aSharedTomcat.- Parameters:
name- the name of the tomcat JVMaoServer- the server that hosts the JVM- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer, orSharedTomcat
-
enableEmailPipe
public void enableEmailPipe(int pkey) throws IllegalArgumentException, SQLException, IOExceptionEnables anPipe.- Parameters:
pkey- the pkey of the pipe- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find thePipe
-
enableHttpdSite
public void enableHttpdSite(String name, String aoServer) throws IllegalArgumentException, SQLException, IOException
Enables aSite.- Parameters:
name- the name of the siteaoServer- the server that hosts the site- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer, orSite
-
enableHttpdSiteBind
public void enableHttpdSiteBind(int pkey) throws IllegalArgumentException, SQLException, IOExceptionEnables aVirtualHost.- Parameters:
pkey- the pkey of the bind- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theVirtualHost
-
enableEmailList
public void enableEmailList(PosixPath path, String aoServer) throws IllegalArgumentException, SQLException, IOException
Enables anList.- Parameters:
path- the path of the listaoServer- the server the list is part of- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theList
-
enableEmailSmtpRelay
public void enableEmailSmtpRelay(int pkey) throws IllegalArgumentException, IOException, SQLExceptionEnables aSmtpRelay.- Parameters:
pkey- the pkey of the relay- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theSmtpRelay
-
enableUsername
public void enableUsername(User.Name username) throws IllegalArgumentException, SQLException, IOException
Enables aUserand all uses of the username.- Parameters:
username- the username to enable- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser
-
enableLinuxAccount
public void enableLinuxAccount(User.Name username) throws IllegalArgumentException, SQLException, IOException
Enables aUser.- Parameters:
username- the username to enable- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorUser
-
enableLinuxServerAccount
public void enableLinuxServerAccount(User.Name username, String aoServer) throws IllegalArgumentException, SQLException, IOException
Enables aUserServer.- Parameters:
username- the username to enableaoServer- the server the account is on- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser,User, orUserServer
-
enableCvsRepository
public void enableCvsRepository(int pkey) throws IllegalArgumentException, SQLException, IOExceptionEnables aCvsRepository.- Parameters:
pkey- the pkey of the repository to enable- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theCvsRepository
-
enableMySQLUser
public void enableMySQLUser(User.Name username) throws IllegalArgumentException, SQLException, IOException
Enables aUser.- Parameters:
username- the username to enable- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorUser
-
enableMySQLServerUser
public void enableMySQLServerUser(User.Name username, Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, SQLException, IOException
Enables aUserServer.- Parameters:
username- the username to enableaoServer- the server the account is on- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUser
-
enablePostgresUser
public void enablePostgresUser(User.Name username) throws IllegalArgumentException, SQLException, IOException
Enables aUser.- Parameters:
username- the username to enable- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorUser
-
enablePostgresServerUser
public void enablePostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Enables aUserServer.- Parameters:
username- the username to enablepostgresServer- the name of the PostgreSQL serveraoServer- the server the account is on- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUser
-
enableAdministrator
public void enableAdministrator(User.Name username) throws IllegalArgumentException, SQLException, IOException
Enables anAdministrator.- Parameters:
username- the username to enable- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorAdministrator
-
dumpMySQLDatabase
public void dumpMySQLDatabase(Database.Name name, Server.Name mysqlServer, String aoServer, Writer out) throws IllegalArgumentException, IOException, SQLException
- Parameters:
name- the name of theDatabaseaoServer- the hostname of theServerout- theWriterto dump to- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorDatabase- See Also:
Database.dump(java.io.PrintWriter),Database
-
dumpMySQLDatabase
public void dumpMySQLDatabase(Database.Name name, Server.Name mysqlServer, String aoServer, boolean gzip, StreamHandler streamHandler) throws IllegalArgumentException, IOException, SQLException
Dumps the contents of aDatabaseto anOutputStream, optionally gzipped.- Parameters:
name- the name of theDatabaseaoServer- the hostname of theServergzip- the gzip flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorDatabase- See Also:
Database.dump(java.io.PrintWriter),Database
-
dumpPostgresDatabase
public void dumpPostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer, Writer out) throws IllegalArgumentException, IOException, SQLException
- Parameters:
name- the name of theDatabasepostgresServer- the name of the PostgreSQL serveraoServer- the hostname of theServerout- theWriterto dump to- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorDatabase- See Also:
Database.dump(java.io.PrintWriter),Database
-
dumpPostgresDatabase
public void dumpPostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer, boolean gzip, StreamHandler streamHandler) throws IllegalArgumentException, IOException, SQLException
Dumps the contents of aDatabaseto anOutputStream, optionally gzipped.- Parameters:
name- the name of theDatabasepostgresServer- the name of the PostgreSQL serveraoServer- the hostname of theServergzip- the gzip flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorDatabase- See Also:
Database.dump(java.io.PrintWriter),Database
-
generateAccountingCode
public Account.Name generateAccountingCode(Account.Name accountingTemplate) throws IOException, SQLException
Generates a unique accounting code that may be used to create a newAccount.- Parameters:
accountingTemplate- the beginning part of the accounting code, such as"AO_"- Returns:
- the available accounting code
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
AccountTable.generateAccountingCode(com.aoindustries.aoserv.client.account.Account.Name),addAccount(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, boolean, boolean, boolean, boolean),Account
-
generateMySQLDatabaseName
public Database.Name generateMySQLDatabaseName(String template_base, String template_added) throws IOException, SQLException
Generates a unique MySQL database name.- Parameters:
template_base- the beginning part of the template, such as"AO"template_added- the part of the template added between thetemplate_baseand the generated number, such as"_"- Returns:
- the available database name
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
DatabaseTable.generateMySQLDatabaseName(java.lang.String, java.lang.String),addMySQLDatabase(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name),Database
-
generatePackageName
public Account.Name generatePackageName(Account.Name template) throws IOException, SQLException
Generates a uniquePackagename.- Parameters:
template- the beginning part of the template, such as"AO_"- Returns:
- the available
Packagename - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
PackageTable.generatePackageName(com.aoindustries.aoserv.client.account.Account.Name),addPackage(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.Account.Name, int),Package
-
generatePassword
public String generatePassword() throws IOException
Generates a random, valid password.- Returns:
- the password
- Throws:
IOException- if unable to contact the server
-
generatePostgresDatabaseName
public Database.Name generatePostgresDatabaseName(String template_base, String template_added) throws IOException, SQLException
Generates a unique PostgreSQL database name.- Parameters:
template_base- the beginning part of the template, such as"AO"template_added- the part of the template added between thetemplate_baseand the generated number, such as"_"- Returns:
- the available database name
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
DatabaseTable.generatePostgresDatabaseName(java.lang.String, java.lang.String),addPostgresDatabase(com.aoindustries.aoserv.client.postgresql.Database.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.postgresql.User.Name, java.lang.String, boolean),Database
-
generateSharedTomcatName
public String generateSharedTomcatName(String template) throws IOException, SQLException
Generates a uniqueSharedTomcatname.- Parameters:
template- the beginning part of the template, such as"ao"- Returns:
- the available
SharedTomcatname - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
SharedTomcatTable.generateSharedTomcatName(java.lang.String),addHttpdSharedTomcat(java.lang.String, java.lang.String, java.lang.String, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name),addHttpdTomcatSharedSite(java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoapps.net.Email, boolean, com.aoapps.net.InetAddress, java.lang.String, com.aoapps.net.DomainName, com.aoapps.net.DomainName[], java.lang.String),Site
-
generateSiteName
public String generateSiteName(String template) throws IOException, SQLException
Generates a uniqueSitename.- Parameters:
template- the beginning part of the template, such as"ao"- Returns:
- the available
Sitename - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
SiteTable.generateSiteName(java.lang.String),addHttpdTomcatStdSite(java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoapps.net.Email, boolean, com.aoapps.net.InetAddress, java.lang.String, com.aoapps.net.DomainName, com.aoapps.net.DomainName[], java.lang.String),Site
-
getAutoresponderContent
public String getAutoresponderContent(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException
Gets the autoresponder content.- Parameters:
username- the username of theUserServeraoServer- the server to get the data from- Returns:
- the autoresponder content
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find the sourceUserServer- See Also:
UserServer.getAutoresponderContent(),setAutoresponder(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, java.lang.String, com.aoapps.net.DomainName, java.lang.String, java.lang.String, boolean)
-
getConnector
public AOServConnector getConnector()
Gets theAOServConnectorused for communication with the server.
-
getCronTable
public String getCronTable(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException
Gets a user's cron table on one server.- Parameters:
username- the username of theUseraoServer- the server to get the data from- Returns:
- the cron table
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find the sourceUserServer- See Also:
UserServer.getCronTable(),setCronTable(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, java.lang.String),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),removeLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String)
-
getEmailListAddressList
public String getEmailListAddressList(PosixPath path, String aoServer) throws IllegalArgumentException, IOException, SQLException
Gets the list of email addresses that anListwill be forwarded to.- Parameters:
path- the path of the listaoServer- the server this list is part of- Returns:
- the list of addresses, one address per line separated by
'\n' - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theList- See Also:
List.getAddressList(),addEmailList(java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name),setEmailListAddressList(com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String, java.lang.String),List
-
getBackupPartitionTotalSize
public long getBackupPartitionTotalSize(String aoServer, String path) throws IllegalArgumentException, IOException, SQLException
Gets the total size of aBackupPartition.- Parameters:
aoServer- the hostname of the serverpath- the path of theBackupPartition- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServerorBackupPartition- See Also:
BackupPartition.getDiskTotalSize()
-
getBackupPartitionUsedSize
public long getBackupPartitionUsedSize(String aoServer, String path) throws IllegalArgumentException, IOException, SQLException
Gets the used size of aBackupPartition.- Parameters:
aoServer- the hostname of the serverpath- the path of theBackupPartition- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServerorBackupPartition- See Also:
BackupPartition.getDiskUsedSize()
-
getFailoverFileReplicationActivity
public FileReplication.Activity getFailoverFileReplicationActivity(String fromServer, String toServer, String path) throws IllegalArgumentException, IOException, SQLException
Gets the last reported activity for aFileReplication.- Parameters:
fromServer- the server that is being backed-uptoServer- the hostname of the server the stores the backupspath- the path of theBackupPartition- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHost,Server,BackupPartition, orFileReplication- See Also:
FileReplication.getActivity()
-
getHttpdServerConcurrency
public int getHttpdServerConcurrency(String aoServer, String name) throws IllegalArgumentException, IOException, SQLException
- Parameters:
aoServer- the server hosting the accountname- the name of the instance ofnullfor the default instance- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHost,Server, orHttpdServer- See Also:
HttpdServer.getConcurrency()
-
getInboxAttributes
public InboxAttributes getInboxAttributes(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException
Gets the attributes of an inbox.- Parameters:
username- the username of theUserServeraoServer- the server hosting the account- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theUserServer- See Also:
UserServer.getInboxAttributes()
-
getImapFolderSizes
public long[] getImapFolderSizes(User.Name username, String aoServer, String[] folderNames) throws IllegalArgumentException, IOException, SQLException
Gets the IMAP folder sizes for an inbox.- Parameters:
username- the username of theUserServeraoServer- the server hosting the accountfolderNames- the folder names- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theUserServer- See Also:
UserServer.getImapFolderSizes(java.lang.String[])
-
getMajordomoInfoFile
public String getMajordomoInfoFile(DomainName domain, String aoServer, String listName) throws IllegalArgumentException, IOException, SQLException
Gets the info file for aMajordomoList.- Parameters:
domain- the domain of theMajordomoServeraoServer- the hostname of theServerlistName- the name of the new list- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the name is not valid or unable to find theServer,Domain,MajordomoServer, orMajordomoList- See Also:
MajordomoList.getInfoFile(),addMajordomoList(com.aoapps.net.DomainName, java.lang.String, java.lang.String),removeEmailList(com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String)
-
getMajordomoIntroFile
public String getMajordomoIntroFile(DomainName domain, String aoServer, String listName) throws IllegalArgumentException, IOException, SQLException
Gets the intro file for aMajordomoList.- Parameters:
domain- the domain of theMajordomoServeraoServer- the hostname of theServerlistName- the name of the new list- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the name is not valid or unable to find theServer,Domain,MajordomoServer, orMajordomoList- See Also:
MajordomoList.getIntroFile(),addMajordomoList(com.aoapps.net.DomainName, java.lang.String, java.lang.String),removeEmailList(com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String)
-
getMrtgFile
public void getMrtgFile(String aoServer, String filename, OutputStream out) throws IllegalArgumentException, IOException, SQLException
Gets the contents of a MRTG file.- Parameters:
aoServer- the hostname of the server to get the file fromfilename- the filename on the serverout- theOutputStreamto write the file to- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.getMrtgFile(java.lang.String, java.io.OutputStream)
-
getUpsStatus
public String getUpsStatus(String aoServer) throws IllegalArgumentException, IOException, SQLException
Gets the current status of the UPS.- Parameters:
aoServer- the hostname of the server to get the file from- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.getMrtgFile(java.lang.String, java.io.OutputStream)
-
getAWStatsFile
public void getAWStatsFile(String siteName, String aoServer, String path, String queryString, OutputStream out) throws IllegalArgumentException, IOException, SQLException
Gets the contents of an AWStats file.- Parameters:
siteName- the site nameaoServer- the hostname of the server to get the file frompath- the filename on the serverqueryString- the query string for the requestout- theOutputStreamto write the file to- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHost,Server, orSite- See Also:
Site.getAWStatsFile(java.lang.String, java.lang.String, java.io.OutputStream)
-
getRootAccount
public Account.Name getRootAccount() throws IOException, SQLException
- Returns:
- the accounting code of the root
Account - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
AccountTable.getRootAccount_name()
-
invalidate
public void invalidate(int tableID, String server) throws IllegalArgumentException, SQLException, IOExceptionInvalidates a table, causing all caches of the table to be removed and all configurations based on the table to be reevaluated.- Parameters:
tableID- the ID of theAOServTableto invalidateserver- the server that should be invalidated ornull or ""for none, accepts ao_servers.hostname, servers.package||'/'||servers.name, or servers.pkey- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the table ID is invalid- See Also:
AOServConnector.invalidateTable(int, int),Administrator.isActiveTableInvalidator()
-
isAccountingAvailable
public boolean isAccountingAvailable(Account.Name accounting) throws SQLException, IOException
Determines if an accounting code is available.- Parameters:
accounting- the accounting code- Returns:
trueif the accounting code is available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
AccountTable.isAccountingAvailable(com.aoindustries.aoserv.client.account.Account.Name),addAccount(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, boolean, boolean, boolean, boolean),generateAccountingCode(com.aoindustries.aoserv.client.account.Account.Name),Account
-
isAdministratorPasswordSet
public boolean isAdministratorPasswordSet(User.Name username) throws IllegalArgumentException, IOException, SQLException
Determines if aAdministratorcurrently has a password set.- Parameters:
username- the username of the administrator- Returns:
- if the
Administratorhas a password set - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theAdministratoris not found- See Also:
Administrator.arePasswordsSet(),setAdministratorPassword(com.aoindustries.aoserv.client.account.User.Name, java.lang.String),Administrator
-
isDNSZoneAvailable
public boolean isDNSZoneAvailable(String zone) throws IOException, SQLException
Determines if aZoneis available.- Parameters:
zone- the zone indomain.tld.format- Returns:
trueif theZoneis available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
ZoneTable.isDNSZoneAvailable(java.lang.String),addDNSZone(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, com.aoapps.net.InetAddress, int),Zone
-
isIPAddressUsed
public boolean isIPAddressUsed(InetAddress ipAddress, String server, String net_device) throws IllegalArgumentException, IOException, SQLException
Determines if anIpAddressis currently being used.- Parameters:
ipAddress- the IP address- Returns:
trueif theIpAddressis in use- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theIpAddress- See Also:
IpAddress.isUsed(),setIPAddressPackage(com.aoapps.net.InetAddress, java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name)
-
isLinuxGroupNameAvailable
public boolean isLinuxGroupNameAvailable(Group.Name groupname) throws IOException, SQLException
Determines if a groupname is available.- Parameters:
groupname- the groupname- Returns:
trueif the groupname is available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
GroupTable.isLinuxGroupNameAvailable(com.aoindustries.aoserv.client.linux.Group.Name),addLinuxGroup(com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.account.Account.Name, java.lang.String),Group
-
isLinuxServerAccountPasswordSet
public boolean isLinuxServerAccountPasswordSet(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException
Determines if aUserServercurrently has a password set.- Parameters:
username- the username of the accountaoServer- the server the account is hosted on- Returns:
- if the
UserServerhas a password set - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theUserServeris not found- See Also:
UserServer.arePasswordsSet(),setLinuxServerAccountPassword(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, java.lang.String),UserServer
-
isLinuxServerAccountProcmailManual
public int isLinuxServerAccountProcmailManual(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException
Determines if aUserServeris currently in manual procmail mode. Manual procmail mode is initiated when the header comment in the .procmailrc file is altered or removed.- Parameters:
username- the username of the accountaoServer- the server the account is hosted on- Returns:
- if the
UserServeris in manual mode - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theUserServeris not found- See Also:
UserServer.isProcmailManual(),UserServer
-
isMySQLDatabaseNameAvailable
public boolean isMySQLDatabaseNameAvailable(Database.Name name, Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
name- the name of the databaseaoServer- the hostname of theServer- Returns:
trueif theDatabaseis available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if the database name is invalid or unable to find theServer- See Also:
Server.isMySQLDatabaseNameAvailable(com.aoindustries.aoserv.client.mysql.Database.Name)
-
isMySQLServerNameAvailable
public boolean isMySQLServerNameAvailable(Server.Name name, String aoServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
name- the name of the MySQL serveraoServer- the hostname of theServer- Returns:
trueif theServeris available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if the server name is invalid or unable to find theServer- See Also:
Server.isMySQLServerNameAvailable(com.aoindustries.aoserv.client.mysql.Server.Name)
-
isMySQLServerUserPasswordSet
public boolean isMySQLServerUserPasswordSet(User.Name username, Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Determines if aUserServercurrently has a password set.- Parameters:
username- the username of the accountaoServer- the server the account is hosted on- Returns:
- if the
UserServerhas a password set - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theUserServeris not found- See Also:
UserServer.arePasswordsSet(),setMySQLServerUserPassword(com.aoindustries.aoserv.client.mysql.User.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, java.lang.String),UserServer
-
isPackageNameAvailable
public boolean isPackageNameAvailable(Account.Name packageName) throws IOException, SQLException
Determines if aPackagename is available.- Parameters:
packageName- the name of thePackage- Returns:
trueif thePackagename is available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
PackageTable.isPackageNameAvailable(com.aoindustries.aoserv.client.account.Account.Name),generatePackageName(com.aoindustries.aoserv.client.account.Account.Name),addPackage(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.Account.Name, int),Package
-
isPostgresDatabaseNameAvailable
public boolean isPostgresDatabaseNameAvailable(Database.Name name, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
name- the name of the databasepostgresServer- the name of the PostgreSQL serveraoServer- the hostname of theServer- Returns:
trueif theDatabaseis available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if the database name is invalid or unable to find theServer- See Also:
Server.isPostgresDatabaseNameAvailable(com.aoindustries.aoserv.client.postgresql.Database.Name)
-
isPostgresServerNameAvailable
public boolean isPostgresServerNameAvailable(Server.Name name, String aoServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
name- the name of the PostgreSQL serveraoServer- the hostname of theServer- Returns:
trueif theServeris available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if the server name is invalid or unable to find theServer- See Also:
Server.isPostgresServerNameAvailable(com.aoindustries.aoserv.client.postgresql.Server.Name)
-
isPostgresServerUserPasswordSet
public boolean isPostgresServerUserPasswordSet(User.Name username, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Determines if aUserServercurrently has a password set.- Parameters:
username- the username of the accountpostgresServer- the name of the PostgreSQL serveraoServer- the server the account is hosted on- Returns:
- if the
UserServerhas a password set - Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theUserServeris not found- See Also:
UserServer.arePasswordsSet(),setPostgresServerUserPassword(com.aoindustries.aoserv.client.postgresql.User.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String, java.lang.String),UserServer
-
isEmailDomainAvailable
public boolean isEmailDomainAvailable(DomainName domain, String aoServer) throws IllegalArgumentException, IOException, SQLException
Determines if aDomainis available.- Parameters:
domain- the domainaoServer- the hostname of the server- Returns:
trueif theDomainis available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if theDomainis invalid- See Also:
Server.isEmailDomainAvailable(com.aoapps.net.DomainName),addEmailDomain(com.aoapps.net.DomainName, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name),Domain
-
isSharedTomcatNameAvailable
public boolean isSharedTomcatNameAvailable(String name) throws IOException, SQLException
Determines if a name is available for use as aSharedTomcat.- Parameters:
name- the name- Returns:
trueif the name is available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
SharedTomcatTable.isSharedTomcatNameAvailable(java.lang.String),generateSharedTomcatName(java.lang.String),SharedTomcat
-
isSiteNameAvailable
public boolean isSiteNameAvailable(String siteName) throws IllegalArgumentException, IOException, SQLException
Determines if a site name is available.- Parameters:
siteName- the site name- Returns:
trueif the site name is available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if the site name is invalid- See Also:
SiteTable.isSiteNameAvailable(java.lang.String)
-
isUsernameAvailable
public boolean isUsernameAvailable(User.Name username) throws IOException, SQLException
Determines if aUseris available.- Parameters:
username- the username- Returns:
trueif theUseris available- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database- See Also:
UserTable.isUsernameAvailable(com.aoindustries.aoserv.client.account.User.Name),addUsername(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.User.Name),User
-
moveAccount
public void moveAccount(Account.Name business, String from, String to, TerminalWriter out) throws IllegalArgumentException, IOException, SQLException
- Parameters:
business- the accounting code of theAccountfrom- the hostname of theServerto get all the resources fromto- the hostname of theServerto place all the resources onout- an optionalTerminalWriterto send diagnostic output to- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theAccountor either of theservers- See Also:
Account.move(com.aoindustries.aoserv.client.linux.Server, com.aoindustries.aoserv.client.linux.Server, com.aoapps.hodgepodge.io.TerminalWriter)
-
moveIPAddress
public void moveIPAddress(InetAddress ip_address, String from_server, String from_net_device, String to_server) throws IllegalArgumentException, IOException, SQLException
- Parameters:
ip_address- the IP address to moveto_server- the destination server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theIpAddressor theHost- See Also:
IpAddress.moveTo(com.aoindustries.aoserv.client.net.Host)
-
ping
public int ping() throws IOException, SQLExceptionTimes the latency of the communication with the server.- Returns:
- the latency of the communication in milliseconds
- Throws:
IOExceptionSQLException- See Also:
AOServConnector.ping()
-
printZoneFile
public void printZoneFile(String zone, PrintWriter out) throws IllegalArgumentException, SQLException, IOException
Prints the contents of aZoneas used by thenamedprocess.- Parameters:
zone- the name of theZoneout- thePrintWriterto write to- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theZone- See Also:
Zone.printZoneFile(java.io.PrintWriter),addDNSZone(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, com.aoapps.net.InetAddress, int)
-
refreshEmailSmtpRelay
public void refreshEmailSmtpRelay(int pkey, long minDuration) throws IllegalArgumentException, IOException, SQLExceptionRefreshes the time window for SMTP server access by resetting the expiration to 24 hours from the current time.- Parameters:
pkey- theidof theSmtpRelay- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theSmtpRelay- See Also:
SmtpRelay.refresh(long),addEmailSmtpRelay(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, com.aoapps.net.HostAddress, java.lang.String, long),SmtpRelay
-
removeBlackholeEmailAddress
public void removeBlackholeEmailAddress(String address, DomainName domain, String aoServer) throws IllegalArgumentException, IOException, SQLException
Removes aBlackholeAddressfrom the system.- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomain,Address, orBlackholeAddress- See Also:
BlackholeAddress.remove()
-
removeAdministrator
public void removeAdministrator(User.Name username) throws IllegalArgumentException, IOException, SQLException
Removes anAdministratorfrom the system.- Parameters:
username- the username of theAdministrator- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorAdministrator- See Also:
Administrator.remove(),addAdministrator(com.aoindustries.aoserv.client.account.User.Name, java.lang.String, java.lang.String, java.sql.Date, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.aoapps.net.Email, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
-
removeAccountHost
public void removeAccountHost(Account.Name accounting, String server) throws IllegalArgumentException, IOException, SQLException
Revokes anaccount'saccess to aHost. The server must not have any resources allocated for the business, and the server must not be the default server for the business.- Parameters:
accounting- the accounting code of the businessserver- the hostname of the server- Throws:
IOException- if unable to communicate with the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find the business or server- See Also:
AccountHost,AccountHost.remove(),addAccountHost(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String),setDefaultAccountHost(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String)
-
removeCreditCard
public void removeCreditCard(int pkey) throws IllegalArgumentException, SQLException, IOExceptionRemoves aCreditCard.- Parameters:
pkey- theidof theCreditCardto remove- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theCreditCard- See Also:
CreditCard.remove()
-
removeCvsRepository
public void removeCvsRepository(String aoServer, PosixPath path) throws IllegalArgumentException, IOException, SQLException
Removes aCvsRepository.- Parameters:
aoServer- the hostname of theServerpath- the path of the repository- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorCvsRepository- See Also:
CvsRepository.remove(),addCvsRepository(java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, long),CvsRepository
-
removeDNSRecord
public void removeDNSRecord(int pkey) throws IllegalArgumentException, IOException, SQLExceptionRemoves one record from aZone.- Parameters:
pkey- theidof theRecordto remove- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theRecord- See Also:
Record.remove(),addDNSRecord(java.lang.String, java.lang.String, java.lang.String, int, int, int, java.lang.String, int),Record
-
removeDNSRecord
public void removeDNSRecord(String zone, String domain, String type, String destination) throws IllegalArgumentException, IOException, SQLException
-
removeDNSZone
public void removeDNSZone(String zone) throws IllegalArgumentException, IOException, SQLException
Completely removes aZonefrom the servers.- Parameters:
zone- the name of theZoneto remove- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theZone- See Also:
Zone.remove(),addDNSZone(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, com.aoapps.net.InetAddress, int),Zone
-
setDNSZoneTTL
public void setDNSZoneTTL(String zone, int ttl) throws IllegalArgumentException, IOException, SQLException
Completely removes aZonefrom the servers.- Parameters:
zone- the name of theZoneto remove- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theZone- See Also:
Zone.remove(),addDNSZone(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, com.aoapps.net.InetAddress, int),Zone
-
removeEmailAddress
public void removeEmailAddress(String address, DomainName domain, String aoServer) throws IllegalArgumentException, IOException, SQLException
Removes anAddressfrom the system. If theAddressis used by other resources, such asListAddress, those resources are also removed.- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomainorAddress- See Also:
Address.remove(),addEmailForwarding(java.lang.String, com.aoapps.net.DomainName, java.lang.String, com.aoapps.net.Email),addEmailListAddress(java.lang.String, com.aoapps.net.DomainName, com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String),addEmailPipeAddress(java.lang.String, com.aoapps.net.DomainName, int),addLinuxAccAddress(java.lang.String, com.aoapps.net.DomainName, java.lang.String, com.aoindustries.aoserv.client.linux.User.Name)
-
removeEmailForwarding
public void removeEmailForwarding(String address, DomainName domain, String aoServer, Email destination) throws IllegalArgumentException, IOException, SQLException
Removes anForwardingfrom the system.- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@aoServer- the hostname of the server that hosts this domaindestination- the destination of the email forwarding- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomain,Address, orForwarding- See Also:
Forwarding.remove(),addEmailForwarding(java.lang.String, com.aoapps.net.DomainName, java.lang.String, com.aoapps.net.Email)
-
removeEmailList
public void removeEmailList(PosixPath path, String aoServer) throws IllegalArgumentException, IOException, SQLException
Removes anListfrom the system. AllAddresses that are directed to the list are also removed. The file that stores the list contents is removed from the file system.- Parameters:
path- the path of theListto removeaoServer- the server that hosts this list- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theList- See Also:
List.remove(),addEmailList(java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name)
-
removeEmailListAddress
public void removeEmailListAddress(String address, DomainName domain, PosixPath path, String aoServer) throws IllegalArgumentException, IOException, SQLException
Removes anListAddressfrom the system.- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@path- the list the emails are sent toaoServer- the hostname of the server hosting the list- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomain,Address,List, orListAddress- See Also:
ListAddress.remove(),addEmailListAddress(java.lang.String, com.aoapps.net.DomainName, com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String)
-
removeEmailPipe
public void removeEmailPipe(int pkey) throws IllegalArgumentException, IOException, SQLException- Parameters:
pkey- theidof thePipeto remove- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find thePipe- See Also:
Pipe.remove(),addEmailPipe(java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name)
-
removeEmailPipeAddress
public void removeEmailPipeAddress(String address, DomainName domain, int pipe) throws IllegalArgumentException, IOException, SQLException
Removes anPipeAddressfrom the system.- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@pipe- the pkey of the email pipe- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomain,Address,Pipe, orPipeAddress- See Also:
PipeAddress.remove(),addEmailPipeAddress(java.lang.String, com.aoapps.net.DomainName, int)
-
removeFTPGuestUser
public void removeFTPGuestUser(User.Name username) throws IllegalArgumentException, IOException, SQLException
- Parameters:
username- the username of theGuestUser- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theGuestUser- See Also:
GuestUser.remove(),addFTPGuestUser(com.aoindustries.aoserv.client.linux.User.Name)
-
removeHttpdSharedTomcat
public void removeHttpdSharedTomcat(String name, String aoServer) throws IllegalArgumentException, IOException, SQLException
Completely removes aSharedTomcatfrom the servers.- Parameters:
name- the name of the siteaoServer- the server the site runs on- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theSharedTomcat- See Also:
SharedTomcat.remove(),SharedTomcat
-
removeHttpdSite
public void removeHttpdSite(String name, String aoServer) throws IllegalArgumentException, IOException, SQLException
Completely removes aSitefrom the servers.- Parameters:
name- the name of the siteaoServer- the server the site runs on- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theSite- See Also:
Site.remove(),Site
-
removeHttpdSiteURL
public void removeHttpdSiteURL(int pkey) throws IllegalArgumentException, IOException, SQLExceptionRemoves aVirtualHostNamefrom the servers.- Parameters:
pkey- the pkey of the site URL- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theVirtualHostName- See Also:
VirtualHostName.remove()
-
removeHttpdTomcatContext
public void removeHttpdTomcatContext(int pkey) throws IllegalArgumentException, IOException, SQLExceptionRemoves aContextfrom the servers.- Parameters:
pkey- the pkey of the context- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theContext- See Also:
Context.remove()
-
removeHttpdTomcatDataSource
public void removeHttpdTomcatDataSource(int pkey) throws IllegalArgumentException, IOException, SQLExceptionRemoves aContextDataSourcefrom aContext.- Parameters:
pkey- the pkey of the data source- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theContextDataSource- See Also:
Context.remove()
-
removeHttpdTomcatParameter
public void removeHttpdTomcatParameter(int pkey) throws IllegalArgumentException, IOException, SQLExceptionRemoves aContextParameterfrom aContext.- Parameters:
pkey- the pkey of the parameter- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theContextParameter- See Also:
Context.remove()
-
removeLinuxAccAddress
public void removeLinuxAccAddress(String address, DomainName domain, String aoServer, User.Name username) throws IllegalArgumentException, IOException, SQLException
Removes aInboxAddressfrom the system.- Parameters:
address- the part of the email address before the@domain- the part of the email address after the@username- the account the emails are sent to- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomain,Address,User,User, orInboxAddress- See Also:
InboxAddress.remove(),addLinuxAccAddress(java.lang.String, com.aoapps.net.DomainName, java.lang.String, com.aoindustries.aoserv.client.linux.User.Name)
-
removeLinuxAccount
public void removeLinuxAccount(User.Name username) throws IllegalArgumentException, IOException, SQLException
Removes aUserand all related data from the system.- Parameters:
username- the username of theUserto remove- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.remove(),addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
removeLinuxGroup
public void removeLinuxGroup(Group.Name name) throws IllegalArgumentException, IOException, SQLException
Removes aGroupand all related data from the system.- Parameters:
name- the name of theGroupto remove- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theGroup- See Also:
Group.remove(),addLinuxGroup(com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.account.Account.Name, java.lang.String)
-
removeLinuxGroupAccount
public void removeLinuxGroupAccount(Group.Name group, User.Name username) throws IllegalArgumentException, IOException, SQLException
- Parameters:
group- the name of theGroupto remove access tousername- the username of theUserto remove access from- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theGroup,User, orGroupUser- See Also:
GroupUser.remove(),addLinuxGroupAccount(com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Name),addLinuxGroup(com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.account.Account.Name, java.lang.String),addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
removeLinuxServerAccount
public void removeLinuxServerAccount(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException
Removes aUserServerfrom aServer.- Parameters:
username- the username of theUserServerto removeaoServer- the hostname of theServerto remove the account from- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser,Server, orUserServer- See Also:
UserServer.remove(),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
removeLinuxServerGroup
public void removeLinuxServerGroup(Group.Name group, String aoServer) throws IllegalArgumentException, IOException, SQLException
Removes aGroupServerfrom aServer.- Parameters:
group- the name of theGroupServerto removeaoServer- the hostname of theServer- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theGroup,Server, orGroupServer- See Also:
GroupServer.remove(),addLinuxServerGroup(com.aoindustries.aoserv.client.linux.Group.Name, java.lang.String)
-
removeMySQLDatabase
public void removeMySQLDatabase(Database.Name name, Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Removes aDatabasefrom the system. All relatedDatabaseUsers are also removed, and all data is removed from the MySQL server. The data is not dumped or backed-up during the removal, if a backup is desired, usedumpMySQLDatabase(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, java.io.Writer).- Parameters:
name- the name of the databaseaoServer- the server the database is hosted on- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorDatabase- See Also:
Database.remove(),addMySQLDatabase(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name),dumpMySQLDatabase(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, java.io.Writer)
-
removeMySQLDBUser
public void removeMySQLDBUser(Database.Name name, Server.Name mysqlServer, String aoServer, User.Name username) throws IllegalArgumentException, IOException, SQLException
- Parameters:
name- the name of theDatabaseaoServer- the hostname of theServerusername- the username of theUser- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Database,UserServer, orDatabaseUser- See Also:
DatabaseUser.remove(),addMySQLDBUser(com.aoindustries.aoserv.client.mysql.Database.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.mysql.User.Name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)
-
removeMySQLServerUser
public void removeMySQLServerUser(User.Name username, Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
username- the username of theUserServeraoServer- the hostname of theServer- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUserServer- See Also:
UserServer.remove(),addMySQLServerUser(com.aoindustries.aoserv.client.mysql.User.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String, java.lang.String)
-
removeMySQLUser
public void removeMySQLUser(User.Name username) throws IllegalArgumentException, IOException, SQLException
Removes aUserfrom a the system. All of the associatedUserServers andDatabaseUsers are also removed.- Parameters:
username- the username of theUser- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.remove(),addMySQLUser(com.aoindustries.aoserv.client.mysql.User.Name),removeMySQLServerUser(com.aoindustries.aoserv.client.mysql.User.Name, com.aoindustries.aoserv.client.mysql.Server.Name, java.lang.String)
-
removeNetBind
public void removeNetBind(int pkey) throws IllegalArgumentException, IOException, SQLExceptionRemoves aBindfrom a the system.- Parameters:
pkey- the primary key of theBind- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theBind- See Also:
Bind.remove()
-
removePostgresDatabase
public void removePostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Removes aDatabasefrom the system. All data is removed from the PostgreSQL server. The data is not dumped or backed-up during the removal, if a backup is desired, usedumpPostgresDatabase(com.aoindustries.aoserv.client.postgresql.Database.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String, java.io.Writer).- Parameters:
name- the name of the databasepostgresServer- the name of the PostgreSQL serveraoServer- the server the database is hosted on- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorDatabase- See Also:
Database.remove(),addPostgresDatabase(com.aoindustries.aoserv.client.postgresql.Database.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String, com.aoindustries.aoserv.client.postgresql.User.Name, java.lang.String, boolean),dumpPostgresDatabase(com.aoindustries.aoserv.client.postgresql.Database.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String, java.io.Writer)
-
removePostgresServerUser
public void removePostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
username- the username of theUserServerpostgresServer- the name of the PostgreSQL serveraoServer- the hostname of theServer- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUserServer- See Also:
UserServer.remove()
-
removePostgresUser
public void removePostgresUser(User.Name username) throws IllegalArgumentException, IOException, SQLException
Removes aUserfrom a the system.. All of the associatedUserServers are also removed.- Parameters:
username- the username of theUser- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.remove(),addPostgresUser(com.aoindustries.aoserv.client.postgresql.User.Name),removePostgresServerUser(com.aoindustries.aoserv.client.postgresql.User.Name, com.aoindustries.aoserv.client.postgresql.Server.Name, java.lang.String)
-
removeEmailDomain
public void removeEmailDomain(DomainName domain, String aoServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
domain- the name of theDomainaoServer- the server hosting this domain- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theDomain- See Also:
Domain.remove(),addEmailDomain(com.aoapps.net.DomainName, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name),removeEmailAddress(java.lang.String, com.aoapps.net.DomainName, java.lang.String)
-
removeEmailSmtpRelay
public void removeEmailSmtpRelay(int pkey) throws IllegalArgumentException, IOException, SQLExceptionRemoves anSmtpRelayfrom the system, revoking access to the SMTP server from one IP address.- Parameters:
pkey- theidof theDomain- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theSmtpRelay- See Also:
SmtpRelay.remove(),addEmailSmtpRelay(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String, com.aoapps.net.HostAddress, java.lang.String, long),refreshEmailSmtpRelay(int, long)
-
removeFileBackupSetting
public void removeFileBackupSetting(int replication, String path) throws IllegalArgumentException, IOException, SQLExceptionRemoves aFileReplicationSettingfrom the system.- Parameters:
replication- the pkey of theFileReplicationpath- the path of the setting- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theFileReplicationorFileReplicationSetting- See Also:
FileReplicationSetting.remove(),addFileBackupSetting(int, java.lang.String, boolean, boolean)
-
removeMajordomoServer
public void removeMajordomoServer(DomainName domain, String aoServer) throws IllegalArgumentException, IOException, SQLException
Removes aMajordomoServerand all of itsMajordomoLists.- Parameters:
domain- the name of theMajordomoServeraoServer- the server hosting the list- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,DomainorMajordomoServer- See Also:
MajordomoServer.remove(),addMajordomoServer(com.aoapps.net.DomainName, java.lang.String, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, java.lang.String)
-
removeUsername
public void removeUsername(User.Name username) throws IllegalArgumentException, IOException, SQLException
Removes aUserfrom the system.- Parameters:
username- the username of theUser- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.remove(),addUsername(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.User.Name)
-
restartApache
public void restartApache(String aoServer) throws IllegalArgumentException, IOException, SQLException
Restarts the Apache web server.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.restartApache()
-
restartCron
public void restartCron(String aoServer) throws IllegalArgumentException, IOException, SQLException
Restarts the cron doggie.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.restartCron()
-
restartMySQL
public void restartMySQL(Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Restarts the MySQL database server.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.restartMySQL()
-
restartPostgreSQL
public void restartPostgreSQL(Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Restarts the PostgreSQL database server.- Parameters:
postgresServer- the name of the PostgreSQL serveraoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.restartPostgreSQL()
-
restartXfs
public void restartXfs(String aoServer) throws IllegalArgumentException, IOException, SQLException
Restarts the X Font Server.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.restartXfs()
-
restartXvfb
public void restartXvfb(String aoServer) throws IllegalArgumentException, IOException, SQLException
Restarts the X Virtual Frame Buffer.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.restartXvfb()
-
setAutoresponder
public void setAutoresponder(User.Name username, String aoServer, String address, DomainName domain, String subject, String content, boolean enabled) throws IllegalArgumentException, IOException, SQLException
Sets the autoresponder behavior for a Linux server account.- Parameters:
username- the username of the accountaoServer- the server the account is onaddress- the address part of the email addressdomain- the domain of the email addresssubject- the subject of the emailcontent- the content of the emailenabled- if the autoresponder is enabled or not- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theAddressor theUserServer- See Also:
UserServer.setAutoresponder(com.aoindustries.aoserv.client.email.InboxAddress, java.lang.String, java.lang.String, boolean)
-
setAccountAccounting
public void setAccountAccounting(Account.Name oldAccounting, Account.Name newAccounting) throws IllegalArgumentException, IOException, SQLException
Sets the accounting code for the business. The accounting code is the value that uniquely identifies an account within the system.- Parameters:
oldAccounting- the old accounting codenewAccounting- the new accounting code- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theAccountor the requested accounting code is not valid- See Also:
Account.setName(com.aoindustries.aoserv.client.account.Account.Name)
-
setAdministratorPassword
public void setAdministratorPassword(User.Name username, String password) throws IllegalArgumentException, IOException, SQLException
Sets the password for anAdministrator. This password must pass the security checks provided bycheckAdministratorPassword(com.aoindustries.aoserv.client.account.User.Name, java.lang.String).- Parameters:
username- the username of theAdministratorpassword- the new password- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theAdministrator- See Also:
Administrator.setPassword(java.lang.String),addAdministrator(com.aoindustries.aoserv.client.account.User.Name, java.lang.String, java.lang.String, java.sql.Date, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.aoapps.net.Email, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
-
setAdministratorProfile
public void setAdministratorProfile(User.Name username, String name, String title, Date birthday, boolean isPrivate, String workPhone, String homePhone, String cellPhone, String fax, Email email, String address1, String address2, String city, String state, String country, String zip) throws IllegalArgumentException, IOException, SQLException
Sets the profile of anAdministrator, which is all of their contact information and other details.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theAdministrator- See Also:
Administrator.setProfile(java.lang.String, java.lang.String, java.sql.Date, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.aoapps.net.Email, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String),addAdministrator(com.aoindustries.aoserv.client.account.User.Name, java.lang.String, java.lang.String, java.sql.Date, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.aoapps.net.Email, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
-
setCronTable
public void setCronTable(User.Name username, String aoServer, String cronTable) throws IllegalArgumentException, IOException, SQLException
Sets a user's cron table on one server.- Parameters:
username- the username of theUseraoServer- the server to get the data fromcronTable- the new cron table- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find the sourceUserServer- See Also:
UserServer.setCronTable(java.lang.String),getCronTable(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),removeLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String)
-
setCvsRepositoryMode
public void setCvsRepositoryMode(String aoServer, PosixPath path, long mode) throws IllegalArgumentException, IOException, SQLException
Sets the permissions for a CVS repository directory.- Parameters:
aoServer- the server the repository exists onpath- the path of the servermode- the permission bits- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find the sourceCvsRepository- See Also:
CvsRepository.setMode(long),addCvsRepository(java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, long),removeCvsRepository(java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setDefaultAccountHost
public void setDefaultAccountHost(Account.Name accounting, String server) throws IllegalArgumentException, SQLException, IOException
- Parameters:
accounting- the accounting code of the businessserver- the hostname of the server- Throws:
IOException- if unable to communicate with the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find the business or server- See Also:
AccountHost,AccountHost.setAsDefault(),addAccountHost(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String),removeAccountHost(com.aoindustries.aoserv.client.account.Account.Name, java.lang.String)
-
setEmailListAddressList
public void setEmailListAddressList(PosixPath path, String aoServer, String addresses) throws IllegalArgumentException, IOException, SQLException
Sets the list of addresses that anListwill forward messages to.- Parameters:
path- the path of theListaoServer- the server hosting the listaddresses- the list of addresses, one address per line- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theList- See Also:
List.setAddressList(java.lang.String),getEmailListAddressList(com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String),addEmailList(java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name)
-
setFileBackupSetting
public void setFileBackupSetting(int replication, String path, boolean backupEnabled, boolean required) throws IllegalArgumentException, IOException, SQLExceptionSets the settings contained by oneFileReplicationSetting- Parameters:
replication- the hostname of theFileReplicationpath- the path of the settingbackupEnabled- the enabled flag for the prefix- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theFileReplicationorFileReplicationSetting- See Also:
FileReplicationSetting.setSettings(java.lang.String, boolean, boolean),addFileBackupSetting(int, java.lang.String, boolean, boolean)
-
setHttpdSharedTomcatIsManual
public void setHttpdSharedTomcatIsManual(String name, String aoServer, boolean isManual) throws IllegalArgumentException, IOException, SQLException
Sets theis_manualflag for aSharedTomcat- Parameters:
name- the name of the JVMaoServer- the hostname of theServerisManual- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSharedTomcat- See Also:
SharedTomcat.setIsManual(boolean)
-
setHttpdSharedTomcatMaxPostSize
public void setHttpdSharedTomcatMaxPostSize(String name, String aoServer, int maxPostSize) throws IllegalArgumentException, IOException, SQLException
Sets themaxPostSizefor aSharedTomcat- Parameters:
name- the name of the JVMaoServer- the hostname of theServermaxPostSize- the new maximum POST size, in bytes,-1for none.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSharedTomcat- See Also:
SharedTomcat.setMaxPostSize(int)
-
setHttpdSharedTomcatUnpackWARs
public void setHttpdSharedTomcatUnpackWARs(String name, String aoServer, boolean unpackWARs) throws IllegalArgumentException, IOException, SQLException
Sets theunpackWARssetting for aSharedTomcat- Parameters:
name- the name of the JVMaoServer- the hostname of theServerunpackWARs- the new setting- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSharedTomcat- See Also:
SharedTomcat.setUnpackWARs(boolean)
-
setHttpdSharedTomcatAutoDeploy
public void setHttpdSharedTomcatAutoDeploy(String name, String aoServer, boolean autoDeploy) throws IllegalArgumentException, IOException, SQLException
Sets theautoDeploysetting for aSharedTomcat- Parameters:
name- the name of the JVMaoServer- the hostname of theServerautoDeploy- the new setting- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSharedTomcat- See Also:
SharedTomcat.setAutoDeploy(boolean)
-
setHttpdSharedTomcatTomcatAuthentication
public void setHttpdSharedTomcatTomcatAuthentication(String name, String aoServer, boolean autoDeploy) throws IllegalArgumentException, IOException, SQLException
Sets thetomcatAuthenticationsetting for aSharedTomcat- Parameters:
name- the name of the JVMaoServer- the hostname of theServerautoDeploy- the new setting- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSharedTomcat- See Also:
SharedTomcat.setTomcatAuthentication(boolean)
-
setHttpdSharedTomcatVersion
public void setHttpdSharedTomcatVersion(String name, String aoServer, String version) throws IllegalArgumentException, IOException, SQLException
Sets the Tomcat version for aSharedTomcat- Parameters:
name- the name of the JVMaoServer- the hostname of theServerversion- the new version- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,SharedTomcat, orVersion.- See Also:
SharedTomcat.setHttpdTomcatVersion(com.aoindustries.aoserv.client.web.tomcat.Version)
-
setHttpdSiteBindIsManual
public void setHttpdSiteBindIsManual(int pkey, boolean isManual) throws IllegalArgumentException, IOException, SQLExceptionSets theis_manualflag for aVirtualHost- Parameters:
pkey- the primary key of theVirtualHostisManual- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theVirtualHost- See Also:
VirtualHost.setIsManual(boolean)
-
setHttpdSiteBindRedirectToPrimaryHostname
public void setHttpdSiteBindRedirectToPrimaryHostname(int pkey, boolean redirectToPrimaryHostname) throws IllegalArgumentException, IOException, SQLExceptionSets theredirect_to_primary_hostnameflag for aVirtualHost- Parameters:
pkey- the primary key of theVirtualHostredirectToPrimaryHostname- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theVirtualHost- See Also:
VirtualHost.setRedirectToPrimaryHostname(boolean)
-
setHttpdSiteIsManual
public void setHttpdSiteIsManual(String siteName, String aoServer, boolean isManual) throws IllegalArgumentException, IOException, SQLException
Sets theis_manualflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerisManual- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setIsManual(boolean)
-
setHttpdSiteServerAdmin
public void setHttpdSiteServerAdmin(String siteName, String aoServer, Email emailAddress) throws IllegalArgumentException, IOException, SQLException
Sets the administrative email address for aSite.- Parameters:
siteName- the name of theSiteaoServer- the hostname of the server that hosts the siteemailAddress- the new adminstrative email address- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite, or the email address is not in a valid format- See Also:
Site.setServerAdmin(com.aoapps.net.Email)
-
setHttpdSitePhpVersion
public void setHttpdSitePhpVersion(String siteName, String aoServer, String phpVersion) throws IllegalArgumentException, IOException, SQLException
Sets the PHP version for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerphpVersion- the new version- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Site, or PHP version.- See Also:
Site.setPhpVersion(com.aoindustries.aoserv.client.distribution.SoftwareVersion)
-
setHttpdSiteEnableCgi
public void setHttpdSiteEnableCgi(String siteName, String aoServer, boolean enableCgi) throws IllegalArgumentException, IOException, SQLException
Sets theenable_cgiflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerenableCgi- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setEnableCgi(boolean)
-
setHttpdSiteEnableSsi
public void setHttpdSiteEnableSsi(String siteName, String aoServer, boolean enableSsi) throws IllegalArgumentException, IOException, SQLException
Sets theenable_ssiflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerenableSsi- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setEnableSsi(boolean)
-
setHttpdSiteEnableHtaccess
public void setHttpdSiteEnableHtaccess(String siteName, String aoServer, boolean enableHtaccess) throws IllegalArgumentException, IOException, SQLException
Sets theenable_htaccessflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerenableHtaccess- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setEnableHtaccess(boolean)
-
setHttpdSiteEnableIndexes
public void setHttpdSiteEnableIndexes(String siteName, String aoServer, boolean enableIndexes) throws IllegalArgumentException, IOException, SQLException
Sets theenable_indexesflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerenableIndexes- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setEnableIndexes(boolean)
-
setHttpdSiteEnableFollowSymlinks
public void setHttpdSiteEnableFollowSymlinks(String siteName, String aoServer, boolean enableFollowSymlinks) throws IllegalArgumentException, IOException, SQLException
Sets theenable_follow_symlinksflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerenableFollowSymlinks- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setEnableFollowSymlinks(boolean)
-
setHttpdSiteEnableAnonymousFtp
public void setHttpdSiteEnableAnonymousFtp(String siteName, String aoServer, boolean enableAnonymousFtp) throws IllegalArgumentException, IOException, SQLException
Sets theenable_anonymous_ftpflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerenableAnonymousFtp- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setEnableAnonymousFtp(boolean)
-
setHttpdSiteBlockTraceTrack
public void setHttpdSiteBlockTraceTrack(String siteName, String aoServer, boolean blockTraceTrack) throws IllegalArgumentException, IOException, SQLException
Sets theblock_trace_trackflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerblockTraceTrack- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setBlockTraceTrack(boolean)
-
setHttpdSiteBlockScm
public void setHttpdSiteBlockScm(String siteName, String aoServer, boolean blockScm) throws IllegalArgumentException, IOException, SQLException
Sets theblock_scmflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerblockScm- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setBlockScm(boolean)
-
setHttpdSiteBlockCoreDumps
public void setHttpdSiteBlockCoreDumps(String siteName, String aoServer, boolean blockCoreDumps) throws IllegalArgumentException, IOException, SQLException
Sets theblock_core_dumpsflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerblockCoreDumps- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setBlockCoreDumps(boolean)
-
setHttpdSiteBlockEditorBackups
public void setHttpdSiteBlockEditorBackups(String siteName, String aoServer, boolean blockEditorBackups) throws IllegalArgumentException, IOException, SQLException
Sets theblock_editor_backupsflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerblockEditorBackups- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorSite- See Also:
Site.setBlockEditorBackups(boolean)
-
setHttpdTomcatContextAttributes
public void setHttpdTomcatContextAttributes(String siteName, String aoServer, String oldPath, String className, boolean cookies, boolean crossContext, PosixPath docBase, boolean override, String newPath, boolean privileged, boolean reloadable, boolean useNaming, String wrapperClass, int debug, PosixPath workDir, boolean serverXmlConfigured) throws IllegalArgumentException, IOException, SQLException
Sets the attributes for aContext.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServer,Site, orSite
-
setHttpdTomcatSiteBlockWebinf
public void setHttpdTomcatSiteBlockWebinf(String siteName, String aoServer, boolean blockWebinf) throws IllegalArgumentException, IOException, SQLException
Sets theblock_webinfflag for aSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerblockWebinf- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Site, orSite.- See Also:
Site.setBlockWebinf(boolean)
-
setHttpdTomcatStdSiteMaxPostSize
public void setHttpdTomcatStdSiteMaxPostSize(String siteName, String aoServer, int maxPostSize) throws IllegalArgumentException, IOException, SQLException
Sets themaxPostSizefor aPrivateTomcatSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServermaxPostSize- the new maximum POST size, in bytes,-1for none.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Site, orPrivateTomcatSite- See Also:
PrivateTomcatSite.setMaxPostSize(int)
-
setHttpdTomcatStdSiteUnpackWARs
public void setHttpdTomcatStdSiteUnpackWARs(String siteName, String aoServer, boolean unpackWARs) throws IllegalArgumentException, IOException, SQLException
Sets theunpackWARssetting for aPrivateTomcatSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerunpackWARs- the new setting- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Site, orPrivateTomcatSite- See Also:
PrivateTomcatSite.setUnpackWARs(boolean)
-
setHttpdTomcatStdSiteAutoDeploy
public void setHttpdTomcatStdSiteAutoDeploy(String siteName, String aoServer, boolean autoDeploy) throws IllegalArgumentException, IOException, SQLException
Sets theautoDeploysetting for aPrivateTomcatSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerautoDeploy- the new setting- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Site, orPrivateTomcatSite- See Also:
PrivateTomcatSite.setAutoDeploy(boolean)
-
setHttpdTomcatStdSiteTomcatAuthentication
public void setHttpdTomcatStdSiteTomcatAuthentication(String siteName, String aoServer, boolean tomcatAuthentication) throws IllegalArgumentException, IOException, SQLException
Sets thetomcatAuthenticationsetting for aPrivateTomcatSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServertomcatAuthentication- the new setting- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Site, orPrivateTomcatSite- See Also:
PrivateTomcatSite.setTomcatAuthentication(boolean)
-
setHttpdTomcatStdSiteVersion
public void setHttpdTomcatStdSiteVersion(String siteName, String aoServer, String version) throws IllegalArgumentException, IOException, SQLException
Sets the Tomcat version for aPrivateTomcatSite- Parameters:
siteName- the name of the siteaoServer- the hostname of theServerversion- the new version- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,Site,PrivateTomcatSite, orVersion.- See Also:
PrivateTomcatSite.setHttpdTomcatVersion(com.aoindustries.aoserv.client.web.tomcat.Version)
-
setIPAddressDHCPAddress
public void setIPAddressDHCPAddress(int ipAddress, InetAddress dhcpAddress) throws IllegalArgumentException, IOException, SQLExceptionSets the IP address of a DHCP-enabledIpAddress.- Parameters:
ipAddress- the pkey of theIpAddressdhcpAddress- the new IP address- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theIpAddressor DHCP address is not valid format- See Also:
IpAddress.setDHCPAddress(com.aoapps.net.InetAddress)
-
setIPAddressHostname
public void setIPAddressHostname(InetAddress ipAddress, String server, String net_device, DomainName hostname) throws IllegalArgumentException, IOException, SQLException
Sets the hostname of anIpAddress.- Parameters:
ipAddress- theIpAddressbeing modifiedhostname- the new hostname- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theIpAddressor hostname is not valid format- See Also:
IpAddress.setHostname(com.aoapps.net.DomainName)
-
setIPAddressMonitoringEnabled
public void setIPAddressMonitoringEnabled(InetAddress ipAddress, String server, String net_device, boolean enabled) throws IllegalArgumentException, IOException, SQLException
Sets the monitoring status of anIpAddress.- Parameters:
ipAddress- theIpAddressbeing modifiedenabled- the new monitoring state- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theIpAddressorPackage- See Also:
IpAddress.setPackage(com.aoindustries.aoserv.client.billing.Package),addPackage(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.Account.Name, int)
-
setIPAddressPackage
public void setIPAddressPackage(InetAddress ipAddress, String server, String net_device, Account.Name newPackage) throws IllegalArgumentException, IOException, SQLException
Sets the ownership of anIpAddress. ThePackagemay only be set if theIpAddressis not being used by any resources.- Parameters:
ipAddress- theIpAddressbeing modifiednewPackage- the name of thePackage- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theIpAddressorPackage- See Also:
IpAddress.setPackage(com.aoindustries.aoserv.client.billing.Package),addPackage(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.Account.Name, int)
-
setLinuxAccountHomePhone
public void setLinuxAccountHomePhone(User.Name username, User.Gecos phone) throws IllegalArgumentException, IOException, SQLException
Sets the home phone number associated with aUser.- Parameters:
username- the username of theUserphone- the new office phone- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.setHomePhone(com.aoindustries.aoserv.client.linux.User.Gecos),addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxAccountName
public void setLinuxAccountName(User.Name username, User.Gecos name) throws IllegalArgumentException, IOException, SQLException
Sets the full name associated with aUser.- Parameters:
username- the username of theUsername- the new full name for the account- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the name is not in a valid format or unable to find theUser- See Also:
User.setName(com.aoindustries.aoserv.client.linux.User.Gecos),User.Gecos.validate(java.lang.String),addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxAccountOfficeLocation
public void setLinuxAccountOfficeLocation(User.Name username, User.Gecos location) throws IllegalArgumentException, IOException, SQLException
Sets the office location associated with aUser.- Parameters:
username- the username of theUserlocation- the new office location- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.setOfficeLocation(com.aoindustries.aoserv.client.linux.User.Gecos),addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxAccountOfficePhone
public void setLinuxAccountOfficePhone(User.Name username, User.Gecos phone) throws IllegalArgumentException, IOException, SQLException
Sets the office phone number associated with aUser.- Parameters:
username- the username of theUserphone- the new office phone- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.setOfficePhone(com.aoindustries.aoserv.client.linux.User.Gecos),addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxAccountPassword
public void setLinuxAccountPassword(User.Name username, String password) throws IllegalArgumentException, IOException, SQLException
Sets the password for aUserby setting the password for each one of itsUserServers.- Parameters:
username- the username of theUserpassword- the new password- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.setPassword(java.lang.String),addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxAccountShell
public void setLinuxAccountShell(User.Name username, PosixPath path) throws IllegalArgumentException, IOException, SQLException
Sets the shell used by aUser.- Parameters:
username- the username of theUserpath- the full path of the shell- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUserorShell- See Also:
User.setShell(com.aoindustries.aoserv.client.linux.Shell),addLinuxAccount(com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, com.aoindustries.aoserv.client.linux.User.Gecos, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxServerAccountPassword
public void setLinuxServerAccountPassword(User.Name username, String aoServer, String password) throws IllegalArgumentException, IOException, SQLException
Sets the password for aUserServer.- Parameters:
username- the username of theUserServeraoServer- the hostname of theServerpassword- the new password- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theHost,ServerorUserServer- See Also:
UserServer.setPassword(java.lang.String),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxServerAccountJunkEmailRetention
public void setLinuxServerAccountJunkEmailRetention(User.Name username, String aoServer, int days) throws IllegalArgumentException, IOException, SQLException
Sets the number of days junk email is kept.- Parameters:
username- the username of theUserServeraoServer- the hostname of theServerdays- the new number of days,-1causes the junk to not be automatically removed- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUserServer- See Also:
UserServer.setJunkEmailRetention(int),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxServerAccountSpamAssassinIntegrationMode
public void setLinuxServerAccountSpamAssassinIntegrationMode(User.Name username, String aoServer, String mode) throws IllegalArgumentException, IOException, SQLException
Sets the SpamAssassin integration mode for an email account.- Parameters:
username- the username of theUserServeraoServer- the hostname of theServermode- the new mode- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServer,UserServer, orSpamAssassinMode- See Also:
UserServer.setEmailSpamAssassinIntegrationMode(com.aoindustries.aoserv.client.email.SpamAssassinMode),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath),SpamAssassinMode
-
setLinuxServerAccountSpamAssassinRequiredScore
public void setLinuxServerAccountSpamAssassinRequiredScore(User.Name username, String aoServer, float required_score) throws IllegalArgumentException, IOException, SQLException
Sets the SpamAssassin required score for an email account.- Parameters:
username- the username of theUserServeraoServer- the hostname of theServerrequired_score- the new required score- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUserServer- See Also:
UserServer.setSpamAssassinRequiredScore(float),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxServerAccountTrashEmailRetention
public void setLinuxServerAccountTrashEmailRetention(User.Name username, String aoServer, int days) throws IllegalArgumentException, IOException, SQLException
Sets the number of days trash email is kept.- Parameters:
username- the username of theUserServeraoServer- the hostname of theServerdays- the new number of days,-1causes the trash to not be automatically removed- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUserServer- See Also:
UserServer.setTrashEmailRetention(int),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setLinuxServerAccountUseInbox
public void setLinuxServerAccountUseInbox(User.Name username, String aoServer, boolean useInbox) throws IllegalArgumentException, IOException, SQLException
Sets theuse_inboxflag on aUserServer.- Parameters:
username- the username of theUserServeraoServer- the hostname of theServeruseInbox- the new flag- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theServerorUserServer- See Also:
UserServer.setUseInbox(boolean),UserServer.useInbox(),addLinuxServerAccount(com.aoindustries.aoserv.client.linux.User.Name, java.lang.String, com.aoindustries.aoserv.client.linux.PosixPath)
-
setMajordomoInfoFile
public void setMajordomoInfoFile(DomainName domain, String aoServer, String listName, String file) throws IllegalArgumentException, IOException, SQLException
Sets the info file for aMajordomoList.- Parameters:
domain- the domain of theMajordomoServeraoServer- the hostname of theServerlistName- the name of the new listfile- the new file contents- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the name is not valid or unable to find theServer,Domain,MajordomoServer, orMajordomoList- See Also:
MajordomoList.setInfoFile(java.lang.String),addMajordomoList(com.aoapps.net.DomainName, java.lang.String, java.lang.String),removeEmailList(com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String)
-
setMajordomoIntroFile
public void setMajordomoIntroFile(DomainName domain, String aoServer, String listName, String file) throws IllegalArgumentException, IOException, SQLException
Sets the intro file for aMajordomoList.- Parameters:
domain- the domain of theMajordomoServeraoServer- the hostname of theServerlistName- the name of the new listfile- the new file contents- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the name is not valid or unable to find theServer,Domain,MajordomoServer, orMajordomoList- See Also:
MajordomoList.setIntroFile(java.lang.String),addMajordomoList(com.aoapps.net.DomainName, java.lang.String, java.lang.String),removeEmailList(com.aoindustries.aoserv.client.linux.PosixPath, java.lang.String)
-
setMySQLServerUserPassword
public void setMySQLServerUserPassword(User.Name username, Server.Name mysqlServer, String aoServer, String password) throws IllegalArgumentException, IOException, SQLException
Sets the password for aUserServer.- Parameters:
username- the username of theUserServeraoServer- the hostname of theServerpassword- the new password- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser,Server, orUserServer- See Also:
UserServer.setPassword(java.lang.String)
-
setMySQLUserPassword
public void setMySQLUserPassword(User.Name username, String password) throws IllegalArgumentException, IOException, SQLException
Sets the password for aUserby settings the password for all of itsUserServers.- Parameters:
username- the username of theUserpassword- the new password- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.setPassword(java.lang.String)
-
setNetBindFirewalldZones
public void setNetBindFirewalldZones(int pkey, Set<FirewallZone.Name> firewalldZones) throws IllegalArgumentException, IOException, SQLExceptionSets the firewalld zones enable for aBind.- Parameters:
pkey- the pkey of theBindfirewalldZones- the set of enabled zones- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theBind- See Also:
Bind.setFirewalldZones(java.util.Set)
-
setNetBindMonitoringEnabled
public void setNetBindMonitoringEnabled(int pkey, boolean enabled) throws IllegalArgumentException, IOException, SQLExceptionSets the monitoring status for aBind- Parameters:
pkey- the pkey of theBindenabled- the new monitoring state- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theBind- See Also:
Bind.setMonitoringEnabled(boolean)
-
setPostgresServerUserPassword
public void setPostgresServerUserPassword(User.Name username, Server.Name postgresServer, String aoServer, String password) throws IllegalArgumentException, IOException, SQLException
Sets the password for aUserServer.- Parameters:
username- the username of theUserServerpostgresServer- the name of the PostgreSQL serveraoServer- the hostname of theServerpassword- the new password- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser,Server, orUserServer- See Also:
UserServer.setPassword(java.lang.String)
-
setPostgresUserPassword
public void setPostgresUserPassword(User.Name username, String password) throws IllegalArgumentException, IOException, SQLException
Sets the password for aUserby settings the password for all of itsUserServers.- Parameters:
username- the username of theUserpassword- the new password- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.setPassword(java.lang.String)
-
setPrimaryHttpdSiteURL
public void setPrimaryHttpdSiteURL(int pkey) throws IllegalArgumentException, IOException, SQLExceptionSets the primary URL for aVirtualHost.- Parameters:
pkey- the pkey of theVirtualHostName- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theVirtualHostName- See Also:
VirtualHostName.setAsPrimary()
-
setPrimaryLinuxGroupAccount
public void setPrimaryLinuxGroupAccount(Group.Name group_name, User.Name username) throws IllegalArgumentException, IOException, SQLException
Sets the primary group for aUser.- Parameters:
group_name- the name of theGroupusername- the username of theUser- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if the name is not in a valid format or unable to find theUser- See Also:
User.setPrimaryLinuxGroup(com.aoindustries.aoserv.client.linux.Group)
-
setUsernamePassword
public void setUsernamePassword(User.Name username, String password) throws IllegalArgumentException, IOException, SQLException
Sets the password for aUser. This password must pass the security checks provided bycheckUsernamePassword(com.aoindustries.aoserv.client.account.User.Name, java.lang.String).- Parameters:
username- the usernamepassword- the new password- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theUser- See Also:
User.setPassword(java.lang.String),checkUsernamePassword(com.aoindustries.aoserv.client.account.User.Name, java.lang.String),addUsername(com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.account.User.Name)
-
startApache
public void startApache(String aoServer) throws IllegalArgumentException, IOException, SQLException
Starts the Apache web server if it is not already running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.startApache()
-
startCron
public void startCron(String aoServer) throws IllegalArgumentException, IOException, SQLException
Starts the cron process if it is not already running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.startCron()
-
startDistro
public void startDistro(String aoServer, boolean includeUser) throws IllegalArgumentException, IOException, SQLException
Starts the distribution on a server and/or changes the setting of the user file scanning.- Parameters:
aoServer- the public hostname of theServerto start the scan onincludeUser- the flag indicating whether to include user files- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theServer- See Also:
Server.startDistro(boolean)
-
startJVM
public String startJVM(String siteName, String aoServer) throws IllegalArgumentException, IOException, SQLException
Starts and/or restarts the Tomcat or JBoss Java VM for the provided site.- Parameters:
siteName- the name of the site, which is the directory name under/var/www/aoServer- the public hostname of theServerthe site is hosted on- Returns:
- an error message if the Java VM cannot currently be restarted or
nullon success - Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theServer,Site, orSite- See Also:
Site.startJVM(),addHttpdTomcatStdSite(java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoapps.net.Email, boolean, com.aoapps.net.InetAddress, java.lang.String, com.aoapps.net.DomainName, com.aoapps.net.DomainName[], java.lang.String)
-
startMySQL
public void startMySQL(Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Starts the MySQL database server if it is not already running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.startMySQL()
-
startPostgreSQL
public void startPostgreSQL(Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Starts the PostgreSQL database server if it is not already running.- Parameters:
postgresServer- the name of the PostgreSQL serveraoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.startPostgreSQL()
-
startXfs
public void startXfs(String aoServer) throws IllegalArgumentException, IOException, SQLException
Starts the X Font Server if it is not already running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.startXfs()
-
startXvfb
public void startXvfb(String aoServer) throws IllegalArgumentException, IOException, SQLException
Starts the X Virtual Frame Buffer if it is not already running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.startXvfb()
-
stopApache
public void stopApache(String aoServer) throws IllegalArgumentException, IOException, SQLException
Stops the Apache web server if it is running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.stopApache()
-
stopCron
public void stopCron(String aoServer) throws IllegalArgumentException, IOException, SQLException
Stops the cron daemon if it is running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.stopCron()
-
stopJVM
public String stopJVM(String siteName, String aoServer) throws IllegalArgumentException, IOException, SQLException
Stops the Tomcat or JBoss Java VM for the provided site.- Parameters:
siteName- the name of the site, which is the directory name under/var/www/aoServer- the public hostname of theServerthe site is hosted on- Returns:
- an error message if the Java VM cannot currently be stopped
nullon success - Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theServer,Site, orSite- See Also:
Site.stopJVM(),addHttpdTomcatStdSite(java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoapps.net.Email, boolean, com.aoapps.net.InetAddress, java.lang.String, com.aoapps.net.DomainName, com.aoapps.net.DomainName[], java.lang.String)
-
stopMySQL
public void stopMySQL(Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Stops the MySQL database server if it is running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.stopMySQL()
-
stopPostgreSQL
public void stopPostgreSQL(Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException
Stops the PostgreSQL database server if it is running.- Parameters:
postgresServer- the name of the PostgreSQL serveraoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.stopPostgreSQL()
-
stopXfs
public void stopXfs(String aoServer) throws IllegalArgumentException, IOException, SQLException
Stops the X Font Server if it is running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.stopXfs()
-
stopXvfb
public void stopXvfb(String aoServer) throws IllegalArgumentException, IOException, SQLException
Stops the X Virtual Frame Buffer if it is running.- Parameters:
aoServer- the public hostname of theServer- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.stopXvfb()
-
updateHttpdTomcatDataSource
public void updateHttpdTomcatDataSource(String siteName, String aoServer, String path, String oldName, String newName, String driverClassName, String url, String username, String password, int maxActive, int maxIdle, int maxWait, String validationQuery) throws IllegalArgumentException, IOException, SQLException
Updates aContextdata source.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServer,Site,SiteorContext.
-
updateHttpdTomcatParameter
public void updateHttpdTomcatParameter(String siteName, String aoServer, String path, String oldName, String newName, String value, boolean override, String description) throws IllegalArgumentException, IOException, SQLException
Updates aContextparameter.- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServer,Site,SiteorContext.
-
waitForHttpdSiteRebuild
public void waitForHttpdSiteRebuild(String aoServer) throws IllegalArgumentException, IOException, SQLException
Waits for any processing or pending updates of the Apache configurations to complete.- Parameters:
aoServer- the hostname of theServerto wait for- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.waitForHttpdSiteRebuild(),addHttpdTomcatStdSite(java.lang.String, java.lang.String, com.aoindustries.aoserv.client.account.Account.Name, com.aoindustries.aoserv.client.linux.User.Name, com.aoindustries.aoserv.client.linux.Group.Name, com.aoapps.net.Email, boolean, com.aoapps.net.InetAddress, java.lang.String, com.aoapps.net.DomainName, com.aoapps.net.DomainName[], java.lang.String)
-
waitForLinuxAccountRebuild
public void waitForLinuxAccountRebuild(String aoServer) throws IllegalArgumentException, IOException, SQLException
Waits for any processing or pending updates of the Linux account configurations to complete.- Parameters:
aoServer- the hostname of theServerto wait for- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.waitForLinuxAccountRebuild()
-
waitForMySQLDatabaseRebuild
public void waitForMySQLDatabaseRebuild(String aoServer) throws IllegalArgumentException, IOException, SQLException
Waits for any processing or pending updates of the MySQL configurations to complete.- Parameters:
aoServer- the hostname of theServerto wait for- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.waitForMySQLDatabaseRebuild()
-
waitForMySQLDBUserRebuild
public void waitForMySQLDBUserRebuild(String aoServer) throws IllegalArgumentException, IOException, SQLException
Waits for any processing or pending updates of the MySQL configurations to complete.- Parameters:
aoServer- the hostname of theServerto wait for- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.waitForMySQLDBUserRebuild()
-
waitForMySQLServerRebuild
public void waitForMySQLServerRebuild(String aoServer) throws IllegalArgumentException, IOException, SQLException
Waits for any processing or pending updates of the MySQL server configurations to complete.- Parameters:
aoServer- the hostname of theServerto wait for- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.waitForMySQLServerRebuild()
-
waitForMySQLUserRebuild
public void waitForMySQLUserRebuild(String aoServer) throws IllegalArgumentException, IOException, SQLException
Waits for any processing or pending updates of the MySQL configurations to complete.- Parameters:
aoServer- the hostname of theServerto wait for- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.waitForMySQLUserRebuild()
-
waitForPostgresDatabaseRebuild
public void waitForPostgresDatabaseRebuild(String aoServer) throws IllegalArgumentException, IOException, SQLException
Waits for any processing or pending updates of the PostgreSQL configurations to complete.- Parameters:
aoServer- the hostname of theServerto wait for- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.waitForPostgresDatabaseRebuild()
-
waitForPostgresServerRebuild
public void waitForPostgresServerRebuild(String aoServer) throws IllegalArgumentException, IOException, SQLException
Waits for any processing or pending updates of the PostgreSQL server configurations to complete.- Parameters:
aoServer- the hostname of theServerto wait for- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.waitForPostgresServerRebuild()
-
waitForPostgresUserRebuild
public void waitForPostgresUserRebuild(String aoServer) throws IllegalArgumentException, IOException, SQLException
Waits for any processing or pending updates of the PostgreSQL configurations to complete.- Parameters:
aoServer- the hostname of theServerto wait for- Throws:
IOException- if not able to communicate with the serverSQLException- if not able to access the databaseIllegalArgumentException- if unable to find theHostorServer- See Also:
Server.waitForPostgresUserRebuild()
-
checkSslCertificate
public List<Certificate.Check> checkSslCertificate(String aoServer, String keyFileOrCertbotName, boolean allowCached) throws IllegalArgumentException, IOException, SQLException
- Parameters:
aoServer- the hostname of the serverkeyFileOrCertbotName- Either the full path for keyFile or the per-server unique certbot name- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theServerorCertificate- See Also:
Certificate.check(boolean)
-
createVirtualServer
public String createVirtualServer(String virtualServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorVirtualServer- See Also:
VirtualServer.create()
-
rebootVirtualServer
public String rebootVirtualServer(String virtualServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorVirtualServer- See Also:
VirtualServer.reboot()
-
shutdownVirtualServer
public String shutdownVirtualServer(String virtualServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorVirtualServer- See Also:
VirtualServer.shutdown()
-
destroyVirtualServer
public String destroyVirtualServer(String virtualServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorVirtualServer- See Also:
VirtualServer.destroy()
-
pauseVirtualServer
public String pauseVirtualServer(String virtualServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorVirtualServer- See Also:
VirtualServer.pause()
-
unpauseVirtualServer
public String unpauseVirtualServer(String virtualServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorVirtualServer- See Also:
VirtualServer.unpause()
-
getVirtualServerStatus
public int getVirtualServerStatus(String virtualServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorVirtualServer- See Also:
VirtualServer.getStatus()
-
addIpReputation
public void addIpReputation(String identifier, String host, String confidence, String reputationType, short score) throws IllegalArgumentException, IOException, SQLException
- Parameters:
identifier- the unique identifier of the sethost- the dotted-quad (A.B.C.D) format IPv4 addressconfidence- either "uncertain" or "definite"reputationType- either "good" or "bad"- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theSetor unable to parse parameters- See Also:
Set.addReputation(int, com.aoindustries.aoserv.client.net.reputation.Set.ConfidenceType, com.aoindustries.aoserv.client.net.reputation.Set.ReputationType, short)
-
verifyVirtualDisk
public long verifyVirtualDisk(String virtualServer, String device) throws IllegalArgumentException, IOException, SQLException
Begins a verification of the redundancy of the virtual disk.- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual serverdevice- the device identifier (xvda, xvdb, ...)- Returns:
- The time the verification began, which may be in the past if a verification was already in progress
- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the database or a data integrity violation occursIllegalArgumentException- if unable to find theVirtualServerorVirtualDisk- See Also:
VirtualDisk.verify()
-
getPrimaryVirtualServer
public String getPrimaryVirtualServer(String virtualServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorVirtualServer- See Also:
VirtualServer.getPrimaryPhysicalServer()
-
getSecondaryVirtualServer
public String getSecondaryVirtualServer(String virtualServer) throws IllegalArgumentException, IOException, SQLException
- Parameters:
virtualServer- the pkey, package/name, or hostname of the virtual server- Throws:
IOException- if unable to contact the serverSQLException- if unable to access the databaseIllegalArgumentException- if unable to find theHostorVirtualServer- See Also:
VirtualServer.getSecondaryPhysicalServer()
-
-