|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.cofax.DataStore
Cofax's top level data store class.
Cofax compatible handlers for data store implement this API.
One example of such a handler is SqlDataStore
. It uses an
SQL compatible database as the data store for Cofax.
SqlDataStore
is flexible since it is not tied to a given table
or field naming structure.
Other data stores classes like OdiDataStore
can be used to
allow Cofax to use an ODI object database as the data store.
Other data stores like XMLDataStore
can be used for
PersonalCofax
to power small sites for those who do not
wish to use an SQL database.
Future data stores can be used for distributed content and
storage over the internet. For example, a company that owns
several newspapers can use a DistributedDataStore
along
with a DistributedDataCache
to serve multiple newspapers
from remote locations.
DataStore
classes are listed in the configuration and loaded dynamically.
Field Summary | |
static int |
CLOB_COLUMNS
|
static java.lang.String |
dataLog
whether to print logs or not |
static java.lang.String |
dataLogLocation
whether to print logs to a file location (named) or System.out(empty) |
static long |
dataLogMaxSize
Max size (in bits) of the log |
static int |
PACKAGE_TAG_CACHE
|
static int |
PACKAGE_TAG_CACHE_COMMAND
|
static int |
PACKAGE_TAG_PROCESSED
|
static int |
PACKAGE_TAG_RESULTS
|
Constructor Summary | |
DataStore()
|
Method Summary | |
abstract void |
clearCache(int whichCache)
Clears the cache indicated with whichCache |
abstract boolean |
connect(java.lang.String dataStoreName)
Establishes a connection to the datastore. |
abstract boolean |
connectFromPool()
Establishes a connection to the datastore. |
abstract void |
destroy()
To be ran once after using the data store. |
abstract boolean |
disConnect(java.lang.String dataStoreName)
Disconnects from the data store. |
abstract java.lang.Object |
getCacheValue(java.lang.Object key,
int whichCache)
Gets a single value from a cache object |
boolean |
getError()
Gets the error set with setError() |
java.lang.String |
getLastError()
Returns the last error recorded. |
abstract java.util.List |
getPackageData(java.util.HashMap data,
java.lang.String tagName,
java.lang.String tagData,
boolean init)
Overload for getPackageData that handles tag data and clobs additionally. |
abstract java.util.List |
getPackageData(java.lang.String tag,
java.lang.String tagStatement)
Executes the tag definition and prefixes the name of returned values with the tag name. |
abstract java.lang.String |
getPackageTag(java.lang.String tag,
java.util.HashMap params)
Looks up the package tag definition and does variable substitution with the params HashMap. |
abstract void |
init(java.util.Properties dbProps)
To be ran once before using the data store. |
abstract void |
init(java.lang.String configFile)
To be ran once before using the data store. |
abstract void |
initPool()
To be ran once before using the data store. |
abstract boolean |
insertArticle(java.util.HashMap article,
java.lang.String approvedBy,
java.lang.String xmlFileType,
java.util.ArrayList mappings,
java.util.ArrayList relatedLinks)
Inserts an article to the datastore. |
abstract void |
setCache(java.lang.Object cache,
int whichCache)
Set's the cache indicated with whichCache |
protected void |
setError(boolean error)
Sets the error message to be returned to the caller |
void |
setLastError(java.lang.String lastError)
Sets an error message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PACKAGE_TAG_CACHE
public static final int PACKAGE_TAG_PROCESSED
public static final int PACKAGE_TAG_RESULTS
public static final int CLOB_COLUMNS
public static final int PACKAGE_TAG_CACHE_COMMAND
public static java.lang.String dataLog
public static java.lang.String dataLogLocation
public static long dataLogMaxSize
Constructor Detail |
public DataStore()
Method Detail |
public abstract void init(java.lang.String configFile)
public abstract void init(java.util.Properties dbProps)
public abstract void initPool()
public abstract void setCache(java.lang.Object cache, int whichCache)
public abstract void clearCache(int whichCache)
public abstract java.lang.Object getCacheValue(java.lang.Object key, int whichCache)
protected void setError(boolean error)
public boolean getError()
public abstract void destroy()
public java.lang.String getLastError()
public void setLastError(java.lang.String lastError)
public abstract boolean connect(java.lang.String dataStoreName)
public abstract boolean connectFromPool()
public abstract java.lang.String getPackageTag(java.lang.String tag, java.util.HashMap params)
tag
- The tag name. The Data Store must have a lookup
table of names and definitions.
the command.public abstract java.util.List getPackageData(java.lang.String tag, java.lang.String tagStatement)
public abstract java.util.List getPackageData(java.util.HashMap data, java.lang.String tagName, java.lang.String tagData, boolean init)
public abstract boolean disConnect(java.lang.String dataStoreName)
public abstract boolean insertArticle(java.util.HashMap article, java.lang.String approvedBy, java.lang.String xmlFileType, java.util.ArrayList mappings, java.util.ArrayList relatedLinks)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |