COM.FutureTense.Interfaces
Interface ICS


public interface ICS

Content Server evaluator engine functions. These functions provide an alternative, faster way to interface with Content Server, as well as providing the flexibility and strength of the Java programming language.


Field Summary
static java.lang.String blobSrvGuid_id
          GUID string for the BlobServer
static java.lang.String cacheSrvGuid_id
          GUID string for the CacheServer
static java.lang.String catManGuid_id
          GUID string for the CatalogManager
static java.lang.String conSrvGuid_id
          GUID string for the ContentServer
static int ContentCatalog
           
static java.lang.String evalSrvGuid_id
          GUID string for the EvalServer
static int ForeignCatalog
           
static int HTTPVERSION10
           
static int HTTPVERSION11
           
static int NoSuchCatalog
          Catalog types for use with GetCatalogType
static int ObjectCatalog
           
static java.lang.String SQLExpAND
          AND type string for use with SQLExp
static java.lang.String SQLExpIN
          IN type string for use with SQLExp
static java.lang.String SQLExpOR
          OR type string for use with SQLExp
static int SystemCatalog
           
static int TempCatalog
           
static int TempTreeCatalog
           
static int TRACKING_LOCKEDBYOTHER
           
static int TRACKING_LOCKEDBYUSER
           
static int TRACKING_NOACCESS
           
static int TRACKING_NOTLOCKED
           
static int TRACKING_NOTTRACKED
           
static int TRACKING_UNKNOWN
          tracking status codes for getTrackingStatus()
static int TreeCatalog
           
static java.lang.String treeManGuid_id
          GUID string for the TreeManager
 
