Interface ConfigTransform
- All Known Implementing Classes:
AddCustomerActionConfigTransform,AddWorklogActionConfigTransform,AssignConfigTransform,CommentActionConfigTransform,CreateServiceDeskRequestConfigTransform,FieldChangedTriggerConfigTransform,HipChatNotificationActionConfigTransform,IssueActionConfigTransformer,IssueConditionConfigTransform,LinkIssueActionConfigTransform,ManageWatchersActionConfigTransform,MicrosoftTeamsNotificationActionConfigTransform,OutgoingEmailActionConfigTransform,OutgoingWebhookActionConfigTransform,SetEntityPropertyActionConfigTransform,SlackNotificationActionConfigTransform,StrideNotificationActionConfigTransform,TransitionActionConfigTransform,TwilioNotificationActionConfigTransform,UserConditionConfigTransform
public interface ConfigTransform
-
Method Summary
Modifier and TypeMethodDescriptiondefault ComponentMigrationResultmigrateData(TenantContext tenantContext, ComponentMigrationValidation migrationValidation, com.codebarrel.automation.api.config.ComponentConfigBean componentBean) Applies data migrations to the component based on the changes in theMigrationContext.transformSchema(int schemaVersion, String rawJSON, TenantActor tenantActor) Applies any outstanding schema changes to the componentdefault ComponentMigrationValidationvalidateMigration(TenantContext tenantContext, MigrationContext migrationContext, com.codebarrel.automation.api.config.ComponentConfigBean componentBean) Validates a migration on the provided component
-
Method Details
-
transformSchema
Applies any outstanding schema changes to the component- Parameters:
schemaVersion- current version of the schemarawJSON- current JSON of the componenttenantActor- Tenant actor- Returns:
- transformed schema or rawJSON if no changes applied
-
validateMigration
default ComponentMigrationValidation validateMigration(TenantContext tenantContext, MigrationContext migrationContext, com.codebarrel.automation.api.config.ComponentConfigBean componentBean) Validates a migration on the provided component- Parameters:
tenantContext- Tenant ContextmigrationContext- details of the current data migrationcomponentBean- component to check if it will be affected by the migration- Returns:
ComponentMigrationValidationindicating whether the component will be affected and, if so, how
-
migrateData
default ComponentMigrationResult migrateData(TenantContext tenantContext, ComponentMigrationValidation migrationValidation, com.codebarrel.automation.api.config.ComponentConfigBean componentBean) Applies data migrations to the component based on the changes in theMigrationContext. This method will only be called with a validation that has changes.- Parameters:
tenantContext- Tenant ContextmigrationValidation- details of the migrationcomponentBean- component to migrate- Returns:
ComponentMigrationResultindicating if any migration took place and the migrated component
-