Home > Contents > Index >
Expanded TOC   |    Accordion TOC   |    Annotated TOC   |    Index

 

CatalogManager

Executes a CatalogManager command.

There are two variants of this method:


ICS.CatalogManager

Use this method to execute a CatalogManager command. The list of CatalogManager commands follows:



 

Syntax

Parameters

vIn
List of name/value pairs passed to CatalogManager. The ftcmd parameter is required and specifies the CatalogManager command to execute. Any other parameters depend on the CatalogManager command. Null indicates that the required parameters are passed in existing Sites variables.

Returns

Returns a boolean value; true if CatalogManager was invoked successfully.

Error Numbers

Use GetErrno to check the results of the specific CatalogManager command.

Example

The following example deletes a row from the Movies table and then examines the return value to determine whether the method worked properly:


ICS.CatalogManager

Use this method to execute a CatalogManager command. This variant accepts a handle for a BatchContext object.

Syntax

Parameters

vIn
List of name/value pairs passed to CatalogManager. The ftcmd parameter is required and specifies the CatalogManager command to execute. Any other parameters depend on the CatalogManager command. Null indicates that the required parameters are passed in existing Sites variables.

oBatchContext
Handle to the BatchContext object.

Description

Use this method to execute a CatalogManager command. This variant accepts a handle for a BatchContext object. The follwing is a list of the CatalogManager commands that accept a Batch Context object:

Returns

Returns true if CatalogManager was invoked successfully.

Error Numbers

Use GetErrno to check the results of the specific CatalogManager command.

Example

The following example deletes a row from the Movies table and then examines the return value to determine whether the method worked properly:


ICS.CatalogManager

Adds a row to a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to addrow.

tablename (required)
Specify the name of the table to which you plan to add a row.

columnname_folder (optional)
Specify a subfolder name to store the uploaded file. The file is then stored under the upload folder and the subfolder. The upload folder is specified in the SystemInfo table's defdir column. Note that you can have multiple upload columns.

Upload columns are designated by the prefix url. The column name in the table must begin with url (for example, urltext). The argument name must include the table's column name with _folder appended to the column name (for example, urltext_folder).

columname_file (required for non-binary files)
Specify the name of the file you want to upload. The column name in the table must begin with url (for example, urltext). The argument name must have _file appended to the table's column name (for example, urltext_file).

columnname (optional)
Value of each column in the row to be added. The columnname parameter is a table column name.

Description

The addrow command adds a row to a table. The addnodes TreeManager command can be committed in the same transaction.

Note

When adding a row to a table of type obj (an object catalog), the system will create Variables.newid, which contains the system-assigned unique ID for the new record.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

The following example adds a row to the Movies table:

See Also

addrows , addrowtext


ICS.CatalogManager

Adds multiple rows to a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (Required)
Value must be set to addrows.

tablename (Required)
Table name to add rows.

columnname_folder (Optional)
A subfolder name to store the uploaded file. The file is then stored under the upload folder and the subfolder. The upload folder is specified in the SystemInfo table's defdir column. You can have multiple upload columns.

Upload columns are designated by the prefix url. The column name in the table must begin with url (for example, urltext). The argument name must include the table's column name with _folder appended to the column name (for example, urltext_folder).

columnname (Required for non-binary files)
The name of the file you want to upload. The columnname is a table column name. The column name in the table must begin with url (for example, urltext). The argument name must include the table's column name with _folder appended to the column name (for example, urltext_folder)

Description

The addrows command adds multiple rows to a table.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

The following example adds two rows to the Movies table:

}

See Also

addrow , addrows , addrowtext


ICS.CatalogManager

Adds a row to a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to addrowtext.

tablename (required)
Name of the table to which to add text.

urlcolumnname_folder (optional)
For every file upload column (column name starts with url), you can use a parameter named urlcolumnname_folder to store the file in a subfolder under the default upload folder for the table.

columnname_file (optional)
Used to specify a name for a file that will be created on the server. If not provided, the system generates a file name and gives it the extension .txt.

columnname (optional)
Value of each column in the row to be added. columnname is a table column name.

Description

The addrowtext command adds a row to a table. If the table contains an upload column, instead of requiring a file upload, text can be uploaded and Sites automatically creates a file to store the uploaded text.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example adds a row to the reviews table:

See Also

addrow , addrows


ICS.CatalogManager

Adds a user.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to addUser.

