EntityDuplicatorService
EntityDuplicatorService
This service is used to duplicate entities using one of the configured EntityDuplicator functions.
Signature
class EntityDuplicatorService {
constructor(configService: ConfigService, configArgService: ConfigArgService, connection: TransactionalConnection)
getEntityDuplicators(ctx: RequestContext) => EntityDuplicatorDefinition[];
duplicateEntity(ctx: RequestContext, input: DuplicateEntityInput) => Promise<DuplicateEntityResult>;
}
constructor
method
(configService: ConfigService, configArgService: ConfigArgService, connection: TransactionalConnection) => EntityDuplicatorService
getEntityDuplicators
method
(ctx: RequestContext) => EntityDuplicatorDefinition[]
Returns all configured EntityDuplicator definitions.
duplicateEntity
method
(ctx: RequestContext, input: DuplicateEntityInput) => Promise<DuplicateEntityResult>
Duplicates an entity using the specified EntityDuplicator. The duplication is performed within a transaction, so if an error occurs, the transaction will be rolled back.