Contentserv PHP API

CSMamVolumeMigration
in package

Defines a helper class for the MAM migration.

Provides utility methods to execute migration logic.

Tags
since

CS24.0

Table of Contents

ACTIVE_SCRIPT_FIELD_FINALIZE  = 'FinalizeMigration'
Defines the active script field name if the migration should be finalized.
ACTIVE_SCRIPT_NAME  = 'volumemigrationscript'
Defines the active script name, which executes the migration.
DATA_KEY_BATCH_COUNTER  = 'BatchCounter'
Defines the available data keys.
DATA_KEY_BATCH_SIZE  = 'BatchSize'
DATA_KEY_SOURCE_VOLUME_ID  = 'SourceVolumeID'
DATA_KEY_TARGET_VOLUME_ID  = 'TargetVolumeID'
MODULE_NAME  = 'mam'
Defines the module name of the migration.
SERVICE_KEY  = 'volumemigration'
Defines the rest service key of the migration.
SERVICE_METHOD_MIGRATE_FILES  = 'migrateFiles'
Defines the rest service method name to migrate files.
STATUS_TYPE_COPIED  = 1
STATUS_TYPE_DELETED  = 2
STATUS_TYPE_NONE  = 0
Defines the status types of the migration for each folder / file.
createTemporaryTables()  : void
Creates the temporary tables for the DAM migration.
createTemporaryTargetVolumes()  : bool
Creates the tempoorary target volumes to receive the target paths of the migration files.
deleteMigrationFile()  : bool
Deletes a migrated file.
deleteTemporaryFilesTableData()  : void
Deletes the data of the temporary files table for the given ids.
dropTemporaryTables()  : void
Drops the temporary tables of the DAM migration.
getFileCountForVolumes()  : int
Returns the file count for the given target volume ids.
getMigratedIds()  : array<string|int, mixed>
Returns the migrated ids.
getMigrationDriverFileForFolder()  : CSMamDriverFile
Returns the migration driver file for the given MAM file and target volume ID.
getMigrationDriverFiles()  : array<string|int, CSMamDriverFile>
Returns the migration driver files for the given MAM file and target volume ID:
getStatus()  : string
Returns the status of the migration.
getVolumeIds()  : array<string|int, mixed>
Returns the volume ids, which should be migrated.
getVolumeMapping()  : array<string|int, mixed>
Returns the volume mapping of the migrated volumes and the target volumes.
hasTemporaryTables()  : bool
Checks whether the temporary tables exist.
isAvailable()  : bool
Checks if the migration is available for the system.
migrateVolumes()  : bool
Migrates the original volumes and deletes the temporary volumes.
updateTemporaryFilesTableData()  : void
Updates the data of the temporary files table for the given ids and status.
updateTemporaryVolumesTableData()  : void
Updates the data of the temporary volumes table for the given source and target volume ID.

Constants

ACTIVE_SCRIPT_FIELD_FINALIZE

Defines the active script field name if the migration should be finalized.

public string ACTIVE_SCRIPT_FIELD_FINALIZE = 'FinalizeMigration'
Tags

ACTIVE_SCRIPT_NAME

Defines the active script name, which executes the migration.

public string ACTIVE_SCRIPT_NAME = 'volumemigrationscript'
Tags

DATA_KEY_BATCH_COUNTER

Defines the available data keys.

public string DATA_KEY_BATCH_COUNTER = 'BatchCounter'
Tags

DATA_KEY_SOURCE_VOLUME_ID

public mixed DATA_KEY_SOURCE_VOLUME_ID = 'SourceVolumeID'
Tags

DATA_KEY_TARGET_VOLUME_ID

public mixed DATA_KEY_TARGET_VOLUME_ID = 'TargetVolumeID'
Tags

MODULE_NAME

Defines the module name of the migration.

public string MODULE_NAME = 'mam'
Tags

SERVICE_KEY

Defines the rest service key of the migration.

public string SERVICE_KEY = 'volumemigration'
Tags

SERVICE_METHOD_MIGRATE_FILES

Defines the rest service method name to migrate files.

public string SERVICE_METHOD_MIGRATE_FILES = 'migrateFiles'
Tags