username (required)
Name of user to add.

password (required)
Password for the user. The password is stored in an encrypted format.

useracl (required)
Access Control List. Comma-separated list of groups.

Error Numbers

Possible value of errno:

Value
Description
-105
Database error.

 

Example

This example adds the user Editor whose password is edit1234 and gives the user ContentEditor privileges. These values can be modified when the form is displayed.

See Also

delUser , modifyUser


ICS.CatalogManager

Commits a record from a revision-tracked table into the Revision Tracking subsystem.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to commit.

tablename (required)
Name of the table.

asset (required)
Value of the primary key for the row to commit.

checkout (optional)
Indicates lock status of record after commit. Set value to true to indicate the record will still be locked by user after the commit.

annotation (optional)
Comment describing the new revision.

Description

The commit command commits a record from a revision-tracked table into the Revision Tracking subsystem. The current user must have the record locked and have write access to the tracked table to perform this operation.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example commits the currently locked record whose primary key value is 95137.

}

See Also

lock , unlockrecord


ICS.CatalogManager

Creates a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to createtable.

tablename (required)
Name of the table to create.

systable (required)
Allows differentiation between ContentCatalog (systable=no) and ObjectCatalog (systable=obj). This defaults to ContentCatalog (systable=no).

uploadDir (required)
Server-side folder path to contain uploaded files.

aclList (optional)
Comma-separated list of ACLs. When security is enabled, only members of the ACLs can access content in the table.

colvalueN (required)
Database-specific field type for column. N is 0 (zero) for the first column, 1 for the second column, etc.

colnameN (required)
Column field name. Each colname parameter corresponds to a column in the table. N is 0 (zero) for the first column, 1 for the second column, and so forth.

Description

The createtable command creates a table. The table's primary key field name is defined in the Sites properties file (futuretense.ini).

The default primary key used by CatalogManager is defined in the property cc.contentkey. Unlike a custom property for primary keys, the cc.contentkey property does not restrict the name of the tables you create. The Object table column, version, is reserved for future use.

Error Numbers

Possible values of errno include:

Value
Description
-22
Table already exists.
-105
Database error.

 

Example

The following example uses the cc.contentkey property when creating a new table called ExampleTable:

To specify the primary key in the properties file (futuretense.ini file), you must use the following syntax:

The K in Key must be capitalized; for example, the following is valid:

Note that tablename must also be named Test; otherwise the table name will not get created.

See Also

deletetable


ICS.CatalogManager

Deletes the log file (futuretenseip_address.txt) if per-IP address logging is enabled.

Parameters

An FTValList containing the following name/value pair:

ftcmd (required)
Value must be set to deletelog.

Description

The deletelog command deletes the log file (futuretenseip_address.txt) if per-IP address logging is enabled. Enable per-IP address logging by setting the ft.dbl property, found in the Sites properties file (futuretense.ini), to yes.

This command is useful for removing the existing log file so that you can create a new one when debugging. When the application server restarts and Sites is called the first time, Sites attempts to delete all previous log files, regardless of whether per-IP address logging is enabled. This means that the Sites log file will be deleted as well as any other.TXT files in the directory where the logs are stored.

Error Numbers

Possible value of errno:

Value
Description
-300
File not found.

 

Example

This example deletes the log via a URL:

}

See Also

exportlog


ICS.CatalogManager

Deletes a revision of a row from a revision-tracked table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to deleterevision.

tablename (required)
Name of the tracked table.

asset (required)
Value of the primary key for the row to obtain history.

version (optional)
Possible values are:

Description

The deleterevision command deletes a revision of a row from a revision-tracked table. The current user must have rtadmin access to the tracked table to perform this operation.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example deletes version 5 of the row in movies whose primary key value is 95137.

See Also

release


ICS.CatalogManager

Deletes a row in a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to deleterow.

tablename (required)
Name of the table containing the row to delete.

Delete uploaded file(s) (optional)
Value should be set to "yes" if upload files associated with the row should be deleted. Default is "no".

primarykey (optional)
primarykey is the column name of the primary key column. The value is the value of row's primary key.

tablekey (optional)
Use the tablekey parameter if you want to delete rows based on a value other than the primary key. The value of tablekey is the column name of the column you will use to perform the deletion. For example, if you want to delete a table based on the value in the title column, the tablekey parameter looks as follows:

