okapi.coreobjects
Class OkapiSite

java.lang.Object
  extended by okapi.coreobjects.OkapiObject
      extended by okapi.coreobjects.OkapiSite
All Implemented Interfaces:
java.io.Serializable

public class OkapiSite
extends OkapiObject

Okapi site object Sitewide information may be stored here.

Version:
$Revision: 31044 $, $Date: 2008-09-02 17:08:01 -0400 (Tue, 02 Sep 2008) $
Author:
MIT Stellar team
See Also:
Serialized Form

Field Summary
 
Fields inherited from class okapi.coreobjects.OkapiObject
createdBy, createdDate, description, lastModifiedBy, lastModifiedDate, longName, name, objectID, status
 
Constructor Summary
OkapiSite(javax.servlet.ServletContext context)
          Construct the site object, initializing sitewide values
OkapiSite(java.lang.String rootDirectory)
          Alternative constructor for testing outside a servlet.
 
Method Summary
static java.util.List apacheHostIpList()
          Return vector of IP addresses for valid Apache connectors
 void descend(java.util.List pathVector, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext context, java.util.Vector nexusHistory)
          Method descend
 void destroy()
          Destroy the Site object.
 OcwInfoXmlFactory getOcwInfoFactory()
           
static java.lang.String getOcwUrl(java.lang.String masterSubjectId)
          return OCW Url for (master) subject number
static OkapiNexus getRootNexus()
          return root nexus.
static boolean isPreload()
          Check for preload status of this site
static boolean isPreload(javax.servlet.http.HttpServletRequest request)
          Check for preload status of this site
static boolean isReadOnly()
          Check for readOnly status of this site
static boolean isReadOnly(javax.servlet.http.HttpServletRequest request)
          Check for readOnly status of this site
static int objectLatency()
          Return object latency (time between cache checks)
 void setDataSource(javax.sql.DataSource dataSource)
          Set the dataSource to be used for data access.
 void setOcwInfoFactory(OcwInfoXmlFactory ocwInfoFactory)
           
 
Methods inherited from class okapi.coreobjects.OkapiObject
checkAuthorization, currentDateTimeOracle, getAsXml, getAsXml, getAsXml, getAsXml, getCreatedBy, getCreatedDate, getDescription, getLastModifiedBy, getLastModifiedDate, getLongName, getName, getObjectID, getStatus, isEncryptionRequired, refreshFromDB, setAuthorization, setCreatedBy, setCreatedDate, setDescription, setLastModifiedBy, setLastModifiedBy, setLastModifiedDate, setLongName, setName, setStatus, updateDB
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OkapiSite

public OkapiSite(javax.servlet.ServletContext context)
Construct the site object, initializing sitewide values


OkapiSite

public OkapiSite(java.lang.String rootDirectory)
Alternative constructor for testing outside a servlet.

Method Detail

setOcwInfoFactory

public void setOcwInfoFactory(OcwInfoXmlFactory ocwInfoFactory)

getOcwInfoFactory

public OcwInfoXmlFactory getOcwInfoFactory()

getRootNexus

public static OkapiNexus getRootNexus()
return root nexus. A site object must have been initialized before this returns non null.


isReadOnly

public static boolean isReadOnly(javax.servlet.http.HttpServletRequest request)
Check for readOnly status of this site


isReadOnly

public static boolean isReadOnly()
Check for readOnly status of this site


isPreload

public static boolean isPreload(javax.servlet.http.HttpServletRequest request)
Check for preload status of this site


isPreload

public static boolean isPreload()
Check for preload status of this site


objectLatency

public static int objectLatency()
Return object latency (time between cache checks)


apacheHostIpList

public static java.util.List apacheHostIpList()
Return vector of IP addresses for valid Apache connectors


getOcwUrl

public static java.lang.String getOcwUrl(java.lang.String masterSubjectId)
return OCW Url for (master) subject number


destroy

public void destroy()
Destroy the Site object. no longer performs any action.


descend

public void descend(java.util.List pathVector,
                    javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response,
                    javax.servlet.ServletContext context,
                    java.util.Vector nexusHistory)
             throws java.io.IOException,
                    javax.servlet.ServletException
Method descend

Parameters:
pathVector -
request -
response -
context -
nexusHistory -
Throws:
java.io.IOException
javax.servlet.ServletException

setDataSource

public void setDataSource(javax.sql.DataSource dataSource)
Set the dataSource to be used for data access.

Parameters:
dataSource -


Copyright ? 2001-2009 MIT. All Rights Reserved.