Documentation Center

Calling PutDocPerl() to use PutDoc

Description and examples of the use of PutDocPerl() for importing an object into SDL Contenta are provided.

Example:
CPCMcommand::PutDocPerl(BSTR bsDocDirPath, BSTR bsAdapter, BSTR bsCustomArgs)
Description:
bsDocDirPath
The directory path that contains the document and its supporting files created by the GetDoc adapter.
bsAdapter
The name of the top level Perl module that defines the subroutine for importing documents into SDL Contenta.

Example: PcmPutDocEnt.pm

bsCustomArgs

Custom arguments, as in $CustomArgs shown in the Perl example that follows. This is a pipe-delimited string of values used by the adapter.

Perl example:
my $CustomArgs = "$ThisToolsFname|$CustomModule|-socket $socket|-node $node|-cookie $Cookie|myarg1|
myarg2|myargN|";
Description:
ThisToolsFname
For tools launched from:
  • SDL Contenta Explorer, this must be the program or script file name including the filename extension.

    For example: EpicEdit.pl, FrameCheckout.exe, XmEdit.exe.

  • SDL Contenta Web, this must be the tool name that appears in the tools list.

    For example: Epic Check Out, Epic Check In, XMetaL Check Out, Frame Check In.

This is used by the adapter with the top level object’s Document Type as a pair of keys to determine the overriding name of a custom module in AppData.

CustomModule
The name of the perl module that contains customizations to the adapter callbacks.

The custom modules inherit from delivered custom modules and override subroutines that need to behave in a specialized way for a given customer or application.

For example: CustomPutDocEpicAcme

socket, node, cookie
These are assigned to data members of the custom object making them available for use by tools that require a new connection to pcmportal.
  • Socket is the PcmPortal socket number. $self->{socket}
  • Node is the hostname of the system on which PcmPortal is running. $self->{node}
  • Cookie is one of the arguments passed bySDL Contenta Explorer on the tools command line. $self->{cookie}
myarg1…myarg<n>
These are optional custom arguments. This shows that it is possible for a tool that calls an adapter to pass extra arguments that are needed by the specialized custom module that you write for the particular tool.
Perl example:
$PCMcmd->PutDocPerl($bsDocDirPath,$bsAdapter,$bsCustomArgs);