Method Summary
 boolean AppEvent(java.lang.String name, java.lang.String guid, java.lang.String times, FTValList params)
          Create an event which triggers a registered function (via GUID or class)
 boolean BlobServer(FTValList args, COM.FutureTense.Interfaces.IMIMENotifier im, java.io.OutputStream os)
          Invoke the BlobServer to retrieve a blob into an output stream
 boolean CallElement(java.lang.String elementname, FTValList lin)
          Executes a registered element.
 IList CallSQL(java.lang.String qryname, java.lang.String listname, int limit, boolean bCache, boolean bLoad, java.lang.StringBuffer errstr)
          Executes a stored SQL statement.
 IList CallSQL(java.lang.String qryname, java.lang.String listname, int limit, boolean bLoadCache, java.lang.StringBuffer errstr)
          Executes a stored SQL statement.
 IList CatalogDef(java.lang.String from, java.lang.String listname, java.lang.StringBuffer errstr)
          Queries a catalog for its column definition and stores the results in a list.
 boolean CatalogManager(FTValList lin)
          Executes the Catalog Manager logic class

 boolean CatalogManager(FTValList lin, java.lang.Object oBatchContext)
          Executes the Catalog Manager logic class

 void ClearErrno()
          Clears the current error code, setting it to 0.
 void close()
          Method to close and release any resources associated with this object
 boolean CommitBatchedCommands(java.lang.Object oBatchContext)
          Commit CatalogManager and TreeManager commands queued * to the batch context
 boolean CopyList(java.lang.String list, java.lang.String newname)
          Copies a list object.
 boolean dbDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.DB_DEBUG
 void decode(java.lang.String sAttributes, java.util.Map map)
          Method to split the attribute portion of a URL string into a set of attributes.
 boolean DeleteSynchronizedHash(java.lang.String name)
          Destroy a synchronized hash
 IJSPObject deployJSPData(java.lang.String sData, java.lang.String sZone, java.lang.StringBuffer sbError)
          Deploy JSP data contained in a buffer.
 IJSPObject deployJSPFile(java.lang.String sPath, java.lang.String sZone, java.lang.StringBuffer sbError)
          Deploy a JSP file.
 boolean DestroyEvent(java.lang.String name)
          Destroy a registered event by name
 void DisableCache()
          Disables any caching of the current execution thread.
 boolean DisableEvent(java.lang.String name)
          Disabled a registered event by name
 void DisableFragmentCache()
          Disable caching on this fragment
 java.lang.String diskFileName()
          Deprecated. Method is disabled since cached pages are stored in the database now.
 java.lang.String diskFileName(java.lang.String pname, FTValList arguments)
          Deprecated. Method is disabled since cached pages are stored in the database now.
 java.lang.String diskFileName(java.lang.String pname, java.lang.String arguments)
          Deprecated. Method is disabled since cached pages are stored in the database now.
 boolean EmailEvent(java.lang.String name, java.lang.String tolist, java.lang.String times, java.lang.String filespec)
          Create an event which triggers an email
 boolean EmailEvent(java.lang.String name, java.lang.String tolist, java.lang.String times, java.lang.String filespec, java.lang.String contenttype, java.lang.String charset, FTValList attachments)
          Create an event which triggers an email
 boolean EnableEvent(java.lang.String name)
          Enabled a registered event by name
 java.lang.String encode(java.lang.String base, java.util.Map map, boolean bSession)
          Method to build an encoded URL string from a set of attributes
 boolean eventDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.EVENT_DEBUG
 boolean FlushCatalog(java.lang.String catname)
          Flushes any cached information on a named catalog.
 void FlushStream()
          Flush the output stream of pending data (not stuff in cache for page)
 java.lang.String genID(boolean bClusterSafe)
          Generate a unique number.
 java.lang.Object getAttribute(java.lang.String sName)
          Method to get an attribute value from the request
 java.util.Enumeration getAttributeNames()
          Method to get an enumeration of all the request attribute names
 byte[] GetBin(java.lang.String name)
          Returns the value of a binary posted value.
 int GetCatalogType(java.lang.String catalog)
          Gets the type of a catalog.
 FTVAL GetCgi(java.lang.String name)
          Gets variable value even if the value is binary.
 ftErrors getComplexError()
          Get error details in the form of COM.FutureTense.Util.ftErrors.
 java.lang.String getCookie(java.lang.String sName)
          Get the value of a cookie from the header
 int GetCounter(java.lang.String counter)
          Returns the value of a counter.
 int GetErrno()
          Returns the current error code as an integer.
 COM.FutureTense.Interfaces.IProperties getIProperties()
          Return an IProperties object that provides access to the properties that are currently loaded into the CS context.
 IServlet getIServlet()
          Return the IServlet functionality
 IList GetList(java.lang.String listname)
          The GetList method retrieves the IList object for the given list name.
 IList GetList(java.lang.String listname, boolean reset)
          The GetList method retrieves the IList object for the given list name.
 java.lang.String getLocaleString(java.lang.String sName, java.lang.String sLocale)
          Method to get a locale specific string
 java.lang.String getNamespace()
          The value returned by this method should be prefixed or appended to elements, such as JavaScript variables or function names, to ensure they are unique in the context of the generated page.
 java.lang.Object GetObj(java.lang.String name)
          Retrieve the last object saved earlier in this same thread using #SetObj(String, Object) or #PushObj(String, Object).
 COM.FutureTense.Interfaces.PastramiEngine getPastramiEngine()
          Method to return a PastramiEngine object based on the value of the propety cs.PastramiEngine or the override class name passed in
 java.lang.String GetProperty(java.lang.String name)
          Gets a property from the ContentServer property file.
 java.lang.String GetProperty(java.lang.String name, java.lang.String files, boolean append)
          Gets a property from the a property file set.
 COM.FutureTense.Cache.Satellite getSatellite(java.lang.String id)
          Method to get read-only information about a Satellite server.
 COM.FutureTense.Interfaces.ISearchEngine GetSearchEngine(java.lang.String sEngine, java.lang.String sCharset, java.lang.StringBuffer errstr)
          Get an instance of the specified search engine.
 java.lang.String GetSearchEngineList()
          Get a string list of the available search engines.
 java.lang.String GetSSVar(java.lang.String name)
          Returns the value of a session variable.
 java.util.Enumeration GetSSVars()
          Returns an enumeration of all session variables.
 ISyncHash GetSynchronizedHash(java.lang.String name, boolean bCreate, int timeout, int size, boolean bAbsolute, boolean bClusterSync)
          Locate/create a named synchronized hash
 ISyncHash GetSynchronizedHash(java.lang.String name, boolean bCreate, int timeout, int size, boolean bAbsolute, boolean bClusterSync, java.util.Collection linked)
          Locate/create a named synchronized hash
 int getTrackingStatus(java.lang.String sTable, java.lang.String sId)
          Method to get the tracking status for a row in a table
 java.lang.String getURL(com.fatwire.cs.core.uri.Definition definition, java.lang.String assembler)
          Method to generate a URI appropriate for the request
 java.lang.String getURL(COM.FutureTense.Interfaces.IURLDefinition oIURLDefinition)
          Deprecated. Use #getURI(Definition, String) instead. This method will be removed after Content Server 6.1
 java.security.Principal getUserPrincipal()
          Returns a java.security.Principal object containing the name of the current authenticated user.
 java.lang.String GetVar(java.lang.String name)
          Returns the value of a variable.
 java.util.Enumeration GetVars()
          Returns an enumeration of all variables.
 byte[] grabCacheStatus()
          get the cache status
 FTValList grabHeaders()
          Get headers set since last call
 boolean IndexAdd(java.lang.String sIndex, java.lang.String sEntryName, java.lang.String sEntryDetail, java.lang.String sWordList, java.lang.String sWordListDelimiters, java.lang.String sFileList, java.lang.String sDate, FTValList vlTextArguments, FTValList vlFileArguments, FTValList vlDateArguments, java.lang.String sEngine, java.lang.String sCharset, java.lang.StringBuffer sbError)
          Adds an item to the search index.
 boolean IndexCreate(java.lang.String sIndex, FTValList vlFieldArguments, java.lang.String sEngine, java.lang.String sCharset, java.lang.StringBuffer errstr)
          Creates a search index.
 boolean IndexDestroy(java.lang.String sIndex, java.lang.String sEngine, java.lang.String sCharset, java.lang.StringBuffer sbError)
          Deletes a search index.
 boolean IndexExists(java.lang.String sIndex, java.lang.String sEngine, java.lang.String sCharset, java.lang.StringBuffer sbError)
          Checks for the existence a search index.
 boolean IndexRemove(java.lang.String sIndex, java.lang.String sEntryName, java.lang.String sEngine, java.lang.String sCharset, java.lang.StringBuffer sbError)
          Removes a search index entry.
 boolean IndexReplace(java.lang.String sIndex, java.lang.String sEntryName, java.lang.String sEntryDetail, java.lang.String sWordList, java.lang.String sWordListDelimiters, java.lang.String sFileList, java.lang.String sDate, FTValList vlTextArguments, FTValList vlFileArguments, FTValList vlDateArguments, java.lang.String sEngine, java.lang.String sCharset, java.lang.StringBuffer sbError)
          Replaces an item in the search index.
 boolean InsertPage(java.lang.String pagename, FTValList lin)
          Invokes a page inline with the current evaluation.
 boolean ioErrorThrown()
          Check to see if the http request has registered an io error ie broken pipe
 boolean isCacheable(java.lang.String pagename)
          Determine if a page is set to cache at this time.
 boolean IsElement(java.lang.String element)
          Checks for the existance of an element.
 boolean IsSystemSecure()
          Return if the current thread is running with CS security on or off - depends on property file setting and if off, no access restrictions will be in place at the core catalog level
 boolean IsTracked(java.lang.String catalog)
          Checks if a catalog is revision tracked.
 java.lang.String literal(java.lang.String sTable, java.lang.String sColumn, java.lang.String sValue)
          Generates a literal value specific to a column in a table.
 boolean LoadProperty(java.lang.String name)
          Loads a new property set into the system.
 void LogMsg(java.lang.String msg)
          Deprecated. Use Apache's commons-logging module instead. Logger names are identified in ftMessage
 int Mirror(java.util.Vector vILists, java.lang.String sTarget, java.lang.String sUsername, java.lang.String sPassword, java.lang.String sCGIPrefix, java.lang.String sTargetIniFile, int nPort, boolean bUseProxy, boolean bUseHTTPS, int nHTTPVersion, java.lang.StringBuffer sbOutput)
          Mirrors a result set.
 int Mirror(java.util.Vector vILists, java.util.Vector vTreeList, java.lang.String sTarget, java.lang.String sUsername, java.lang.String sPassword, java.lang.String sCGIPrefix, java.lang.String sTargetIniFile, int nPort, boolean bUseProxy, boolean bUseHTTPS, int nHTTPVersion, java.lang.StringBuffer sbOutput)
          Mirrors a result set.
 Seed NewSeedFromTagname(java.lang.String tagname)
          Deprecated. use ICS.runTag(String, FTValList) instead
 java.lang.String[] pageCriteriaKeys(java.lang.String pagename)
          Get a String array of page criteria allowable keynames
 java.lang.String pageURL()
          Return the 'url' of the current execution instance (page) NOT whole thread
 java.lang.String pageURL(java.lang.String pname, FTValList arguments)
          Return the 'url' of the current execution instance (page) NOT whole thread
 boolean pastramiDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.GENERIC_DEBUG
 boolean pgCacheDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.PAGE_CACHE_DEBUG
 java.lang.Object PopObj(java.lang.String name)
          Pop the last object saved earlier in this same thread by a given name.
 void PopVars()
          Pops the variable stack, returning the variables to their previously stacked state.
 boolean PushObj(java.lang.String name, java.lang.Object value)
          Save an object by name, and retain any object previously saved by that same name.
 void PushVars()
          Saves a copy of all the current variables to a stack.
 IList QueryEvents(java.lang.String sNamePattern, java.lang.String sType, java.lang.Boolean bEnabled, java.lang.String sList)
          Attempt to query for a list of matching events
 IList ReadEvent(java.lang.String sEvent, java.lang.String sList)
          Attempt to read an event record
 java.lang.String ReadPage(java.lang.String pagename, FTValList lin)
          Invokes a page inline with the current evaluation.
 boolean RegisterList(java.lang.String listname, IList ilist)
          Register an IList object with CS for use in XML tagging; this assumes that the IList was created in a manner that did not implicitly register the name, as would be the case with the listname parameter to SQL(), SelectTo(), etc.
 void removeAttribute(java.lang.String sName)
          Method to remove an attribute from the request
 void RemoveCounter(java.lang.String name)
          Remove counter
 void RemoveSSVar(java.lang.String name)
          Removes a session variable.
 void RemoveVar(java.lang.String name)
          Removes a variable.
 boolean RenameList(java.lang.String list, java.lang.String newname)
          Renames a list object.
 java.lang.String ResolveVariables(java.lang.String st)
          Resolves any variable, query column value, counter or property in this string.
 java.lang.String ResolveVariables(java.lang.String st, boolean bNew)
          Resolves any variable, query column value, counter or property in this string.
 boolean RestoreProperty(boolean bClose)
          Restores the previous property set into the system.
 boolean RollbackBatchedCommands(java.lang.Object oBatchContext)
          Abort CatalogManager and TreeManager commands queued * to the batch context
 boolean rsCacheDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.RESULT_SET_CACHE_DEBUG
 int RTCommit(java.lang.String sTable, java.lang.String sAsset, java.lang.String sAnnotation, boolean bKeepLocked)
          Creates a new revision of a record from a tracked table.
 int RTDeleteRevision(java.lang.String sTable, java.lang.String sAsset, int nVersion)
          Deletes a revision of a row from a tracked table.
 IList RTHistory(java.lang.String sTable, java.lang.String sAsset, java.lang.String sVersion, java.lang.String sLocker, java.lang.String sCreator, java.lang.String sAnnotation, java.lang.String sListName)
          Returns revision history for rows in a revision tracked table.
 IList RTInfo(java.lang.String sTable, java.lang.String sListName)
          Returns information on tracked tables from the RTInfo table
 int RTLock(java.lang.String sTable, java.lang.String sAsset)
          Locks a record by the current user in a tracked table.
 int RTRelease(java.lang.String sTable, java.lang.String sAsset)
          Release a lock on a row from a tracked table.
 IList RTRetrieveRevision(java.lang.String strTableName, java.lang.String strAsset, int nVersion, java.lang.String listName)
          This method returns a specific version for a tracked table.
 IList RTRetrieveRevision(java.lang.String strTableName, java.lang.String strAsset, java.lang.String strVersion, java.lang.String listName)
          This method returns a specific version for a tracked table.
 int RTRollback(java.lang.String sTable, java.lang.String sAsset, int nVersion)
          Reverts a row in a tracked table to a previous revision.
 int RTRollback(java.lang.String sTable, java.lang.String sAsset, java.lang.String strVersion)
          Reverts a row in a tracked table to a previous revision.
 int RTSetVersions(java.lang.String sTable, int nVersions)
          Sets the number of revisions stored for each row in a tracked table.
 int RTTrackTable(java.lang.String sTable, java.lang.String sStorage, int nVersions)
          Enables revision tracking operations on a table.
 int RTUnlockRecord(java.lang.String sTable, java.lang.String sAsset)
          Unlocks a locked row.
 int RTUntrackTable(java.lang.String sTable)
          Stops tracking a table.
 java.lang.String runTag(java.lang.String sTag, FTValList vIn)
          Method to execute a simple XML tag by name.
 IList Search(java.lang.String sIndex, java.lang.String sWhat, java.lang.String sRelevence, java.lang.String sQueryParser, int nMaxResults, FTValList vlAdditionalIndexes, java.lang.String sList, java.lang.String sEngine, java.lang.String sCharset, java.lang.StringBuffer sbError)
          Searches an index.
 boolean SearchDateToNative(java.lang.String sDate, java.lang.StringBuffer sbOut, java.lang.String sEngine, java.lang.String sCharset, java.lang.StringBuffer sbError)
          Converts a javaSQL date string to native search engine format.
 IList SelectTo(java.lang.String from, java.lang.String what, java.lang.String where, java.lang.String orderby, int limit, java.lang.String listname, boolean bCache, java.lang.StringBuffer errstr)
          Performs a simple query by specifing a list of column names to return, and a list of column names to use as filtering.
 boolean SendMail(java.lang.String to, java.lang.String subject, java.lang.String body)
          Sends an email to the specified address.
 boolean SendMail(java.lang.String to, java.lang.String subject, java.lang.String body, java.lang.String replyto, java.lang.String contenttype)
          Sends an email to the specified address.
 boolean SendMail(java.lang.String to, java.lang.String subject, java.lang.String body, java.lang.String replyto, java.lang.String contenttype, java.lang.String charset, FTValList attachments)
          Sends an email to the specified address.
 boolean sessionDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.SESSION_DEBUG
 boolean SessionExists(java.lang.String id)
          Deprecated. this always returns false
 java.lang.String SessionID()
          Find out the session id being used by this user session.
 void setAttribute(java.lang.String sName, java.lang.Object oValue)
          Method to set an attribute for the request
 void setComplexError(ftErrors error)
          Set a complex error using COM.FutureTense.Util.ftErrors
 boolean SetCookie(java.lang.String name, java.lang.String value, int timeout, java.lang.String url, java.lang.String domain, boolean bSecure)
          Sets or removes a cookie.
 void SetCounter(java.lang.String counter, int value)
          Set a counter
 void SetErrno(int i)
          Set the current error code as an integer.
 boolean SetObj(java.lang.String name, java.lang.Object value)
          Save an object by name.
 void SetSSVar(java.lang.String name, int value)
          Sets a session variable to the specified value.
 void SetSSVar(java.lang.String name, java.lang.String value)
          Sets a session variable to the specified value.
 void SetVar(java.lang.String name, FTVAL value)
          Sets a variable to the specified value.
 void SetVar(java.lang.String name, int value)
          Sets a variable to the specified value.
 void SetVar(java.lang.String name, java.lang.String value)
          Sets a variable to the specified value.
 IList SQL(com.fatwire.cs.core.db.PreparedStmt stmt, com.fatwire.cs.core.db.StatementParam data, boolean bCache)
          Executes a given PreparedStmt with supplied data; returns data in the form of an IList.
 IList SQL(java.lang.String from, java.lang.String sqlstmt, java.lang.String listname, int limit, boolean bCache, boolean bLoad, java.lang.StringBuffer errstr)
          Executes an SQL statement.
 IList SQL(java.lang.String from, java.lang.String sqlstmt, java.lang.String listname, int limit, boolean bLoadCache, java.lang.StringBuffer errstr)
          Executes an SQL statement.
 java.lang.String SQLExp(java.lang.String table, java.lang.String type, java.lang.String verb, java.lang.String arg, java.lang.String column)
          Generates an expression for an SQL WHERE clause

 java.lang.String SQLExp(java.lang.String table, java.lang.String type, java.lang.String verb, java.lang.String arg, java.lang.String column, java.lang.String expression)
          Generates an expression for an SQL WHERE clause

 java.lang.Object StartBatchContext()
          Fetch Batch context object to queue CatalogManager and TreeManager commands
 void StreamBinary(byte[] b, int offset, int length)
          Immediately streams binary out to the ICS context (RIGHT NOW).
 void StreamEvalBytes(java.lang.String msg)
          Writes a string to the current element evaluation stream; it will be appended to the current element output buffer.
 void StreamHeader(java.lang.String header, java.lang.String text)
          Immediately stream header data.
 void StreamText(java.lang.String text)
          Immediately streams text out to the ICS context (RIGHT NOW).
 boolean syncDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.SYNC_DEBUG
 boolean systemDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.GENERIC_DEBUG
 boolean systemSession()
          Are sessions enabled?
 void ThrowException()
          Interface to xml THROWEXCEPTION functionality - this effects the entire thread ie http request
 boolean timeDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.TIME_DEBUG
 boolean TreeManager(FTValList lin)
          Executes the Tree Manager logic class

 boolean TreeManager(FTValList lin, java.lang.Object oBatchContext)
          Executes the Tree Manager logic class

 boolean UserIsMember(java.lang.String grouplist)
          Determines if the currently logged in user is a member of a supplied group.
 boolean xmlDebug()
          Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.XML_DEBUG
 

Field Detail

HTTPVERSION10

public static final int HTTPVERSION10
See Also:
Constant Field Values

HTTPVERSION11

public static final int HTTPVERSION11
See Also:
Constant Field Values

conSrvGuid_id

public static final java.lang.String conSrvGuid_id
GUID string for the ContentServer

See Also:
Constant Field Values

catManGuid_id

public static final java.lang.String catManGuid_id
GUID string for the CatalogManager

See Also:
Constant Field Values

treeManGuid_id

public static final java.lang.String treeManGuid_id
GUID string for the TreeManager

