Class UserServer
java.lang.Object
com.aoindustries.aoserv.client.AoservObject<Integer,UserServer>
com.aoindustries.aoserv.client.CachedObject<Integer,UserServer>
com.aoindustries.aoserv.client.CachedObjectIntegerKey<UserServer>
com.aoindustries.aoserv.client.postgresql.UserServer
- All Implemented Interfaces:
Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,Disablable
,PasswordProtected
,Removable
,SingleTableObject<Integer,
UserServer>
public final class UserServer
extends CachedObjectIntegerKey<UserServer>
implements Removable, PasswordProtected, Disablable
A
PostgresServerUser
grants a PostgresUser
access to a Server
.- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
Fields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
Fields inherited from interface com.aoindustries.aoserv.client.password.PasswordProtected
ALL, NONE, SOME
-
Constructor Summary
ConstructorDescriptionDeprecated.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
boolean
boolean
checkPassword
(String password) void
disable
(DisableLog dl) void
enable()
Lists the reasons an object may not be removed.protected Object
getColumnImpl
(int i) int
void
Initializes this object from the raw database contents.boolean
Checks if this object is disabled.boolean
void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) void
remove()
Removes this object, and all dependant objects, from the system.void
setPassword
(String password) void
setPredisablePassword
(String password) AoservObject.toString()
implementation that is allowed to throw exceptions.void
write
(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
Methods inherited from class com.aoindustries.aoserv.client.AoservObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxId, getLinuxUserName, getMacAddress, getMysqlDatabaseName, getMysqlServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
Constructor Details
-
UserServer
Deprecated.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
arePasswordsSet
- Specified by:
arePasswordsSet
in interfacePasswordProtected
- Throws:
IOException
SQLException
-
canDisable
public boolean canDisable()- Specified by:
canDisable
in interfaceDisablable
-
canEnable
- Specified by:
canEnable
in interfaceDisablable
- Throws:
SQLException
IOException
-
checkPassword
- Specified by:
checkPassword
in interfacePasswordProtected
- Throws:
IOException
-
disable
- Specified by:
disable
in interfaceDisablable
- Throws:
IOException
SQLException
-
enable
- Specified by:
enable
in interfaceDisablable
- Throws:
IOException
SQLException
-
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<Integer,
UserServer>
-
isDisabled
public boolean isDisabled()Description copied from interface:Disablable
Checks if this object is disabled. This should execute very quickly (not incur any round-trip to any database) and thus does not throw any checked exceptions.- Specified by:
isDisabled
in interfaceDisablable
-
getDisableLog_id
-
getDisableLog
- Specified by:
getDisableLog
in interfaceDisablable
- Throws:
IOException
SQLException
-
getPostgresDatabases
- Throws:
IOException
SQLException
-
getPostgresUser_username
-
getPostgresUser
- Throws:
SQLException
IOException
-
isSpecial
public boolean isSpecial() -
getPredisablePassword
-
getPostgresServer_bind_id
public int getPostgresServer_bind_id() -
getPostgresServer
- Throws:
IOException
SQLException
-
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
UserServer>
-
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<Integer,
UserServer> - Parameters:
result
- theResultSet
containing the row to copy into this object- Throws:
SQLException
-
read
- Specified by:
read
in interfaceAoservReadable
- Specified by:
read
in interfaceAoservStreamable
- Specified by:
read
in classAoservObject<Integer,
UserServer> - Throws:
IOException
-
getCannotRemoveReasons
Description copied from interface:Removable
Lists the reasons an object may not be removed.- Specified by:
getCannotRemoveReasons
in interfaceRemovable
- Returns:
- an empty
List<CannotRemoveReason>
if this object may be removed, or a list of descriptions - Throws:
SQLException
IOException
-
remove
Description copied from interface:Removable
Removes this object, and all dependant objects, from the system.- Specified by:
remove
in interfaceRemovable
- Throws:
IOException
SQLException
-
setPassword
- Specified by:
setPassword
in interfacePasswordProtected
- Throws:
IOException
SQLException
-
setPredisablePassword
- Throws:
IOException
SQLException
-
toStringImpl
Description copied from class:AoservObject
AoservObject.toString()
implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAoservObject.toString()
on the key (fromAoservObject.getKey()
). When the key isnull
, uses the default implementation fromObject.toString()
.- Overrides:
toStringImpl
in classCachedObjectIntegerKey<UserServer>
- Throws:
IOException
SQLException
-
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<Integer,
UserServer> - Throws:
IOException
-
canSetPassword
- Specified by:
canSetPassword
in interfacePasswordProtected
- Throws:
SQLException
IOException
-