forked from Jumoo/uSyncMigrations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ISyncPropertyMigrator.cs
43 lines (32 loc) · 1.58 KB
/
ISyncPropertyMigrator.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Composing;
using uSync.Migrations.Migrators.Models;
using uSync.Migrations.Models;
namespace uSync.Migrations.Migrators;
public interface ISyncPropertyMigrator : IDiscoverable
{
string[] Editors { get; }
public string GetEditorAlias(SyncMigrationDataTypeProperty dataTypeProperty, SyncMigrationContext context);
public string GetDatabaseType(SyncMigrationDataTypeProperty dataTypeProperty, SyncMigrationContext context);
public object GetConfigValues(SyncMigrationDataTypeProperty dataTypeProperty, SyncMigrationContext context);
public string GetContentValue(SyncMigrationContentProperty contentProperty, SyncMigrationContext context);
}
/// <summary>
/// interface to impliment if you want to completly replace a datatype with something else ?
/// </summary>
/// <remarks>
/// if you impliment this then the migrator will not migrate the datatype, but it will
/// use the replacement info suppled to make sure all contenttypes and content use the
/// replacement datatype.
/// </remarks>
public interface ISyncReplacablePropertyMigrator : ISyncPropertyMigrator
{
public ReplacementDataTypeInfo? GetReplacementEditorId(SyncMigrationDataTypeProperty dataTypeProperty, SyncMigrationContext context);
}
/// <summary>
/// interface to impliment if your property splits up a single value into varied (e.g cultured) values
/// </summary>
public interface ISyncVariationPropertyMigrator
{
public Attempt<CulturedPropertyValue> GetVariedElements(SyncMigrationContentProperty contentProperty, SyncMigrationContext context);
}