tablekeyvalue (optional)
Value in the tablekey column of the row you want to delete. For example, if you want to delete a row with a value of Jaws in the title column, the tablekeyvalue parameter looks as follows:

This parameter is required only if the tablekey parameter is used.

Description

The deleterow command deletes a row in a table. The addnodes TreeManager command can be committed in the same transaction.

There are two options you can use to delete a row with this command:

Note

This is valid only if the primarykey column does not have a variable set.

Error Numbers

Possible value of errno:

Value
Description
-105
Database error.

 

Example

The following examples remove two rows from the movies table.

id (primary key)
rating
title
    1
    
    G
    
    Beauty and The Beast
    
    2
    
    PG
    
    The Princess Bride
    
    3
    
    R
    
    The Godfather
    

 

The first example uses the primary key column to delete a row:

Example using a column other than the primary key column to delete a row:

After both rows have been removed, the resulting table will look as follows:

id (primary key)
rating
title
    3
    
    R
    
    The Godfather
    

 

See Also

addrow , deleterows


ICS.CatalogManager

Deletes multiple rows in a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Values must be set to "deleterows".

tablename (required)
Name of the table containing the rows to delete.

primarykeyN (required)
Value of row's primary key. The primarykey parameter is the primary key's column name. The value of N corresponds to the row number--in the resultset--that you want to delete.

Delete uploaded file(s)(optional)
Value should be set to "yes" if the upload files associated with the row should be deleted. Default is "no".

Description

The deleterows command deletes multiple rows in a table.

Error Numbers

Possible value of errno:

Value
Description
-105
Database error.

 

Example

The following example deletes two rows from the TopMovies table:

id
Director
Title
133
Charlie Chaplin
Modern Times
137
Buster Keaton
The General
145
Clint Eastwood
A Perfect World
148
Rob Reiner
The Princess Bride

 

See Also

deleterow


ICS.CatalogManager

Deletes a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
The literal value deletetable.

tablename (required)
The name of the table to delete.

Description

The deletetable command deletes a table. This command does not delete the upload storage folder.

Error Numbers

Possible values of errno:

Value
Description
-103
tablename does not exist.
-105
Database error.

 

Example

The following example deletes the table named moviereviews.

See Also

createtable


ICS.CatalogManager

Deletes a user.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to delUser.

username (required)
Name of the user to delete.

Error Numbers

Possible value of errno:

Value
Description
-105
Database error.

 

Example

The following example deletes the user joe.

See Also

addUser


ICS.CatalogManager

Modifies the fields of a row in a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to "editrow".

tablename (required)
Name of the table whose row will be edited.

primarykey (required)
Value of row's primary key. The primarykey parameter is the primary key's column name.

columnname (optional)
The information in the field you are editing. The columnname parameter is the name of the column to be edited.

tablekey (optional)
Use the tablekey parameter if you want to update rows based on a value other than the primary key. The value of tablekey is the column name of the column you will use to perform the update. For example, if you want to update a table based on the value in the title column, the tablekey parameter looks as follows:

tablekeyvalue (optional)
Value in the tablekey column of the row you want to update. For example, if you want to update a row with a value of Jaws in the title column, the tablekeyvalue parameter looks as follows:

This parameter is required only if the tablekey parameter is used.

Description

The editrow command modifies the fields of a row in a table. The fields in the row are modified with the new values. If a url field is edited, the content of the associated server-side upload file is modified to contain the new value. Thus, a user can pass text to update the back-end storage for a given url column value.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example edits a movie title in the movies table.

See Also

addrowtext , editrow , replacerow , updaterow


ICS.CatalogManager

Modifies the fields for multiple rows in a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to editrows.

tablename (required)
Name of the table containing rows to be edited.

primarykeynameN (optional)
The primarykeyname parameter is the name of the column you want to use as the primary key. The value of N corresponds to the row number to be edited. For example, if you want to edit the values in row 0 of the table, you would use the following code:

columnnameN (optional)
The columname parameter is the name of the column that you want to edit. The value of N corresponds to the row number--in the resultset--that you want to edit. For example, if you want to edit the value in the comments field of row 0 of the table to read "miss it", you would use the following code:

Description

The editrows command modifies the fields for multiple rows in a table. The fields in the row are modified with the new values. If a url field is edited, the content of the associated server-side upload file is modified to contain the new value.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example edits the rows with godzilla and titanic in the movies table, and changes the values of the comments column to miss it and see it, respectively.

