understanding how to expose additional java classes and documentation

Hi,

I am trying to figure out what content type a piece of content is using, but in doing so I have come across an array of additional tools in the PSO tool kit.

Is there any documentation on the PSO toolkit other than what is provided? There is a few holes in the current documentation. For example:

$user.psoRelationships.getRelationships(itemId,contenttypename,userName)

What is itemId, contenttypename and userName expecting.

I am assuming that itemId is the contentid? If I could get the contenttypename that would solve all my problems and I would not have to try and use this, so how do I get it, and what userName is it expecting? :confused::confused:

Also, when reading the documentation there seems to be other methods/classes which would be really useful. How do we expose these for use in Rhythmyx? :o

Thanks

Georgina

Georgina,

The PSO Toolkit comes with some JavaDoc (HTML) files. These contain more detail than the annotations that you see in the workbench.

The Server also has public javadoc. You can find this on your server:

http://<server>:<port>/Rhythmyx/Docs/Rhythmyx/Javadocs/index.html

I hope this helps.

Dave

Hi Dave,

Thanks for the reply. We did not know about that documentation. I think it would be useful if the PSO documentation had a few more examples of code if possible.

Can you tell me how to find out what content type a piece of content is so I can use it in one of the PSO commands?

Thanks

Georgina

How to find the content type name is discussed here:

You might also want to read my API Recommendations document:

Hi Dave,

Thanks, those are useful, although I don’t seem to be able to get this to work…

$user.PSOObjectFinder.getContentTypeSummary($sys.item.getGuid())

Am I being dumb? Could you give me an example code snippet so I can make sure I am not missing something please?

FYI: we have 6.5.2 and PSOToolKit installed.

Thanks

Georgina

Georgina,

No, you can’t do it that way. The getContentTypeSummary() method requires a Content Type GUID not a Content Item GUID.

The best way to get the Content Type GUID is to load the PSComponentSummary first:


$user.PSOObjectFinder.getComponentSummary($sys.item.getGuid()).getContentTypeGUID()

If all you need is the content type name, then you don’t really need to do this at all.

The name is available as $sys.item.definition.name.

Hi Dave,

Great thanks. That solved it.

Is there a list of these (e.g. $sys.item.definition.name) somewhere?

Thanks

Georgina

There’s a list of the basic properties in the Rhythmyx Implementation Guide (look for “System Variables” on page 410). It lists each of the variables in $sys, and gives their “type”.

You have to look up the type in the JavaDoc (either the Rhythmyx javadoc for com.percussion classes, or the general Sun javadoc for other classes).

If there is a method named “getDefinition()” in the javadoc, you can access it in JEXL / Velocity as either “xyz.definition” or “xyz.getDefinition()”. The two expressions are exactly equivalent.

I realize that there’s some confusion out there, and I hope this helps.

Dave

Hi David,

Yes that helps thanks.

It would be good if there were code snippets in this documentation, but this listing helps all the same.

Thanks

Georgina