Documentation Center

TOM.NET API delta compared to SDL Tridion 2013 SP1

Compared to SDL Tridion 2013 SP1 HR1, the API has changed slightly.

  • Compatiblity break: Previously, if a Publication contained published items, the method Publication.Delete would throw an ItemIsInUseException, with an error code of TcmErrorCode.ItemIsPublished. Now, the exceptions thrown is InvalidActionException and the error code is TcmErrorCode.ItemHasPublishedItems.

  • SaveEventArgs has new properties:
    DetectedChanges
    Gets a list of item properties that changed since the last read operation from the database.
    ApprovalStatusResetOverride
    Gets or sets the reset value of the Approval Status, either Unapproved or Undefined. This property exists to cover the use case where an item was previously configured to go through workflow, but now not anymore (that is, it no longer has a Workflow Process Association). In this case, it must be possible to reset its Approval Status to Undefined rather than to Unapproved, to keep it publishable.
  • To improve measuring and troubleshooting your publish actions, the PublishTransaction class has the following new properties:
    • TotalExecutionTime
    • ResolvingTime
    • RenderingTime
  • Implementers can now use the GetPublishUrl method in the Publication, StructureGroup and Page classes to retrieve the full URL, rather than a URL relative to the server, of the published item, provided that they specify the Target Type or Purpose to which the item was published.

  • The Target property of SetPublishStateEventArgs, referring to the Publication Target, has been made read-only because changing the Publication Target in this class does not serve any purpose and can only lead to incorrect data about where the item was published.

  • The Actions enumeration in the Tridion.ContentManager namespace is now deprecated, because it had no more room for the new Demote and Promote enumeration values. In the Actions enumeration, those actions will now result in the enumeration value UnknownByClient. SDL recommends that you use the new TcmAction enumeration in the same namespace, which does cover all actions in its enumeration values.

  • A number of Content Manager lists returned by an API call now contain not only a user name but also a user description.

  • The ActivityState enumeration has a new value, Waiting for Workflow Agent.

  • The PublishTransactionState enumeration has a new value, Waiting for CD environment.

  • In the Tridion.ContenManager.Extensibility.Events namespace, the new release adds the GetListEventArgs class. By hooking into list events, you can:
    • Remove list items
    • Extend list data
    • Modify list data

    Such actions could be part of a GUI extension to the product.

    The following example shows an event handler that removes any Multimedia Component from a list that has the ECL Multimedia Type:
    void SuppressEclStubs(IdentifiableObject subject, GetListEventArgs eventArgs, EventPhases eventPhase)
    {
      IList<IdentifiableObject> listItems = eventArgs.ListItems;
      foreach (Component mmComp in listItems.OfType(Component).Where(c => c.BinaryContent != null))
      {
        if (mmComp.BinaryContent.MultimediaType == EclMultimediaType)
        {
          listItems.Remove(mmComp);
        }
      }
    }
    And this other example shows an event handler that sets custom properties that are part of an extension:
    void AddCustomProperties(TargetGroup subject, LoadEventArgs eventArgs, EventPhases event Phase)
    {
      subject.ExtensionProperties["MyOrg.CustProp1"] = "CustVal1";
      subject.ExtensionProperties["MyOrg.CustProp2"] = "CustVal2";
    }
  • A new LoadApplicationDataForSubjects method allows for bulk application data loading. The method helps to improve performance by lowering the amount of roundtrips to TOM.NET that need to be performed by the Core Service's ReadApplicationDataForSubjectIds method, which previously made individual LoadApplicationData calls.