See Also

editrow , replacerows , updaterows


ICS.CatalogManager

Displays a default HTML form for adding, deleting, modifying, or selecting rows from a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to exportform.

tablename (required)
Name of the table that the form uses.

ftchoice (required)
Value must be set to addrow, deleterow, updaterow, or replacerow.

tablekeyvalue (optional)
If ftchoice is deleterow, editrow, or updaterow, the value for this input must be the primary key value for the record you want to delete or update. No value for tablekeyvalue can be supplied when ftchoice is set to addrow.

Error Numbers

Possible value of errno:

Value
Description
-105
Database error.

 

Example

The updaterow, deleterow, and replacerow operations require that the specified row be selected by the value of its primary key. This example assumes that the column name id is the primary key for any tablename specified.

See Also

addrow , deleterow , replacerow , selectrow(s) , updaterow


ICS.CatalogManager

Exports a per-IP address log.

Parameters

An FTValList containing the following name/value pair:

ftcmd (required)
You must set the associated value to exportlog.

Description

The exportlog command exports a per-IP address log. You can enable per-IP address logging by setting the ft.dbl property, found in the Sites properties file (futuretense.ini), to yes.

Error Numbers

Possible value of errno:

Value
Description
-300
File not found.

 

Example

Although exportlog can be called from inside an element, it would be more commonly called as an argument to a URL. If your application server is WebLogic or WebSphere, the following URL will export the log:

If your application server is iPlanet, the following URL will export the log:

See Also

deletelog


ICS.CatalogManager

Flushes the internal memory cache for a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to flushcatalog.

tablename (required)
Name of the table to flush.

Description

The flushcatalog command flushes the internal memory cache for a table. This command is useful to clear a table's cache after a table update using a non-Sites mechanism.

flushcatalog can also force cache clearing when the SQL used to select against a table has performed a join with other catalogs and the system may hold the cached information for either table.

Error Numbers

Possible value of errno:

Value
Description
-105
Database error.

 

Example

If your application server is WebLogic or WebSphere, the following URL flushes the cache for the SystemInfo table.

If your application server is iPlanet, the following URL flushes the cache for the SystemInfo table.


ICS.CatalogManager

Deletes all the page's cache file.

Parameters

Create an FTValList containing the following name/value pairs:

ftcmd (required)
Specify flushpage.

pagename (required)
Specify the name of page to be cleared from cache. The method will flush all pages having this name.

params (optional)
As of CS 5.0, these optional parameters no longer have any effect.

Example

The following example shows how to flush the page named arts2 from the disk cache.


ICS.CatalogManager

Gets a revision history for rows in a revision-tracked table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to history.

tablename (required)
Name of the tracked table.

asset (required)
Value of the primary key for the row to obtain history.

version (optional)
Possible values are:

first - history of the earliest revision of the record.

last - history of the most recent revision of the record.

# - history of a specific revision number.

date - history of the record up to the revision current at the specified date. The date must be in SQL format (yyyy-mm-dd hh:mm:ss) and is expected to be GMT.

locker (optional)
Filters 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 user's name; otherwise, no data will be returned.

creator (optional)
Filters 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 user's name; otherwise, no data will be returned.

annotation (optional)
Filters rows returned based on the annotation of a row.

Description

The history command gets a 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.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example gets the history for the row in movies whose primary key value is 95137.


ICS.CatalogManager

Locks a record for the current user in a revision-tracked table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to lock.

tablename (required)
Name of the tracked table.

asset (required)
Value of the primary key for the row to lock.

Description

The lock command locks a record for 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.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example locks the record whose primary key value is 95137 in movies.

See Also

release


ICS.CatalogManager

Logs in, or authorizes, a user within an application.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to login.

username (required)
Name of existing user.

password (required)
Password of user.

system (optional)
Domain as hostname to validate with.

Error Numbers

Possible value of errno:

Value
Description
-105
Database error.

 

Example

This example logs in user Tom with password of oscar:

See Also

logout


ICS.CatalogManager

Logs out a user from within an application.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to logout.

killsession (optional)
If value is set to true, destroys the session maintained on the server. This should only be done at the end of processing a given HTTP request since you can't recover or re-create a session until the next http connect is issued by the client. This is useful for web crawlers after they finish their crawl session.

Error Numbers

Possible value of errno:

Value
Description
-105
Database error.

 

Example

