当前位置: 动力学知识库 > 问答 > 编程问答 >

Upgrade Tridion events from TOM to TOM.NET

问题描述:

Is there any guidance or documentation for which classes in TOM.NET replace the functionality in the legacy COM API for Tridion?

I'm having trouble finding the entry point corresponding to TDSE.

网友答案:

The closest class you have to the good old TDSE is the Session class, which exposes most (if not all) of the "system-level" methods and properties (like current User, WorkflowManager, etc).

In Event Systems you get a session as part of the Subject - all classes derived from IdentifiableObject expose a Session property - and this Session will be running under the identity of the user that caused the event to be triggered. In TOM/COM days, this was not always the case, and very often you had to call .Impersonate in your code to act as the current user. With TOM.NET this is not required anymore, as long as you use the correct session.

Good luck with your upgrade, the new Event System engine is worlds apart from the old one, there really is no turning back.

网友答案:

The TDSE object does not really exist in TOM.NET. The closest object you have is the Session class, although you may not need it as you will receive the target object as the subject parameter of your handler. Try reading this article by Bart:

https://sdltridionworld.com/articles/sdltridion2011/sdltridion2011eventsystem.aspx

The article has a good overview on setting up the event handlers, and a link to a matrix document mapping old COM driven TOM based event systems to the new methodology of the new TOM.NET based event handlers.

网友答案:

Have a look at Rob Curlette's post about performing an upgrade to 2011. It discusses the upgrade of the event system: http://www.curlette.com/?p=90

Bart has also provided a table that maps old events to new ones: http://sdltridionworld.com/images/event_matrix_tcm89-18738.pdf

Hope this helps get you started!

分享给朋友:
您可能感兴趣的文章:
随机阅读: