Washington DC Plumtree Training

bdg plans to offer a 5-day Plumtree Training Course in the Washington DC Metro Area starting on August 22nd. We’re combining our two most popular courses into one jam-packed week. The first three days will cover Plumtree Administration followed by two days of Portlet Development with the EDK. The course will be given in Herndon, VA about 10 minutes from Dulles Airport.

If you’re interested, you may download the complete syllabi from our Web site.

There are no pre-requisites for the Plumtree Administration course other than a basic understanding of Web applications. The Portlet Development course requires strong programming skills in either Java or .NET including Web programming concepts such as posting forms, retrieving parameters from the querystring and working with basic Javascript for form validation.

The price for this course is $500/day. You may attend the 3-day segment, the 2-day segment or the entire week.

There is a limit of 10 participants. You must sign up by Friday, August 12th and bdg must receive payment by Friday, August 19th. We now accept VISA/MC payments in addition to corporate checks and money orders.

To sign up, please send an e-mail to [email protected]. If you have any questions, please send us an e-mail or call us at 703 234 7910.

Plumtree RSS feeds of interest

If you like RSS and you like Plumtree, you might find the following links interesting:

This blog: http://feeds.feedburner.com/bdg/plumtree

Links related to Plumtree from del.icio.us: http://del.icio.us/rss/tag/plumtree

Plumtree’s Developer Feeds:

http://portal-img.plumtree.com/ptimages/rss/dev_additions_feed.xml
http://portal-img.plumtree.com/ptimages/rss/dev_articles_feed.xml
http://portal-img.plumtree.com/ptimages/rss/dev_samples_feed.xml
http://portal-img.plumtree.com/ptimages/rss/dev_docs_feed.xml
http://portal-img.plumtree.com/ptimages/rss/dev_releases_feed.xml
http://portal-img.plumtree.com/ptimages/rss/dev_events_feed.xml

And here’s one called “Code Sermon” that I’ve been listening to as a podcast. Even though it’s not related to Plumtree, it’s a good resource for software development best practices:

http://www.codesermon.org/portals/15/podcast.xml

Query filters explained, at last

I can’t even begin to count the number of times I’ve been asked how to write a query filter in Plumtree. Yesterday, I had to write one for myself and lo and behold, I was confused. I’ve come to the conclusion that they’re just hard to write. Despite this, they’re incredibly useful when trying to lookup objects in the Plumtree API.

(Note: this post does not apply to writing portlets or other integrations. It’s only useful when writing Pluggable Navigation, PEIs, or other customizations to the UI.)

To use a query filter, you’ll first need access to a Plumtree user’s session. Let’s assume that you have one in the variable plumtreeSession and that it’s already connected as a user who has at least read-level access to some objects. This query will work for any object, but just for the sake of example, let’s use Groups. Also, I wrote this in Java, but it works almost exactly the same way in C#.

First you need to get an IPTObjectManager as shown here:

IPTObjectManager groups = plumtreeSession.GetUserGroups();

Next, we’ll build up the query filter, which is always an Object[][].

Object[][] filter = new Object[3][1];
filter[0][0] = new Integer(PT_PROPIDS.PT_PROPID_NAME);
filter[1][0] = new Integer(PT_FILTEROPS.PT_FILTEROP_EQ_NOCASE);
filter[2][0] = "Everyone";

Let’s go through that line by line. First of all, why did I choose 3,1 for my array dimensions? All query filters are 2D arrays. The first dimension always has three items:

    1. The name of the property on which you’re filtering
    2. The operator (equals, less than, greater than, etc.)
    3. The value of the property you’re evaluating

Since it’s an Object[][], we can’t use primatives, so we must box our constants in Integer objects because the constants themselves are primatives.

When using the Query method that supports a query filter, you also need to specify an ordering attribute. You can only order ascending, but you can order by up to three properties which will be applied in the order they are put in the array, as shown below:

int[] orderBy = {PT_PROPIDS.PT_PROPID_NAME, PT_PROPIDS.PT_PROPID_OBJECTID};

In the code above, I’m asking to order first by name, then by object ID. (Since no two names can be the same in Plumtree, this dual ordering doesn’t really make much sense, but oh well.)

Now, finally, it’s time to run the query:

IPTQueryResult group = groups.Query(PT_PROPIDS.PT_PROPID_OBJECTID + PT_PROPIDS.PT_PROPID_NAME, -1, orderBy, 0, -1, filter);

Let’s break down those parameters one by one. The first, PT_PROPIDS.PT_PROPID_OBJECTID + PT_PROPIDS.PT_PROPID_NAME is a bitmask of properties you want to include in your results.

The second, -1, means query all folders in the admin directory. (If you want to restrict your query to a single folder (and all folders below it), use the folder id here. If you want to query down two distinct folder trees, you’ll need to run two queries.

The third, orderBy is your ordering attribute(s), explained above.

The fourth, 0 is your starting row.

The fifth, -1 is the number of rows to return (-1 means all rows). This parameter, along with the starting row, can be very useful for pagination.

The sixth and final parameter is your beloved query filter.

We did it! Now that wasn’t so bad, eh? Iterating through the results set is trivial, so I won’t cover it here, but if you have you have a question, feel free to make a comment here or post on the developer forums.

We’ve moved!

Effective immediately, bdg’s new place of business is located at 13800 Coppermine Road in Herndon, Virginia, just 10 minutes from Washington Dulles International Airport and in the heart of the Dulles Tech Corridor. You may now reach us at 703 234 7910.

If you’re in the area, arrange to pay us a visit by sending a note to [email protected].

bdg’s new hires and site changes

All of us at bdg are very pleased to welcome the newest members of our team: Rich Weinhold and Eric Bucchere.

Rich, our resident PHP and Plumtree guru, has made his claim to fame by developing the PHP EDK, which is now available for download on the Plumtree Code Share (requires a login and password) or by contacting bdg.

Eric, bdg’s Account Manager, serves as the main POC for all of our implementations, helping customers get their issues resolved quickly and efficiently.

We’ve updated the Web site to reflect these new additions and also made a few other changes, including adding a page about our committment to open source development, which has come to fruition with the release of the Plumtree PHP EDK 5.1.

Resources for running Plumtree on Oracle

Many of our customers run Plumtree on Oracle, for better or worse.

Despite it’s complexities and eccentricities, it’s been a good platform albeit not without it’s driver issues, configuration issues and other weirdnesses.

While doing some research on running Oracle over TCPS (TCP + SSL), I discovered two excellent Oracle resources in the blogosphere:

1. http://vanbortel.blogspot.com
2. http://tkyte.blogspot.com

Enjoy!

bdg launches the PHP EDK 5.1

I am very pleased to announce that on Friday, 8 July 2005, bdg released the PHP EDK 5.1 to the Plumtree Code Share. Largely due to a Herculean effort on the part of Rich Weinhold, our resident PHP and Plumtree Guru, we were able to take the com.plumtree.remote.portlet.* package from zero to released in just three weeks.

We are offering this code up for redistribution and use under the BSD License, which is the standard for the Plumtree Code Share.

In order to access the code (for now), you’ll need to create a login on portal.plumtree.com. We are currently considering other distribution methods, such as SourceForge, and we’ll make an announcement should we choose to go down that path.

We look forward to seeing some PHP portlets start to emerge for the Plumtree platform. If you’re interested in developing a PHP portlet for Plumtree, let us know — we’d love to hear from you.