Interface IChangeTracker

Adds dirty tracking functionality between Sitecore Content Hub and the SDK. All members in this interface work with the original entity in Sitecore Content Hub to determine whether a member was dirty or not. This is independent from any dirty tracking in the SDK itself.

Namespace: StylelabsStylelabs.MStylelabs.M.ScriptingStylelabs.M.Scripting.TypesStylelabs.M.Scripting.Types.V1_0ChangeTracking
Assembly: Stylelabs.M.Scripting.Types.dll
Syntax
RequestResponse

public interface IChangeTracker

Properties

InheritsSecurity

Gets information about the InheritsSecurity on the entity.

Declaration
RequestResponse

ISystemPropertyTracker<bool?> InheritsSecurity { get; }
Property Value
TypeDescription
ISystemPropertyTrackerbool

IsPathRoot

Gets information about the IsPathRoot on the entity.

Declaration
RequestResponse

ISystemPropertyTracker<bool?> IsPathRoot { get; }
Property Value
TypeDescription
ISystemPropertyTrackerbool

IsRootTaxonomyItem

Gets information about the IsRootTaxonomyItem on the entity.

Declaration
RequestResponse

ISystemPropertyTracker<bool?> IsRootTaxonomyItem { get; }
Property Value
TypeDescription
ISystemPropertyTrackerbool

IsSystemOwned

Gets information about the IsSystemOwned on the entity.

Declaration
RequestResponse

ISystemPropertyTracker<bool?> IsSystemOwned { get; }
Property Value
TypeDescription
ISystemPropertyTrackerbool

Methods

GetChangeSet()

Creates a change set for the current entity.

Declaration
RequestResponse

EntityChangeSet GetChangeSet()
Returns
TypeDescription
EntityChangeSet

A change set.

GetDirtyProperties()

Determines all dirty properties and returns the matching SDK

RequestResponse
      <see cref="!:IEntity"></see>properties. Their values contain the
      current value.
    </p>
  </div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration" id="declaration-5">Declaration</h5>
  <div class="codewrapper">
    <pre class="shiki shiki-themes one-dark-pro one-dark-pro not-prose" style="background-color:#282c34;--shiki-dark-bg:#282c34;color:#abb2bf;--shiki-dark:#abb2bf" tabindex="0"><code><span class="line"></span>

IReadOnlyList<IProperty> GetDirtyProperties()

Returns
TypeDescription
IReadOnlyList<>IProperty

Dirty properties.

GetDirtyRelations()

Determines all dirty relations and returns the matching SDK

RequestResponse
      <see cref="!:IEntity"></see>relations. Their ids contain the
      current ids.
    </p>
  </div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration" id="declaration-6">Declaration</h5>
  <div class="codewrapper">
    <pre class="shiki shiki-themes one-dark-pro one-dark-pro not-prose" style="background-color:#282c34;--shiki-dark-bg:#282c34;color:#abb2bf;--shiki-dark:#abb2bf" tabindex="0"><code><span class="line"></span>

IReadOnlyList<IRelation> GetDirtyRelations()

Returns
TypeDescription
IReadOnlyList<>IRelation

Dirty relations.

GetNewIds(string, RelationRole?)

Gets the newly added ids on the relation. Returns an empty list if there are no new ids.

Declaration
RequestResponse

IReadOnlyList<long> GetNewIds(string relationName, RelationRole? role = null)
Parameters
TypeNameDescription
stringrelationName

Name of the relation (case-insensitive).

RelationRolerole

Role of the relation.

Returns
TypeDescription
IReadOnlyList<>long

A collection of ids.

GetOriginalPropertyValue<T>(string, CultureInfo)

Gets the original value of a property. T should preferably be nullable.

Declaration
RequestResponse

T GetOriginalPropertyValue<T>(string propertyName, CultureInfo culture)
Parameters
TypeNameDescription
stringpropertyName

Name of the property (case-insensitive).

CultureInfoculture

Culture to get the value in.

Returns
TypeDescription
T

The original value of the property. Returns default T when the property is not dirty.

Type Parameters
NameDescription
T

Type of the value. Should preferably be nullable.

GetOriginalPropertyValue<T>(string)

Gets the original value of a property. T should preferably be nullable.

Declaration
RequestResponse

T GetOriginalPropertyValue<T>(string propertyName)
Parameters
TypeNameDescription
stringpropertyName

Name of the property (case-insensitive).

Returns
TypeDescription
T

The original value of the property. Returns default T when the property is not dirty.

Type Parameters
NameDescription
T

Type of the value. Should preferably be nullable.

GetRemovedIds(string, RelationRole?)

Gets the removed ids from the relation. Returns an empty list if there are no ids removed.

Declaration
RequestResponse

IReadOnlyList<long> GetRemovedIds(string relationName, RelationRole? role = null)
Parameters
TypeNameDescription
stringrelationName

Name of the relation (case-insensitive).

RelationRolerole

Role of the relation.

Returns
TypeDescription
IReadOnlyList<>long

A collection of ids.

IsPropertyDirty(string)

Checks if the given property is dirty.

Declaration
RequestResponse

bool IsPropertyDirty(string propertyName)
Parameters
TypeNameDescription
stringpropertyName

Name of the property (case-insensitive).

Returns
TypeDescription
bool

Returns true if it is dirty.

IsRelationDirty(string, RelationRole?)

Checks if the given relation is dirty.

Declaration
RequestResponse

bool IsRelationDirty(string relationName, RelationRole? role = null)
Parameters
TypeNameDescription
stringrelationName

Name of the relation (case-insensitive).

RelationRolerole

Role of the relation.

Returns
TypeDescription
bool

Returns true if it is dirty.

Do you have some feedback for us?

If you have suggestions for improving this article,