Write Checkout of Vcfile and Vcfolder

To write a client that performs a checkout, use the doIt() method of the HttpVcCheckout class passing in various parameters.

The doIt() method is available in the com.matrixone.fcs.http.HttpVcCheckout package.

The HttpVcCheckout class provides two version of the doIt() method as shown below.

public static TicketWrapper doIt(
                       Context ctx,
                       java.lang.String[] biods,
                       java.lang.String[] fileNames,
                       java.lang.String[] formats,
                       java.lang.String[] locks,
                       long[] vcIndexList,
                       java.lang.String[] versions,
                       java.lang.String[] path,
                       boolean zipOutput,
                       java.lang.String outFileName,
                       java.lang.String errorPage,
                       javax.servlet.http.HttpServletRequest req,
                       javax.servlet.http.HttpServletResponse res)
                          throws MatrixException

The arguments are:

Argument Description

Ctx

The ENOVIA product context.

boids

An array of business object ids for the business objects whose associated files or folders are being checked in.

fileNames

An array containing the names of the files to checkout.

formats

An array containing the formats of the files to checkout.

lock

An array containing the lock state of the files after the checkout is complete.

The files are locked in the DesignSync store. The business objects associated with the files do not get locked during file check out.

vcIndexList

An array of vcconnection indexes for the various files and folders being checked in.

versions

An array of alternate version specification.

For vcfile checkout, the format to specify the alternate version is:

specifier type@specifier@qualifier (if needed).

For information on specifier type, specifier and qualifier, see the explanation of VERSION in Connect to a File in DesignSync.

For vcfolder checkout, specify the configuration name.

If you provide an empty string, the file or the folder pointed to by the connection is checked out.

paths

An array containing the paths to the files.

The path to prepend to a file in the zip file on checkout.

zipOutput

OutFileName

This is what the file will be referred to locally after the checkout.

errorPage

The URL location to the error page to display if the checkout operation fails.

req

An Http request which must have a matching params of boid, vcIndex, comment, and unlock. If the param counts don't match, an error is thrown.

res

Http Servlet response

This function can be used to checkout more than one vc connection as well as files from captured stores, or to checkout a specific file of a vcfolder connection. This is why the arguments take arrays of information. Each arg, which is an array, must have the same number of entries as every other one. Entries with the same index refer to the same captured file or vc connection to check out. When specifying a captured file, the vcindex should be zero. When specifying a vc connection (so that vcindex > 0), the format is irrelevant. For a vc connection, the filename is only relevant when checking out a specific file of a vcfolder connection.