The following example logs out the user.

}

See Also

login


ICS.CatalogManager

Aborts a mirror operation in progress.

Parameters

An FTValList containing the following name/value pair:

ftcmd (required)
Value must be set to mirrorabort.

Error Numbers

Possible values of errno include:

Value
Description
0
Mirror operation succeeded.
-105
Database error.
-601
Returned from mirrorabort when a mirror operation is not currently in progress.
-602
Mirror operation in progress.
-603
Required variables are missing from the mirrorrows CatalogManager command.
-604
The data (file) associated with a url column could not be found on the source machine.
-605
The schema for a column on the source machine can not be determined.
-606
No rows to mirror from the target system.
-607
Current mirroring operation was aborted via the mirrorabort command.
-608
A connection could not be established to the mirror target server.
-609
The network disconnected communication between the source and target machines.
-610
An attempt was made to mirror from a machine where the database columns are mixed case to a system where the database columns are case-sensitive.
-611
Mirror commit operation failed.
-612
Target server returned an invalid configuration connection message.
-613
Obsolete, will not be returned.
-614
Could not create a temporary table on the target server.
-615
Could not delete the temporary table.
-616
Server does not support this mirror operation.
-617
Table is not an Object table.
-618
No tree nodes found matching the nid parameter of FTTreeNode.

 

Example

The following example aborts a mirror operation.

See Also

mirrorrows


ICS.CatalogManager

Copies rows from a table in one database to a table in another database.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to mirrorrows.

tablename (required)
Name of the source table.

tablekey (required)
Name of the table column to perform a selection on. If the system does not find the key, it uses the primary key of the specified table as the selection column. Contentname is the default value. See futuretense.ini to change this default.

tablekeyvalue (required)
Value in the tablekey column.

mirrorport (optional)
HTTP target port. Port 80 is used if a value is not specified.

mirrortarget (required)
Network name of the mirror target machine.

mirrorauthusername (optional)
Sites username to log into the target machine. Value is required if security is enabled on the mirror target.

mirrorauthpassword (optional)
Password associated with value of mirrorauthusername to log into the mirror target. Value is required if security is enabled on the mirror target.

useProxyServer (optional)
If value is true, transmission should be routed through the proxy server. The proxy server and port to use are specified using the cs.mirrorproxyserver and cs.mirrorproxyport properties.

cgiprefix (optional)
Specifies the application server type on the target system. For iPlanet Application Server, set it to:

For WebLogic and WebSphere, set it to:

inimerge (optional)
Name of a property file on the target system that should be loaded before the mirroring operation proceeds. This parameter is used to define primary key values for tables on the target server.

secureCommunication (optional)
If true, uses secure protocol (HTTPS) to transmit the data to the target server.

Error Numbers

Possible values of errno include:

Value
Description
0
Mirror operation succeeded.
-105
Database error.
-601
Returned from mirrorabort when a mirror operation is not currently in progress.
-602
Mirror operation in progress.
-603
Required variables are missing from the mirrorrows catalogmanager command.
-604
The data (file) associated with a url column could not be found on the source machine.
-605
The schema for a column on the source machine can not be determined.
-606
No rows to mirror from the target system.
-607
Current mirroring operation was aborted via the mirrorabort command.
-608
A connection could not be established to the mirror target server.
-609
The network disconnected communication between the source and target machines.
-610
An attempt was made to mirror from a machine where the database columns are mixed case to a system where the database columns are case-sensitive.
-611
Mirror commit operation failed.
-612
Target server returned an invalid configuration connection message.
-613
Obsolete, will not be returned.
-614
Could not create a temporary table on the target server.
-615
Could not delete the temporary table.
-616
Server does not support this mirror operation.
-617
Table is not an Object table.
-618
No tree nodes found matching the nid parameter of FTTreeNode.

 

Example

This example passes mirror parameters that a user has entered in an HTML form to the mirror command.

See Also

mirrorabort


ICS.CatalogManager

Modifies a user.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to modifyUser.

username (required)
Name of the user to modify.

password (optional)
Password for the user. The password is stored in an encrypted format.

useracl (optional)
Access Control List. Comma-separated list of groups.

Error Numbers

Possible value of errno:

Value
Description
-105
Database error.

 

Example

The following example modifies the user Joe:

See Also

addUser , delUser


ICS.CatalogManager

Releases a lock on a row from a revision-tracked table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to release.

