- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.GlobalObject<String,T>
-
- com.aoindustries.aoserv.client.GlobalObjectStringKey<UserType>
-
- com.aoindustries.aoserv.client.linux.UserType
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable
public final class UserType extends GlobalObjectStringKey<UserType>
TheLinuxAccountTypeof aLinuxAccountcontrols which systems the account may access. If theLinuxAccountis able to access multipleServers, its type will be the same on all servers. TODO: Make this class an enum? How would API version compatibility work? Same for group type.- Author:
- AO Industries, Inc.
- See Also:
User,UserServer
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPPLICATIONThe different Linux account types.static StringBACKUPThe different Linux account types.static StringEMAILThe different Linux account types.static StringFTPONLYThe different Linux account types.static StringMERCENARYThe different Linux account types.static StringSYSTEMThe different Linux account types.static StringUSERThe different Linux account types.-
Fields inherited from class com.aoindustries.aoserv.client.GlobalObjectStringKey
pkey
-
Fields inherited from class com.aoindustries.aoserv.client.AOServObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
-
Constructor Summary
Constructors Constructor Description UserType()
-
Method Summary
-
Methods inherited from class com.aoindustries.aoserv.client.GlobalObjectStringKey
equals, getKey, hashCode
-
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
-
-
-
-
Field Detail
-
BACKUP
public static final String BACKUP
The different Linux account types.- See Also:
- Constant Field Values
-
EMAIL
public static final String EMAIL
The different Linux account types.- See Also:
- Constant Field Values
-
FTPONLY
public static final String FTPONLY
The different Linux account types.- See Also:
- Constant Field Values
-
USER
public static final String USER
The different Linux account types.- See Also:
- Constant Field Values
-
MERCENARY
public static final String MERCENARY
The different Linux account types.- See Also:
- Constant Field Values
-
SYSTEM
public static final String SYSTEM
The different Linux account types.- See Also:
- Constant Field Values
-
APPLICATION
public static final String APPLICATION
The different Linux account types.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPasswordStrength
public PasswordChecker.PasswordStrength getPasswordStrength()
-
getPasswordStrength
public static PasswordChecker.PasswordStrength getPasswordStrength(String type)
-
getAllowedShells
public List<Shell> getAllowedShells(AOServConnector connector) throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<String,UserType>
-
getDescription
public String getDescription()
-
getName
public String getName()
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<String,UserType>
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<String,UserType>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
canPostgresIdent
public boolean canPostgresIdent()
-
canPostgresIdent
public static boolean canPostgresIdent(String type)
-
isAllowedShell
public boolean isAllowedShell(Shell shell) throws SQLException
- Throws:
SQLException
-
isAllowedShell
public boolean isAllowedShell(PosixPath path) throws SQLException
- Throws:
SQLException
-
isAllowedShell
public static boolean isAllowedShell(String type, PosixPath path) throws SQLException
- Throws:
SQLException
-
isEmail
public boolean isEmail()
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<String,UserType>- Throws:
IOException
-
toStringImpl
public String toStringImpl()
Description copied from class:AOServObjectAOServObject.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:
toStringImplin classGlobalObjectStringKey<UserType>
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<String,UserType>- Throws:
IOException
-
canSetPassword
public static boolean canSetPassword(String type)
-
canSetPassword
public boolean canSetPassword()
-
-