Does PublishTransactionsFilter exist on Tridion versions before 2011? - tridion

I am trying to use Alex Klock's solution with regards to querying the publishingqueue to see if in item is already still in it. His post about it is here: http://www.codedweapon.com/2012/03/tridion-publishengine/
I am using Tridion 2009 SP1, but it seems I don't have PublishTransactionsFilter available in my code abse. In the top of my file I did include: using Tridion.Contentmanager.Publishing;
Any exmaple on how to get something similar to work in Tridion 2009? Especially the PublishEngine.GetPublishTransactions method. I can't find a similar method in the 2009 API. Only methods which need a specific TCMUri or XML.

You will need to use the ManagementInfo Class which is documented in the 'Templating and Customization Manual TOM 2009 SP1.chm' help file that comes SDL Tridion 2009.
To quote:
The ManagementInfo object supports the following methods:
GetListPublishQueue Gets a list of items in the publishing queue(s) or
scheduler. GetListPublishTransactions Gets a list of publish
transactions
GetListPublishQueue:
Summary - Gets a list of items in the publishing
queue(s) or scheduler.
These classes and methods are contained in the COM version of the TOM DLL so you will need to use Interop to access this from Microsoft.NET

Yes you found it yourself but indeed just to confirm, the GetPublishTransactions method is specific to SDL Tridion 2011.
The code on the link you provided is using the 2011 API of looking into the queue.

Related

Tridion 2011 SP1 HR1 - which extension to use?

We have a requirement that on a page publish, we need to:
Find a component presentation that has a component based upon a particular schema.
Extract certain field vales from that component and store them in a custom database table that's available to our .NET application (on the Content Delivery side).
I think this is a good candidate for either a Deployer extension or a Storage extension - but I'm a little unclear which and why having never written either?
I've ruled out the Event System as this kind of code would be located on the CM, which seems like the wrong "side" to me - my focus is on extending what happens on the CD-side after a page is published.
Read a few articles on Tridion World (this, this, this and this) and I think a storage extension would be the better choice?
Mihai's article seems to be very close to what we need, where he uses a new item type mapping:
<ItemTypes defaultStorageId="brokerdb" cached="true">
<Item typeMapping="PublishAction" cached="false" storageId="searchdb" /></ItemTypes>
But how does Tridion "know" to use this new item type when content is published, (its not one of the defined TYPE_NAMEs, which is kind of the point)?
I should clarify I'm a .NET/C# dev not a Java dev so this is probably really obvious to Java people - apologies if it is!
Cheers
Tridion will not know by default how to deploy your new entity. My advise is to create a Deployer Module (your links should give you enough information about how you can do that) that executes in post-processing phase (of the deployment process), that processes all components from the deployment/transport package, extracts the needed information and uses a custom Storage Extension to store the needed information.
Be careful: you need to set-up in config your new type but you also need to use it yourself from that Deployer Module.
Hope this helps.

Tridion 2011 - Publish Unpublish while writing custom resolver

Needed to understand your inputs on: Is there a way in Tridion 2011 to Publish or Unpublish components/pages/templates in a custom resolver code. I understand we can play with the list of resolved items. (By giving a CP,etc). But is there a way to push an item in the publishing Q from a custom resolver code.
You can add or remove any number of items to be part of the existing package / transaction.
If you want it to be part of a new entry in the Publishing Queue instead, the event system seems more appropriate than a resolver. But the items you are publishing automatically won't show up in the "Items to Publish" screen if you Publish them separately, so you need to decide if that's a good thing or not.
Peter (and Nuno) have really answered your question in the best way. You should use a resolver to add the Pages or Component Presentations to the package rather than making new publish transactions. However you can publish items using the core service, so there is no reason you could not call the core service from a resolver and initiate your new publish actions that way.
However it does not sound like a good idea, perhaps you can update you question to explain why you need to do this.
I used to use the PublishEngine object in my templates to add items to the Publish Queue (see http://www.tridiondeveloper.com/the-story-of-sdl-tridion-2011-custom-resolver-and-the-allowwriteoperationsintemplates-attribute), but custom resolvers and other techniques are far superior.

Tridion UI 2012 -Error 424 occurred while rendering the page Object required: 'SiteEdit

One of my application was upgraded from SiteEdit 1.3 SP2 to SiteEdit 2009.Now i am upgrading it again to Tridion UI 2012. I restored both the DLL's cm_SiteEdit.dll and cc_SiteEdit2.dll.
In code inside the templates,objects "SiteEdit" and "SiteEdit2" are accessibly used.Object "SiteEdit2" is initialized properly and object "SiteEdit" is throwing below error -
Error 424 occurred while rendering the page Object required:
'SiteEdit'.
Is it possible to go with this implementation to save the development efforts ? if yes , please help to resolve the issue. otherwise your valuable suggestions/inputs would be most welcomed.
This error is typically thrown because you haven't registered "SiteEdit" as a Script Extension in the SDL Tridion Content Manager configuration. From your description, I gather that it should point to the 1.3 script extension.
Once you do, be sure to restart the Tridion COM+ package for the change to take effect.
Peter has already answered your question still I would like to recommend not to use old SiteEdit object. You should update the template code as per Tridion UI 2012.

Tridion 2011 Core Service: How can I delete previous versions of a component?

I would like to use the Core Service to delete previous versions of a component, only keeping the most recent version. How can I do that?
The documentation says about the Delete method:
"Permanently deletes the item or a specific version of the item from the system"
So you can delete versions by passing in the uri of the version (e.g. tcm:2-123-64-v4).
Tridion ships by default with a tool called "Purge Tool" that you can use for this purpose.
You can find more info on the online documentation
There is a visual interface, but also if you have business requirements to do this programmatically, or as a scheduled task, it also provides a command line interface.

How to Get attachments Associated with artifacts in SourceForge Enterprise Edition

We are using SourceForge Enterprise Edition 4.4 in one of our project.
My question is, in CollabNet SFEE (SourceForge Enterprise Edition 4.4), how will we get attachments associated with an Artifacts Using SFEE SOAP API?
We have made our own .net 2.0 client. We are not using .net SDK provided by Collabnet,
If you commit with a message you can add "[artf1000]" (where artf1000 is your artifact number) to the beginning or end of your commit message. Then it will associate to that artifact you can also do this with documents using doc1000, to get the id of the item you can use the URL it is what is after the http://sfeeserver/sf/go/.
Documents and artifacts are the only item I have used this for so I am not sure about other types of links, but I would imagine anything that has a /go/ID could be referenced by the ID.
ie:
http://sfeeserver/sf/go/artf1000
http://sfeeserver/sf/go/doc1000
Edited to add:
I have seemingly successfully tried this with releases, tasks, and discussions as well.
You can cheat a little bit and have a look at the scripts from SFEE. Log into your SFEE via SSH and take a look at the following script:
/usr/local/sourceforge/sourceforge_home/integration/post-commit.py
Maybe it helps...

Resources