All Categories  Class Hierarchy  This Category  Previous  Next  Indexes

Miscellaneous Class CATVpmUsrReplication

CATVpmUsrReplication
 


public class CATVpmUsrReplication

Replication management class.
Role: This class provides services for managing import and export of data in a multi-site environment.


Method Index


o Export(CATVpmUsrReplicateObjectType,char*,unsigned int,char*)
Exports data to a file.
o Export(ObjID&,char*)
o Import(char*)
Imports data from a file.
o Queue(CATVpmUsrReplicateObjectType,char*,unsigned int,char*,CATVpmUsrReplicateObjectMode,int,int,char*,char*)
Adds a request in the replication queue.

Methods


o Export
public static int Export( const CATVpmUsrReplicateObjectType iType,
const char* iOID,
const unsigned int iLengthOID,
const char* iSiteID)
Exports data to a file.

Role: Use this method to export a complex object, e.g. creates the import/export exchange file for the object and all its components. The name and location of the resulting file are computed according to the replication declaratives. The file creation is immediate: the method by-passes the replication queue mechanism.

Parameters:
iType
Type of the object to export (see CATVpmUsrReplicateObjectType type definition above).
iOID
OID of the object to export.
iLengthOID
Object OID length, in bytes.
iSiteID
Destination site ID.
Returns:
0 if successful, non-zero otherwise.
o Export
public static int Export( const ObjID& iUUID,
const char* iSiteID)
Deprecated:
VPM 1.5 GA Exports data to a file.

Role: Use this method to export a complex object, e.g. creates the import/export exchange file for the object and all its components. The name and location of the resulting file are computed according to the replication declaratives. The file creation is immediate: the method by-passes the replication queue mechanism.

Parameters:
iUUID
Object identifier structure.
See also:
CATDMUsrMethod
iSiteID
Destination site ID.
Returns:
0 if successful, non-zero otherwise.
o Import
public static int Import( const char* iFile)
Imports data from a file.

Role: Use this method to import the contents of an import/export exchange file in the database.

Parameters:
iFile
Import/export exchange full file name.
Returns:
0 if successful, non-zero otherwise.
o Queue
public static int Queue( const CATVpmUsrReplicateObjectType iType,
const char* iOID,
const unsigned int iLengthOID,
const char* iSiteId,
const CATVpmUsrReplicateObjectMode iMode,
const int iPriority,
const int iTransfer=0 ,
const char* iUserID=NULL,
const char* iOrganizationID=NULL)
Adds a request in the replication queue.

Role: Use this method to create a new entry in the replication queue for a given object, e.g. request the export of the object by the the replication daemon VX0REPLS.

Parameters:
iType
Type of the object to queue (see CATVpmUsrReplicateObjectType type definition above).
iOID
OID of the object to queue.
iLengthOID
Length of the obejct OID, in bytes.
iSiteId
Destination site id.
iMode
Replication mode : can either asynchronous (delayed) or synchronous (immediate) ; see type definition above. The mode must be set to synchronous when the object is transferred to the remote site.
iPriority
Priority of the replication request in the queue. This number should be comprised between 0 (highest priority) and 100 (lowest priority).
iTransfer
Transfers the object to the remote site, e.g. assign the the owner- ship of the object to the destination site. The object must belong to the current site, and the relevant security accesses must be granted.
iUserID
Optional owning user ID the object should be assigned to when transferring it to the remote site. This parameter should be set to NULL for standard export.
iOrganizationID
Optional owning organization ID the object should be assigned to when transferring it to the remote site. This parameter should be set to NULL for standard export.
Returns:
0 if successful, non-zero otherwise.

This object is included in the file: CATVpmUsrReplication.h
If needed, your Imakefile.mk should include the module: VX0REPL1

Copyright © 2003, Dassault Systèmes. All rights reserved.