tablename (required)
Name of the tracked table.

asset (required)
Value of the primary key for the row to lock.

Description

The release command releases a lock on a row from a revision-tracked table. Only the user who has the row locked against the table may release it. This also reverts the row in the table to its last committed state, overwriting any changes the user made while the row was locked.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example releases the locked record whose primary key value is 95137 in movies.

}

See Also

lock


ICS.CatalogManager

Replaces an existing row in a table on a remote server by first deleting it, and then inserting the specified information into the row.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to replacerow.

tablename (required)
Name of the table that contains the row to replace.

primarykey (optional)
Value of row's primary key. The primarykey parameter is the primary key's column name.

columnname (optional)
Each column in the row to be replaced. columnname is a table column name.

tablekey (optional)
Use the tablekey parameter if you want to update rows based on a value other than the primary key. The value of tablekey is the column name of the column you will use to perform the update. For example, if you want to update a table based on the value in the title column, the tablekey parameter looks as follows:

tablekeyvalue (optional)
Value in the tablekey column of the row you want to update. For example, if you want to update a row with a value of Jaws in the title column, the tablekeyvalue parameter looks as follows:

This parameter is required only if the tablekey parameter is used.

Description

The replacerow command replaces an existing row in a table on a remote server by first deleting it, and then inserting the specified information into the row. Use the replacerow command to clear the value of a column in a row.

If the row specified by the primarykey value does not exist, then the row will be added to the table.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

The following example replaces the existing row information for Titanic with information for The Great Escape.

id
title
rating
133
Modern Times
G
137
The General
G
145
A Perfect World
PG
148
The Princess Bride
PG
    166
    
    Titanic
    
PG 13

 

After the row has been replaced, the table looks as follows:

id
title
rating
133
Modern Times
G
137
The General
G
145
A Perfect World
PG
148
The Princess Bride
PG
    166
    
    The Great Escape
    
PG

 

See Also

editrow , updaterow , updaterow2


ICS.CatalogManager

Replaces multiple rows in a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to replacerows.

tablename (required)
Name of the table that contains the rows to replace.

primarykeyN (optional)
Value of row's primary key. The primarykey parameter is the primary key's column name. The value of N corresponds to the row number--in the resultset--that you want to replace.

columnnameN (optional)
Each column in the row to be replaced. columnname is a table column name. The value of N corresponds to the row number--in the resultset--that you want to replace.

tablekeyN (optional)
Use the tablekeyN parameter if you want to update rows based on a value other than the primary key. The value of tablekeyN is the column name of the column you will use to perform the update. The value of N corresponds to the row number--in the resultset--that you want to update. For example, if you want to update a table based on the value in the title column, the tablekeyN parameter looks as follows:

tablekeyvalueN (optional)
Value in the tablekey column of the row you want to update. The value of N corresponds to the row number--in the resultset--that you want to update. For example, if you want to update a row with a value of Jaws in the title column, the tablekeyvalueN parameter looks as follows:

This parameter is required only if the tablekey parameter is used.

Description

The replacerows command replaces multiple rows in a table. If a value is not specified for a column, the column value is cleared.

If the row specified by the primarykeyN value does not exist, then the row will be added to the table.

Error Numbers

Possible values of errno include:

Value
Description
-22
Table already exists.
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

Consider a table named movies whose two rows contain the following information:

id
Title
Rating
24
Something About Mary
R
25
The Godmother
R

 

The following example adds a third row and updates the second row of the preceding table:

The modified table contains the following information; notice that the Rating field for the modified title is left blank because it was not explicitly set in the updaterows command:

id
Title
Rating
24
Something About Mary
R
25
The Godfather
26
American Pie
R

 

See Also

editrows , updaterows


ICS.CatalogManager

Reverts a row in a revision-tracked table to a previous revision.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to rollback.

tablename (required)
Name of the tracked table.

asset (required)
Value of the primary key for the row to roll back.

version (optional)
Possible values are:

Description

The rollback command reverts a row in a revision-tracked table to a previous revision. The current user must have the row locked and have rtaudit privileges against the table to roll back the row. A row can be rolled back to its earliest revision, its most recent revision, a specific version number, or whatever revision was current at a specified date.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example performs a rollback on the record whose primary key value is 95137 to version 5.

See Also

history


ICS.CatalogManager

Executes a query against a given table and displays records from a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to selectrow(s).