See Also:
Constant Field Values

blobSrvGuid_id

public static final java.lang.String blobSrvGuid_id
GUID string for the BlobServer

See Also:
Constant Field Values

evalSrvGuid_id

public static final java.lang.String evalSrvGuid_id
GUID string for the EvalServer

See Also:
Constant Field Values

cacheSrvGuid_id

public static final java.lang.String cacheSrvGuid_id
GUID string for the CacheServer

See Also:
Constant Field Values

SQLExpAND

public static final java.lang.String SQLExpAND
AND type string for use with SQLExp

See Also:
Constant Field Values

SQLExpOR

public static final java.lang.String SQLExpOR
OR type string for use with SQLExp

See Also:
Constant Field Values

SQLExpIN

public static final java.lang.String SQLExpIN
IN type string for use with SQLExp

See Also:
Constant Field Values

NoSuchCatalog

public static final int NoSuchCatalog
Catalog types for use with GetCatalogType

See Also:
Constant Field Values

SystemCatalog

public static final int SystemCatalog
See Also:
Constant Field Values

ContentCatalog

public static final int ContentCatalog
See Also:
Constant Field Values

ForeignCatalog

public static final int ForeignCatalog
See Also:
Constant Field Values

TreeCatalog

public static final int TreeCatalog
See Also:
Constant Field Values

ObjectCatalog

public static final int ObjectCatalog
See Also:
Constant Field Values

TempCatalog

public static final int TempCatalog
See Also:
Constant Field Values

TempTreeCatalog

public static final int TempTreeCatalog
See Also:
Constant Field Values

TRACKING_UNKNOWN

public static final int TRACKING_UNKNOWN
tracking status codes for getTrackingStatus()

See Also:
Constant Field Values

TRACKING_NOTTRACKED

public static final int TRACKING_NOTTRACKED
See Also:
Constant Field Values

TRACKING_NOTLOCKED

public static final int TRACKING_NOTLOCKED
See Also:
Constant Field Values

TRACKING_LOCKEDBYOTHER

public static final int TRACKING_LOCKEDBYOTHER
See Also:
Constant Field Values

TRACKING_LOCKEDBYUSER

public static final int TRACKING_LOCKEDBYUSER
See Also:
Constant Field Values

TRACKING_NOACCESS

public static final int TRACKING_NOACCESS
See Also:
Constant Field Values
Method Detail

PushVars

public void PushVars()
Saves a copy of all the current variables to a stack. The current variable state is unchanged.

See Also:
PopVars()

PopVars

public void PopVars()
Pops the variable stack, returning the variables to their previously stacked state. If the stack is empty, popVars() does nothing.

See Also:
PushVars()

SetVar

public void SetVar(java.lang.String name,
                   java.lang.String value)
Sets a variable to the specified value. If the variable does not exist, SetVar() creates it.

This method provides the same functionality as the XML <SETVAR> command.

Parameters:
name - The name of the variable you wish to set.
value - The value to set the variable to.
See Also:
GetVar(String), RemoveVar(String)

SetObj

public boolean SetObj(java.lang.String name,
                      java.lang.Object value)
Save an object by name. Useful for keeping objects saved during a thread. Any previous objects saved by the same name will be lost.

Parameters:
name - name of object
value - object to save, setting to null removes object
Returns:
Returns true on success, false on failure. Use GetErrno() to view the error.
See Also:
GetObj(String), PopObj(String), PushObj(String, Object)

GetObj

public java.lang.Object GetObj(java.lang.String name)
Retrieve the last object saved earlier in this same thread using #SetObj(String, Object) or #PushObj(String, Object).

Parameters:
name - name of object
Returns:
saved object or null if no object was saved
See Also:
PopObj(String), PushObj(String, Object), SetObj(String, Object)

PopObj

public java.lang.Object PopObj(java.lang.String name)
Pop the last object saved earlier in this same thread by a given name.

Parameters:
name - String name of the object
Returns:
saved object or null if no object was saved
Since:
4.0
See Also:
GetObj(String), PushObj(String, Object), SetObj(String, Object)

PushObj

public boolean PushObj(java.lang.String name,
                       java.lang.Object value)
Save an object by name, and retain any object previously saved by that same name. Useful for keeping objects saved during a thread.

Parameters:
name - String name of the object
value - Object to be pushed
Returns:
true on success else false
Since:
4.0
See Also:
GetObj(String), PopObj(String), SetObj(String, Object)

GetVar

public java.lang.String GetVar(java.lang.String name)
Returns the value of a variable. If the variable does not exist, returns null.

This method provides the same functionality as the XML <CSVAR> command.

Parameters:
name - The name of the variable.
Returns:
The value of the variable. Returns null if the variable does not exist.
See Also:
SetVar(String, String), SetVar(String, int), RemoveVar(String)

GetBin

public byte[] GetBin(java.lang.String name)
Returns the value of a binary posted value. If the variable does not exist, returns null.

Parameters:
name - The name of the variable.
Returns:
The value of the variable. Returns null if the variable does not exist.

GetCounter

public int GetCounter(java.lang.String counter)
               throws java.lang.Exception
Returns the value of a counter.

Parameters:
counter - name
Returns:
int
Throws:
java.lang.Exception - if failure

SetCounter

public void SetCounter(java.lang.String counter,
                       int value)
                throws java.lang.Exception
Set a counter

Parameters:
counter - name
value - integer value
Throws:
java.lang.Exception - if failure

RemoveCounter

public void RemoveCounter(java.lang.String name)
Remove counter

Parameters:
name - of counter

GetVars

public java.util.Enumeration GetVars()
Returns an enumeration of all variables.

Returns:
Enumeration of all variables names; use GetVar() on each element as in for(Enumeration e=cs.GetVars(); e.hasMoreElements();) String value = GetVar(e.nextElement());
See Also:
SetVar(String, String), SetVar(String, int), GetVar(String), RemoveVar(String)

SetVar

public void SetVar(java.lang.String name,
                   int value)
Sets a variable to the specified value. If the variable does not exist, SetVar() creates it.

This method provides the same functionality as the XML <SETVAR> command.

Parameters:
name - The name of the variable you wish to set.
value - The value to set the variable to.
See Also:
GetVar(String), RemoveVar(String)

RemoveVar

public void RemoveVar(java.lang.String name)
Removes a variable. After a variable is removed it is no longer defined for the processing of the page and its value cannot be referenced.

This method provides the same functionality as the XML <REMOVEVAR> command.

Parameters:
name - The name of the variable to delete.
See Also:
SetVar(String, String), SetVar(String, int), GetVar(String)

SetSSVar

public void SetSSVar(java.lang.String name,
                     java.lang.String value)
Sets a session variable to the specified value. If the session variable does not exist, setSSVar() creates it.

This method provides the same functionality as the XML <SETSSVAR> command.

Parameters:
name - The name of the session variable you wish to set.
value - The value to set the session variable to.
See Also:
GetSSVar(String), RemoveSSVar(String)

GetSSVar

public java.lang.String GetSSVar(java.lang.String name)
Returns the value of a session variable. If the session variable does not exist, returns null.

This method provides the same functionality as the XML <CSVAR> command.

Parameters:
name - The name of the session variable.
Returns:
The value of the session variable.
See Also:
SetSSVar(String, String), SetSSVar(String, int), RemoveSSVar(String)

GetSSVars

public java.util.Enumeration GetSSVars()
Returns an enumeration of all session variables.

Returns:
Enumeration of all session variable names; use GetSSVar() on each element as in

for(Enumeration e=cs.GetSSVars(); e.hasMoreElements();) String value = GetSSVar(e.nextElement());

See Also:
SetSSVar(String, String), SetSSVar(String, int), GetSSVar(String), RemoveSSVar(String)

SetSSVar

public void SetSSVar(java.lang.String name,
                     int value)
Sets a session variable to the specified value. If the session variable does not exist, setSSVar() creates it.

This method provides the same functionality as the XML <SETSSVAR> command.

Parameters:
name - The name of the session variable you wish to set.
value - The value to set the session variable to.
See Also:
GetSSVar(String), RemoveSSVar(String)

RemoveSSVar

public void RemoveSSVar(java.lang.String name)
Removes a session variable. After a session variable is removed it is no longer defined for the processing of the page and its value cannot be referenced.

This method provides the same functionality as the XML <REMOVESSVAR> command.

Parameters:
name - The name of the session variable to delete.
See Also:
SetSSVar(String, String), SetSSVar(String, int), GetSSVar(String)

SessionID

public java.lang.String SessionID()
Find out the session id being used by this user session. App server dependent form and size (length).

Returns:
string - may be null if sessions inactive or other error.

IsSystemSecure

public boolean IsSystemSecure()
Return if the current thread is running with CS security on or off - depends on property file setting and if off, no access restrictions will be in place at the core catalog level

Returns:
true if security is enabled, false it not
Since:
4.0

SetVar

public void SetVar(java.lang.String name,
                   FTVAL value)
Sets a variable to the specified value. If the variable does not exist, SetVar() creates it.

Parameters:
name - The name of the variable you wish to set.
value - The value to set the variable to.
Since:
4.0
See Also:
GetCgi(String), RemoveVar(String)

GetCgi

public FTVAL GetCgi(java.lang.String name)
Gets variable value even if the value is binary.

Parameters:
name - The name of the variable you wish to get.
Returns:
FTVAL value of the variable or null if it is not defined.
See Also:
GetVar(String), SetVar(String, FTVAL)

GetProperty

public java.lang.String GetProperty(java.lang.String name)
Gets a property from the ContentServer property file.

This method provides the same functionality as the XML <CSVAR NAME="CS.Property.PROPERTY_NAME"/> command.

Parameters:
name - The name of the property you wish to get.
Returns:
The value of the property.
See Also:
GetProperty(String, String, boolean), LoadProperty(String), RestoreProperty(boolean)

GetProperty

public java.lang.String GetProperty(java.lang.String name,
                                    java.lang.String files,
                                    boolean append)
Gets a property from the a property file set.

This method provides the same functionality as the XML <CSVAR NAME="CS.Property.PROPERTY_NAME"/> command.

Parameters:
name - The name of the property you wish to get.
files - The semicolon separated list of property files.
append - Set to true to append to the current property files.
Returns:
The value of the property.
Since:
4.0
See Also:
GetProperty(String), LoadProperty(String), RestoreProperty(boolean)

IsElement

public boolean IsElement(java.lang.String element)
Checks for the existance of an element.

This method provides the same functionality as the XML <IF COND="IsElement.ELEMENT_NAME=true"/> command.

Parameters:
element - The name of the element.
Returns:
Returns true on success, false on failure.

GetCatalogType

public int GetCatalogType(java.lang.String catalog)
Gets the type of a catalog.

This method provides the similar functionality as the XML <IF COND="IsTree.CATALOG_NAME=true"/> commands.

Parameters:
catalog - The name of the catalog.
Returns:
Returns the catalog type (ContentCatalog, ObjectCatalog, TreeCatalog, ForeignCatalog, SystemCatalog, etc.).

IsTracked

public boolean IsTracked(java.lang.String catalog)
Checks if a catalog is revision tracked.

Parameters:
catalog - The name of the catalog.
Returns:
Returns true if the catalog is revision tracked, else it return false.

getTrackingStatus

public int getTrackingStatus(java.lang.String sTable,
                             java.lang.String sId)
