java.lang.Object
com.aoindustries.aoserv.client.AoservObject<User.Name,User>
com.aoindustries.aoserv.client.CachedObject<User.Name,User>
com.aoindustries.aoserv.client.postgresql.CachedObjectUserNameKey<User>
com.aoindustries.aoserv.client.postgresql.User
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AoservReadable,AoservStreamable,AoservWritable,Disablable,PasswordProtected,Removable,SingleTableObject<User.Name,User>
public final class User
extends CachedObjectUserNameKey<User>
implements Removable, PasswordProtected, Disablable
A
PostgresUser may have access to multiple servers. The information
common to all servers is contained in PostgresUser.- Author:
- AO Industries, Inc.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final intDeprecated.static final StringA password may be set to null, which means that the account will be disabled.static final Stringstatic final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.static final User.NameThe username of the PostgreSQL special users.Fields inherited from class com.aoindustries.aoserv.client.postgresql.CachedObjectUserNameKey
pkeyFields inherited from class com.aoindustries.aoserv.client.CachedObject
tableFields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITEFields inherited from interface com.aoindustries.aoserv.client.password.PasswordProtected
ALL, NONE, SOME -
Constructor Summary
ConstructorsConstructorDescriptionUser()Deprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionintaddPostgresServerUser(Server postgresServer) intbooleanbooleanbooleanbooleanbooleanbooleancanTrace()static List<PasswordChecker.Result> checkPassword(User.Name username, String password) checkPassword(String password) voiddisable(DisableLog dl) voidenable()Lists the reasons an object may not be removed.protected ObjectgetColumnImpl(int i) getPostgresServerUser(Server server) voidInitializes this object from the raw database contents.booleanbooleanChecks if this object is disabled.booleanstatic booleanSpecial PostgreSQL users may not be added or removed.voidread(StreamableInput in, AoservProtocol.Version protocolVersion) voidremove()Removes this object, and all dependant objects, from the system.voidsetPassword(String password) voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.postgresql.CachedObjectUserNameKey
equals, getKey, hashCode, toStringImplMethods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTableMethods 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
-
Field Details
-
MAX_USERNAME_LENGTH
Deprecated.Please useUser.Name.MAX_LENGTHinstead.The maximum length of a PostgreSQL username.- See Also:
-
POSTGRES
The username of the PostgreSQL special users. -
PG_MONITOR
The username of the PostgreSQL special users. -
PG_READ_ALL_SETTINGS
The username of the PostgreSQL special users. -
PG_READ_ALL_STATS
The username of the PostgreSQL special users. -
PG_SIGNAL_BACKEND
The username of the PostgreSQL special users. -
PG_STAT_SCAN_TABLES
The username of the PostgreSQL special users. -
PG_EXECUTE_SERVER_PROGRAM
The username of the PostgreSQL special users. -
PG_READ_SERVER_FILES
The username of the PostgreSQL special users. -
PG_WRITE_SERVER_FILES
The username of the PostgreSQL special users. -
PG_READ_ALL_DATA
The username of the PostgreSQL special users. -
PG_WRITE_ALL_DATA
The username of the PostgreSQL special users. -
PG_DATABASE_OWNER
The username of the PostgreSQL special users. -
PG_CHECKPOINT
The username of the PostgreSQL special users. -
POSTGRESMON
The username of the PostgreSQL special users. -
AOADMIN
The username of the PostgreSQL special users. -
AOSERV_APP
The username of the PostgreSQL special users. -
AOWEB_APP
The username of the PostgreSQL special users. -
NO_PASSWORD
A password may be set to null, which means that the account will be disabled. -
NO_PASSWORD_DB_VALUE
- See Also:
-
-
Constructor Details
-
User
Deprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
isSpecial
Special PostgreSQL users may not be added or removed. -
addPostgresServerUser
- Throws:
IOExceptionSQLException
-
arePasswordsSet
- Specified by:
arePasswordsSetin interfacePasswordProtected- Throws:
IOExceptionSQLException
-
canCatupd
public boolean canCatupd() -
canCreatedb
public boolean canCreatedb() -
canDisable
- Specified by:
canDisablein interfaceDisablable- Throws:
IOExceptionSQLException
-
canEnable
- Specified by:
canEnablein interfaceDisablable- Throws:
SQLExceptionIOException
-
canTrace
public boolean canTrace() -
checkPassword
- Specified by:
checkPasswordin interfacePasswordProtected- Throws:
IOException
-
checkPassword
public static List<PasswordChecker.Result> checkPassword(User.Name username, String password) throws IOException - Throws:
IOException
-
disable
- Specified by:
disablein interfaceDisablable- Throws:
IOExceptionSQLException
-
enable
- Specified by:
enablein interfaceDisablable- Throws:
IOExceptionSQLException
-
getColumnImpl
- Specified by:
getColumnImplin classAoservObject<User.Name,User>
-
isDisabled
public boolean isDisabled()Description copied from interface:DisablableChecks 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:
isDisabledin interfaceDisablable
-
getDisableLog_id
-
getDisableLog
- Specified by:
getDisableLogin interfaceDisablable- Throws:
SQLExceptionIOException
-
getPostgresServerUser
- Throws:
IOExceptionSQLException
-
getPostgresServerUsers
- Throws:
IOExceptionSQLException
-
getTableId
- Specified by:
getTableIdin classAoservObject<User.Name,User>
-
getUsername_username_id
-
getUsername
- Throws:
SQLExceptionIOException
-
isSpecial
public boolean isSpecial() -
init
Description copied from class:AoservObjectInitializes this object from the raw database contents.- Specified by:
initin classAoservObject<User.Name,User> - Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
isDatabaseAdmin
public boolean isDatabaseAdmin() -
read
- Specified by:
readin interfaceAoservReadable- Specified by:
readin interfaceAoservStreamable- Specified by:
readin classAoservObject<User.Name,User> - Throws:
IOException
-
getCannotRemoveReasons
Description copied from interface:RemovableLists the reasons an object may not be removed.- Specified by:
getCannotRemoveReasonsin interfaceRemovable- Returns:
- an empty
List<CannotRemoveReason>if this object may be removed, or a list of descriptions - Throws:
SQLExceptionIOException
-
remove
Description copied from interface:RemovableRemoves this object, and all dependant objects, from the system.- Specified by:
removein interfaceRemovable- Throws:
IOExceptionSQLException
-
setPassword
- Specified by:
setPasswordin interfacePasswordProtected- Throws:
IOExceptionSQLException
-
write
- Specified by:
writein interfaceAoservStreamable- Specified by:
writein interfaceAoservWritable- Specified by:
writein classAoservObject<User.Name,User> - Throws:
IOException
-
canSetPassword
public boolean canSetPassword()- Specified by:
canSetPasswordin interfacePasswordProtected
-

User.Name.MAX_LENGTHinstead.