Interface IChangeTracker

Current version: 3.4

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

      <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">
    <div data-rehype-pretty-code-fragment=""><pre data-language="shell" data-theme="default"><code data-language="shell" data-theme="default"><span class="line"><span style="color: #61AFEF">IReadOnlyList&#x3C;IProperty></span><span style="color: #ABB2BF"> </span><span style="color: #98C379">GetDirtyProperties</span><span style="color: #ABB2BF">()</span></span></code></pre></div>
  </div>
  <h5 class="returns" id="returns-1">Returns</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">IReadOnlyList&#x3C;></span><span class="xref">IProperty</span></td>
          <td>
            <p>Dirty properties.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div><a id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetDirtyRelations_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetDirtyRelations*"></a>
  <h4 id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetDirtyRelations" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetDirtyRelations">GetDirtyRelations()</h4>
  <div class="markdown level1 summary">
    <p>
      Determines all dirty relations and returns the matching SDK
      
      <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">
    <div data-rehype-pretty-code-fragment=""><pre data-language="shell" data-theme="default"><code data-language="shell" data-theme="default"><span class="line"><span style="color: #61AFEF">IReadOnlyList&#x3C;IRelation></span><span style="color: #ABB2BF"> </span><span style="color: #98C379">GetDirtyRelations</span><span style="color: #ABB2BF">()</span></span></code></pre></div>
  </div>
  <h5 class="returns" id="returns-2">Returns</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">IReadOnlyList&#x3C;></span><span class="xref">IRelation</span></td>
          <td>
            <p>Dirty relations.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div><a id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetNewIds_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetNewIds*"></a>
  <h4 id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetNewIds_System_String_System_Nullable_RelationRole__" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetNewIds(System.String,System.Nullable{RelationRole})">GetNewIds(string, RelationRole?)</h4>
  <div class="markdown level1 summary">
    <p>
      Gets the newly added ids on the relation. Returns an empty list if
      there are no new ids.
    </p>
  </div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration" id="declaration-7">Declaration</h5>
  <div class="codewrapper">
    <div data-rehype-pretty-code-fragment=""><pre data-language="shell" data-theme="default"><code data-language="shell" data-theme="default"><span class="line"><span style="color: #61AFEF">IReadOnlyList&#x3C;long></span><span style="color: #ABB2BF"> </span><span style="color: #98C379">GetNewIds</span><span style="color: #ABB2BF">(</span><span style="color: #61AFEF">string</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">relationName,</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">RelationRole?</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">role</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">=</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">null</span><span style="color: #ABB2BF">)</span></span></code></pre></div>
  </div>
  <h5 class="parameters" id="parameters">Parameters</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Name</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">string</span></td>
          <td><span class="parametername">relationName</span></td>
          <td>
            <p>Name of the relation (case-insensitive).</p>
          </td>
        </tr>
        <tr>
          <td><span class="xref">RelationRole</span></td>
          <td><span class="parametername">role</span></td>
          <td>
            <p>Role of the relation.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <h5 class="returns" id="returns-3">Returns</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">IReadOnlyList&#x3C;></span><span class="xref">long</span></td>
          <td>
            <p>A collection of ids.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div><a id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetOriginalPropertyValue_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetOriginalPropertyValue*"></a>
  <h4 id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetOriginalPropertyValue__1_System_String_CultureInfo_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetOriginalPropertyValue&#x60;&#x60;1(System.String,CultureInfo)">GetOriginalPropertyValue&#x3C;T>(string, CultureInfo)</h4>
  <div class="markdown level1 summary">
    <p>Gets the original value of a 
      <see cref="!:ICultureSensitiveProperty"></see>property. <code data-dev-comment-type="typeparamref" class="typeparamref">T</code> should preferably be nullable.
    </p>
  </div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration" id="declaration-8">Declaration</h5>
  <div class="codewrapper">
    <div data-rehype-pretty-code-fragment=""><pre data-language="shell" data-theme="default"><code data-language="shell" data-theme="default"><span class="line"><span style="color: #61AFEF">T</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">GetOriginalPropertyValue</span><span style="color: #ABB2BF">&#x3C;T</span><span style="color: #98C379">>(</span><span style="color: #61AFEF">string</span><span style="color: #98C379"> propertyName, CultureInfo culture)</span></span></code></pre></div>
  </div>
  <h5 class="parameters" id="parameters-1">Parameters</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Name</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">string</span></td>
          <td><span class="parametername">propertyName</span></td>
          <td>
            <p>Name of the property (case-insensitive).</p>
          </td>
        </tr>
        <tr>
          <td><span class="xref">CultureInfo</span></td>
          <td><span class="parametername">culture</span></td>
          <td>
            <p>Culture to get the value in.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <h5 class="returns" id="returns-4">Returns</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">T</span></td>
          <td>
            <p>The original value of the property. Returns default <code data-dev-comment-type="typeparamref" class="typeparamref">T</code> when the property is not dirty.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <h5 class="typeParameters" id="type-parameters">Type Parameters</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Name</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="parametername">T</span></td>
          <td>
            <p>Type of the value. Should preferably be nullable.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div><a id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetOriginalPropertyValue_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetOriginalPropertyValue*"></a>
  <h4 id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetOriginalPropertyValue__1_System_String_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetOriginalPropertyValue&#x60;&#x60;1(System.String)">GetOriginalPropertyValue&#x3C;T>(string)</h4>
  <div class="markdown level1 summary">
    <p>Gets the original value of a 
      <see cref="!:ICultureInsensitiveProperty"></see>property. <code data-dev-comment-type="typeparamref" class="typeparamref">T</code> should preferably be nullable.
    </p>
  </div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration" id="declaration-9">Declaration</h5>
  <div class="codewrapper">
    <div data-rehype-pretty-code-fragment=""><pre data-language="shell" data-theme="default"><code data-language="shell" data-theme="default"><span class="line"><span style="color: #61AFEF">T</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">GetOriginalPropertyValue</span><span style="color: #ABB2BF">&#x3C;T</span><span style="color: #98C379">>(</span><span style="color: #61AFEF">string</span><span style="color: #98C379"> propertyName)</span></span></code></pre></div>
  </div>
  <h5 class="parameters" id="parameters-2">Parameters</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Name</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">string</span></td>
          <td><span class="parametername">propertyName</span></td>
          <td>
            <p>Name of the property (case-insensitive).</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <h5 class="returns" id="returns-5">Returns</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">T</span></td>
          <td>
            <p>The original value of the property. Returns default <code data-dev-comment-type="typeparamref" class="typeparamref">T</code> when the property is not dirty.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <h5 class="typeParameters" id="type-parameters-1">Type Parameters</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Name</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="parametername">T</span></td>
          <td>
            <p>Type of the value. Should preferably be nullable.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div><a id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetRemovedIds_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetRemovedIds*"></a>
  <h4 id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_GetRemovedIds_System_String_System_Nullable_RelationRole__" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.GetRemovedIds(System.String,System.Nullable{RelationRole})">GetRemovedIds(string, RelationRole?)</h4>
  <div class="markdown level1 summary">
    <p>
      Gets the removed ids from the relation. Returns an empty list if
      there are no ids removed.
    </p>
  </div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration" id="declaration-10">Declaration</h5>
  <div class="codewrapper">
    <div data-rehype-pretty-code-fragment=""><pre data-language="shell" data-theme="default"><code data-language="shell" data-theme="default"><span class="line"><span style="color: #61AFEF">IReadOnlyList&#x3C;long></span><span style="color: #ABB2BF"> </span><span style="color: #98C379">GetRemovedIds</span><span style="color: #ABB2BF">(</span><span style="color: #61AFEF">string</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">relationName,</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">RelationRole?</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">role</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">=</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">null</span><span style="color: #ABB2BF">)</span></span></code></pre></div>
  </div>
  <h5 class="parameters" id="parameters-3">Parameters</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Name</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">string</span></td>
          <td><span class="parametername">relationName</span></td>
          <td>
            <p>Name of the relation (case-insensitive).</p>
          </td>
        </tr>
        <tr>
          <td><span class="xref">RelationRole</span></td>
          <td><span class="parametername">role</span></td>
          <td>
            <p>Role of the relation.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <h5 class="returns" id="returns-6">Returns</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">IReadOnlyList&#x3C;></span><span class="xref">long</span></td>
          <td>
            <p>A collection of ids.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div><a id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_IsPropertyDirty_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.IsPropertyDirty*"></a>
  <h4 id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_IsPropertyDirty_System_String_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.IsPropertyDirty(System.String)">IsPropertyDirty(string)</h4>
  <div class="markdown level1 summary">
    <p>Checks if the given property is dirty.</p>
  </div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration" id="declaration-11">Declaration</h5>
  <div class="codewrapper">
    <div data-rehype-pretty-code-fragment=""><pre data-language="shell" data-theme="default"><code data-language="shell" data-theme="default"><span class="line"><span style="color: #61AFEF">bool</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">IsPropertyDirty</span><span style="color: #ABB2BF">(</span><span style="color: #61AFEF">string</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">propertyName</span><span style="color: #ABB2BF">)</span></span></code></pre></div>
  </div>
  <h5 class="parameters" id="parameters-4">Parameters</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Name</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">string</span></td>
          <td><span class="parametername">propertyName</span></td>
          <td>
            <p>Name of the property (case-insensitive).</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <h5 class="returns" id="returns-7">Returns</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">bool</span></td>
          <td>
            <p>Returns <span class="xref">true</span> if it is dirty.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div><a id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_IsRelationDirty_" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.IsRelationDirty*"></a>
  <h4 id="Stylelabs_M_Scripting_Types_V1_0_ChangeTracking_IChangeTracker_IsRelationDirty_System_String_System_Nullable_RelationRole__" data-uid="Stylelabs.M.Scripting.Types.V1_0.ChangeTracking.IChangeTracker.IsRelationDirty(System.String,System.Nullable{RelationRole})">IsRelationDirty(string, RelationRole?)</h4>
  <div class="markdown level1 summary">
    <p>Checks if the given relation is dirty.</p>
  </div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration" id="declaration-12">Declaration</h5>
  <div class="codewrapper">
    <div data-rehype-pretty-code-fragment=""><pre data-language="shell" data-theme="default"><code data-language="shell" data-theme="default"><span class="line"><span style="color: #61AFEF">bool</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">IsRelationDirty</span><span style="color: #ABB2BF">(</span><span style="color: #61AFEF">string</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">relationName,</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">RelationRole?</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">role</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">=</span><span style="color: #ABB2BF"> </span><span style="color: #98C379">null</span><span style="color: #ABB2BF">)</span></span></code></pre></div>
  </div>
  <h5 class="parameters" id="parameters-5">Parameters</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Name</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">string</span></td>
          <td><span class="parametername">relationName</span></td>
          <td>
            <p>Name of the relation (case-insensitive).</p>
          </td>
        </tr>
        <tr>
          <td><span class="xref">RelationRole</span></td>
          <td><span class="parametername">role</span></td>
          <td>
            <p>Role of the relation.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <h5 class="returns" id="returns-8">Returns</h5>
  <div class="informaltable table-responsive">
    <table class="table table-bordered table-striped table-condensed informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th>Type</th>
          <th>Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td><span class="xref">bool</span></td>
          <td>
            <p>Returns <span class="xref">true</span> if it is dirty.</p>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</section>
<div class="footer-content">
  <div class="glossary-definitions"></div>
</div>
<footer></footer>

Do you have some feedback for us?

If you have suggestions for improving this article,