tablename (required)
Name of the table to query.

tablekeyN (optional)
Name of the table column to perform a selection on, where N is a counter starting at 0 and ending at the number of rows -1. If the system does not find the key, it uses the primary key of the specified table as the selection column. The default primary key is contentname. Change this default in futuretense.ini.

tablekeyvalue (required)
Value in the tablekey column of the row you want to select. For example, if you want to select a row with a value of Jaws in the title column, the tablekeyvalue parameter looks as follows:

This parameter can contain the% wildcard.

Description

The selectrow(s) command executes a query against a given table and displays records from a table. The rows displayed will match the criteria specified by the value of the parameters. CatalogManager assigns the returned HTML to the cshttp variable.

Example

This example selects the row whose moviename is godzilla.


ICS.CatalogManager

Sets the number of revisions stored for each row in a revision-tracked table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to setversions.

tablename (required)
Name of the tracked table.

numversions (required)
Number of revisions to be stored for each row in a tracked table.

Description

The setversions command sets the number of revisions stored for each row in a revision-tracked table. The current user must have rtadmin privileges for the table.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example sets the maximum number of revisions for rows in the movies table to 8.

See Also

tracktable


ICS.CatalogManager

Enables revision tracking operations for a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to tracktable.

tablename (required)
Name of the table to track.

numversions (optional)
Maximum number of versions to store for each row. When the maximum is reached, the oldest version is removed. If the value of numversions is not specified or is set to 0, there is no limit to the number of revisions.

storage (optional)
Location to store revisions associated with a row in the table.

Description

The tracktable command enables revision tracking operations for a table. The maximum number of revisions per row can be set, as well as the storage location for the revisions. Only users who have rtadmin privileges for the table may track the table.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.
-1000
Revision tracking error. This error may be appearing because the user attempting to track the table does not have rtadmin privileges.

 

Example

This example tracks the reviews table with a maximum of 5 versions for each row.

See Also

untracktable


ICS.CatalogManager

Stops tracking a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to untracktable.

tablename (required)
Name of the table to stop tracking.

Description

The untracktable command stops tracking a table. Revision tracking operations will no longer be available on the table. Only users who have rtadmin privileges for the table can stop tracking the table.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.
-1000
Revision tracking error. This error may appear because the user attempting to stop tracking the table does not have rtadmin privileges.

 

Example

This example stops tracking on the reviews table.

}

See Also

tracktable


ICS.CatalogManager

Unlocks a locked row.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to unlockrecord.

tablename (required)
Name of the tracked table.

asset (required)
Value of the primary key for the row to unlock.

Description

The unlockrecord command unlocks a locked row. Only the user who has the row locked or a user who has rtadmin privileges for the table can unlock the row. The unlockrecord command does not restore the row to its most recent revision.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example unlocks the row in movies whose primary key value is 95137.

See Also

lock


ICS.CatalogManager

Updates field values for a row in a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to updaterow.

tablename (required)
Name of the table containing the row to be updated.

primarykey (optional)
Value of row's primary key. The primarykey parameter is the primary key's column name.

columnname (optional)
Each column in the row to be modified. columnname is a table column name.

tablekey (optional)
Use the tablekey parameter if you want to update rows based on a value other than the primary key. The value of tablekey is the column name of the column you will use to perform the update. For example, if you want to update a table based on the value in the title column, the tablekey parameter looks as follows:

tablekeyvalue (optional)
Value in the tablekey column of the row you want to update. For example, if you want to update a row with a value of Jaws in the title column, the tablekeyvalue parameter looks as follows:

This parameter is required only if the tablekey parameter is used.

Description

The updaterow command updates field values for a row in a table. For each column and specified value, the existing column value is replaced with the incoming data for that column. Only the specified values are changed; you cannot clear a value in a table row or column by using editrows or updaterows. You must use replacerow or updaterow2.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

The following example updates the comments in the Movies table for a given movie:

See Also

editrow , replacerow , updaterow2


ICS.CatalogManager

Updates or clears values in columns for a row in a table

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to updaterow2.

tablename (required)
Name of the table containing the row to be updated.

primarykey (optional)
Value of row's primary key. The primarykey parameter name is the primary key's column name.

columnname (optional)
Each column in the row to be modified. columnname is a table column name.

tablekey (optional)
Use the tablekey parameter if you want to update rows based on a value other than the primary key. The value of tablekey is the column name of the column you will use to perform the update. For example, if you want to update a table based on the value in the title column, the tablekey parameter looks as follows:

