Class SimpleAoservClient
SimpleAoservClient
is 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 Aosh
commands resolve to these method calls.
- Author:
- AO Industries, Inc.
- See Also:
-
Constructor Summary
ConstructorDescriptionSimpleAoservClient
(AoservConnector connector) Creates a newSimpleAoservClient
using the providedAoservConnector
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAccount
(Account.Name accounting, String contractVersion, String defaultServer, Account.Name parent, boolean canAddBackupServers, boolean canAddBusinesses, boolean canSeePrices, boolean billParent) Adds a newAccount
to the system.int
addAccountHost
(Account.Name accounting, String host) 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) Adds a newAdministrator
to anAccount
.int
addBackupHost
(String hostname, String farm, Account.Name owner, String description, int backupHour, String osType, String osVersion, String architecture, User.Name username, String password, String contactPhone, String contactEmail) Adds a new backupHost
.int
addCvsRepository
(String aoServer, PosixPath path, User.Name username, Group.Name group, long mode) Adds a newCvsRepository
to aServer
.int
addDnsRecord
(String zone, String domain, String type, int priority, int weight, int port, short flag, String tag, String destination, int ttl) void
addDnsZone
(Account.Name packageName, String zone, InetAddress ip, int ttl) Adds a newZone
to a system.int
addEmailDomain
(DomainName domain, String aoServer, Account.Name packageName) int
addEmailForwarding
(String address, DomainName domain, String aoServer, Email destination) Forwards email addressed to an address at aDomain
to a different email address.int
addEmailList
(String aoServer, PosixPath path, User.Name username, Group.Name group) Adds a newList
to the system.int
addEmailListAddress
(String address, DomainName domain, PosixPath path, String aoServer) int
addEmailPipe
(String aoServer, String command, Account.Name packageName) Adds a newPipe
to the system.int
addEmailPipeAddress
(String address, DomainName domain, int pkey) Adds an address to the list of email addresses that will be piped to anPipe
.int
addEmailSmtpRelay
(Account.Name packageName, String aoServer, HostAddress host, String type, long duration) Grants access to the SMTP server.int
addFileBackupSetting
(int replication, String path, boolean backupEnabled, boolean required) Adds aFileReplicationSetting
to aFileReplication
.void
addFtpGuestUser
(User.Name username) 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) Adds a newSite
to the system.int
addHttpdSharedTomcat
(String name, String aoServer, String version, User.Name linuxServerAccount, Group.Name linuxServerGroup) Adds a newSharedTomcat
to a server.int
addHttpdSiteAuthenticatedLocation
(String siteName, String aoServer, String path, boolean isRegularExpression, String authName, PosixPath authGroupFile, PosixPath authUserFile, String require, String handler) 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) 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) Adds a new data source to aContext
.int
addHttpdTomcatParameter
(String siteName, String aoServer, String path, String name, String value, boolean override, String description) Adds a new parameter to aContext
.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) Adds a newSharedTomcatSite
to the system.int
addHttpdTomcatSiteJkMount
(String siteName, String aoServer, String path, boolean mount) 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) Adds a newPrivateTomcatSite
to the system.void
addIpReputation
(String identifier, String host, String confidence, String reputationType, short score) int
addLinuxAccAddress
(String address, DomainName domain, String aoServer, User.Name username) void
addLinuxAccount
(User.Name username, Group.Name primaryGroup, User.Gecos name, User.Gecos officeLocation, User.Gecos officePhone, User.Gecos homePhone, String type, PosixPath shell) Adds a newUser
the system.void
addLinuxGroup
(Group.Name name, Account.Name packageName, String type) Adds aGroup
to the system.int
addLinuxGroupAccount
(Group.Name group, User.Name username) int
addLinuxServerAccount
(User.Name username, String aoServer, PosixPath home) int
addLinuxServerGroup
(Group.Name group, String aoServer) int
addMajordomoList
(DomainName domain, String aoServer, String listName) Adds a newMajordomoList
to aMajordomoServer
.void
addMajordomoServer
(DomainName domain, String aoServer, User.Name linuxAccount, Group.Name linuxGroup, String version) Adds a newMajordomoServer
to anDomain
.int
addMysqlDatabase
(Database.Name name, Server.Name mysqlServer, String aoServer, Account.Name packageName) Adds a newDatabase
to the system.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) Grants aUserServer
permission to access aDatabase
.int
addMysqlServerUser
(User.Name username, Server.Name mysqlServer, String aoServer, String host) void
addMysqlUser
(User.Name username) Adds aUser
to the system.int
addNetBind
(String server, Account.Name packageName, InetAddress ipAddress, String netDevice, Port port, String appProtocol, boolean monitoringEnabled, Set<FirewallZone.Name> firewalldZoneNames) Adds a network bind to the system.int
addNoticeLog
(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 theAccount
is notified.int
addPackage
(Account.Name packageName, Account.Name accounting, int packageDefinition) int
addPostgresDatabase
(Database.Name name, Server.Name postgresServer, String aoServer, User.Name datdba, String encoding, boolean enablePostgis) Adds a newDatabase
to the system.int
addPostgresServerUser
(User.Name username, Server.Name postgresServer, String aoServer) void
addPostgresUser
(User.Name username) Adds aUser
to the system.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) int
addSpamEmailMessage
(int emailRelay, String message) Adds aSpamMessage
.int
addTransaction
(int timeType, Timestamp time, Account.Name accountName, Account.Name sourceAccountName, User.Name administrator, String type, String description, int quantity, Money rate, String paymentType, String paymentInfo, String processor, byte paymentConfirmed) Adds a newTransaction
to aAccount
.void
addUsername
(Account.Name packageName, User.Name username) int
addVirtualHostName
(int hsbPkey, DomainName hostname) Adds a newVirtualHostName
to aVirtualHost
.int
areLinuxAccountPasswordsSet
(User.Name username) Determines if aUser
currently has passwords set.int
areMysqlUserPasswordsSet
(User.Name username) Determines if aUser
currently has passwords set.int
arePostgresUserPasswordsSet
(User.Name username) Determines if aUser
currently has passwords set.int
areUsernamePasswordsSet
(User.Name username) Determines if aUser
currently has passwords set.void
cancelAccount
(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
.void
checkDnsZone
(String zone) Checks the format of aZone
.void
checkEmailListPath
(String aoServer, PosixPath path) Checks the format of an email list path.checkLinuxAccountPassword
(User.Name username, String password) Checks the strength of a password that will be used for aUser
orUserServer
.static void
checkMajordomoListName
(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 void
checkSharedTomcatName
(String tomcatName) Checks the format of anSharedTomcat
name.static void
checkSiteName
(String siteName) Checks the format of anSite
name.checkSslCertificate
(String aoServer, String keyFileOrCertbotName, boolean allowCached) checkUsernamePassword
(User.Name username, String password) Checks the strength of a password that will be used for aUser
.boolean
compareLinuxServerAccountPassword
(User.Name username, String aoServer, String password) Checks if a password matches aUserServer
.long
copyHomeDirectory
(User.Name username, String fromAoServer, String toAoServer) Copies the contents of user's home directory from one server to another.void
copyLinuxServerAccountPassword
(User.Name fromUsername, String fromAoServer, User.Name toUsername, String toAoServer) Copies the password from oneUserServer
to another.createVirtualServer
(String virtualServer) static String
Deprecated.void
declineCreditCard
(int pkey, String reason) Disables aCreditCard
.destroyVirtualServer
(String virtualServer) int
disableAccount
(Account.Name accounting, String disableReason) Disables a business, recursively disabling all of its enabled child components.int
disableAdministrator
(User.Name username, String disableReason) Disables aAdministrator
.int
disableCvsRepository
(int pkey, String disableReason) Disables aCvsRepository
.int
disableEmailList
(PosixPath path, String aoServer, String disableReason) Disables anList
.int
disableEmailPipe
(int pkey, String disableReason) Disables anPipe
.int
disableEmailSmtpRelay
(int pkey, String disableReason) Disables aSmtpRelay
.int
disableHttpdSharedTomcat
(String name, String aoServer, String disableReason) Disables aSharedTomcat
.int
disableHttpdSite
(String name, String aoServer, String disableReason) Disables aSite
.int
disableHttpdSiteBind
(int pkey, String disableReason) Disables aVirtualHost
.int
disableLinuxAccount
(User.Name username, String disableReason) Disables aUser
.int
disableLinuxServerAccount
(User.Name username, String aoServer, String disableReason) Disables aUserServer
.int
disableMysqlServerUser
(User.Name username, Server.Name mysqlServer, String aoServer, String disableReason) Disables aUserServer
.int
disableMysqlUser
(User.Name username, String disableReason) Disables aUser
.int
disablePackage
(Account.Name name, String disableReason) Disables a package, recursively disabling all of its enabled child components.int
disablePostgresServerUser
(User.Name username, Server.Name postgresServer, String aoServer, String disableReason) Disables aUserServer
.int
disablePostgresUser
(User.Name username, String disableReason) Disables aUser
.int
disableUsername
(User.Name username, String disableReason) Disables aUser
and all uses of the username.void
dumpMysqlDatabase
(Database.Name name, Server.Name mysqlServer, String aoServer, boolean gzip, StreamHandler streamHandler) Dumps the contents of aDatabase
to anOutputStream
, optionally gzipped.void
dumpMysqlDatabase
(Database.Name name, Server.Name mysqlServer, String aoServer, Writer out) void
dumpPostgresDatabase
(Database.Name name, Server.Name postgresServer, String aoServer, boolean gzip, StreamHandler streamHandler) Dumps the contents of aDatabase
to anOutputStream
, optionally gzipped.void
dumpPostgresDatabase
(Database.Name name, Server.Name postgresServer, String aoServer, Writer out) void
enableAccount
(Account.Name accounting) Enables a business, recursively enabling all of its disabled child components.void
enableAdministrator
(User.Name username) Enables anAdministrator
.void
enableCvsRepository
(int pkey) Enables aCvsRepository
.void
enableEmailList
(PosixPath path, String aoServer) Enables anList
.void
enableEmailPipe
(int pkey) Enables anPipe
.void
enableEmailSmtpRelay
(int pkey) Enables aSmtpRelay
.void
enableHttpdSharedTomcat
(String name, String aoServer) Enables aSharedTomcat
.void
enableHttpdSite
(String name, String aoServer) Enables aSite
.void
enableHttpdSiteBind
(int pkey) Enables aVirtualHost
.void
enableLinuxAccount
(User.Name username) Enables aUser
.void
enableLinuxServerAccount
(User.Name username, String aoServer) Enables aUserServer
.void
enableMysqlServerUser
(User.Name username, Server.Name mysqlServer, String aoServer) Enables aUserServer
.void
enableMysqlUser
(User.Name username) Enables aUser
.void
enablePackage
(Account.Name name) Enables a package, recursively enabling all of its disabled child components.void
enablePostgresServerUser
(User.Name username, Server.Name postgresServer, String aoServer) Enables aUserServer
.void
enablePostgresUser
(User.Name username) Enables aUser
.void
enableUsername
(User.Name username) Enables aUser
and all uses of the username.generateAccountingCode
(Account.Name accountingTemplate) Generates a unique accounting code that may be used to create a newAccount
.generateMysqlDatabaseName
(String templateBase, String templateAdded) Generates a unique MySQL database name.generatePackageName
(Account.Name template) Generates a uniquePackage
name.Generates a random, valid password.generatePostgresDatabaseName
(String templateBase, String templateAdded) Generates a unique PostgreSQL database name.generateSharedTomcatName
(String template) Generates a uniqueSharedTomcat
name.generateSiteName
(String template) Generates a uniqueSite
name.getAutoresponderContent
(User.Name username, String aoServer) Gets the autoresponder content.void
getAwstatsFile
(String siteName, String aoServer, String path, String queryString, OutputStream out) Gets the contents of an AWStats file.long
getBackupPartitionTotalSize
(String aoServer, String path) Gets the total size of aBackupPartition
.long
getBackupPartitionUsedSize
(String aoServer, String path) Gets the used size of aBackupPartition
.Gets theAoservConnector
used for communication with the server.getCronTable
(User.Name username, String aoServer) Gets a user's cron table on one server.getEmailListAddressList
(PosixPath path, String aoServer) Gets the list of email addresses that anList
will be forwarded to.getFailoverFileReplicationActivity
(String fromServer, String toServer, String path) Gets the last reported activity for aFileReplication
.int
getHttpdServerConcurrency
(String aoServer, String name) long[]
getImapFolderSizes
(User.Name username, String aoServer, String[] folderNames) Gets the IMAP folder sizes for an inbox.getInboxAttributes
(User.Name username, String aoServer) Gets the attributes of an inbox.getMajordomoInfoFile
(DomainName domain, String aoServer, String listName) Gets the info file for aMajordomoList
.getMajordomoIntroFile
(DomainName domain, String aoServer, String listName) Gets the intro file for aMajordomoList
.void
getMrtgFile
(String aoServer, String filename, OutputStream out) Gets the contents of a MRTG file.getPrimaryVirtualServer
(String virtualServer) getSecondaryVirtualServer
(String virtualServer) getUpsStatus
(String aoServer) Gets the current status of the UPS.int
getVirtualServerStatus
(String virtualServer) void
invalidate
(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.boolean
isAccountingAvailable
(Account.Name accounting) Determines if an accounting code is available.boolean
isAdministratorPasswordSet
(User.Name username) Determines if aAdministrator
currently has a password set.boolean
isDnsZoneAvailable
(String zone) Determines if aZone
is available.boolean
isEmailDomainAvailable
(DomainName domain, String aoServer) Determines if aDomain
is available.boolean
isIpAddressUsed
(InetAddress ipAddress, String server, String netDevice) Determines if anIpAddress
is currently being used.boolean
isLinuxGroupNameAvailable
(Group.Name groupname) Determines if a groupname is available.boolean
isLinuxServerAccountPasswordSet
(User.Name username, String aoServer) Determines if aUserServer
currently has a password set.int
isLinuxServerAccountProcmailManual
(User.Name username, String aoServer) Determines if aUserServer
is currently in manual procmail mode.boolean
isMysqlDatabaseNameAvailable
(Database.Name name, Server.Name mysqlServer, String aoServer) boolean
isMysqlServerNameAvailable
(Server.Name name, String aoServer) boolean
isMysqlServerUserPasswordSet
(User.Name username, Server.Name mysqlServer, String aoServer) Determines if aUserServer
currently has a password set.boolean
isPackageNameAvailable
(Account.Name packageName) Determines if aPackage
name is available.boolean
isPostgresDatabaseNameAvailable
(Database.Name name, Server.Name postgresServer, String aoServer) boolean
isPostgresServerNameAvailable
(Server.Name name, String aoServer) boolean
isPostgresServerUserPasswordSet
(User.Name username, Server.Name postgresServer, String aoServer) Determines if aUserServer
currently has a password set.boolean
Determines if a name is available for use as aSharedTomcat
.boolean
isSiteNameAvailable
(String siteName) Determines if a site name is available.boolean
isUsernameAvailable
(User.Name username) Determines if aUser
is available.void
moveAccount
(Account.Name business, String from, String to, TerminalWriter out) void
moveIpAddress
(InetAddress ipAddress, String fromServer, String fromNetDevice, String toServer) pauseVirtualServer
(String virtualServer) int
ping()
Times the latency of the communication with the server.void
printZoneFile
(String zone, PrintWriter out) Prints the contents of aZone
as used by thenamed
process.rebootVirtualServer
(String virtualServer) void
refreshEmailSmtpRelay
(int pkey, long minDuration) Refreshes the time window for SMTP server access by resetting the expiration to 24 hours from the current time.void
removeAccountHost
(Account.Name accounting, String server) void
removeAdministrator
(User.Name username) Removes anAdministrator
from the system.void
removeBlackholeEmailAddress
(String address, DomainName domain, String aoServer) Removes aBlackholeAddress
from the system.void
removeCreditCard
(int pkey) Removes aCreditCard
.void
removeCvsRepository
(String aoServer, PosixPath path) Removes aCvsRepository
.void
removeDnsRecord
(int pkey) Removes one record from aZone
.void
void
removeDnsZone
(String zone) Completely removes aZone
from the servers.void
removeEmailAddress
(String address, DomainName domain, String aoServer) Removes anAddress
from the system.void
removeEmailDomain
(DomainName domain, String aoServer) void
removeEmailForwarding
(String address, DomainName domain, String aoServer, Email destination) Removes anForwarding
from the system.void
removeEmailList
(PosixPath path, String aoServer) Removes anList
from the system.void
removeEmailListAddress
(String address, DomainName domain, PosixPath path, String aoServer) Removes anListAddress
from the system.void
removeEmailPipe
(int pkey) Removes anPipe
from the system.void
removeEmailPipeAddress
(String address, DomainName domain, int pipe) Removes anPipeAddress
from the system.void
removeEmailSmtpRelay
(int pkey) Removes anSmtpRelay
from the system, revoking access to the SMTP server from one IP address.void
removeFileBackupSetting
(int replication, String path) Removes aFileReplicationSetting
from the system.void
removeFtpGuestUser
(User.Name username) void
removeHttpdSharedTomcat
(String name, String aoServer) Completely removes aSharedTomcat
from the servers.void
removeHttpdSite
(String name, String aoServer) Completely removes aSite
from the servers.void
removeHttpdTomcatContext
(int pkey) Removes aContext
from the servers.void
removeHttpdTomcatDataSource
(int pkey) Removes aContextDataSource
from aContext
.void
removeHttpdTomcatParameter
(int pkey) Removes aContextParameter
from aContext
.void
removeHttpdTomcatSiteJkMount
(String siteName, String aoServer, String path) void
removeLinuxAccAddress
(String address, DomainName domain, String aoServer, User.Name username) Removes aInboxAddress
from the system.void
removeLinuxAccount
(User.Name username) Removes aUser
and all related data from the system.void
removeLinuxGroup
(Group.Name name) Removes aGroup
and all related data from the system.void
removeLinuxGroupAccount
(Group.Name group, User.Name username) void
removeLinuxServerAccount
(User.Name username, String aoServer) Removes aUserServer
from aServer
.void
removeLinuxServerGroup
(Group.Name group, String aoServer) Removes aGroupServer
from aServer
.void
removeMajordomoServer
(DomainName domain, String aoServer) Removes aMajordomoServer
and all of itsMajordomoList
s.void
removeMysqlDatabase
(Database.Name name, Server.Name mysqlServer, String aoServer) Removes aDatabase
from the system.void
removeMysqlDbUser
(Database.Name name, Server.Name mysqlServer, String aoServer, User.Name username) Removes aDatabaseUser
from the system.void
removeMysqlServerUser
(User.Name username, Server.Name mysqlServer, String aoServer) Removes aUserServer
from a the system..void
removeMysqlUser
(User.Name username) Removes aUser
from a the system.void
removeNetBind
(int pkey) Removes aBind
from a the system.void
removePostgresDatabase
(Database.Name name, Server.Name postgresServer, String aoServer) Removes aDatabase
from the system.void
removePostgresServerUser
(User.Name username, Server.Name postgresServer, String aoServer) Removes aUserServer
from a the system..void
removePostgresUser
(User.Name username) Removes aUser
from a the system..void
removeUsername
(User.Name username) Removes aUser
from the system.void
removeVirtualHostName
(int pkey) Removes aVirtualHostName
from the servers.void
restartApache
(String aoServer) Restarts the Apache web server.void
restartCron
(String aoServer) Restarts the cron doggie.void
restartMysql
(Server.Name mysqlServer, String aoServer) Restarts the MySQL database server.void
restartPostgresql
(Server.Name postgresServer, String aoServer) Restarts the PostgreSQL database server.void
restartXfs
(String aoServer) Restarts the X Font Server.void
restartXvfb
(String aoServer) Restarts the X Virtual Frame Buffer.void
setAccountAccounting
(Account.Name oldAccounting, Account.Name newAccounting) Sets the accounting code for the business.void
setAdministratorPassword
(User.Name username, String password) Sets the password for anAdministrator
.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) Sets the profile of anAdministrator
, which is all of their contact information and other details.void
setAutoresponder
(User.Name username, String aoServer, String address, DomainName domain, String subject, String content, boolean enabled) Sets the autoresponder behavior for a Linux server account.void
setCronTable
(User.Name username, String aoServer, String cronTable) Sets a user's cron table on one server.void
setCvsRepositoryMode
(String aoServer, PosixPath path, long mode) Sets the permissions for a CVS repository directory.void
setDefaultAccountHost
(Account.Name accounting, String server) void
setDnsZoneTtl
(String zone, int ttl) Completely removes aZone
from the servers.void
setEmailListAddressList
(PosixPath path, String aoServer, String addresses) Sets the list of addresses that anList
will forward messages to.void
setFileBackupSetting
(int replication, String path, boolean backupEnabled, boolean required) Sets the settings contained by oneFileReplicationSetting
.void
setHttpdSharedTomcatAutoDeploy
(String name, String aoServer, boolean autoDeploy) Sets theautoDeploy
setting for aSharedTomcat
.void
setHttpdSharedTomcatIsManual
(String name, String aoServer, boolean isManual) Sets theis_manual
flag for aSharedTomcat
.void
setHttpdSharedTomcatMaxParameterCount
(String name, String aoServer, int maxParameterCount) Sets themaxParameterCount
for aSharedTomcat
.void
setHttpdSharedTomcatMaxPostSize
(String name, String aoServer, int maxPostSize) Sets themaxPostSize
for aSharedTomcat
.void
setHttpdSharedTomcatTomcatAuthentication
(String name, String aoServer, boolean tomcatAuthentication) Sets thetomcatAuthentication
setting for aSharedTomcat
.void
setHttpdSharedTomcatUndeployOldVersions
(String name, String aoServer, boolean undeployOldVersions) Sets theundeployOldVersions
setting for aSharedTomcat
.void
setHttpdSharedTomcatUnpackWars
(String name, String aoServer, boolean unpackWars) Sets theunpackWars
setting for aSharedTomcat
.void
setHttpdSharedTomcatVersion
(String name, String aoServer, String version) Sets the Tomcat version for aSharedTomcat
.void
setHttpdSiteAuthenticatedLocationAttributes
(String siteName, String aoServer, String path, boolean isRegularExpression, String authName, PosixPath authGroupFile, PosixPath authUserFile, String require, String handler) Updates aLocation
.void
setHttpdSiteBindIsManual
(int pkey, boolean isManual) Sets theis_manual
flag for aVirtualHost
.void
setHttpdSiteBindRedirectToPrimaryHostname
(int pkey, boolean redirectToPrimaryHostname) Sets theredirect_to_primary_hostname
flag for aVirtualHost
.void
setHttpdSiteBlockCoreDumps
(String siteName, String aoServer, boolean blockCoreDumps) Sets theblock_core_dumps
flag for aSite
.void
setHttpdSiteBlockEditorBackups
(String siteName, String aoServer, boolean blockEditorBackups) Sets theblock_editor_backups
flag for aSite
.void
setHttpdSiteBlockScm
(String siteName, String aoServer, boolean blockScm) Sets theblock_scm
flag for aSite
.void
setHttpdSiteBlockTraceTrack
(String siteName, String aoServer, boolean blockTraceTrack) Sets theblock_trace_track
flag for aSite
.void
setHttpdSiteEnableAnonymousFtp
(String siteName, String aoServer, boolean enableAnonymousFtp) Sets theenable_anonymous_ftp
flag for aSite
.void
setHttpdSiteEnableCgi
(String siteName, String aoServer, boolean enableCgi) Sets theenable_cgi
flag for aSite
.void
setHttpdSiteEnableFollowSymlinks
(String siteName, String aoServer, boolean enableFollowSymlinks) Sets theenable_follow_symlinks
flag for aSite
.void
setHttpdSiteEnableHtaccess
(String siteName, String aoServer, boolean enableHtaccess) Sets theenable_htaccess
flag for aSite
.void
setHttpdSiteEnableIndexes
(String siteName, String aoServer, boolean enableIndexes) Sets theenable_indexes
flag for aSite
.void
setHttpdSiteEnableSsi
(String siteName, String aoServer, boolean enableSsi) Sets theenable_ssi
flag for aSite
.void
setHttpdSiteIsManual
(String siteName, String aoServer, boolean isManual) Sets theis_manual
flag for aSite
.void
setHttpdSitePhpVersion
(String siteName, String aoServer, String phpVersion) Sets the PHP version for aSite
.void
setHttpdSiteServerAdmin
(String siteName, String aoServer, Email emailAddress) Sets the administrative email address for aSite
.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) Sets the attributes for aContext
.void
setHttpdTomcatSiteBlockWebinf
(String siteName, String aoServer, boolean blockWebinf) Sets theblock_webinf
flag for aSite
.void
setHttpdTomcatStdSiteAutoDeploy
(String siteName, String aoServer, boolean autoDeploy) Sets theautoDeploy
setting for aPrivateTomcatSite
.void
setHttpdTomcatStdSiteMaxParameterCount
(String siteName, String aoServer, int maxParameterCount) Sets themaxParameterCount
for aPrivateTomcatSite
.void
setHttpdTomcatStdSiteMaxPostSize
(String siteName, String aoServer, int maxPostSize) Sets themaxPostSize
for aPrivateTomcatSite
.void
setHttpdTomcatStdSiteTomcatAuthentication
(String siteName, String aoServer, boolean tomcatAuthentication) Sets thetomcatAuthentication
setting for aPrivateTomcatSite
.void
setHttpdTomcatStdSiteUndeployOldVersions
(String siteName, String aoServer, boolean undeployOldVersions) Sets theundeployOldVersions
setting for aPrivateTomcatSite
.void
setHttpdTomcatStdSiteUnpackWars
(String siteName, String aoServer, boolean unpackWars) Sets theunpackWars
setting for aPrivateTomcatSite
.void
setHttpdTomcatStdSiteVersion
(String siteName, String aoServer, String version) Sets the Tomcat version for aPrivateTomcatSite
.void
setIpAddressDhcpAddress
(int ipAddress, InetAddress dhcpAddress) Sets the IP address of a DHCP-enabledIpAddress
.void
setIpAddressHostname
(InetAddress ipAddress, String server, String netDevice, DomainName hostname) Sets the hostname of anIpAddress
.void
setIpAddressMonitoringEnabled
(InetAddress ipAddress, String server, String netDevice, boolean enabled) Sets the monitoring status of anIpAddress
.void
setIpAddressPackage
(InetAddress ipAddress, String server, String netDevice, Account.Name newPackage) Sets the ownership of anIpAddress
.void
setLinuxAccountHomePhone
(User.Name username, User.Gecos phone) Sets the home phone number associated with aUser
.void
setLinuxAccountName
(User.Name username, User.Gecos name) Sets the full name associated with aUser
.void
setLinuxAccountOfficeLocation
(User.Name username, User.Gecos location) Sets the office location associated with aUser
.void
setLinuxAccountOfficePhone
(User.Name username, User.Gecos phone) Sets the office phone number associated with aUser
.void
setLinuxAccountPassword
(User.Name username, String password) Sets the password for aUser
by setting the password for each one of itsUserServer
s.void
setLinuxAccountShell
(User.Name username, PosixPath path) Sets the shell used by aUser
.void
setLinuxServerAccountJunkEmailRetention
(User.Name username, String aoServer, int days) Sets the number of days junk email is kept.void
setLinuxServerAccountPassword
(User.Name username, String aoServer, String password) Sets the password for aUserServer
.void
setLinuxServerAccountSpamAssassinIntegrationMode
(User.Name username, String aoServer, String mode) Sets the SpamAssassin integration mode for an email account.void
setLinuxServerAccountSpamAssassinRequiredScore
(User.Name username, String aoServer, float requiredScore) Sets the SpamAssassin required score for an email account.void
setLinuxServerAccountTrashEmailRetention
(User.Name username, String aoServer, int days) Sets the number of days trash email is kept.void
setLinuxServerAccountUseInbox
(User.Name username, String aoServer, boolean useInbox) Sets theuse_inbox
flag on aUserServer
.void
setMajordomoInfoFile
(DomainName domain, String aoServer, String listName, String file) Sets the info file for aMajordomoList
.void
setMajordomoIntroFile
(DomainName domain, String aoServer, String listName, String file) Sets the intro file for aMajordomoList
.void
setMysqlServerUserPassword
(User.Name username, Server.Name mysqlServer, String aoServer, String password) Sets the password for aUserServer
.void
setMysqlUserPassword
(User.Name username, String password) Sets the password for aUser
by settings the password for all of itsUserServer
s.void
setNetBindFirewalldZones
(int pkey, Set<FirewallZone.Name> firewalldZones) Sets the firewalld zones enable for aBind
.void
setNetBindMonitoringEnabled
(int pkey, boolean enabled) Sets the monitoring status for aBind
.void
setPostgresServerUserPassword
(User.Name username, Server.Name postgresServer, String aoServer, String password) Sets the password for aUserServer
.void
setPostgresUserPassword
(User.Name username, String password) Sets the password for aUser
by settings the password for all of itsUserServer
s.void
setPrimaryLinuxGroupAccount
(Group.Name groupName, User.Name username) Sets the primary group for aUser
.void
setPrimaryVirtualHostName
(int pkey) Sets the primary URL for aVirtualHost
.void
setUsernamePassword
(User.Name username, String password) Sets the password for aUser
.shutdownVirtualServer
(String virtualServer) void
startApache
(String aoServer) Starts the Apache web server if it is not already running.void
Starts the cron process if it is not already running.void
startDistro
(String aoServer, boolean includeUser) Starts the distribution on a server and/or changes the setting of the user file scanning.Starts and/or restarts the Tomcat or JBoss Java VM for the provided site.void
startMysql
(Server.Name mysqlServer, String aoServer) Starts the MySQL database server if it is not already running.void
startPostgresql
(Server.Name postgresServer, String aoServer) Starts the PostgreSQL database server if it is not already running.void
Starts the X Font Server if it is not already running.void
Starts the X Virtual Frame Buffer if it is not already running.void
stopApache
(String aoServer) Stops the Apache web server if it is running.void
Stops the cron daemon if it is running.Stops the Tomcat or JBoss Java VM for the provided site.void
stopMysql
(Server.Name mysqlServer, String aoServer) Stops the MySQL database server if it is running.void
stopPostgresql
(Server.Name postgresServer, String aoServer) Stops the PostgreSQL database server if it is running.void
Stops the X Font Server if it is running.void
Stops the X Virtual Frame Buffer if it is running.unpauseVirtualServer
(String virtualServer) 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) Updates aContext
data source.void
updateHttpdTomcatParameter
(String siteName, String aoServer, String path, String oldName, String newName, String value, boolean override, String description) Updates aContext
parameter.long
verifyVirtualDisk
(String virtualServer, String device) Begins a verification of the redundancy of the virtual disk.void
waitForHttpdSiteRebuild
(String aoServer) Waits for any processing or pending updates of the Apache configurations to complete.void
waitForLinuxAccountRebuild
(String aoServer) Waits for any processing or pending updates of the Linux account configurations to complete.void
waitForMysqlDatabaseRebuild
(String aoServer) Waits for any processing or pending updates of the MySQL configurations to complete.void
waitForMysqlDbUserRebuild
(String aoServer) Waits for any processing or pending updates of the MySQL configurations to complete.void
waitForMysqlServerRebuild
(String aoServer) Waits for any processing or pending updates of the MySQL server configurations to complete.void
waitForMysqlUserRebuild
(String aoServer) Waits for any processing or pending updates of the MySQL configurations to complete.void
waitForPostgresDatabaseRebuild
(String aoServer) Waits for any processing or pending updates of the PostgreSQL configurations to complete.void
waitForPostgresServerRebuild
(String aoServer) Waits for any processing or pending updates of the PostgreSQL server configurations to complete.void
waitForPostgresUserRebuild
(String aoServer) Waits for any processing or pending updates of the PostgreSQL configurations to complete.
-
Constructor Details
-
SimpleAoservClient
Creates a newSimpleAoservClient
using the providedAoservConnector
.- Parameters:
connector
- theAoservConnector
that will be used for communication with the server.- See Also:
-
-
Method Details
-
addBackupHost
public int addBackupHost(String hostname, String farm, Account.Name owner, String description, int backupHour, String osType, String osVersion, String architecture, User.Name username, String password, String contactPhone, String contactEmail) 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 serverbackupHour
- the hour the backup will be run if used in daemon mode, expressed in server-local timeosType
- the type of operating system on the serverosVersion
- 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 passwordcontactPhone
- the phone number to call for anything related to this servercontactEmail
- 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:
-
addAccount
public void addAccount(Account.Name accounting, String contractVersion, String defaultServer, Account.Name parent, boolean canAddBackupServers, boolean canAddBusinesses, boolean canSeePrices, boolean billParent) throws IllegalArgumentException, SQLException, IOException Adds a newAccount
to 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 businesscanAddBackupServers
- allows backup servers to be added to the systemcanAddBusinesses
- iftrue
, the new business is allowed to add additional businessesbillParent
- iftrue
the 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:
-
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 newAdministrator
to anAccount
.- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if unable to find theUser
- See Also:
-
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 newProfile
to 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 theAccount
IOException
SQLException
- See Also:
-
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:
-
addCvsRepository
public int addCvsRepository(String aoServer, PosixPath path, User.Name username, Group.Name group, long mode) throws IllegalArgumentException, IOException, SQLException Adds a newCvsRepository
to 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
id
of 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:
-
addDnsRecord
public int addDnsRecord(String zone, String domain, String type, int priority, int weight, int port, short flag, String tag, 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
- theRecordType
priority
- if aRecordType.MX
orRecordType.SRV
type, then the value is the priority of the record, otherwise it isRecord.NO_PRIORITY
.weight
- if aRecordType.SRV
type, then the value is the weight of the record, otherwise it isRecord.NO_WEIGHT
.port
- if aRecordType.SRV
type, then the value is the port of the record, otherwise it isRecord.NO_PORT
.- Returns:
- the
id
of 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.MX
and non-RecordType.SRV
record, the priority is not provided for aRecordType.MX
orRecordType.SRV
record, if the weight is provided for a non-RecordType.SRV
record, the weight is not provided for aRecordType.SRV
record, if the port is provided for a non-RecordType.SRV
record, the port is not provided for aRecordType.SRV
record, the destination is not the correct format for theRecordType
, or unable to find theZone
orRecordType
- See Also:
-
addDnsZone
public void addDnsZone(Account.Name packageName, String zone, InetAddress ip, int ttl) throws IllegalArgumentException, IOException, SQLException Adds a newZone
to a system. AZone
is one unique domain in the name servers. It is always one host up from a top level domain. Inmydomain.com.
com
is the top level domain, which are defined byTopLevelDomain
s.- Parameters:
packageName
- the name of thePackage
that owns this domainzone
- the complete domain of the newZone
ip
- the IP address that will be used for the defaultRecord
s- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the database or a data integrity violation occursIllegalArgumentException
- if unable to find thePackage
or either parameter is not in the proper format.- See Also:
-
addEmailForwarding
public int addEmailForwarding(String address, DomainName domain, String aoServer, Email destination) throws IllegalArgumentException, IOException, SQLException Forwards email addressed to an address at aDomain
to 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:
-
addEmailList
public int addEmailList(String aoServer, PosixPath path, User.Name username, Group.Name group) throws IllegalArgumentException, IOException, SQLException Adds a newList
to 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
List
may receive email on any number of addresses, each address must be part of aDomain
that is hosted on the sameServer
as theList
. If email in a domain on anotherServer
is required to be sent to this list, it must be forwarded from the otherServer
via aForwarding
.The list of destinations for the
List
is stored on theServer
in 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:
-
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 theDomain
orList
- See Also:
-
addEmailPipe
public int addEmailPipe(String aoServer, String command, Account.Name packageName) throws IllegalArgumentException, IOException, SQLException Adds a newPipe
to 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 thisPipe
belongs 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 theServer
orPackage
- See Also:
-
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 theDomain
orPipe
- See Also:
-
addFileBackupSetting
public int addFileBackupSetting(int replication, String path, boolean backupEnabled, boolean required) throws IllegalArgumentException, IOException, SQLException Adds aFileReplicationSetting
to 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:
-
addFtpGuestUser
public void addFtpGuestUser(User.Name username) throws IllegalArgumentException, IOException, SQLException Flags aUser
as 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:
-
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 newSite
to the system. AnSite
is anSite
that uses the Tomcat servlet engine and JBoss as an EJB container.- Parameters:
aoServer
- the hostname of theServer
siteName
- the name of thePrivateTomcatSite
packageName
- the name of thePackage
jvmUsername
- the username of theUser
that the Java VM will run asgroupName
- the name of theGroup
that 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
- theIpAddress
that the web site will bind to. In order for HTTP requests to succeed,Record
entries must point the hostnames of thisPrivateTomcatSite
to thisIpAddress
. Ifnull
, the system will assign a shared IP address.primaryHttpHostname
- the primary hostname of thePrivateTomcatSite
for the HTTP protocolaltHttpHostnames
- any number of alternate hostnames for the HTTP protocol ornull
for nonejbossVersion
- the version number ofJBoss
to install in the site- Returns:
- the
id
of 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:
-
addVirtualHostName
public int addVirtualHostName(int hsbPkey, DomainName hostname) throws IllegalArgumentException, IOException, SQLException Adds a newVirtualHostName
to 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
,Site
orContext
.
-
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
,Site
orContext
.
-
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:
-
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:
-
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 newPrivateTomcatSite
to the system. AnPrivateTomcatSite
is anSite
that 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 theServer
siteName
- the name of thePrivateTomcatSite
packageName
- the name of thePackage
jvmUsername
- the username of theUser
that the Java VM will run asgroupName
- the name of theGroup
that 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
- theIpAddress
that the web site will bind to. In order for HTTP requests to succeed,Record
entries must point the hostnames of thisPrivateTomcatSite
to thisIpAddress
. Ifnull
, the system will assign a shared IP address.primaryHttpHostname
- the primary hostname of thePrivateTomcatSite
for the HTTP protocolaltHttpHostnames
- any number of alternate hostnames for the HTTP protocol ornull
for nonetomcatVersion
- the version number ofTomcat
to install in the site- Returns:
- the
id
of 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:
-
addLinuxAccAddress
public int addLinuxAccAddress(String address, DomainName domain, String aoServer, User.Name username) throws IllegalArgumentException, IOException, SQLException Adds anAddress
to aUser
. Not allUser
s may be used as an email inbox. TheUserType
of the account determines which accounts may store email. When email is allowed for the account, anAddress
is 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 theUser
to 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 theDomain
orUser
- See Also:
-
addLinuxAccount
public void addLinuxAccount(User.Name username, Group.Name primaryGroup, User.Gecos name, User.Gecos officeLocation, User.Gecos officePhone, User.Gecos homePhone, String type, PosixPath shell) throws IllegalArgumentException, IOException, SQLException Adds a newUser
the system. AUser
does 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 theUser
has been created.- Parameters:
username
- the username of the newUser
primaryGroup
- the primary group of the new accountname
- the account's full nameofficeLocation
- optional office location available via the Unixfinger
commandofficePhone
- optional phone number available via the Unixfinger
commandhomePhone
- optional home phone number available vie the Unixfinger
commandtype
- theUserType
shell
- 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:
-
addLinuxGroup
public void addLinuxGroup(Group.Name name, Account.Name packageName, String type) throws IllegalArgumentException, IOException, SQLException Adds aGroup
to the system. After adding theGroup
, the group may be added to aServer
via aGroupServer
. Also,User
s may be granted access to the group usingGroupUser
.- Parameters:
name
- the name of the newGroup
packageName
- the name of thePackage
that 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 thePackage
orGroupType
- See Also:
-
addLinuxGroupAccount
public int addLinuxGroupAccount(Group.Name group, User.Name username) throws IllegalArgumentException, IOException, SQLException Once aUser
and aGroup
have been established, permission for theUser
to access theGroup
may be granted using aGroupUser
.- Parameters:
group
- the name of theGroup
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 theGroup
orUser
- See Also:
-
addLinuxServerAccount
public int addLinuxServerAccount(User.Name username, String aoServer, PosixPath home) throws IllegalArgumentException, IOException, SQLException Grants aUser
access to aServer
. The primaryGroup
for this account must already have aGroupServer
for theServer
.- Parameters:
username
- the username of theUser
aoServer
- the hostname of theServer
home
- the home directory of the user, typically/home/username
. Ifnull
, the default home directory forusername
is 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
,Host
orServer
- See Also:
-
addLinuxServerGroup
public int addLinuxServerGroup(Group.Name group, String aoServer) throws IllegalArgumentException, IOException, SQLException Grants aGroup
access to aServer
. If the group is the primaryGroup
for anyUser
that will be added to theServer
, theGroup
must be added to theServer
first via aGroupServer
.- Parameters:
group
- the name of theGroup
aoServer
- 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
orServer
- See Also:
-
addMajordomoList
public int addMajordomoList(DomainName domain, String aoServer, String listName) throws IllegalArgumentException, IOException, SQLException Adds a newMajordomoList
to aMajordomoServer
.- Parameters:
domain
- the domain of theMajordomoServer
aoServer
- the hostname of theServer
listName
- 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:
-
addMajordomoServer
public void addMajordomoServer(DomainName domain, String aoServer, User.Name linuxAccount, Group.Name linuxGroup, String version) throws IllegalArgumentException, IOException, SQLException Adds a newMajordomoServer
to anDomain
.- Parameters:
domain
- the domain of theDomain
aoServer
- the hostname of theServer
linuxAccount
- the username of theUser
linuxGroup
- the naem of theGroup
version
- the version of theMajordomoVersion
- Throws:
IllegalArgumentException
- if unable to find theServer
,Domain
,UserServer
,GroupServer
, orMajordomoVersion
IOException
SQLException
- See Also:
-
addMysqlDatabase
public int addMysqlDatabase(Database.Name name, Server.Name mysqlServer, String aoServer, Account.Name packageName) throws IllegalArgumentException, IOException, SQLException Adds a newDatabase
to the system. Once added,User
s may be granted access to theDatabase
using 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 theServer
packageName
- the name of thePackage
that 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 theServer
orPackage
- See Also:
-
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 aUserServer
permission to access aDatabase
.- Parameters:
name
- the name of theDatabase
aoServer
- the hostname of theServer
username
- the username of theUser
canSelect
- grants the userSELECT
privilegescanInsert
- grants the userINSERT
privilegescanUpdate
- grants the userUPDATE
privilegescanDelete
- grants the userDELETE
privilegescanCreate
- grants the userCREATE
privilegescanDrop
- grants the userDROP
privilegescanIndex
- grants the userINDEX
privilegescanAlter
- grants the userALTER
privilegescanCreateTempTable
- grants the userCREATE TEMPORARY TABLE
privilegescanLockTables
- grants the userLOCK TABLE
privileges- 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:
-
addMysqlServerUser
public int addMysqlServerUser(User.Name username, Server.Name mysqlServer, String aoServer, String host) throws IllegalArgumentException, IOException, SQLException - Parameters:
username
- the username of theUser
aoServer
- the hostname of theServer
host
- the host the user is allowed to connect from, almost alwaysUserServer.ANY_LOCAL_HOST
because 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 theUser
orServer
- See Also:
-
addMysqlUser
public void addMysqlUser(User.Name username) throws IllegalArgumentException, IOException, SQLException Adds aUser
to the system. AUser
does not exist on anyServer
, it merely indicates that aUser
will be used for accessing aDatabase
. In order to grant the newUser
access to aDatabase
, first add aUserServer
on the sameServer
as theDatabase
, then add aDatabaseUser
granting permission to theDatabase
.- Parameters:
username
- theUser
that 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:
-
addNetBind
public int addNetBind(String server, Account.Name packageName, InetAddress ipAddress, String netDevice, 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:
-
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 theAccount
is notified. The details of this notification are logged as aNoticeLog
.- Parameters:
accounting
- the accounting code of theAccount
billingContact
- the name of the person who was contactedemailAddress
- the email address that the email was sent totype
- theNoticeType
transid
- the transaction ID associated with this notification orNoticeLog.NO_TRANSACTION
for none- Throws:
IOException
- if unable to access the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if unable to find theAccount
,NoticeType
, orTransaction
.- See Also:
-
addPackage
public int addPackage(Account.Name packageName, Account.Name accounting, int packageDefinition) throws IllegalArgumentException, IOException, SQLException EachAccount
can have multiplePackage
s associated with it. EachPackage
is an allotment of resources with a monthly charge.To determine if this connection can set prices:
SimpleAoservClient client=new SimpleAoservClient(); boolean canSetPrices=client .getConnector() .getCurrentAdministrator() .getUsername() .getPackage() .getAccount() .canSetPrices();
- Parameters:
packageName
- the name for the new packageaccounting
- the accounting code of theAccount
packageDefinition
- 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:
-
addPostgresDatabase
public int addPostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer, User.Name datdba, String encoding, boolean enablePostgis) throws IllegalArgumentException, SQLException, IOException Adds a newDatabase
to 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, call
waitForPostgresDatabaseRebuild(java.lang.String)
.- Parameters:
name
- the name of the new databaseaoServer
- the hostname of theServer
datdba
- the username of theUserServer
who 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:
-
addPostgresServerUser
public int addPostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException - Parameters:
username
- the username of theUser
postgresServer
- 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 theUser
orServer
- See Also:
-
addPostgresUser
public void addPostgresUser(User.Name username) throws IllegalArgumentException, IOException, SQLException Adds aUser
to the system. AUser
does not exist on anyServer
, it merely indicates that aUser
will be used for accessing aDatabase
. In order to grant the newUser
access to aDatabase
, first add aUserServer
on the sameServer
as theDatabase
, then use the PostgreSQLgrant
andrevoke
commands.- Parameters:
username
- theUser
that 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:
-
addEmailDomain
public int addEmailDomain(DomainName domain, String aoServer, Account.Name packageName) throws IllegalArgumentException, IOException, SQLException Adds a newDomain
to aServer
. Once added, theServer
will accept email for the provided domain. In order for the email to function, however, a DNSRecordType.MX
entry for the domain must point to a hostname that resolves to anIpAddress
on theServer
.- Parameters:
domain
- the email domain that will be hostedaoServer
- the hostname of theServer
that is being addedpackageName
- the name of thePackage
that 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:
-
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 thePackage
that is granted accessaoServer
- the hostname of theServer
host
- 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 thePackage
orServer
- See Also:
-
addSpamEmailMessage
public int addSpamEmailMessage(int emailRelay, String message) throws IllegalArgumentException, IOException, SQLException Adds aSpamMessage
.- Returns:
- the pkey of the
SpamMessage
that 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:
-
addTransaction
public int addTransaction(int timeType, Timestamp time, Account.Name accountName, Account.Name sourceAccountName, User.Name administrator, String type, String description, int quantity, Money rate, String paymentType, String paymentInfo, String processor, byte paymentConfirmed) throws IllegalArgumentException, IOException, SQLException Adds a newTransaction
to aAccount
.- Parameters:
accountName
- the accounting code of theAccount
sourceAccountName
- the accounting code of the originatingAccount
administrator
- the username of theAdministrator
making thisTransaction
type
- the type as found inPackageDefinitionLimit
description
- the descriptionquantity
- the quantity in thousandthsrate
- the rate in hundredthspaymentConfirmed
- 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:
-
addUsername
public void addUsername(Account.Name packageName, User.Name username) throws IllegalArgumentException, IOException, SQLException Adds a newUser
to 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 thePackage
that owns theUser
username
- 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:
-
areLinuxAccountPasswordsSet
public int areLinuxAccountPasswordsSet(User.Name username) throws IllegalArgumentException, IOException, SQLException Determines if aUser
currently has passwords set.- Parameters:
username
- the username of the account- Returns:
- an
int
containingPasswordProtected.NONE
,PasswordProtected.SOME
, orPasswordProtected.ALL
- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theUser
is not found- See Also:
-
areMysqlUserPasswordsSet
public int areMysqlUserPasswordsSet(User.Name username) throws IllegalArgumentException, IOException, SQLException Determines if aUser
currently has passwords set.- Parameters:
username
- the username of the user- Returns:
- an
int
containingPasswordProtected.NONE
,PasswordProtected.SOME
, orPasswordProtected.ALL
- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theUser
is not found- See Also:
-
arePostgresUserPasswordsSet
public int arePostgresUserPasswordsSet(User.Name username) throws IllegalArgumentException, IOException, SQLException Determines if aUser
currently has passwords set.- Parameters:
username
- the username of the user- Returns:
- an
int
containingPasswordProtected.NONE
,PasswordProtected.SOME
, orPasswordProtected.ALL
- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theUser
is not found- See Also:
-
areUsernamePasswordsSet
public int areUsernamePasswordsSet(User.Name username) throws IllegalArgumentException, IOException, SQLException Determines if aUser
currently has passwords set.- Parameters:
username
- the username- Returns:
- an
int
containingPasswordProtected.NONE
,PasswordProtected.SOME
, orPasswordProtected.ALL
- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theUser
is not found- See Also:
-
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:
-
checkAdministratorPassword
public static List<PasswordChecker.Result> checkAdministratorPassword(User.Name username, String password) throws IOException Checks the strength of a password that will be used for aAdministrator
.- Parameters:
username
- the username of theAdministrator
whose password will be setpassword
- the new password- Returns:
- a description of why the password is weak or
null
if all checks succeed - Throws:
IOException
- See Also:
-
checkDnsZone
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:
-
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 formatIOException
SQLException
- See Also:
-
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 aUser
orUserServer
.- Parameters:
username
- the username of the account that will have its password setpassword
- the new password for the account- Returns:
- a
String
describing why the password is not secure ornull
if 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:
-
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 theUserServer
whos password will be setpassword
- the new password- Returns:
- a description of why the password is weak or
null
if all checks succeed - Throws:
IOException
- if unable to load the dictionary resource- See Also:
-
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 theUserServer
whos password will be setpassword
- the new password- Returns:
- a description of why the password is weak or
null
if all checks succeed - Throws:
IOException
- if unable to load the dictionary resource- See Also:
-
checkMajordomoListName
Checks the format of a Majordomo list name.- Throws:
IllegalArgumentException
- if the domain is not in a valid format- See Also:
-
checkSiteName
Checks the format of anSite
name.- Parameters:
siteName
- the name of theSite
- Throws:
IllegalArgumentException
- if the name is not in a valid format- See Also:
-
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
null
if 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:
-
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
, orUserServer
is not found- See Also:
-
copyHomeDirectory
public long copyHomeDirectory(User.Name username, String fromAoServer, String toAoServer) throws IllegalArgumentException, IOException, SQLException Copies the contents of user's home directory from one server to another.- Parameters:
username
- the username of theUser
fromAoServer
- the server to get the data fromtoAoServer
- 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 sourceUserServer
or destinationServer
- See Also:
-
copyLinuxServerAccountPassword
public void copyLinuxServerAccountPassword(User.Name fromUsername, String fromAoServer, User.Name toUsername, String toAoServer) throws IllegalArgumentException, IOException, SQLException Copies the password from oneUserServer
to another.- Parameters:
fromUsername
- the username to copy fromfromAoServer
- the server to get the data fromtoUsername
- the username to copy totoAoServer
- 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:
-
crypt
Deprecated.Please useHashedPassword
instead.Encrypts a password using a pure Java implementation of the standard Unixcrypt
function.- 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:
-
declineCreditCard
public void declineCreditCard(int pkey, String reason) throws IllegalArgumentException, IOException, SQLException - Parameters:
pkey
- the unique identifier of theCreditCard
reason
- 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:
-
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 necessaryAoservObject
s
-
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 necessaryAoservObject
s
-
disableEmailPipe
public int disableEmailPipe(int pkey, String disableReason) throws IllegalArgumentException, SQLException, IOException Disables 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, IOException Disables 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, IOException Disables 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 aUser
and 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 theUser
orUser
-
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, IOException Disables 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 theUser
orUser
-
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 theServer
orUser
-
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 theUser
orUser
-
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 theServer
orUser
-
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 theUser
orAdministrator
-
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 necessaryAoservObject
s
-
enableEmailPipe
Enables 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, IOException Enables 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, SQLException Enables 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 aUser
and 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 theUser
orUser
-
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, IOException Enables 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 theUser
orUser
-
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 theServer
orUser
-
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 theUser
orUser
-
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 theServer
orUser
-
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 theUser
orAdministrator
-
dumpMysqlDatabase
public void dumpMysqlDatabase(Database.Name name, Server.Name mysqlServer, String aoServer, Writer out) throws IllegalArgumentException, IOException, SQLException - Parameters:
name
- the name of theDatabase
aoServer
- the hostname of theServer
out
- theWriter
to 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 theServer
orDatabase
- See Also:
-
dumpMysqlDatabase
public void dumpMysqlDatabase(Database.Name name, Server.Name mysqlServer, String aoServer, boolean gzip, StreamHandler streamHandler) throws IllegalArgumentException, IOException, SQLException Dumps the contents of aDatabase
to anOutputStream
, optionally gzipped.- Parameters:
name
- the name of theDatabase
aoServer
- the hostname of theServer
gzip
- 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 theServer
orDatabase
- See Also:
-
dumpPostgresDatabase
public void dumpPostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer, Writer out) throws IllegalArgumentException, IOException, SQLException - Parameters:
name
- the name of theDatabase
postgresServer
- the name of the PostgreSQL serveraoServer
- the hostname of theServer
out
- theWriter
to 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 theServer
orDatabase
- See Also:
-
dumpPostgresDatabase
public void dumpPostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer, boolean gzip, StreamHandler streamHandler) throws IllegalArgumentException, IOException, SQLException Dumps the contents of aDatabase
to anOutputStream
, optionally gzipped.- Parameters:
name
- the name of theDatabase
postgresServer
- the name of the PostgreSQL serveraoServer
- the hostname of theServer
gzip
- 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 theServer
orDatabase
- See Also:
-
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:
-
generateMysqlDatabaseName
public Database.Name generateMysqlDatabaseName(String templateBase, String templateAdded) throws IOException, SQLException Generates a unique MySQL database name.- Parameters:
templateBase
- the beginning part of the template, such as"AO"
templateAdded
- the part of the template added between thetemplate_base
and 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:
-
generatePackageName
Generates a uniquePackage
name.- Parameters:
template
- the beginning part of the template, such as"AO_"
- Returns:
- the available
Package
name - Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the database- See Also:
-
generatePassword
Generates a random, valid password.- Returns:
- the password
- Throws:
IOException
- if unable to contact the server
-
generatePostgresDatabaseName
public Database.Name generatePostgresDatabaseName(String templateBase, String templateAdded) throws IOException, SQLException Generates a unique PostgreSQL database name.- Parameters:
templateBase
- the beginning part of the template, such as"AO"
templateAdded
- the part of the template added between thetemplate_base
and 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:
-
generateSiteName
Generates a uniqueSite
name.- Parameters:
template
- the beginning part of the template, such as"ao"
- Returns:
- the available
Site
name - Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the database- See Also:
-
getAutoresponderContent
public String getAutoresponderContent(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException Gets the autoresponder content.- Parameters:
username
- the username of theUserServer
aoServer
- 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:
-
getConnector
Gets theAoservConnector
used 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 theUser
aoServer
- 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:
-
getEmailListAddressList
public String getEmailListAddressList(PosixPath path, String aoServer) throws IllegalArgumentException, IOException, SQLException Gets the list of email addresses that anList
will 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:
-
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 theServer
orBackupPartition
- See Also:
-
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 theServer
orBackupPartition
- See Also:
-
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:
-
getHttpdServerConcurrency
public int getHttpdServerConcurrency(String aoServer, String name) throws IllegalArgumentException, IOException, SQLException - Parameters:
aoServer
- the server hosting the accountname
- the name of the instance ofnull
for 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:
-
getInboxAttributes
public InboxAttributes getInboxAttributes(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException Gets the attributes of an inbox.- Parameters:
username
- the username of theUserServer
aoServer
- 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:
-
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 theUserServer
aoServer
- 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:
-
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 theMajordomoServer
aoServer
- the hostname of theServer
listName
- 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:
-
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 theMajordomoServer
aoServer
- the hostname of theServer
listName
- 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:
-
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
- theOutputStream
to write the file to- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if unable to find theHost
orServer
- See Also:
-
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 theHost
orServer
- See Also:
-
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
- theOutputStream
to 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:
-
getRootAccount
- Returns:
- the accounting code of the root
Account
- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the database- See Also:
-
invalidate
public void invalidate(int tableId, String server) throws IllegalArgumentException, SQLException, IOException Invalidates 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 theAoservTable
to 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:
-
isAccountingAvailable
Determines if an accounting code is available.- Parameters:
accounting
- the accounting code- Returns:
true
if the accounting code is available- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the database- See Also:
-
isAdministratorPasswordSet
public boolean isAdministratorPasswordSet(User.Name username) throws IllegalArgumentException, IOException, SQLException Determines if aAdministrator
currently has a password set.- Parameters:
username
- the username of the administrator- Returns:
- if the
Administrator
has a password set - Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theAdministrator
is not found- See Also:
-
isDnsZoneAvailable
Determines if aZone
is available.- Parameters:
zone
- the zone indomain.tld.
format- Returns:
true
if theZone
is available- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the database- See Also:
-
isIpAddressUsed
public boolean isIpAddressUsed(InetAddress ipAddress, String server, String netDevice) throws IllegalArgumentException, IOException, SQLException Determines if anIpAddress
is currently being used.- Parameters:
ipAddress
- the IP address- Returns:
true
if theIpAddress
is in use- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if unable to find theIpAddress
- See Also:
-
isLinuxGroupNameAvailable
Determines if a groupname is available.- Parameters:
groupname
- the groupname- Returns:
true
if the groupname is available- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the database- See Also:
-
isLinuxServerAccountPasswordSet
public boolean isLinuxServerAccountPasswordSet(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException Determines if aUserServer
currently has a password set.- Parameters:
username
- the username of the accountaoServer
- the server the account is hosted on- Returns:
- if the
UserServer
has a password set - Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theUserServer
is not found- See Also:
-
isLinuxServerAccountProcmailManual
public int isLinuxServerAccountProcmailManual(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException Determines if aUserServer
is 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
UserServer
is in manual mode - Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theUserServer
is not found- See Also:
-
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:
true
if theDatabase
is 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:
-
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:
true
if theServer
is 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:
-
isMysqlServerUserPasswordSet
public boolean isMysqlServerUserPasswordSet(User.Name username, Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException Determines if aUserServer
currently has a password set.- Parameters:
username
- the username of the accountaoServer
- the server the account is hosted on- Returns:
- if the
UserServer
has a password set - Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theUserServer
is not found- See Also:
-
isPackageNameAvailable
Determines if aPackage
name is available.- Parameters:
packageName
- the name of thePackage
- Returns:
true
if thePackage
name is available- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the database- See Also:
-
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:
true
if theDatabase
is 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:
-
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:
true
if theServer
is 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:
-
isPostgresServerUserPasswordSet
public boolean isPostgresServerUserPasswordSet(User.Name username, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException Determines if aUserServer
currently 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
UserServer
has a password set - Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theUserServer
is not found- See Also:
-
isEmailDomainAvailable
public boolean isEmailDomainAvailable(DomainName domain, String aoServer) throws IllegalArgumentException, IOException, SQLException Determines if aDomain
is available.- Parameters:
domain
- the domainaoServer
- the hostname of the server- Returns:
true
if theDomain
is available- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if theDomain
is invalid- See Also:
-
isSiteNameAvailable
public boolean isSiteNameAvailable(String siteName) throws IllegalArgumentException, IOException, SQLException Determines if a site name is available.- Parameters:
siteName
- the site name- Returns:
true
if 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:
-
isUsernameAvailable
Determines if aUser
is available.- Parameters:
username
- the username- Returns:
true
if theUser
is available- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the database- See Also:
-
moveAccount
public void moveAccount(Account.Name business, String from, String to, TerminalWriter out) throws IllegalArgumentException, IOException, SQLException - Parameters:
business
- the accounting code of theAccount
from
- the hostname of theServer
to get all the resources fromto
- the hostname of theServer
to place all the resources onout
- an optionalTerminalWriter
to send diagnostic output to- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if unable to find theAccount
or either of theservers
- See Also:
-
moveIpAddress
public void moveIpAddress(InetAddress ipAddress, String fromServer, String fromNetDevice, String toServer) throws IllegalArgumentException, IOException, SQLException - Parameters:
ipAddress
- the IP address to movetoServer
- the destination server- Throws:
IOException
- if unable to contact the serverSQLException
- if unable to access the databaseIllegalArgumentException
- if unable to find theIpAddress
or theHost
- See Also:
-
ping
Times the latency of the communication with the server.- Returns:
- the latency of the communication in milliseconds
- Throws:
IOException
SQLException
- See Also:
-
printZoneFile
public void printZoneFile(String zone, PrintWriter out) throws IllegalArgumentException, SQLException, IOException Prints the contents of aZone
as used by thenamed
process.- Parameters:
zone
- the name of theZone
out
- thePrintWriter
to 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:
-
refreshEmailSmtpRelay
public void refreshEmailSmtpRelay(int pkey, long minDuration) throws IllegalArgumentException, IOException, SQLException Refreshes the time window for SMTP server access by resetting the expiration to 24 hours from the current time.- Parameters:
pkey
- theid
of 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:
-
removeBlackholeEmailAddress
public void removeBlackholeEmailAddress(String address, DomainName domain, String aoServer) throws IllegalArgumentException, IOException, SQLException Removes aBlackholeAddress
from 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:
-
removeAdministrator
public void removeAdministrator(User.Name username) throws IllegalArgumentException, IOException, SQLException Removes anAdministrator
from 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 theUser
orAdministrator
- See Also:
-
removeAccountHost
public void removeAccountHost(Account.Name accounting, String server) throws IllegalArgumentException, IOException, SQLException Revokes anaccount's
access 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:
-
removeCreditCard
Removes aCreditCard
.- Parameters:
pkey
- theid
of theCreditCard
to 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:
-
removeCvsRepository
public void removeCvsRepository(String aoServer, PosixPath path) throws IllegalArgumentException, IOException, SQLException Removes aCvsRepository
.- Parameters:
aoServer
- the hostname of theServer
path
- 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 theServer
orCvsRepository
- See Also:
-
removeDnsRecord
Removes one record from aZone
.- Parameters:
pkey
- theid
of theRecord
to 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:
-
removeDnsRecord
public void removeDnsRecord(String zone, String domain, String type, String tag, String destination) throws IllegalArgumentException, IOException, SQLException -
removeDnsZone
Completely removes aZone
from the servers.- Parameters:
zone
- the name of theZone
to 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:
-
setDnsZoneTtl
public void setDnsZoneTtl(String zone, int ttl) throws IllegalArgumentException, IOException, SQLException Completely removes aZone
from the servers.- Parameters:
zone
- the name of theZone
to 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:
-
removeEmailAddress
public void removeEmailAddress(String address, DomainName domain, String aoServer) throws IllegalArgumentException, IOException, SQLException Removes anAddress
from the system. If theAddress
is 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 theDomain
orAddress
- See Also:
-
removeEmailForwarding
public void removeEmailForwarding(String address, DomainName domain, String aoServer, Email destination) throws IllegalArgumentException, IOException, SQLException Removes anForwarding
from 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:
-
removeEmailList
public void removeEmailList(PosixPath path, String aoServer) throws IllegalArgumentException, IOException, SQLException Removes anList
from the system. AllAddress
es 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 theList
to 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:
-
removeEmailListAddress
public void removeEmailListAddress(String address, DomainName domain, PosixPath path, String aoServer) throws IllegalArgumentException, IOException, SQLException Removes anListAddress
from 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:
-
removeEmailPipe
- Parameters:
pkey
- theid
of thePipe
to 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:
-
removeEmailPipeAddress
public void removeEmailPipeAddress(String address, DomainName domain, int pipe) throws IllegalArgumentException, IOException, SQLException Removes anPipeAddress
from 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:
-
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:
-
removeHttpdSite
public void removeHttpdSite(String name, String aoServer) throws IllegalArgumentException, IOException, SQLException Completely removes aSite
from 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:
-
removeVirtualHostName
public void removeVirtualHostName(int pkey) throws IllegalArgumentException, IOException, SQLException Removes aVirtualHostName
from 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:
-
removeHttpdTomcatContext
public void removeHttpdTomcatContext(int pkey) throws IllegalArgumentException, IOException, SQLException Removes aContext
from 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:
-
removeHttpdTomcatDataSource
public void removeHttpdTomcatDataSource(int pkey) throws IllegalArgumentException, IOException, SQLException Removes aContextDataSource
from 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:
-
removeHttpdTomcatParameter
public void removeHttpdTomcatParameter(int pkey) throws IllegalArgumentException, IOException, SQLException Removes aContextParameter
from 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:
-
removeLinuxAccAddress
public void removeLinuxAccAddress(String address, DomainName domain, String aoServer, User.Name username) throws IllegalArgumentException, IOException, SQLException Removes aInboxAddress
from 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:
-
removeLinuxAccount
public void removeLinuxAccount(User.Name username) throws IllegalArgumentException, IOException, SQLException Removes aUser
and all related data from the system.- Parameters:
username
- the username of theUser
to 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:
-
removeLinuxGroup
public void removeLinuxGroup(Group.Name name) throws IllegalArgumentException, IOException, SQLException Removes aGroup
and all related data from the system.- Parameters:
name
- the name of theGroup
to 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:
-
removeLinuxGroupAccount
public void removeLinuxGroupAccount(Group.Name group, User.Name username) throws IllegalArgumentException, IOException, SQLException - Parameters:
group
- the name of theGroup
to remove access tousername
- the username of theUser
to 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:
-
removeLinuxServerAccount
public void removeLinuxServerAccount(User.Name username, String aoServer) throws IllegalArgumentException, IOException, SQLException Removes aUserServer
from aServer
.- Parameters:
username
- the username of theUserServer
to removeaoServer
- the hostname of theServer
to 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:
-
removeLinuxServerGroup
public void removeLinuxServerGroup(Group.Name group, String aoServer) throws IllegalArgumentException, IOException, SQLException Removes aGroupServer
from aServer
.- Parameters:
group
- the name of theGroupServer
to 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:
-
removeMysqlDatabase
public void removeMysqlDatabase(Database.Name name, Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException Removes aDatabase
from the system. All relatedDatabaseUser
s 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 theServer
orDatabase
- See Also:
-
removeMysqlDbUser
public void removeMysqlDbUser(Database.Name name, Server.Name mysqlServer, String aoServer, User.Name username) throws IllegalArgumentException, IOException, SQLException - Parameters:
name
- the name of theDatabase
aoServer
- the hostname of theServer
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 theServer
,Database
,UserServer
, orDatabaseUser
- See Also:
-
removeMysqlServerUser
public void removeMysqlServerUser(User.Name username, Server.Name mysqlServer, String aoServer) throws IllegalArgumentException, IOException, SQLException - Parameters:
username
- the username of theUserServer
aoServer
- 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 theServer
orUserServer
- See Also:
-
removeMysqlUser
public void removeMysqlUser(User.Name username) throws IllegalArgumentException, IOException, SQLException Removes aUser
from a the system. All of the associatedUserServer
s andDatabaseUser
s 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:
-
removeNetBind
Removes aBind
from 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:
-
removePostgresDatabase
public void removePostgresDatabase(Database.Name name, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException Removes aDatabase
from 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 theServer
orDatabase
- See Also:
-
removePostgresServerUser
public void removePostgresServerUser(User.Name username, Server.Name postgresServer, String aoServer) throws IllegalArgumentException, IOException, SQLException - Parameters:
username
- the username of theUserServer
postgresServer
- 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 theServer
orUserServer
- See Also:
-
removePostgresUser
public void removePostgresUser(User.Name username) throws IllegalArgumentException, IOException, SQLException Removes aUser
from a the system.. All of the associatedUserServer
s 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:
-
removeEmailDomain
public void removeEmailDomain(DomainName domain, String aoServer) throws IllegalArgumentException, IOException, SQLException - Parameters:
domain
- the name of theDomain
aoServer
- the server hosting this domain- Throws:
-
HashedPassword
instead.