Class Context
- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Context>
-
- com.aoindustries.aoserv.client.web.tomcat.Context
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,Removable,SingleTableObject<Integer,Context>
public final class Context extends CachedObjectIntegerKey<Context> implements Removable
Represents one context within aHttpdTomcatSite.- Author:
- AO Industries, Inc.
- See Also:
Site
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_CLASS_NAMEThese are the default values for a new site.static booleanDEFAULT_COOKIESstatic booleanDEFAULT_CROSS_CONTEXTstatic intDEFAULT_DEBUGstatic booleanDEFAULT_OVERRIDEstatic booleanDEFAULT_PRIVILEGEDstatic booleanDEFAULT_RELOADABLEstatic booleanDEFAULT_SERVER_XML_CONFIGUREDstatic booleanDEFAULT_USE_NAMINGstatic PosixPathDEFAULT_WORK_DIRstatic StringDEFAULT_WRAPPER_CLASSstatic StringROOT_DOC_BASEstatic StringROOT_PATHThe ROOT webapp details-
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 Context()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddHttpdTomcatDataSource(String name, String driverClassName, String url, String username, String password, int maxActive, int maxIdle, int maxWait, String validationQuery)intaddHttpdTomcatParameter(String name, String value, boolean override, String description)booleanallowCrossContext()booleanallowOverride()List<CannotRemoveReason<Context>>getCannotRemoveReasons()Lists the reasons an object may not be removed.StringgetClassName()protected ObjectgetColumnImpl(int i)intgetDebugLevel()PosixPathgetDocBase()ContextDataSourcegetHttpdTomcatDataSource(String name)List<ContextDataSource>getHttpdTomcatDataSources()ContextParametergetHttpdTomcatParameter(String name)List<ContextParameter>getHttpdTomcatParameters()SitegetHttpdTomcatSite()intgetHttpdTomcatSite_httpdSite_id()StringgetPath()Table.TableIDgetTableID()PosixPathgetWorkDir()StringgetWrapperClass()voidinit(ResultSet result)Initializes this object from the raw database contents.booleanisPrivileged()booleanisReloadable()booleanisServerXmlConfigured()static booleanisValidDocBase(PosixPath docBase)static booleanisValidPath(String path)static booleanisValidWorkDir(PosixPath workDir)voidread(StreamableInput in, AoservProtocol.Version protocolVersion)voidremove()Removes this object, and all dependant objects, from the system.voidsetAttributes(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)booleanuseCookies()booleanuseNaming()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_CLASS_NAME
public static final String DEFAULT_CLASS_NAME
These are the default values for a new site.
-
DEFAULT_COOKIES
public static final boolean DEFAULT_COOKIES
- See Also:
- Constant Field Values
-
DEFAULT_CROSS_CONTEXT
public static final boolean DEFAULT_CROSS_CONTEXT
- See Also:
- Constant Field Values
-
DEFAULT_OVERRIDE
public static final boolean DEFAULT_OVERRIDE
- See Also:
- Constant Field Values
-
DEFAULT_PRIVILEGED
public static final boolean DEFAULT_PRIVILEGED
- See Also:
- Constant Field Values
-
DEFAULT_RELOADABLE
public static final boolean DEFAULT_RELOADABLE
- See Also:
- Constant Field Values
-
DEFAULT_USE_NAMING
public static final boolean DEFAULT_USE_NAMING
- See Also:
- Constant Field Values
-
DEFAULT_WRAPPER_CLASS
public static final String DEFAULT_WRAPPER_CLASS
-
DEFAULT_DEBUG
public static final int DEFAULT_DEBUG
- See Also:
- Constant Field Values
-
DEFAULT_WORK_DIR
public static final PosixPath DEFAULT_WORK_DIR
-
DEFAULT_SERVER_XML_CONFIGURED
public static final boolean DEFAULT_SERVER_XML_CONFIGURED
- See Also:
- Constant Field Values
-
ROOT_PATH
public static final String ROOT_PATH
The ROOT webapp details- See Also:
- Constant Field Values
-
ROOT_DOC_BASE
public static final String ROOT_DOC_BASE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addHttpdTomcatDataSource
public int addHttpdTomcatDataSource(String name, String driverClassName, String url, String username, String password, int maxActive, int maxIdle, int maxWait, String validationQuery) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addHttpdTomcatParameter
public int addHttpdTomcatParameter(String name, String value, boolean override, String description) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getCannotRemoveReasons
public List<CannotRemoveReason<Context>> 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
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,Context>
-
getHttpdTomcatSite_httpdSite_id
public int getHttpdTomcatSite_httpdSite_id()
-
getHttpdTomcatSite
public Site getHttpdTomcatSite() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getClassName
public String getClassName()
-
useCookies
public boolean useCookies()
-
allowCrossContext
public boolean allowCrossContext()
-
getDocBase
public PosixPath getDocBase()
-
allowOverride
public boolean allowOverride()
-
getPath
public String getPath()
-
isPrivileged
public boolean isPrivileged()
-
isReloadable
public boolean isReloadable()
-
useNaming
public boolean useNaming()
-
getWrapperClass
public String getWrapperClass()
-
getDebugLevel
public int getDebugLevel()
-
getWorkDir
public PosixPath getWorkDir()
-
isServerXmlConfigured
public boolean isServerXmlConfigured()
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Context>
-
getHttpdTomcatDataSources
public List<ContextDataSource> getHttpdTomcatDataSources() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHttpdTomcatDataSource
public ContextDataSource getHttpdTomcatDataSource(String name) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHttpdTomcatParameters
public List<ContextParameter> getHttpdTomcatParameters() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHttpdTomcatParameter
public ContextParameter getHttpdTomcatParameter(String name) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
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,Context>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
isValidDocBase
public static boolean isValidDocBase(PosixPath docBase)
-
isValidPath
public static boolean isValidPath(String path)
-
isValidWorkDir
public static boolean isValidWorkDir(PosixPath workDir)
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,Context>- Throws:
IOException
-
setAttributes
public void setAttributes(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 IOException, SQLException
- Throws:
IOExceptionSQLException
-
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
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,Context>- Throws:
IOException
-
-