tablekeyvalue (optional)
Value in the tablekey column of the row you want to update. For example, if you want to update a row with a value of Jaws in the title column, the tablekeyvalue parameter looks as follows:

This parameter is required only if the tablekey parameter is used.

updaterowNullColumns (optional)
A comma-separated list of columns that are to be cleared if no data is supplied when the user submits a form.

Note that if this list is supplied, other columns are ignored and will not be cleared.

Description

Like the updaterow command, updaterow2 updates values in columns for a row in a table. However, where you cannot clear columns with updaterow, updaterow2 allows you to clear columns if there is no value for the specified column (for example, if there is no related field in the form, or if the field on the form was left blank).

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

The following example updates a row in the movies table:

}

See Also

editrow , editrows , replacerow


ICS.CatalogManager

Modifies field values for multiple rows in a table.

Parameters

An FTValList containing the following name/value pairs:

ftcmd (required)
Value must be set to updaterows.

tablename (required)
Name of the table containing rows to be updated.

primarykeyN (optional)
Value of row's primary key. The primarykey parameter is the primary key's column name. The value of N corresponds to the row number--in the resultset--that you want to update.

columnnameN (optional)
Each column in the row to be updated. columnname is a table column name. The value of N corresponds to the row number--in the resultset--that you want to update.

tablekeyN (optional)
Use the tablekeyN parameter if you want to update rows based on a value other than the primary key. The value of tablekeyN is the column name of the column you will use to perform the update. The value of N corresponds to the row number--in the resultset--that you want to update. For example, if you want to update a table based on the value in the title column, the tablekeyN parameter looks as follows:

tablekeyvalueN (optional)
Value in the tablekey column of the row you want to update. The value of N corresponds to the row number--in the resultset--that you want to update. For example, if you want to update a row with a value of Jaws in the title column, the tablekeyvalueN parameter looks as follows:

This parameter is required only if the tablekey parameter is used.

Description

The updaterows command modifies field values for multiple rows in a table. For fields other than url fields, the value of the field is modified. For url fields, updaterows deletes the file associated with the url field and modifies the url field to point to the newly uploaded file.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example updates the rows with godzilla and titanic in the movies table, and changes the values of the comments column to miss it and see it, respectively.

See Also

editrows , replacerows


ICS.CatalogManager

Modifies field values or clears columns for multiple rows in a table.

Parameters

ftcmd (required)
Value must be set to "updaterows2".

tablename (required)
Name of the table containing rows to be updated.

primarykeyN (required)
Value of row's primary key. The primarykey parameter is the primary key's column name. The value of N corresponds to the row number--in the resultset--that you want to update.

columnnameN (optional)
Each column in the row to be replaced. columnname is a table column name. The value of N corresponds to the row number--in the resultset--that you want to update.

tablekeyN (optional)
Use the tablekeyN parameter if you want to update rows based on a value other than the primary key. The value of tablekeyN is the column name of the column you will use to perform the update. The value of N corresponds to the row number--in the resultset--that you want to update. For example, if you want to update a table based on the value in the title column, the tablekeyN parameter looks as follows:

tablekeyvalueN (optional)
Value in the tablekey column of the row you want to update. The value of N corresponds to the row number--in the resultset--that you want to update. For example, if you want to update a row with a value of Jaws in the title column, the tablekeyvalueN parameter looks as follows:

This parameter is required only if the tablekey parameter is used.

updaterowNullColumns (optional)
A comma-separated list of columns that are to be cleared if no data is supplied when the user submits a form. Note that If this list is supplied, other columns are ignored and will not be cleared.

Description

Like the updaterows command, the updaterows2 command modifies field values for multiple rows in a table. However, where you cannot clear columns with updaterows, updaterows2 allows you to clear columns if there is no value for the specified column (for example, if there is no related field in the form). For url fields, updaterows2 deletes the file associated with the url field and modifies the url field to point to the newly uploaded file.

Error Numbers

Possible values of errno include:

Value
Description
-103
No such table.
-104
No table definition.
-105
Database error.

 

Example

This example updates the rows with godzilla and titanic in the movies table, and changes the values of the comments column to miss it and see it, respectively.

See Also

replacerow , replacerows

 

  Home > Contents > Index >

Oracle JAVA Reference
Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.