migrateReply

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

Syntax

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

Description

The migrateReply operation creates a comment 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).

Parameters and Return Value

binderId

The binder identifier of the folder that will contain the new comment.

parentId

The binder identifier of the entry or comment to which you want to apply the new comment.

definitionId

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

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 comment you want to create.

inputDataAsXML

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

creator

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

creationDate

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

modifier

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

modificationDate

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

return_value

The entry identifier of the newly created comment.

Example

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

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

See Also