Method to get the tracking status for a row in a table

Parameters:
sTable - name of the table
sId - row identifier
Returns:
int status code
Since:
6.0

FlushCatalog

public boolean FlushCatalog(java.lang.String catname)
Flushes any cached information on a named catalog.

This method is analogous to the XML <FLUSH> command.

Parameters:
catname - The name of the catalog to flush.
Returns:
Returns true on success, false on failure. Use GetErrno() to view the error.

GetErrno

public int GetErrno()
Returns the current error code as an integer.

Returns:
Current errno. Numbers less than 0 are errors.
See Also:
ClearErrno()

getComplexError

public ftErrors getComplexError()
Get error details in the form of COM.FutureTense.Util.ftErrors. Useful methods in this object are ftErrors.getError(), ftErrors.detail(int) (with ftErrors.details()) and ftErrors.getReason().

Returns:
ftErrors
See Also:
ftErrors.getError(), ftErrors.getReason(), ftErrors.details(), ftErrors.detail(int)

setComplexError

public void setComplexError(ftErrors error)
Set a complex error using COM.FutureTense.Util.ftErrors

Parameters:
error - ftErrors error object

SetErrno

public void SetErrno(int i)
Set the current error code as an integer.

Please note, in order to avoid setting error codes which may interfere with the built in ContentServer codes, make sure all error codes are set to: (ftErrors.maxErrno + yourErrno) where "yourErrno" is a negative integer.

Parameters:
i - the integer error code to set
See Also:
ClearErrno(), GetErrno()

ClearErrno

public void ClearErrno()
Clears the current error code, setting it to 0. It is usefull to call this method immediately before executing a function which may alter the errno, to insure that the correct code is set.

See Also:
GetErrno()

ResolveVariables

public java.lang.String ResolveVariables(java.lang.String st)
Resolves any variable, query column value, counter or property in this string. For example, if passed the string "This is the year: CS.Year", the return string will be "This is the year: 2000". Users may find resolveVariables() helpful to resolve ContentServer built-in values.

This method has similar functionality to the XML <CSVAR> command.

Parameters:
st - The String to resolve variable references for.
Returns:
The resolved String

ResolveVariables

public java.lang.String ResolveVariables(java.lang.String st,
                                         boolean bNew)
Resolves any variable, query column value, counter or property in this string. For example, if passed the string "This is the year: CS.Year", the return string will be "This is the year: 2000". Users may find resolveVariables() helpful to resolve ContentServer built-in values.

This method has similar functionality to the XML <CSVAR> command.

Parameters:
st - The String to resolve variables for
bNew - true to use the newer variable resolution syntax, false to use the older.
Returns:
The resolved String

SelectTo

public IList SelectTo(java.lang.String from,
                      java.lang.String what,
                      java.lang.String where,
                      java.lang.String orderby,
                      int limit,
                      java.lang.String listname,
                      boolean bCache,
                      java.lang.StringBuffer errstr)
Performs a simple query by specifing a list of column names to return, and a list of column names to use as filtering. Dependant on variables in scope. Note that regardless of the value of bCache, the existing cache will be used in the return value. bCache only prevents new resultsets from being cached.

This method is analogous to the XML <SELECTO> command.

Parameters:
from - Tablename to select.
what - Column list, as in "tblname,systable"; * is all columns.
where - Comma-separated list of catalog columns to select against. For each item in the WHERE string, the value of the corresponding variable is used to construct a SQL WHERE clause.
orderby - Column list defining the ordering of the results.
limit - Maximum number of results, -1 means no limit.
listname - List name to present to XML side for processing; if null is passed, a generic name will be assigned.
bCache - True to cache the results; false otherwise.
errstr - For return values; may contain error information.
Returns:
IList object containing the results. If IList is null, use GetErrno() to find the error.
See Also:
CallSQL(String, String, int, boolean, boolean, StringBuffer), SQL(String, String, String, int, boolean, boolean, StringBuffer)

CallSQL

public IList CallSQL(java.lang.String qryname,
                     java.lang.String listname,
                     int limit,
                     boolean bLoadCache,
                     java.lang.StringBuffer errstr)
Executes a stored SQL statement. Note that regardless of the value of bCache, the existing cache will be used in the return value. bCache only prevents new resultsets from being cached.

This method is analagous to the XML <CALLSQL> command.

Parameters:
qryname - The name of the SQL element in the SystemSQL table.
listname - List name to present to XML side for processing; if null is passed, a generic name will be assigned.
limit - Maximum number of results, -1 means no limit.
bLoadCache - True to completely load and cache the result set; otherwise the database connection is left open.
errstr - For return values; may contain error information.
Returns:
IList object containing the results. If IList is null, use GetErrno() to find the error.
See Also:
SelectTo(String, String, String, String, int, String, boolean, StringBuffer), SQL(String, String, String, int, boolean, boolean, StringBuffer)

CallSQL

public IList CallSQL(java.lang.String qryname,
                     java.lang.String listname,
                     int limit,
                     boolean bCache,
                     boolean bLoad,
                     java.lang.StringBuffer errstr)
Executes a stored SQL statement. Note that regardless of the value of bCache, the existing cache will be used in the return value. bCache only prevents new resultsets from being cached.

This method is analagous to the XML <CALLSQL> command.

Parameters:
qryname - The name of the SQL element in the SystemSQL table.
listname - List name to present to XML side for processing; if null is passed, a generic name will be assigned.
limit - Maximum number of results, -1 means no limit.
bCache - True to cache the result set; false otherwise.
bLoad - True to completely load the result set; otherwise the database connection is left open.
errstr - For return values; may contain error information.
Returns:
IList object containing the results. If IList is null, use GetErrno() to find the error.
Since:
6.0
See Also:
SelectTo(String, String, String, String, int, String, boolean, StringBuffer), SQL(String, String, String, int, boolean, boolean, StringBuffer)

SQL

public IList SQL(java.lang.String from,
                 java.lang.String sqlstmt,
                 java.lang.String listname,
                 int limit,
                 boolean bLoadCache,
                 java.lang.StringBuffer errstr)
Executes an SQL statement. May be data base specific. Note that regardless of the value of bCache, the existing cache will be used in the return value. bCache only prevents new resultsets from being cached.

This method is analgous to the XML <EXECSQL> command.

Parameters:
from - Comma separated list of table names this query will be cached against
sqlstmt - The SQL statement to execute.
listname - List name to present to XML side for processing; if null is passed, a generic name will be assigned.
limit - Maximum number of results, -1 means no limit.
bLoadCache - True to completely load and cache the result set; otherwise the database connection is left open.
errstr - For return values; may contain error information.
Returns:
IList object containing the results. If IList is null, use GetErrno() to find the error.

SQL

public IList SQL(java.lang.String from,
                 java.lang.String sqlstmt,
                 java.lang.String listname,
                 int limit,
                 boolean bCache,
                 boolean bLoad,
                 java.lang.StringBuffer errstr)
Executes an SQL statement. May be data base specific. Note that regardless of the value of bCache, the existing cache will be used in the return value. bCache only prevents new resultsets from being cached.

This method is analgous to the XML <EXECSQL> command.

Parameters:
from - Comma separated list of table names this query will be cached against
sqlstmt - The SQL statement to execute.
listname - List name to present to XML side for processing; if null is passed, a generic name will be assigned.
limit - Maximum number of results, -1 means no limit.
bCache - True to cache the result set; false otherwise.
bLoad - True to completely load the result set; otherwise the database connection is left open.
errstr - For return values; may contain error information.
Returns:
IList object containing the results. If IList is null, use GetErrno() to find the error.
Since:
6.0

SQL

public IList SQL(com.fatwire.cs.core.db.PreparedStmt stmt,
                 com.fatwire.cs.core.db.StatementParam data,
                 boolean bCache)
Executes a given PreparedStmt with supplied data; returns data in the form of an IList. The results will be cached if requested ( bCache = true ). Results are always looked up from the cache. Resulting data is fully loaded into the resulting IList before returning to the caller.

Please read *** Important Note *** below before using this API

