migrateFolderEntry

Creates a new folder entry while preserving SiteScape Forum data. (V1.0.3)

Syntax

public void migrateFolderEntry ( long binderId, String definitionId, String inputDataAsXML, String creator, Calendar creationDate, String modifier, Calendar modificationDate );

Description

The migrateFolderEntry operation creates a folder entry in Teaming that preserves values from a SiteScape Forum installation (for example, the name of the person who created the item in Forum, the Forum creation date, the person who last modified the item in Forum, and the date of the last modification in Forum).

When creating entries within a Files folder in Teaming, use this operation to create the entry, and then use either migrateFolderFile or migrateFolderFileStaged to attach the file to the entry.

Parameters and Return Value

binderId

The binder identifier of the folder to contain the new entry.

definitionId

The 32-character, hexadecimal identifier that maps to the type of entry to be created.

The easiest way to work with definition identifiers for entries is to specify null for this value. When you specify null, Teaming automatically applies the definition identifier for the default entry type of the folder in which you are creating a new entry. For example, by default, you want to create an entry in a blog folder. If you pass null as the definition identifier, Teaming automatically applies the definition identifier for a blog entry.

As another option, you can use the getDefinitionListAsXML operation to get metadata for all definitions. Then, you can parse the XML string for the definition identifier of the type of workspace or folder you want to create.

inputDataAsXML

A string of XML supplying the elements and values needed to construct the type of entry you want to create.

creator

A string containing the username of the person who created the corresponding entry in the Forum installation.

creationDate

Calendar data specifying the date when the corresponding entry was created in Forum.

modifier

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

modificationDate

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

return_value

The entry identifier of the newly created entry.

Example

call.setOperationName(new QName("migrateFolderEntry")); Object result = call.invoke(new Object[] {new Long(21), def, input, new String("JSmith"), createcal, new String("JGarces"), modcal});

This code creates a new entry of the type determined by the definition in the def variable (use the getDefinitionListAsXML operation to obtain the correct string for your entry type), and the new entry is to be located in the binder whose identifier is 21. The input variable contains an XML string, properly formatted for your entry type, which Teaming uses to create entry content. The remaining four parameters provide names (literals) and dates (the createcal and modcal variables) for the creation and last modification of the corresponding entry in the Forum installation.

See Also