migrateFolderFile

Attaches a file to an entry while preserving SiteScape Forum data. (V1.0.3)

Syntax

public void migrateFolderFile ( long binderId, long entryId, String fileUploadDataItemName, String filename, String modifier, Calendar modificationDate );

Description

The migrateFolderFile operation attaches a file to a folder entry in Teaming that preserves values from a SiteScape Forum installation (for example, the person who last modified the item in Forum, and the date of the last modification in Forum).

Parameters and Return Value

binderId

The binder identifier of the folder that contains the entry to which you want to attach a file.

entryId

The entry identifier of the entry to which you want to attach the file.

fileUploadDataItemName

The internal-use name used by the database to identify the file as an element of an entry.

For example, a Forum custom command allowed for uploading different files into a single entry that served different functions, such as an expense report, a meeting presentation, and so on. These custom file uploads have associated internal-use names that are different than the reserved internal-use name applied to standard file entries or standard attachments.

If you are migrating to a folder file, specify upload as an argument to this parameter to make this attachment the primary file for the entry.

filename

The name of the file to be attached to the entry.

modifier

A string containing the username of the person who last modified the corresponding file in Forum.

modificationDate

Calendar data specifying the date when the corresponding file was modified in Forum.

Example

call.setOperationName(new QName(“migrateFolderFile”)); Object result = call.invoke(new Object[] {new Long(21), new Long(45), String("_budgetReport"), String("budget-report.xls"), new String("JGarces"), modcal});

This code attaches the budget-report.xls file to the entry whose identifier is 45 and is located in a folder whose binder identifier is 21. The internal-use name that maps to the file as an element in the entry is _budgetReport. The operation also provides the name of the person who modified the file in Forum and the date when that modification occurred.

See Also