Skip to main content

Publication

Publications for the C++ Replication API

Abstract

A publication is a list of files to be replicated. The files are defined using the hierarchy of file system classes defined in File. These files will be the source for replication. A publication may belong to a Subscription.

A publication is a list of files to be replicated. The files are defined using the hierarchy of file system classes defined in File. These files will be the source for replication. A publication may belong to a Subscription.

Class

FCREPLPublication

Represents a group of files to be published. To set a replication, this publication must be subscribed, which forms a FCREPLSubscription, which is assigned to a FCREPLReplPlan (replication plan).

Getters

Table 1. Getters

DBEngine entity object

pFCREPLDBEngine GetDBEngine() { return (pFCREPLDBEngine)((pRCESPublication)this)->GetDBEngine(); };

Database entity object

pFCREPLDatabase GetDatabase() { return (pFCREPLDatabase)((pRCESPublication)this)->GetDatabase(); };



Inherited getters

Table 2. Inherited getters

Publication identfication

int GetID();

DBEngine identification

Note

This is linked to FCREPLDBEngine class.

int GetDBEngineID();

DBEngine

pRCESDBEngine GetDBEngine();

Database identification

Note

This is linked to FCREPLDatabase class.

int GetDatabaseID();

Database

pRCESDatabase GetDatabase();

Publication name

const char *GetName();

Publication description

const char *GetDescription();

Create new

bool GetCreateNew();

Delete old

bool GetDeleteOld();

Drop old

bool GetDropOld();



Setters

Table 3. Setters

DBEngine entity object

void SetDBEngine(pFCREPLDBEngine dbEngine) { ((pRCESPublication)this)->SetDBEngine((pRCESDBEngine)dbEngine); };

Database entity object

void SetDatabase(pFCREPLDatabase database) { ((pRCESPublication)this)->SetDatabase((pRCESDatabase)database); };

Publication name

void SetName(const char *name) { ((pRCESPublication)this)->SetName(name); };

Publication description

void SetDescription(const char *description) { ((pRCESPublication)this)->SetDescription(description); };

Publication root path

Note

This is used to calculate the path redirection.

void SetRootPath(const char *rootPath) { ((pRCESPublication)this)->SetRootPath(rootPath); };

Calculated volume name

void SetCalcVolumeName(const char *calcVolumeName) { ((pRCESPublication)this)->SetCalcVolumeName(calcVolumeName); };

Calculated root path

void SetCalcRootPath(const char *calcRootPath) { ((pRCESPublication)this)->SetCalcRootPath(calcRootPath); };



Inherited setters

Table 4. Inherited setters

Publication identification

void SetID(int id) ;

DBEngine identification

Note

This is linked to FCREPLDBEngine class.

void SetDBEngineID(int dbEngineID);

DBEngine

void SetDBEngine(pRCESDBEngine dbEngine);

Database identification

Note

This is linked to the FCREPLDatabase class.

void SetDatabaseID(int databaseID);

Database

void SetDatabase(pRCESDatabase database);

Name

void SetName(const char *name);

Descrption

void SetDescription(const char *description);

Create new

void SetCreateNew(bool createNew);

Delete old

void SetDeleteOld(bool deleteOld);

Drop old

void SetDropOld(bool dropOld);



Retrieve all the publication entity objects.

Prototype

FCREPL_API int fcReplGetPublications(pFCREPLConn replConn, int dbEngine, int publicationListSize, int publicationStart, ppFCREPLPublication *publicationList, int *publicationCount, int *totalPublications);

Parameters

Table 5. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

dbEngine [IN]

DBEngine Identification

publicationListSize [IN]

Publication list count to be retrieved

publicationStart [IN]

Publication list start record

publicationList [OUT]

Publication entity list

publicationCount [OUT]

Number of publication entities in the list

totalPublications [OUT]

Total number of publication entities



Return

Error code

Retrieve the publication list by name or partially filter by name.

Prototype

FCREPL_API int fcReplGetPublicationsByName(pFCREPLConn replConn, int dbEngine, const char *name, bool partial, int publicationListSize, int publicationStart, ppFCREPLPublication *publicationList, int *publicationCount, int *totalPublications);

Parameters

Table 6. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

dbEngine [IN]

DBEngine ID

name [IN]

Publication name

partial [IN]

Flag indicating that the search by name should use partial name

publicationListSize [IN]

Publication list count to be retrieved

publicationStart [IN]

Publication list start record

publicationList [OUT]

Publication entity list

publicationCount [OUT]

Number of publication entities in the list

totalPublications [OUT]

Total number of publication entities



Return

Error code

Retrieve the publication entity object by its ID.

Prototype

FCREPL_API int fcReplGetPublication(pFCREPLConn replConn, int publicationID, ppFCREPLPublication publication);

Parameters

Table 7. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

publicationID [IN]

Publication identification

publication [OUT]

Publication entity retrieved



Return

Error code

Add a publication entity to the database. If there already is a publication with the given ID, update the existing record.

Prototype

FCREPL_API int fcReplPersistPublication(pFCREPLConn replConn, pFCREPLPublication publication);

Parameters

Table 8. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

publication [IN]

Publication entity to be persisted



Return

Error code

Delete the publication by its ID.

Prototype

FCREPL_API int fcReplRemovePublication(pFCREPLConn replConn, int publicationID, bool recursive);

Parameters

Table 9. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

publicationID [IN]

Publication identification

recursive [IN]

Recursive flag



Return

Error code

Remove a list of files from a publication.

Prototype

FCREPL_API int fcReplRemoveFilesFromPublication(pFCREPLConn replConn, int publicationID, int *fileIDList, int fileCount);

Parameters

Table 10. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

publicationID [IN]

Existing publication identification

fileIDList [IN]

Existing file identification list

fileCount [IN]

Number of files to be removed



Return

Error code

Add a list of files to a group.

Prototype

FCREPL_API int fcReplAddFilesToPublication(pFCREPLConn replConn, int publicationID, int *fileIDList, int fileCount);

Parameters

Table 11. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

publicationID [IN]

Existing publication identification

fileIDList [IN]

Existing file identification list

fileCount [IN]

Number of files to be added



Return

Error code

Remove a list of files from a publication.

Prototype

FCREPL_API int fcReplRemoveFilesFromPublication(pFCREPLConn replConn, int publicationID, int *fileIDList, int fileCount);

Parameters

Table 12. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

publicationID [IN]

Existing publication identification

fileIDList [IN]

Existing file identification list

fileCount [IN]

Number of files to be removed



Return

Error code

Retrieve the next available default name for a publication.

Prototype

FCREPL_API int fcReplGetTempPubName(pFCREPLConn replConn, char *tempPubName);

Parameters

Table 13. Parameters

Parameter

Description

replConn [IN]

Replication connection handle

tempPubName [OUT]

Temporary publication name



Return

Error code