Parameters:
stmt - Instance of PreparedStmt that will be executed (aftre resolving all SQL types for its placeholders)
data - Instance of StatementParam belonging to the PreparedStmt. null is acceptable when PreparedStmt instance contains no placeholders (no ? characters in its statement).
bCache - true to cache the result set; false otherwise (data will always be read from cache, when available, regardless of the value for bCache.
Returns:
IList of results of execution, can be null.
Throws:
java.lang.IllegalArgumentException - - if PreparedStmt, StatementParam are null (when not allowed) or incomplete (isComplete() = false) or number of placeholders are not equal ( PreparedStmt.getNumberOfPostions != StatementParam.getNumberOfPostions) IllegalStateException - if the current user does not have permission (ACLs) to the tables used in the prepared statement or if table/column name specified could not be found. app.setError() is set for situations that results in any of these errors. RuntimeException if execution of statement fails. Exceptions simply communicate the failure to the caller.

***************** Important Note ********************* Usage of this API is slightly different from other database accesss methods in this class. Please consider the following before using this method.
1. This class can be used only from Java API. There is no accessor to this functionality from XML tags or JSP tags.
2. This function throws Exceptions to communicate failure, in addition to setting error coded (like the rest of the APIs). Specific exceptions are documented above, users are expected to react by inspecing the error code once an exception is encountered.
3. This method does not set a 'list' in the ICS variable space.


literal

public java.lang.String literal(java.lang.String sTable,
                                java.lang.String sColumn,
                                java.lang.String sValue)
Generates a literal value specific to a column in a table.

Parameters:
sTable - the table which contains the column
sColumn - the name of the column
sValue - the value to be converted to a literal
Returns:
string containing the generated literal or null on error
Since:
5.0
See Also:
SQLExp(String, String, String, String, String), SQLExp(String, String, String, String, String, String)

SQLExp

public java.lang.String SQLExp(java.lang.String table,
                               java.lang.String type,
                               java.lang.String verb,
                               java.lang.String arg,
                               java.lang.String column)
Generates an expression for an SQL WHERE clause

This method is analgous to the XML <SQLExp> command.

Parameters:
table - The table for which the statement is being executed.
type - The expression type. Legal values are:
  • ICS.SQLExpAND
  • ICS.SQLExpOR
  • ICS.SQLExpIN
verb - The verb for the where clause (e.g. "LIKE", "=", "!=", "IN", "NOT IN")
arg - Comma separated list of values for the expression
column - The column for which the expression is being generated
Returns:
String containing the generated expression.

SQLExp

public java.lang.String SQLExp(java.lang.String table,
                               java.lang.String type,
                               java.lang.String verb,
                               java.lang.String arg,
                               java.lang.String column,
                               java.lang.String expression)
Generates an expression for an SQL WHERE clause

This method is analgous to the XML <SQLExp> command.

Parameters:
table - The table for which the statement is being executed.
type - The expression type. Legal values are:
  • ICS.SQLExpAND
  • ICS.SQLExpOR
  • ICS.SQLExpIN
verb - The verb for the where clause (e.g. "LIKE", "=", "!=", "IN", "NOT IN")
arg - Comma separated list of values for the expression
column - The column for which the expression is being generated
expression - The optional column expression for which the expression is being generated
Returns:
String containing the generated expression.
Since:
5.0

CatalogDef

public IList CatalogDef(java.lang.String from,
                        java.lang.String listname,
                        java.lang.StringBuffer errstr)
Queries a catalog for its column definition and stores the results in a list. The list contains a row for each column in the catalog.

This method is analagous to the XML <CATALOGDEF> command.

Parameters:
from - The name of the catalog.
listname - List name to present to XML side for processing; if null is passed, a generic name will be assigned.
errstr - For return values; may contain error information.
Returns:
IList object containing the results. If IList is null, use GetErrno() to find the error.

GetList

public IList GetList(java.lang.String listname)
The GetList method retrieves the IList object for the given list name. This method does not create a list, it retrieves an existing list from among those known to Content Server. The IList is positioned at the first row.

Parameters:
listname - The name of the list you wish to return.
Returns:
The requested IList, or null if it does not exist.
See Also:
GetList(String, boolean), RegisterList(String, IList)

GetList

public IList GetList(java.lang.String listname,
                     boolean reset)
The GetList method retrieves the IList object for the given list name. This method does not create a list, it retrieves an existing list from among those known to Content Server.

Parameters:
listname - The name of the list you wish to return.
reset - set to true to position at first row, otherwise the current list position will be maintained.
Returns:
The requested IList, or null if it does not exist.
See Also:
GetList(String), RegisterList(String, IList)

RenameList

public boolean RenameList(java.lang.String list,
                          java.lang.String newname)
Renames a list object.

Renaming to a list that already exists destroys the existing list. Cached resultsets corresponding to the list, however, are not destroyed, and are accesible to other threads. To delete cached resultsets, use FlushCatalog(String).

Parameters:
list - The list to rename.
newname - The new name for the list.
Returns:
Returns true/false for success/failure.

CopyList

public boolean CopyList(java.lang.String list,
                        java.lang.String newname)
Copies a list object.

Copying to a list that already exists destroys the existing list. Cached resultsets corresponding to the list, however, are not destroyed, and are accesible to other threads. To delete cached resultsets, use FlushCatalog(String).

Parameters:
list - The list to copy.
newname - The new name for the list.
Returns:
Returns true/false for success/failure.

CatalogManager

public boolean CatalogManager(FTValList lin)
Executes the Catalog Manager logic class

This method is analogous to the XML <CATALOGMANAGER> command.

Parameters:
lin - FTValList values to use for new engine, a null indicates to use CGI values of Content Server
Returns:
Returns true or false if manager call worked. Use GetErrno() to check return codes from the call.

CatalogManager

public boolean CatalogManager(FTValList lin,
                              java.lang.Object oBatchContext)
Executes the Catalog Manager logic class

This method is analogous to the XML <CATALOGMANAGER> command.

Parameters:
lin - FTValList values to use for new engine, a null indicates to use CGI values of Content Server
oBatchContext - Object handle to the batch context object
Returns:
Returns true or false if manager call worked. Use GetErrno() to check return codes from the call.

TreeManager

public boolean TreeManager(FTValList lin)
Executes the Tree Manager logic class

This method is analogous to the XML <TREEMANAGER> command.

Parameters:
lin - FTValList values to use for new engine, a null indicates to use CGI values of Content Server
Returns:
Returns true or false if manager call worked. Use GetErrno() to check return codes from the call.

TreeManager

public boolean TreeManager(FTValList lin,
                           java.lang.Object oBatchContext)
Executes the Tree Manager logic class

This method is analogous to the XML <TREEMANAGER> command.

Parameters:
lin - FTValList values to use for new engine, a null indicates to use CGI values of Content Server
oBatchContext - Object handle to the batch context object
Returns:
Returns true or false if manager call worked. Use GetErrno() to check return codes from the call.

CallElement

public boolean CallElement(java.lang.String elementname,
                           FTValList lin)
Executes a registered element. When the element is called, the resulting output is immediately streamed to STDOUT.

This method is analogous to the XML <CALLELEMENT> command.

Parameters:
elementname - The name of the element to call.
lin - Name/value pairs to be passed to the element as arguments.
Returns:
Returns true or false if applogic call worked. Use GetErrno() to check return codes from the applogic.

StreamEvalBytes

public void StreamEvalBytes(java.lang.String msg)
Writes a string to the current element evaluation stream; it will be appended to the current element output buffer.

Parameters:
msg - String msg

ReadPage

public java.lang.String ReadPage(java.lang.String pagename,
                                 FTValList lin)
Invokes a page inline with the current evaluation. Creates a new CS instance and evaluates the page in context. The resulting output is returned.

This method is similar to the XML <INSERT> command.

Parameters:
pagename - pagename entry in the SiteCatalog.
lin - Name/Value pairs to be passed as input parameters to the page.
Returns:
Returns a String containing the resulting output; or null on an error. If an error occurs, errno will be set appropriately (see GetErrno()).

InsertPage

public boolean InsertPage(java.lang.String pagename,
                          FTValList lin)
Invokes a page inline with the current evaluation. Creates a new CS instance and evaluates the page in context. The resulting output is streamed as if included inline

This method is similar to the XML <INSERT> command.

Parameters:
pagename - pagename entry in the SiteCatalog.
lin - Name/Value pairs to be passed as input parameters to the page.
Returns:
boolean. If an error occurs, errno will be set appropriately (see GetErrno()).

NewSeedFromTagname

public Seed NewSeedFromTagname(java.lang.String tagname)
Deprecated. use ICS.runTag(String, FTValList) instead

Return the Seed class which implements a given dynamic tag; may return null if the tag is not implemented dynamically or is undefined in the runtime system.
Example use
Seed s = ics.NewSeedFromTagname("Mytag");
if (s!=null)
    s.Execute(vIn, vOut);

Parameters:
tagname - (caseless)
Returns:
class instance or null
See Also:
runTag(String, FTValList)

runTag

public java.lang.String runTag(java.lang.String sTag,
                               FTValList vIn)
Method to execute a simple XML tag by name. The XML tag connot expect any nested child tags, and so it must be a singleton tag.

Parameters:
sTag - name of the tag
vIn - input key/value pairs
Returns:
output string or null errno set on error
Since:
5.0

StreamText

public void StreamText(java.lang.String text)
Immediately streams text out to the ICS context (RIGHT NOW). This is unbuffered output, and as such may appear before text already in the element's buffered output stream is flushed.

Bytes that are output through this method are not subject to page caching.

Parameters:
text - The text to stream.

FlushStream

public void FlushStream()
Flush the output stream of pending data (not stuff in cache for page)


StreamBinary

public void StreamBinary(byte[] b,
                         int offset,
                         int length)
Immediately streams binary out to the ICS context (RIGHT NOW). This is unbuffered output, and as such may appear before text already in the element's buffered output stream is flushed.

Bytes that are output through this method are not subject to page caching.

Parameters:
b - byte array to stream
offset - offset into byte array
length - number of bytes to stream

StreamHeader

public void StreamHeader(java.lang.String header,
                         java.lang.String text)
Immediately stream header data. Once non header data has been sent, this is a no-op.

Parameters:
header - String name of header (ie content-type)
text - String header data (ie image/gif)

grabHeaders

public FTValList grabHeaders()
Get headers set since last call

Returns:
hashmap of any headers set by the current execution thread since the last call
Since:
5.0

grabCacheStatus

public byte[] grabCacheStatus()
get the cache status

Returns:
cache status
Since:
4.0

LoadProperty

public boolean LoadProperty(java.lang.String name)
Loads a new property set into the system.

This method is analogous to the XML <LOADPROPERTY> command.

Parameters:
name - The name of the property set to load (i.e. "futuretense.ini").
Returns:
Returns true on success, false on failure.

RestoreProperty

public boolean RestoreProperty(boolean bClose)
Restores the previous property set into the system.

This method is analogous to the XML <RESTOREPROPERTY> command.

Parameters:
bClose - Whether to close the connection to a database opened using the current properties. Possible values are "true" or "false". If bClose is set to "true" any open database connection specified by the current properties will be closed before restoring the defaults. This invalidates any resultsets cached against that database. If access to those resultsets is required after restoreProperty(), bClose should be set to "false". This will keep the connection open and resultsets against the database will be available.
Returns:
Returns true on success, false on failure.

getCookie

public java.lang.String getCookie(java.lang.String sName)
Get the value of a cookie from the header

Parameters:
sName - cookie name
Returns:
cookie value or null if no such cookie
Since:
5.5

SetCookie

public boolean SetCookie(java.lang.String name,
                         java.lang.String value,
                         int timeout,
                         java.lang.String url,
                         java.lang.String domain,
                         boolean bSecure)
Sets or removes a cookie.

This method is analogous to the XML <REMOVECOOKIE> , <SETCOOKIE> command.

Parameters:
name - The name of the cookie you wish to set.
value - The value to set the cookie to. Setting the value to null REMOVES the cookie.
timeout - The timeout period for the cookie on the client, in seconds.
url - Valid URL. This value restricts the sending of the cookie from the client to this URL only. Defaults to "/" if omitted.
domain - Valid domain name. This value restricts the sending of the cookie from the client to addresses in this domain only.
bSecure - Indicates whether security is set on this cookie.
Returns:
Returns true on success, false on failure.

DisableCache

public void DisableCache()
Disables any caching of the current execution thread. Does not effect any other thread. Does not effect export. Use this method when an error is detected in the page that should prevent it from being cached.


SendMail

public boolean SendMail(java.lang.String to,
                        java.lang.String subject,
                        java.lang.String body,
                        java.lang.String replyto,
                        java.lang.String contenttype,
                        java.lang.String charset,
                        FTValList attachments)
Sends an email to the specified address.

This method is analogous to the XML <SENDMAIL> command.

Parameters:
to - A valid TO value, i.e. "joe@somecompany.com".
subject - The subject of the message. May be null if the body is not null.
body - The message body. May be null if the subject is not null.
replyto - The replyto address for the message. May be null to use the same address as from.
contenttype - The content-type for the message. May be null to default to text/plain
charset - The charset for the message. May be null if body contains only US-ASCII characters or contenttype contains charset.
attachments - The attachments associated with this message. Attachmaent names are passed as keys and actual attachments are passed as values, each attachment is encapsulated in object FTVAL.
Returns:
Returns true on success, false on failure.

SendMail

public boolean SendMail(java.lang.String to,
                        java.lang.String subject,
                        java.lang.String body,
                        java.lang.String replyto,
                        java.lang.String contenttype)
Sends an email to the specified address.

This method is analogous to the XML <SENDMAIL> command.

Parameters:
to - A valid TO value, i.e. "joe@somecompany.com".
subject - The subject of the message. May be null if the body is not null.
body - The message body. May be null if the subject is not null.
replyto - The replyto address for the message. May be null to use the same address as from.
contenttype - The content-type for the message. May be null to default to text/plain
Returns:
Returns true on success, false on failure.

SendMail

public boolean SendMail(java.lang.String to,
                        java.lang.String subject,
                        java.lang.String body)
Sends an email to the specified address.

This method is analogous to the XML <SENDMAIL> command.

Parameters:
to - A valid TO value, i.e. "joe@somecompany.com".
subject - The subject of the message. May be null if the body is not null.
body - The message body. May be null if the subject is not null.
Returns:
Returns true on success, false on failure.

UserIsMember

public boolean UserIsMember(java.lang.String grouplist)
Determines if the currently logged in user is a member of a supplied group.

This method is analogous to the XML <USERISMEMBER> command.

Parameters:
grouplist - A comma seperated list of groups to check against.
Returns:
Returns true if the user is a member, false if not.

LogMsg

public void LogMsg(java.lang.String msg)
Deprecated. Use Apache's commons-logging module instead. Logger names are identified in ftMessage

Logs an informational message to the Content Server log file.

This method is analogous to the XML <LOGMSG> command.

Messages are logged to the generic logger with a severity of INFO.

Parameters:
msg - The message to send to the Content Server log file.

GetSearchEngine

public COM.FutureTense.Interfaces.ISearchEngine GetSearchEngine(java.lang.String sEngine,
                                                                java.lang.String sCharset,
                                                                java.lang.StringBuffer errstr)
Get an instance of the specified search engine.

This method is currently for internal use only.

Parameters:
sEngine - Search engine name. May be null.
sCharset - Search index charset. May be null.
errstr - For return values; may contain error information.
Returns:
Returns the search engine on success, null on failure.

GetSearchEngineList

public java.lang.String GetSearchEngineList()
Get a string list of the available search engines.

This method is currently for internal use only.

Returns:
Returns a semi-colon separated list of available search engines. May be empty string.

IndexCreate

public boolean IndexCreate(java.lang.String sIndex,
                           FTValList vlFieldArguments,
                           java.lang.String sEngine,
                           java.lang.String sCharset,
                           java.lang.StringBuffer errstr)
Creates a search index.

This method is analogous to the XML <INDEXCREATE> command.

Parameters:
sIndex - Full path name to the index to create. May be null.
vlFieldArguments - Field argument names and values. May be null.
sEngine - Search engine name. May be null.
sCharset - Search index charset. May be null.
errstr - For return values; may contain error information.
Returns:
Returns true on success, false on failure.

IndexDestroy

public boolean IndexDestroy(java.lang.String sIndex,
                            java.lang.String sEngine,
                            java.lang.String sCharset,
                            java.lang.StringBuffer sbError)
Deletes a search index.

This method is analogous to the XML <INDEXDESTROY> command.

Parameters:
sIndex - Search index to destroy. May be null.
sEngine - Search engine name. May be null.
sCharset - Search index charset. May be null.
sbError - For return values; may contain error information.
Returns:
Returns true on success, false on failure.

IndexExists

public boolean IndexExists(java.lang.String sIndex,
                           java.lang.String sEngine,
                           java.lang.String sCharset,
                           java.lang.StringBuffer sbError)
Checks for the existence a search index.

This method is analogous to the XML <INDEXEXISTS> command.

Parameters:
sIndex - Search index to destroy. May be null.
sEngine - Search engine name. May be null.
sCharset - Search index charset. May be null.
sbError - For return values; may contain error information.
Returns:
Returns true if the index exists, false otherwise.

IndexAdd

public boolean IndexAdd(java.lang.String sIndex,
                        java.lang.String sEntryName,
                        java.lang.String sEntryDetail,
                        java.lang.String sWordList,
                        java.lang.String sWordListDelimiters,
                        java.lang.String sFileList,
                        java.lang.String sDate,
                        FTValList vlTextArguments,
                        FTValList vlFileArguments,
                        FTValList vlDateArguments,
                        java.lang.String sEngine,
                        java.lang.String sCharset,
                        java.lang.StringBuffer sbError)
Adds an item to the search index.

This method is analogous to the XML <INDEXADD> command.

Parameters:
sIndex - The name of the search index. May be null.
sEntryName - The name of the index entry to add.
sEntryDetail - The detail string associated with entry. May be null.
sWordList - The word list to index. May be null.
sWordListDelimiters - The characters to use as word list delimiters. May be null.
sFileList - A list of files to add. May be null.
sDate - The date associated with this entry. May be null.
vlTextArguments - The text argument names and values. May be null.
vlFileArguments - The file argument names and values. May be null.
vlDateArguments - The date argument names and values. May be null.
sEngine - The search engine name. May be null.
sCharset - The search index charset. May be null.
sbError - For return values; may contain error information.
Returns:
Returns true on success, false on failure.

IndexReplace

public boolean IndexReplace(java.lang.String sIndex,
                            java.lang.String sEntryName,
                            java.lang.String sEntryDetail,
                            java.lang.String sWordList,
                            java.lang.String sWordListDelimiters,
                            java.lang.String sFileList,
                            java.lang.String sDate,
                            FTValList vlTextArguments,
                            FTValList vlFileArguments,
                            FTValList vlDateArguments,
                            java.lang.String sEngine,
                            java.lang.String sCharset,
                            java.lang.StringBuffer sbError)
Replaces an item in the search index.

This method is analogous to the XML <INDEXREPLACE> command.

Parameters:
sIndex - The name of the search index. May be null.
sEntryName - The name of the index entry to replace.
sEntryDetail - The detail string associated with entry. May be null.
sWordList - The word list to index. May be null.
sWordListDelimiters - The characters to use as word list delimiters. May be null.
sFileList - A list of files to add. May be null.
sDate - The date associated with this entry. May be null.
vlTextArguments - The text argument names and values. May be null.
vlFileArguments - The file argument names and values. May be null.
vlDateArguments - The date argument names and values. May be null.
sEngine - The search engine name. May be null.
sCharset - The search index charset. May be null.
sbError - For return values; may contain error information.
Returns:
Returns true on success, false on failure.

IndexRemove

public boolean IndexRemove(java.lang.String sIndex,
                           java.lang.String sEntryName,
                           java.lang.String sEngine,
                           java.lang.String sCharset,
                           java.lang.StringBuffer sbError)
Removes a search index entry.

This method is analogous to the XML <INDEXREMOVE> command.

Parameters:
sIndex - The name of the index. May be null.
sEntryName - The name of the entry to delete.
sEngine - The search engine name. May be null.
sCharset - The search index charset. May be null.
sbError - For return values; may contain error information.
Returns:
Returns true on success, false on failure.

SearchDateToNative

public boolean SearchDateToNative(java.lang.String sDate,
                                  java.lang.StringBuffer sbOut,
                                  java.lang.String sEngine,
                                  java.lang.String sCharset,
                                  java.lang.StringBuffer sbError)
Converts a javaSQL date string to native search engine format.

This method is analogous to the XML <SEARCHDATENATIVE> command.

Parameters:
sDate - The date to convert.
sbOut - Buffer to where the converted string will be returned.
sEngine - The search engine name. May be null.
sCharset - The search index charset. May be null.
sbError - For return values; may contain error information.
Returns:
Returns true on success, false on failure.

Search

public IList Search(java.lang.String sIndex,
                    java.lang.String sWhat,
                    java.lang.String sRelevence,
                    java.lang.String sQueryParser,
                    int nMaxResults,
                    FTValList vlAdditionalIndexes,
                    java.lang.String sList,
                    java.lang.String sEngine,
                    java.lang.String sCharset,
                    java.lang.StringBuffer sbError)
Searches an index.

This method is analogous to the XML <SEARCH> command.

Parameters:
sIndex - The index to search. May be null.
sWhat - The query string.
sRelevence - The Relevence string. May be null.
sQueryParser - The query parser name. May be null.
nMaxResults - The maximum number of results to return. Set this to 0 for unlimited results.
vlAdditionalIndexes - The name, value pairs of additional indexes to search. May be null.
sList - The name of the list. May be null.
sEngine - The search engine name. May be null.
sCharset - The search index charset. May be null.
sbError - For return values; may contain error information.
Returns:
Returns the name/value pairs of the result set.

RTHistory

public IList RTHistory(java.lang.String sTable,
                       java.lang.String sAsset,
                       java.lang.String sVersion,
                       java.lang.String sLocker,
                       java.lang.String sCreator,
                       java.lang.String sAnnotation,
                       java.lang.String sListName)
Returns revision history for rows in a revision tracked table. To obtain history for all rows, the current user must have rtaudit privileges on the table. If the current user has read privileges on the table, only history on the revisions which the user has created or locked will be returned.

This method is analogous to the XML <HISTORY> command.

Parameters:
sTable - Name of the tracked table.
sAsset - Value of the primary key for the row whose history to retrieve.
sVersion - requesed version
sLocker - Filter rows returned based on a user who has rows locked. If the current user does not have rtaudit privileges, you must specify a value for LOCKER, CREATOR, or both. If you specify only LOCKER, the value must be the current users name; otherwise, no data will be returned.
sCreator - Filter rows returned based on the user who created the row. If the current user does not have rtaudit privileges, you must specify a value for LOCKER, CREATOR, or both. If you specify only CREATOR, the value must be the current users name; otherwise, no data will be returned.
sAnnotation - Filter rows returned based on the annotation of a row.
sListName - Name of the list.
Returns:
List containing the returned results.

RTInfo

public IList RTInfo(java.lang.String sTable,
                    java.lang.String sListName)
Returns information on tracked tables from the RTInfo table

Parameters:
sTable - Name of the tracked table
sListName - Name of the IList to register.
Returns:
IList containing the returned results.
Since:
6.0

RTLock

public int RTLock(java.lang.String sTable,
                  java.lang.String sAsset)
Locks a record by the current user in a tracked table. Once a row is locked, the current user can modify fields in the row. The current user must have write access to the table.

This method is analogous to the XML <LOCK> command.

Parameters:
sTable - Name of the tracked table.
sAsset - Value of the primary key of the row to lock.
Returns:
Returns the errno. If -1000, check the RT details error.

RTCommit

public int RTCommit(java.lang.String sTable,
                    java.lang.String sAsset,
                    java.lang.String sAnnotation,
                    boolean bKeepLocked)
Creates a new revision of a record from a tracked table. The current user must have the record locked and have write access to the tracked table to perform this operation.

This method is analogous to the XML <COMMIT> command.

Parameters:
sTable - Name of the tracked table.
sAsset - Value of the primary key for the record being commited.
sAnnotation - Comment describing the new revision.
bKeepLocked - Indicates lock status of record after commit. Set value to "true" to indicate the record will still be locked by user after the commit.
Returns:
Returns the errno. If -1000, check the RT details error.

RTRelease

public int RTRelease(java.lang.String sTable,
                     java.lang.String sAsset)
Release a lock on a row from a tracked table. Only the user who has the row locked against the table may release it. This will also revert the row in the table to its last committed state, overwriting any changes the user made while the row was locked.

This method is analogous to the XML <RELEASE> command.

Parameters:
sTable - Name of the tracked table.
sAsset - Value of the primary key of the row to release.
Returns:
Returns the errno. If -1000, check the RT details error.

RTRetrieveRevision

public IList RTRetrieveRevision(java.lang.String strTableName,
                                java.lang.String strAsset,
                                int nVersion,
                                java.lang.String listName)
This method returns a specific version for a tracked table. The results returned will be identical to a "select *" against the tracked table, assuming the table had been rolled back to the specified version.

This method is analogous to the XML <RETRIEVEREVISION> command.

Parameters:
strTableName - The name of the tracked table.
strAsset - The asset to get the results for.
nVersion - The version number of the edits.
listName - The name of the list to store the results.
Returns:
Returns the list storing the results.

RTRetrieveRevision

public IList RTRetrieveRevision(java.lang.String strTableName,
                                java.lang.String strAsset,
                                java.lang.String strVersion,
                                java.lang.String listName)
This method returns a specific version for a tracked table. The results returned will be identical to a "select *" against the tracked table, assuming the table had been rolled back to the specified version.

This version of the command allows a string version number, "first", "last", or a date (in the format of "YYYY-MM-DD 24HH:MI:SS"). "first" and "last" return the first and last revisions, while a date will return the revision that was or is current as of the specified date.

This method is analogous to the XML <RETRIEVEREVISION> command.

Parameters:
strTableName - The name of the tracked table.
strAsset - The asset to get the results for.
strVersion - The version number of the edits.
listName - The name of the list that stores the results.
Returns:
Returns the list storing the results.

RegisterList

public boolean RegisterList(java.lang.String listname,
                            IList ilist)
Register an IList object with CS for use in XML tagging; this assumes that the IList was created in a manner that did not implicitly register the name, as would be the case with the listname parameter to SQL(), SelectTo(), etc. NOTE if the supplied name is in use in the current scope, this list will replace the existing list object. NOTE also that if the same IList is known by CS under two different names, operations using one name will affect the other and may result in undefined behavior.

Parameters:
listname - list name to present to XML side for processing;
ilist - list to register, setting to null unregisters an existing list.
Returns:
boolean list item added. Use GetErrno() to view the error. An error will be returned if the added list is empty (no rows) or invalid (no columns).

RTRollback

public int RTRollback(java.lang.String sTable,
                      java.lang.String sAsset,
                      int nVersion)
Reverts a row in a tracked table to a previous revision. The current user must have the row locked and have rtaudit privileges against the table to rollback the row.

This version of RTRollback takes an integer version number to rollback to.

This method is analogous to the XML <ROLLBACK> command.

Parameters:
sTable - Name of the table containing row to revert to a previous version.
sAsset - Value of the primary key for the row to revert to a previous version.
nVersion - Version to make current.
Returns:
Returns the errno. If -1000, check the RT details error.

RTRollback

public int RTRollback(java.lang.String sTable,
                      java.lang.String sAsset,
                      java.lang.String strVersion)
Reverts a row in a tracked table to a previous revision. The current user must have the row locked and have rtaudit privileges against the table to rollback the row.

This version of the command allows a string version number, "first", "last", or a date (in the format of "YYYY-MM-DD 24HH:MI:SS"). "first" and "last" rollback to the first and last revisions, while a date will rollback the revision current as of the specified date.

This method is analogous to the XML <ROLLBACK> command.

Parameters:
sTable - Name of the table containing row to revert to a previous version.
sAsset - Value of the primary key for the row to revert to a previous version.
strVersion - Version to make current.
Returns:
Returns the errno. If -1000, check the RT details error.

RTTrackTable

public int RTTrackTable(java.lang.String sTable,
                        java.lang.String sStorage,
                        int nVersions)
Enables revision tracking operations on a table. The maximum number of revisions per row can be set as well as the storage location for the revisions.

This method is analogous to the XML <TRACKTABLE> command.

Parameters:
sTable - Name of the table to track.
sStorage - Location to store revisions associated with a row in the table. This is the root folder. A folder will be automatically created under the given root folder whose name is the same as the catalog being tracked
nVersions - Maximum number of versions to store for each row. When the maximum is reached, the oldest version is removed.
Returns:
Returns the errno. If -1000, check the RT details error.

RTUntrackTable

public int RTUntrackTable(java.lang.String sTable)
Stops tracking a table. Revision tracking operations will no longer be available on the table.

This method is analogous to the XML <UNTRACKTABLE> command.

Parameters:
sTable - Name of the table to stop tracking.
Returns:
Returns the errno. If -1000, check the RT details error.

RTUnlockRecord

public int RTUnlockRecord(java.lang.String sTable,
                          java.lang.String sAsset)
Unlocks a locked row. Only the user who has the row locked or a user who has rtadmin privileges against the table may unlock the row. Does not restore the row to its most recent revision.

This method is analogous to the XML <UNLOCKRECORD> command.

Parameters:
sTable - Name of the tracked table.
sAsset - Value of the primary key of the row to unlock.
Returns:
Returns the errno. If -1000, check the RT details error.

RTDeleteRevision

public int RTDeleteRevision(java.lang.String sTable,
                            java.lang.String sAsset,
                            int nVersion)
Deletes a revision of a row from a tracked table. The current user must have rtadmin access to the tracked table to perform this operation. If the most recent revision is locked, deleting the most recent revision will also delete the lock on it

This method is analogous to the XML <DELETEREVISION> command.

Parameters:
sTable - Name of the table containing row whose revision is to be deleted.
sAsset - Value of the primary key for the row whose revision is to be deleted.
nVersion - Version of the row to delete.
Returns:
Returns the errno. If -1000, check the RT details error.

RTSetVersions

public int RTSetVersions(java.lang.String sTable,
                         int nVersions)
Sets the number of revisions stored for each row in a tracked table. The current user must have rtadmin privileges on the table.

This method is analogous to the XML <SETVERSIONS> command.

Parameters:
sTable - Table to modify maximum number of versions.
nVersions - Maximum number of versions to store for each row. When the maximum is reached, the oldest version is removed. A value of 0 (zero) indicates an unbounded number of versions will be stored. If the value is smaller than the current number of versions on the table, those versions will remain and can be removed manually.
Returns:
Returns the errno. If -1000, check the RT details error.

Mirror

public int Mirror(java.util.Vector vILists,
                  java.lang.String sTarget,
                  java.lang.String sUsername,
                  java.lang.String sPassword,
                  java.lang.String sCGIPrefix,
                  java.lang.String sTargetIniFile,
                  int nPort,
                  boolean bUseProxy,
                  boolean bUseHTTPS,
                  int nHTTPVersion,
                  java.lang.StringBuffer sbOutput)
Mirrors a result set.

Parameters:
vILists - Vector of IList objects to mirror
sTarget - Target server name.
sUsername - Username to use on the remote server. May be null.
sPassword - Password to use on remote server. May be null.
sCGIPrefix - CGI prefix string. May be null to indicate that the remote server is the same type as the source.
sTargetIniFile - String property file to push to target server. May be null if no property file
nPort - int port to use for communication. 0 interpreted the default HTTP port (80)
bUseProxy - TRUE to use proxy server for connection. FALSE otherwise.
bUseHTTPS - TRUE to use secure communcation. FALSE otherwise.
nHTTPVersion - Version of HTTP protocol to be used to connect to remote server. Valid values are HTTPVERSION10 and HTTPVERSION11.
sbOutput - Output for return values; may contain error info. May be null.
Returns:
Returns the errno.

Mirror

public int Mirror(java.util.Vector vILists,
                  java.util.Vector vTreeList,
                  java.lang.String sTarget,
                  java.lang.String sUsername,
                  java.lang.String sPassword,
                  java.lang.String sCGIPrefix,
                  java.lang.String sTargetIniFile,
                  int nPort,
                  boolean bUseProxy,
                  boolean bUseHTTPS,
                  int nHTTPVersion,
                  java.lang.StringBuffer sbOutput)
Mirrors a result set.

Parameters:
vILists - Vector of IList objects to mirror
vTreeList - Vector of FTTreeNode objects to mirror
sTarget - Target server name.
sUsername - Username to use on the remote server. May be null.
sPassword - Password to use on remote server. May be null.
sCGIPrefix - CGI prefix string. May be null to indicate that the remote server is the same type as the source.
sTargetIniFile - String property file to push to target server. May be null if no property file
nPort - int port to use for communication. 0 interpreted the default HTTP port (80)
bUseProxy - TRUE to use proxy server for connection. FALSE otherwise.
bUseHTTPS - TRUE to use secure communcation. FALSE otherwise.
nHTTPVersion - Version of HTTP protocol to be used to connect to remote server. Valid values are HTTPVERSION10 and HTTPVERSION11.
sbOutput - Output for return values; may contain error info. May be null.
Returns:
Returns the errno.

GetSynchronizedHash

public ISyncHash GetSynchronizedHash(java.lang.String name,
                                     boolean bCreate,
                                     int timeout,
                                     int size,
                                     boolean bAbsolute,
                                     boolean bClusterSync)
Locate/create a named synchronized hash

Parameters:
name - String hashname
bCreate - boolean create - if true and hash not found it is created using following params. Existing hash always returned if found.
timeout - timeout in minutes
size - size of entries
bAbsolute - absolute timeout vs idle
bClusterSync - synchronize over cluster
Returns:
Object handle or null. NOTE that the hash name is not restricted to a given application (ie loaded property file). errno cleared or set if error. Note that creating a hash with size < 1 will return an error.

GetSynchronizedHash

public ISyncHash GetSynchronizedHash(java.lang.String name,
                                     boolean bCreate,
                                     int timeout,
                                     int size,
                                     boolean bAbsolute,
                                     boolean bClusterSync,
                                     java.util.Collection linked)
Locate/create a named synchronized hash

Parameters:
name - String hashname
bCreate - boolean create - if true and hash not found it is created using following params. Existing hash always returned if found.
timeout - timeout in minutes
size - size of entries
bAbsolute - absolute timeout vs idle
bClusterSync - synchronize over cluster
linked - Collection of caches that this ISyncHash is "linked" to. when these linked caches are cleared, this ISyncHash will also get cleared.
Returns:
Object handle or null. NOTE that the hash name is not restricted to a given application (ie loaded property file). errno cleared or set if error. Note that creating a hash with size < 1 will return an error.
Since:
6.0

DeleteSynchronizedHash

public boolean DeleteSynchronizedHash(java.lang.String name)
Destroy a synchronized hash

Parameters:
name - String name
Returns:
boolean success (false means no such hash). errno cleared or set if error.

AppEvent

public boolean AppEvent(java.lang.String name,
                        java.lang.String guid,
                        java.lang.String times,
                        FTValList params)
Create an event which triggers a registered function (via GUID or class)

Parameters:
name - name to register event under; be cautious with characters used in event name, { is a bad idea.
guid - to invoke on event fire
times - coded time string for event firing (see XML doc for details)
params - vallist of argument names/values; may be null
Returns:
boolean success/failure. Use GetErrno() to view the error.

EmailEvent

public boolean EmailEvent(java.lang.String name,
                          java.lang.String tolist,
                          java.lang.String times,
                          java.lang.String filespec)
Create an event which triggers an email

Parameters:
name - name to register event under; be cautious with characters used in event name, { is a bad idea.
tolist - user list to receive email
times - coded time string for event firing (see XML doc for details)
filespec - file to send on event trigger
Returns:
boolean success/failure. Use GetErrno() to view the error.

EmailEvent

public boolean EmailEvent(java.lang.String name,
                          java.lang.String tolist,
                          java.lang.String times,
                          java.lang.String filespec,
                          java.lang.String contenttype,
                          java.lang.String charset,
                          FTValList attachments)
Create an event which triggers an email

Parameters:
name - name to register event under; be cautious with characters used in event name, { is a bad idea.
tolist - user list to receive email
times - coded time string for event firing (see XML doc for details)
filespec - file to send on event trigger
contenttype - The content-type for the message. May be null to default to text/plain
charset - The charset for the message. May be null if body contains only US-ASCII characters or contenttype contains charset.
attachments - Attachments to send with email
Returns:
boolean success/failure. Use GetErrno() to view the error.

DestroyEvent

public boolean DestroyEvent(java.lang.String name)
Destroy a registered event by name

Parameters:
name - event name
Returns:
boolean success/failure. Use GetErrno() to view the error.

EnableEvent

public boolean EnableEvent(java.lang.String name)
Enabled a registered event by name

Parameters:
name - event name
Returns:
boolean success/failure. Use GetErrno() to view the error.

DisableEvent

public boolean DisableEvent(java.lang.String name)
Disabled a registered event by name

Parameters:
name - event name
Returns:
boolean success/failure. Use GetErrno() to view the error.

ReadEvent

public IList ReadEvent(java.lang.String sEvent,
                       java.lang.String sList)
Attempt to read an event record

Parameters:
sEvent - event name
sList - list name
Returns:
event record list or null
Since:
4.0

QueryEvents

public IList QueryEvents(java.lang.String sNamePattern,
                         java.lang.String sType,
                         java.lang.Boolean bEnabled,
                         java.lang.String sList)
Attempt to query for a list of matching events

Parameters:
sNamePattern - event name pattern (can contain one % wildcard) or null for all
sType - event type (1 for servlet request or 2 for email) or null for both
bEnabled - Boolean true for enabled events, false for disabled events, or null for both
sList - list name or null for system generated name
Returns:
event record list or null
Since:
4.0

SessionExists

public boolean SessionExists(java.lang.String id)
Deprecated. this always returns false

See if a session id is valid

Parameters:
id - session id string
Returns:
true if session id is valid, false if not

deployJSPFile

public IJSPObject deployJSPFile(java.lang.String sPath,
                                java.lang.String sZone,
                                java.lang.StringBuffer sbError)
Deploy a JSP file.

Parameters:
sPath - Path of the JSP file to deploy
sZone - Name of the JSP zone to store the data (defaults to /) - this is a relative path within server doc root.
sbError - For return values; may contain error information.
Returns:
Returns IJSPObject on success, null on error.

deployJSPData

public IJSPObject deployJSPData(java.lang.String sData,
                                java.lang.String sZone,
                                java.lang.StringBuffer sbError)
Deploy JSP data contained in a buffer.

Parameters:
sData - The JSP data
sZone - Name of the JSP zone to store the data (defaults to /) - this is a relative path within server doc root.
sbError - For return values; may contain error information.
Returns:
Returns IJSPObject on success, null on error.

getIServlet

public IServlet getIServlet()
Return the IServlet functionality

Returns:
an IServlet for the active request

ThrowException

public void ThrowException()
Interface to xml THROWEXCEPTION functionality - this effects the entire thread ie http request


ioErrorThrown

public boolean ioErrorThrown()
Check to see if the http request has registered an io error ie broken pipe

Returns:
true if an IO error has been reported

genID

public java.lang.String genID(boolean bClusterSafe)
Generate a unique number.

Parameters:
bClusterSafe - true if the number should be cluster safe.
Returns:
Returns the string containing the number, or null on error.
Since:
4.0

getURL

public java.lang.String getURL(COM.FutureTense.Interfaces.IURLDefinition oIURLDefinition)
Deprecated. Use #getURI(Definition, String) instead. This method will be removed after Content Server 6.1

Method to generate a URL appropriate for the request.

Parameters:
oIURLDefinition - object which defines the URL
Returns:
URL for the request or null on error
Since:
6.0

getURL

public java.lang.String getURL(com.fatwire.cs.core.uri.Definition definition,
                               java.lang.String assembler)
Method to generate a URI appropriate for the request

Parameters:
definition - Definition for the URI to generate
assembler - name for the assembler to be used to generate the URI, or null to use the default assembler for this installation of Content Server. Most cases will use null for this argument.
Returns:
url for the request, or null on error.
Since:
6.1.1

encode

public java.lang.String encode(java.lang.String base,
                               java.util.Map map,
                               boolean bSession)
Method to build an encoded URL string from a set of attributes

Parameters:
base - String base of the URL
map - Map key and value pairs for attributes
bSession - true to include session id
Returns:
String encoded URL
Since:
4.0

decode

public void decode(java.lang.String sAttributes,
                   java.util.Map map)
Method to split the attribute portion of a URL string into a set of attributes.

Parameters:
sAttributes - String attribute string of form k1=v1&k2=v2&...
map - Map set of key/value pairs from the string
Since:
4.0

diskFileName

public java.lang.String diskFileName()
Deprecated. Method is disabled since cached pages are stored in the database now.

Return the name of the current page or subpage execution

Returns:
null always
Since:
4.0

diskFileName

public java.lang.String diskFileName(java.lang.String pname,
                                     FTValList arguments)
Deprecated. Method is disabled since cached pages are stored in the database now.

Return the name of the suppied pagename with arguments as it would be cached on disk

Parameters:
pname - pagename, not null else returns null and sets errno to ftErrors.badparams
arguments - optional name/value pairs for resargs (ie PageCriteria)
Returns:
null always
Since:
4.0

diskFileName

public java.lang.String diskFileName(java.lang.String pname,
                                     java.lang.String arguments)
Deprecated. Method is disabled since cached pages are stored in the database now.

Return the name of the suppied pagename with arguments as it would be cached on disk

Parameters:
pname - pagename, not null else returns null and sets errno to ftErrors.badparams
arguments - optional URL components ie p1=v1&p2=v2...
Returns:
null always
Since:
4.0

isCacheable

public boolean isCacheable(java.lang.String pagename)
Determine if a page is set to cache at this time. Note that a page can disable its own cache at any time using DisableCache(). This may be called at any time in page evaluation and the answer may not be the same between calls.

Parameters:
pagename - pagename or null to indicate current page.
Returns:
true if the page may be cached, false if the page will never be cached.
Since:
4.0
See Also:
DisableCache()

pageURL

public java.lang.String pageURL()
Return the 'url' of the current execution instance (page) NOT whole thread

Returns:
url string
Since:
4.0

pageCriteriaKeys

public java.lang.String[] pageCriteriaKeys(java.lang.String pagename)
Get a String array of page criteria allowable keynames

Parameters:
pagename - name of the page
Returns:
string array of key names
Since:
4.0

pageURL

public java.lang.String pageURL(java.lang.String pname,
                                FTValList arguments)
Return the 'url' of the current execution instance (page) NOT whole thread

Parameters:
pname - name of the page to construct the url
arguments - name/value pairs for resargs (ie PageCriteria); may be empty but may not be null
Returns:
url string
Since:
4.0

DisableFragmentCache

public void DisableFragmentCache()
Disable caching on this fragment

Since:
4.0

StartBatchContext

public java.lang.Object StartBatchContext()
Fetch Batch context object to queue CatalogManager and TreeManager commands

Returns:
Object batch context object
Since:
4.0

CommitBatchedCommands

public boolean CommitBatchedCommands(java.lang.Object oBatchContext)
Commit CatalogManager and TreeManager commands queued * to the batch context

Parameters:
oBatchContext - Object batch context object
Returns:
boolean
Since:
4.0

RollbackBatchedCommands

public boolean RollbackBatchedCommands(java.lang.Object oBatchContext)
Abort CatalogManager and TreeManager commands queued * to the batch context

Parameters:
oBatchContext - Object batch context object
Returns:
boolean
Since:
4.0

rsCacheDebug

public boolean rsCacheDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.RESULT_SET_CACHE_DEBUG

Result Set Cache debug flag

Returns:
true if set
Since:
4.0

pgCacheDebug

public boolean pgCacheDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.PAGE_CACHE_DEBUG

Page Cache debug flag

Returns:
true if set
Since:
4.0

pastramiDebug

public boolean pastramiDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.GENERIC_DEBUG

Pastrami debug flag

Returns:
true if set
Since:
6.0

xmlDebug

public boolean xmlDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.XML_DEBUG

XML debug flag

Returns:
true if set
Since:
4.0

syncDebug

public boolean syncDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.SYNC_DEBUG

Sync debug flag

Returns:
true if set
Since:
4.0

eventDebug

public boolean eventDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.EVENT_DEBUG

Event debug flag

Returns:
true if set
Since:
4.0

systemDebug

public boolean systemDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.GENERIC_DEBUG

System (main) debug flag corresponds to ft.debug

Returns:
true if set
Since:
4.0

dbDebug

public boolean dbDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.DB_DEBUG

Database debug flag

Returns:
true if set
Since:
4.0

sessionDebug

public boolean sessionDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.SESSION_DEBUG

Session debug flag

Returns:
true if set
Since:
4.0

timeDebug

public boolean timeDebug()
Deprecated. Use Apache's commons-logging module instead. The logger name that is used in place of this debug flag is identified by the string value of ftMessage.TIME_DEBUG

Time debug flag

Returns:
true if set
Since:
4.0

systemSession

public boolean systemSession()
Are sessions enabled?

Returns:
true if set
Since:
4.0

BlobServer

public boolean BlobServer(FTValList args,
                          COM.FutureTense.Interfaces.IMIMENotifier im,
                          java.io.OutputStream os)
Invoke the BlobServer to retrieve a blob into an output stream

Parameters:
args - Map of blobserver arguments
im - IMIMENotifier call back to set header information
os - OutputStream to capture bytes
Returns:
Returns true or false if manager call worked. Use GetErrno() to check return codes from the call.
Since:
5.0

getLocaleString

public java.lang.String getLocaleString(java.lang.String sName,
                                        java.lang.String sLocale)
Method to get a locale specific string

Parameters:
sName - name of the string
sLocale - locale of the string (i.e., EN_US)
Returns:
locale specific string
Since:
5.0

getPastramiEngine

public COM.FutureTense.Interfaces.PastramiEngine getPastramiEngine()
Method to return a PastramiEngine object based on the value of the propety cs.PastramiEngine or the override class name passed in

Returns:
PastramiEngine object or null if disabled
Since:
6.0

getSatellite

public COM.FutureTense.Cache.Satellite getSatellite(java.lang.String id)
Method to get read-only information about a Satellite server.

Parameters:
id - String satellite engine id as defined in the SystemSatelites table
Returns:
Satellite object or null if id is invalid
Since:
6.0

getAttribute

public java.lang.Object getAttribute(java.lang.String sName)
Method to get an attribute value from the request

Parameters:
sName - name of the attribute
Returns:
attribute value or null
Since:
6.0

getAttributeNames

public java.util.Enumeration getAttributeNames()
Method to get an enumeration of all the request attribute names

Returns:
enumeration of attribute names
Since:
6.0

removeAttribute

public void removeAttribute(java.lang.String sName)
Method to remove an attribute from the request

Parameters:
sName - name of the attribute
Since:
6.0

setAttribute

public void setAttribute(java.lang.String sName,
                         java.lang.Object oValue)
Method to set an attribute for the request

Parameters:
sName - name of the attribute
oValue - value to set
Since:
6.0

close

public void close()
Method to close and release any resources associated with this object

Since:
6.0

getNamespace

public java.lang.String getNamespace()
The value returned by this method should be prefixed or appended to elements, such as JavaScript variables or function names, to ensure they are unique in the context of the generated page.

Returns:
the namespace
Since:
6.0

getUserPrincipal

public java.security.Principal getUserPrincipal()
Returns a java.security.Principal object containing the name of the current authenticated user. If the user has not been authenticated, the method returns null

Returns:
a java.security.Principal containing the name of the user making this request; null if the user has not been authenticated
Since:
6.0

getIProperties

public COM.FutureTense.Interfaces.IProperties getIProperties()
Return an IProperties object that provides access to the properties that are currently loaded into the CS context.

Returns:
IProperties
Since:
6.0