STATUS_TYPE_NONE

Defines the status types of the migration for each folder / file.

public int STATUS_TYPE_NONE = 0
Tags

Methods

createTemporaryTables()

Creates the temporary tables for the DAM migration.

public static createTemporaryTables() : void
Tags
Return values
void

createTemporaryTargetVolumes()

Creates the tempoorary target volumes to receive the target paths of the migration files.

public static createTemporaryTargetVolumes() : bool
Tags
Return values
bool

deleteMigrationFile()

Deletes a migrated file.

public static deleteMigrationFile(array<string|int, mixed> $aFileIdsToDelete[, bool $bCompleteDelete = false ][, string|null $sTargetFileName = null ][, string|null $sTargetFileType = null ][, int|null $iTargetParentId = null ]) : bool
Parameters
$aFileIdsToDelete : array<string|int, mixed>
$bCompleteDelete : bool = false
$sTargetFileName : string|null = null
$sTargetFileType : string|null = null
$iTargetParentId : int|null = null
Tags
Return values
bool

deleteTemporaryFilesTableData()

Deletes the data of the temporary files table for the given ids.

public static deleteTemporaryFilesTableData(array<string|int, mixed> $aIdsToDelete) : void
Parameters
$aIdsToDelete : array<string|int, mixed>
Tags
Return values
void

dropTemporaryTables()

Drops the temporary tables of the DAM migration.

public static dropTemporaryTables() : void
Tags
Return values
void

getFileCountForVolumes()

Returns the file count for the given target volume ids.

public static getFileCountForVolumes(array<string|int, mixed> $aTargetVolumeIds) : int
Parameters
$aTargetVolumeIds : array<string|int, mixed>
Tags
Return values
int

getMigratedIds()

Returns the migrated ids.

public static getMigratedIds(array<string|int, mixed> $aIdsToCheck[, int|null $iStatus = null ]) : array<string|int, mixed>
Parameters
$aIdsToCheck : array<string|int, mixed>
$iStatus : int|null = null
Tags
Return values
array<string|int, mixed>

getMigrationDriverFileForFolder()

Returns the migration driver file for the given MAM file and target volume ID.

public static getMigrationDriverFileForFolder(MamFile $oMamFile, int $iTargetVolumeId) : CSMamDriverFile
Parameters
$oMamFile : MamFile
$iTargetVolumeId : int
Tags
Return values
CSMamDriverFile

getMigrationDriverFiles()

Returns the migration driver files for the given MAM file and target volume ID:

public static getMigrationDriverFiles(MamFile $oMamFile, int $iTargetVolumeId) : array<string|int, CSMamDriverFile>
Parameters
$oMamFile : MamFile
$iTargetVolumeId : int
Tags
Return values
array<string|int, CSMamDriverFile>

getStatus()

Returns the status of the migration.

public static getStatus() : string

The method returns the status in following result: ({MigrationCount} / {TotalFileCount})

Tags
Return values
string

getVolumeIds()

Returns the volume ids, which should be migrated.

public static getVolumeIds() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

getVolumeMapping()

Returns the volume mapping of the migrated volumes and the target volumes.

public static getVolumeMapping() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

hasTemporaryTables()

Checks whether the temporary tables exist.

public static hasTemporaryTables() : bool
Tags
Return values
bool

isAvailable()

Checks if the migration is available for the system.

public static isAvailable() : bool
Tags
Return values
bool

migrateVolumes()

Migrates the original volumes and deletes the temporary volumes.

public static migrateVolumes() : bool
Tags
Return values
bool

updateTemporaryFilesTableData()

Updates the data of the temporary files table for the given ids and status.

public static updateTemporaryFilesTableData(array<string|int, mixed> $aIdsToUpdate, int $iStatus) : void
Parameters
$aIdsToUpdate : array<string|int, mixed>
$iStatus : int
Tags
Return values
void

updateTemporaryVolumesTableData()

Updates the data of the temporary volumes table for the given source and target volume ID.

public static updateTemporaryVolumesTableData(int $iSourceVolumeId, int $iTargetVolumeId) : void
Parameters
$iSourceVolumeId : int
$iTargetVolumeId : int
Tags
Return values
void

        

Search results