Class CvsRepository
- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<CvsRepository>
-
- com.aoindustries.aoserv.client.scm.CvsRepository
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,Disablable,Removable,SingleTableObject<Integer,CvsRepository>
public final class CvsRepository extends CachedObjectIntegerKey<CvsRepository> implements Removable, Disablable
ACvsRepositoryrepresents on repository directory for the CVS pserver.- Author:
- AO Industries, Inc.
-
-
Field Summary
Fields Modifier and Type Field Description static PosixPathDEFAULT_CVS_DIRECTORYThe default directory containing CVS repositories.static longDEFAULT_MODEThe default permissions for a CVS repository.-
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
-
-
Constructor Summary
Constructors Constructor Description CvsRepository()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDisable()booleancanEnable()voiddisable(DisableLog dl)voidenable()List<CannotRemoveReason<?>>getCannotRemoveReasons()Lists the reasons an object may not be removed.protected ObjectgetColumnImpl(int i)UnmodifiableTimestampgetCreated()DisableLoggetDisableLog()UserServergetLinuxServerAccount()intgetLinuxServerAccount_pkey()GroupServergetLinuxServerGroup()intgetLinuxServerGroup_pkey()longgetMode()PosixPathgetPath()Table.TableIDgetTableID()static long[]getValidModes()voidinit(ResultSet result)Initializes this object from the raw database contents.booleanisDisabled()Checks if this object is disabled.static booleanisValidPath(PosixPath path)Allowed CVS repository paths are constrained beyond the general requirements ofPosixPath.voidread(StreamableInput in, AoservProtocol.Version protocolVersion)voidremove()Removes this object, and all dependant objects, from the system.voidsetMode(long mode)voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion)-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode, toStringImpl
-
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
-
-
-
-
Field Detail
-
DEFAULT_CVS_DIRECTORY
public static final PosixPath DEFAULT_CVS_DIRECTORY
The default directory containing CVS repositories.
-
DEFAULT_MODE
public static final long DEFAULT_MODE
The default permissions for a CVS repository.- See Also:
- Constant Field Values
-
-
Method Detail
-
getValidModes
public static long[] getValidModes()
-
isValidPath
public static boolean isValidPath(PosixPath path)
Allowed CVS repository paths are constrained beyond the general requirements ofPosixPath. May only contain characters in the set:[a-z] [A-Z] [0-9] _ . - /
-
canDisable
public boolean canDisable()
- Specified by:
canDisablein interfaceDisablable
-
canEnable
public boolean canEnable() throws SQLException, IOException- Specified by:
canEnablein interfaceDisablable- Throws:
SQLExceptionIOException
-
disable
public void disable(DisableLog dl) throws IOException, SQLException
- Specified by:
disablein interfaceDisablable- Throws:
IOExceptionSQLException
-
enable
public void enable() throws IOException, SQLException- Specified by:
enablein interfaceDisablable- Throws:
IOExceptionSQLException
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,CvsRepository>
-
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
public DisableLog getDisableLog() throws SQLException, IOException
- Specified by:
getDisableLogin interfaceDisablable- Throws:
SQLExceptionIOException
-
getPath
public PosixPath getPath()
-
getLinuxServerAccount_pkey
public int getLinuxServerAccount_pkey()
-
getLinuxServerAccount
public UserServer getLinuxServerAccount() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getLinuxServerGroup_pkey
public int getLinuxServerGroup_pkey()
-
getLinuxServerGroup
public GroupServer getLinuxServerGroup() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getMode
public long getMode()
-
getCreated
public UnmodifiableTimestamp getCreated()
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,CvsRepository>
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<Integer,CvsRepository>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,CvsRepository>- Throws:
IOException
-
getCannotRemoveReasons
public List<CannotRemoveReason<?>> 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
-
remove
public void remove() throws IOException, SQLExceptionDescription copied from interface:RemovableRemoves this object, and all dependant objects, from the system.- Specified by:
removein interfaceRemovable- Throws:
IOExceptionSQLException
-
setMode
public void setMode(long mode) throws IOException, SQLException- Throws:
IOExceptionSQLException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,CvsRepository>- Throws:
IOException
-
-