<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Jivespace Community Blog</title>
    <link>http://www.jivesoftware.com/jivespace/blogs/jivespace</link>
    <description>Jivespace Developer Community Blog</description>
    <pubDate>Mon, 07 Jul 2008 16:43:25 GMT</pubDate>
    <generator>Clearspace 2.5.3 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2008-07-07T16:43:25Z</dc:date>
    <item>
      <title>Customization Part 7: Using the Clearspace API</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/16/customization-part-7-using-the-clearspace-api</link>
      <description>&lt;!-- [DocumentBodyStart:09b0f58b-db0a-462c-a108-3730dd18c562] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;This post is the seventh and final post in a series of blog posts about customizing for Clearspace 2.x. The previous posts covered:&lt;/p&gt;&lt;ol&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/24/customizations-in-clearspace-2x-part-one/"&gt;Customizations in Clearspace 2.x&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/26/customization-part-2-upgrading-themes-and-ftl-files/"&gt;Upgrading Themes and FTL Files&lt;/a&gt;. &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/30/customization-part-3-widgets"&gt;Widgets in Clearspace 2.x&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/07/03/customization-part-4-macros"&gt;Macros for Clearspace 2.0&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/07/07/customization-part-5-web-services"&gt;Web Services&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/07/11/customization-part-6-custom-authentication-and-user-data-providers"&gt;Custom Authentication and User Data Providers&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Some of the most important changes in version 2 of Clearspace required that the underlying API be changed. To get things working on version 2, you'll need to change not only references to these in your Java classes, but also references to them in your FreeMarker templates.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The following describes the most significant changes.&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Inject Dependencies with Spring &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Work with Containers for Projects and Spaces/Communities &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Use Transaction Support When Updating Multiple Tables &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Use Manager Interfaces to Work with Managed Things &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Handle Content As XML &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Other API Changes &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Inject Dependencies With Spring&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;For version 2, the Clearspace codebase was refactored to support &lt;a class="jive-link-external-small" href="http://en.wikipedia.org/wiki/Spring_Framework"&gt;Spring&lt;/a&gt;, a framework with modules for inversion of control, transaction management, authentication, and more. This has potentially the biggest impact on your code because components that extend Clearspace must use the same conventions in order to interact reliably with Clearspace. For example, as described below, dependency injection replaces version 1 conventions for using JiveContext and factory classes to get manager instances.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://en.wikipedia.org/wiki/Dependency_Injection"&gt;Dependency injection&lt;/a&gt; is a way to obtain a dependency, such as an object on which your code relies, by having the instance "injected" at run time&amp;nbsp; -- that is, the instance is set with a JavaBeans-style accessor method. In Clearspace code, manager class instances are generally now injected rather than obtained via a context or factory class method.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A class that supports injection includes a class-level ++ variable for holding the instance it depends on and provides a set* accessor method through which Spring can inject the instance (in other words, your code provides a property of the interface's type). Your setter implementation assigns the injected instance to the variable, which your code can then use to access the instance. By specifying the &lt;em&gt;interface&lt;/em&gt; on which your code depends&amp;nbsp; -- rather than an implementation of the interface&amp;nbsp; -- you have a loosely-coupled dependency. This lets you avoid breakage that might occur if the implementation changes.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote class="jive-quote" level="1"&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You can ensure that the setter you provide actually has a configured type associated with it by &lt;a class="jive-link-external-small" href="http://static.springframework.org/spring/docs/2.5.x/reference/metadata.html#metadata-annotations-required"&gt;annotating the setter method with @org.springframework.beans.factory.annotation.Required&lt;/a&gt;. If the injected type is not known to Spring configuration, then the Spring container will throw an exception at run time.&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The following example illustrates the basics of dependency injection with Spring: declare private class-level variables for manager instances and declare setter methods through which Spring will inject the instances. Code for version 1 techniques has been commented out in favor of the Spring conventions.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:c3471445-4f8f-49a8-8ac4-3221e0f3a8e3]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;// Variables to hold the manager instances.
private DocumentManager documentManager;
private FreemarkerManager freemarkerManager;


// Setters for injecting manager instances.
public void setDocumentManager(DocumentManager documentManager) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.documentManager = documentManager;
}
public void setFreemarkerManager(FreemarkerManager freemarkerManager) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.freemarkerManager = freemarkerManager;
}

private String getDocContent(String documentID)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; // ... Declare variables ... 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Don't use JiveContext (from JiveApplication) to get a DocumentManager 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // instance. The instance has been injected through the setter above.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // DocumentManager documentManager = JiveApplication.getContext(AuthFactory
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; .getSystemAuthToken()).getDocumentManager();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Use the manager to get a document by its ID.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document = documentManager.getDocument(documentID);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map properties = new HashMap();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ... Set FreeMarker properties from the document, then apply 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // a template with them ...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = applyFreemarkerTemplate(properties, FREEMARKER_HTML_FILE);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // ... catch exceptions ...

&amp;nbsp;&amp;nbsp;&amp;nbsp; return result;
}

private String applyFreemarkerTemplate(Map properties,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String templateName) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // ... Declare variables ... 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Don't use getInstance to get the FreemarkerManager instance. It has 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // been injected.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // FreemarkerManager freemarkerManager = FreemarkerManager.getInstance();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ... Use the manager to set up FreeMarker configuration ...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config = freemarkerManager.getConfiguration(ServletActionContext.getServletContext());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (properties != null) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Process the FreeMarker template and store the resulting HTML as a String
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = applyFreemarkerTemplate(config, properties, templateName);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // ... catch exceptions ...

&amp;nbsp;&amp;nbsp;&amp;nbsp; return result;
}&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:c3471445-4f8f-49a8-8ac4-3221e0f3a8e3]--&gt;&lt;p&gt;While you can optionally name the specific interface implementation you want to have injected, Spring in Clearspace supports a feature known as autowiring. In autowiring, you merely include the setter method (using JavaBeans naming conventions) with a single parameter of the interface's type. To optionally specify the implementation you want injected, you include a spring.xml file that associates the implementation class with your setter.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Remove JiveContext uses that retrieve managers.&lt;/strong&gt; In version 1 the JiveContext interface was a popular convention to get instances of the various manager interfaces&amp;nbsp; -- CommunityManager, UserManager, DocumentManager, and so on. In version 2 this convention is, depending on the case, either unavailable or unreliable. For example, if you've written a plugin that has a static initializer that tries to bootstrap with call to JiveContext, Clearspace startup will likely fail.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Instead, use dependency injection as described above. In fact, to stay out of trouble, the general rule in version 2 is "Don't use JiveContext."&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Remove getInstance calls that retrieve managers.&lt;/strong&gt; This includes FreemarkerManager.getInstance, but also all of the *Factory.getInstance methods you might have used in version 1. In version 2 most of the factory classes have been removed. You should replace your calls to their getInstance methods with a property for setting the instance from Spring as described above. Here's a list of the removed classes:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;GroupManagerFactory &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;UserManagerFactory &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;AvatarManagerFactory &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;BanManagerFactory &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;PollManagerFactory &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;SearchQueryLoggerFactory &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;StatusLevelManagerFactory &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;TagManagerFactory &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;WidgetDAOFactory &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Work with Containers for Projects and Spaces/Communities&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;Version 2 introduces &lt;em&gt;projects&lt;/em&gt;, which, like spaces (known as communities in Clearspace Community), collect content such as documents, discussions, and blogs. Projects also add tasks as a content type. To organize the conceptually similar projects and spaces, the API was changed to introduce the idea of a &lt;em&gt;container&lt;/em&gt;. The interfaces that represent projects and spaces&amp;nbsp; -- Project and Community&amp;nbsp; -- now inherit from a common JiveContainer interface.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In practical terms, this means that some methods taking an instance of the Community interface now take a JiveContainer instance instead. The following code works to get the latest document in either a project or space, for example, because they inherit from JiveContainer and both can contain documents. To see how your code might be affected, search the Javadoc index for occurrences of JiveContainer in method signatures and return types.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:1a5c8916-66b0-464a-bc6e-96e02a875f00]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;public Document getLatestDocument(JiveContainer container) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (getDocumentCount(container) == 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; DocumentResultFilter filter = new DocumentResultFilter();
&amp;nbsp;&amp;nbsp;&amp;nbsp; filter.setSortOrder(DocumentResultFilter.DESCENDING);
&amp;nbsp;&amp;nbsp;&amp;nbsp; filter.setSortField(JiveConstants.MODIFICATION_DATE);

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Round down the lower date boundary by 1 day.
&amp;nbsp;&amp;nbsp;&amp;nbsp; filter.setModificationDateRangeMin(ThreadResultFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .roundDate(container.getModificationDate(), 24 * 60 * 60));
&amp;nbsp;&amp;nbsp;&amp;nbsp; filter.setNumResults(10);
&amp;nbsp;&amp;nbsp;&amp;nbsp; Iterable&amp;lt;Document&amp;gt; documents = documentManager.getDocuments(container, filter);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (documents.iterator().hasNext()) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return documents.iterator().next();
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:1a5c8916-66b0-464a-bc6e-96e02a875f00]--&gt;&lt;p&gt;By the way, this getLatestDocument method is now exposed by the DocumentManager interface; in version 1 this method was exposed by the Document interface. Methods such as this one were moved as part of a larger effort to migrate such functionality into managers.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Use Transaction Support When Updating Multiple Tables&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;Version 2 supports &lt;a class="jive-link-external-small" href="http://static.springframework.org/spring/docs/1.2.x/reference/transaction.html#d0e5917"&gt;transaction management through Spring with the @Transactional annotation&lt;/a&gt;. When the work of your code results in updates (including deletes) to data in multiple database tables, supporting &lt;a class="jive-link-external-small" href="http://en.wikipedia.org/wiki/Database_transaction"&gt;transactional behavior&lt;/a&gt; can help to ensure that the updates are made consistently (that is, all of the effected tables are updated or none are).&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you're explicitly supporting transactions with @Transactional, you'll need to add an &lt;a class="jive-link-external-small" href="http://en.wikipedia.org/wiki/AspectJ"&gt;AspectJ&lt;/a&gt; compilation step. The AspectJ compiler weaves into your code the support needed to include at load time your transactional method calls in a transaction context.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You'll want to add transaction support if your code updates multiple database tables as while executing a method. While the need to support transactions is fairly rare if you're doing all your work through the Clearspace API, keep in mind that your calls to API set* methods might result in database updates. If you're not sure whether your code's work results in database updates, it's not a bad idea probably to add the @Transactional annotation to the method.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Adding support for transactions is pretty easy. Here's what you do:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Add the @Transactional annotation to any methods whose execution might result in updates to multiple tables. The annotation is in the package &lt;a class="jive-link-external-small" href="http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/transaction/annotation/Transactional.html"&gt;org.springframework.transaction.annotation&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Compile your code with the &lt;a class="jive-link-external-small" href="http://www.eclipse.org/aspectj/doc/released/devguide/ajc-ref.html"&gt;AspectJ compiler&lt;/a&gt;. There are also &lt;a class="jive-link-external-small" href="http://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html"&gt;Ant tasks&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Use Manager Interfaces to Work with Managed Things&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;Much of the Clearspace code was rewritten to clarify (or create) relationships between instances of manager interfaces and instances of what they manage. The result is an API that's more intuitive, but it also might mean changes to your code.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In general, methods designed to handle &lt;em&gt;types of things&lt;/em&gt;&amp;nbsp; -- documents, attachments, discussion messages, and so on&amp;nbsp; -- were moved from a "containing" type to a manager type. For example, in version 1 the method getAttachmentCount was exposed by the interfaces BlogPost, Document, and ForumMessage ; each of these could have attachments, and getAttachmentCount was how you got the count of them. In version 2, you get the count of attachments with the AttachmentManager.getAttachmentCount(AttachmentContentResource) method. The AttachmentContentResource is a marker interface extended by BlogPost, Document, ForumMessage, and other things that can have attachments.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So in version 2 the rule of thumb, when looking for a way to manage types of things, is to look for a manager of those things.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Handle Content As XML&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;Version 2 includes significant changes in the way Clearspace handles content. Improving the rich text editor (which blogs, documents, and discussions threads all use) included completely reworking the way that content is handled in conversions between plain text (wiki markup), rich text, and HTML (for previewed and published content).&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In particular, content is set and received as XML. In version 1, the content-related accessors that get and set content body, subject and so on received and returned String instances. In version 2, these methods handle content as instances of org.w3c.dom.Document. Version 2 interfaces that used content accessor methods&amp;nbsp; -- including Document, PrivateMessage, ForumMessage, BlogPost, and others&amp;nbsp; -- still include methods such as getPlainBody for retrieving content without markup.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For plugins that include actions, you can extend JiveActionSupport for several methods helpful in converting content from one format to another.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;While version 2 features a model for setting and getting content as XML, there's also an exception: the Macro interface render method still returns content as a String. It has to parse as well-formed XML, but it's still a string.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Other API Changes&lt;/span&gt;&lt;/h3&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;In some cases, methods that took a JiveObject instance now take an instance of an interface that extends JiveObject. The marker interfaces CommentContentResource and AttachmentContentResource were created to indicate an object's support for comments or attachments. Look for these types in the Javadoc index to find out whether you need to update your own code.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The information above along with more details can be found in the &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/docs/DOC-2060/"&gt;Upgrading Extensions to 2.0 documentation&lt;/a&gt;.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:09b0f58b-db0a-462c-a108-3730dd18c562] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">freemarker</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">api</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">freemarker</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">spring</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">xml</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">java</category>
      <pubDate>Wed, 16 Jul 2008 21:46:18 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/16/customization-part-7-using-the-clearspace-api</guid>
      <dc:date>2008-07-16T21:46:18Z</dc:date>
      <clearspace:dateToText>4 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/customization-part-7-using-the-clearspace-api</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1551</wfw:commentRss>
    </item>
    <item>
      <title>Customization Part 4: Macros</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/03/customization-part-4-macros</link>
      <description>&lt;!-- [DocumentBodyStart:ee6d7d04-ed22-4302-9c54-6ae088fd3eef] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;This post is the fourth in a series of blog posts about customizing for Clearspace 2.x. The previous posts covered:&lt;/p&gt;&lt;ol&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;General information about &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/24/customizations-in-clearspace-2x-part-one/"&gt;Customizations in Clearspace 2.x&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/26/customization-part-2-upgrading-themes-and-ftl-files/"&gt;Upgrading Themes and FTL Files&lt;/a&gt;. &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/30/customization-part-3-widgets"&gt;Widgets in Clearspace 2.x&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This post continues the series with more information about macros in Clearspace 2.0&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Depending on what your macro does, it might need substantial upgrade changes or none at all. The main macro-specific difference arises from the fact that Clearspace content is now stored as XML, rather than plain text. At run time Clearspace renders plain text, rich text, or HTML from stored XML. This means that the HTML you return for display when the macro is previewed or published must qualify as well-formed XML.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Note that unless your macro is extremely simple, you're likely to also need to keep in mind API changes and FreeMarker changes. The rest of macro development model&amp;nbsp; -- artifacts involved, how you deploy them, and so on&amp;nbsp; -- is unchanged from version 1.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In version 1, you might have written your macro class in one of two ways: implementing the com.jivesoftware.base.Macro interface or extending the com.jivesoftware.base.BaseMacro class. Implementing the Macro interface was the relatively simple (and documented) way to write a macro class. If you extended the BaseMacro class you were probably doing so in order to support alternate content formats for targets other than HTML&amp;nbsp; -- including for email, the plain text editor, and so on. In version 2 Clearspace handles conversion to these other formats for you.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The process for upgrading your macro class will differ depending on which approach you took. The following describes the two common version 1 ways to implement a macro class and describes what you can do to upgrade each.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Your Macro Class Implements the Macro Interface&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;In version 1 the Macro interface has a single method: String render(String, Map, MacroContext). Your implementation received macro content and parameters (if any), along with information about the context in which it was being used, then simply returned the HTML that should be displayed in the published content.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In version 2 this is still supported with one caveat: The HTML returned by your render method must now qualify as well-formed XML. That's because the return value is now inserted into the XML that represents the content it's being used in. Malformed XML returned by a macro won't be used by Clearspace.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;To upgrade your macro class, simply ensure that the HTML your render method implementation returns is well-formed XML.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Your Macro Class Extends the Version 1 BaseMacro Class&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;In version 1 the BaseMacro class extended BaseFilter, which provided all of the methods a macro needed to return content to Clearspace, whether the content was being displayed in the Clearspace UI or in a notification email. You implemented each of these methods to handle the different targets. In version 2, Clearspace handles rendering for each of these targets so your code doesn't need to.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In version 2 there's a BaseMacro class, but it no longer extends BaseFilter, implementing RenderMacro instead. In other words, macro classes extending the version 1 BaseMacro class won't compile on version 2. The version 2 BaseMacro class is for internal use and will almost surely change in future Clearspace releases.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;To upgrade your macro class, rewrite it so that it implements the Macro interface rather than extending BaseMacro. In most cases this will mean moving your BaseMacro.executeHtmlTarget method implementation (along with the logic that supports it) to your Macro.render method implementation. Both methods return HTML as a String. You can discard the code designed to support the other targets (methods executePlainTextTarget, executeWysiwygEditorTarget, and so on).&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The information above along with more details can be found in the &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/docs/DOC-2060/"&gt;Upgrading Extensions to 2.0 documentation&lt;/a&gt;.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:ee6d7d04-ed22-4302-9c54-6ae088fd3eef] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">macros</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <pubDate>Fri, 04 Jul 2008 00:34:55 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/03/customization-part-4-macros</guid>
      <dc:date>2008-07-04T00:34:55Z</dc:date>
      <clearspace:dateToText>4 months, 3 weeks ago</clearspace:dateToText>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/customization-part-4-macros</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1546</wfw:commentRss>
    </item>
    <item>
      <title>Quick SSO on Clearspace 2.0</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/01/quick-sso-on-clearspace-20</link>
      <description>&lt;!-- [DocumentBodyStart:40c6e4d8-a57e-4722-8f58-a600052dc92c] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Below is a small filter that I co-authored recently to integrate with Oracle Access Manager (formerly called Oblix). With the release of CS 2.0 we have totally revamped the authentication process and it is now built on spring-security (formerly acegi). Doing this makes it super easy for most of the typical SSO use-cases to be implemented in a reasonable amount of time. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here was the use case:&lt;/p&gt;&lt;p&gt;1. User Makes initiial request and is not authenticated yet.&lt;/p&gt;&lt;p&gt;2. Webgate routes user to the corporate login page&lt;/p&gt;&lt;p&gt;3. User supplies auth credentials&lt;/p&gt;&lt;p&gt;4. Webgate authenticates the user&lt;/p&gt;&lt;p&gt;5. Webgate sets an Authentication Cookie that identifies this user to Webgate&lt;/p&gt;&lt;p&gt;6. Webgate adds custom HTTP Headers to a new request to the originally requested resource, in this case clearspace.&lt;/p&gt;&lt;p&gt;7. Clearspace ACEGI Filter chain executes for /*** path, this is where I inserted the OblixSSOFilter right before the form authentication.&lt;/p&gt;&lt;p&gt;8. The Filter executes, grabs the HTTP Header "jwt-dn" and extracts the users DN (the user name).&lt;/p&gt;&lt;p&gt;9. The Filter retrieves the User and creates an Authentication and allows the rest of the filters to execute.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The User is now authenticated. The Default authoprovider ultimatly loads the Users permission etc downstream using the default AuthProvider. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is the code for the filter. The filter is pretty straight forward. It looks at the incoming HttpServletRequest and attempts to retrieve a HTTP Header that was sent along from the webgate authentication form previously visited by the user, as stated above, in this particular scenario I was able to assume authentication would always be done prior to accessing clearspace. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:7c0f7a74-dfa4-4eb6-ae93-e7a4bdcff8c1]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-java"&gt; &lt;font color="navy"&gt;&lt;b&gt;package&lt;/b&gt;&lt;/font&gt; com.jivesoftware.clearspace.sso.oblix;
&amp;nbsp;
&amp;nbsp;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; com.jivesoftware.community.aaa.AnonymousAuthentication;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; com.jivesoftware.community.aaa.JiveUserAuthentication;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; com.jivesoftware.base.*;
&amp;nbsp;
&amp;nbsp;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; javax.servlet.*;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; javax.servlet.http.HttpServletRequest;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; javax.servlet.ServletResponse;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; javax.servlet.FilterChain;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; java.io.IOException;
&amp;nbsp;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; org.acegisecurity.context.SecurityContextHolder;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; org.acegisecurity.Authentication;
&lt;font color="navy"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; org.apache.commons.lang.StringUtils;
&amp;nbsp;
&lt;font color="darkgreen"&gt;/**
 * Created by IntelliJ IDEA.
 * User: fred
 * Date: Jun 11, 2008
 * Time: 12:36:14 PM
 */&lt;/font&gt;
&lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; OblixSSOFilter &lt;font color="navy"&gt;&lt;b&gt;implements&lt;/b&gt;&lt;/font&gt; Filter &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; String OAMHEADER = &lt;font color="red"&gt;"jwt-unique"&lt;/font&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; String HEADER_NAME = &lt;font color="red"&gt;"jwt-dn"&lt;/font&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; UserManager userManager;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="darkgreen"&gt;//possible to use system properties to enable and change the header, for&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="darkgreen"&gt;//now just keep it simple.&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; String oamHeaderName = HEADER_NAME;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;boolean&lt;/b&gt;&lt;/font&gt; enabled = &lt;font color="navy"&gt;&lt;b&gt;true&lt;/b&gt;&lt;/font&gt;;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; OblixSSOFilter()&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;super&lt;/b&gt;&lt;/font&gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp; 
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) &lt;font color="navy"&gt;&lt;b&gt;throws&lt;/b&gt;&lt;/font&gt; IOException, ServletException &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Authentication authentication;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;(!enabled)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterChain.doFilter(servletRequest,servletResponse);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;&lt;font color="navy"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.debug(&lt;font color="red"&gt;"executing oblix filter"&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpServletRequest request = (HttpServletRequest)servletRequest;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String oamHeader = request.getHeader(getOamHeaderName());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;(oamHeader != &lt;font color="navy"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/font&gt;)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.debug(&lt;font color="red"&gt;"got OAM header: "&lt;/font&gt; + oamHeader);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String userDN = extractUserDN(oamHeader);
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; User authenticationTarget = &lt;font color="navy"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/font&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/font&gt;&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authenticationTarget = userManager.getUser(StringUtils.chomp(userDN));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;&lt;font color="navy"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/font&gt;(UserNotFoundException e)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.error(&lt;font color="red"&gt;"no user found with username: "&lt;/font&gt; + userDN);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="darkgreen"&gt;//Found an a&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authentication = &lt;font color="navy"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; JiveUserAuthentication(authenticationTarget);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authentication.setAuthenticated(&lt;font color="navy"&gt;&lt;b&gt;true&lt;/b&gt;&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;&lt;font color="navy"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.debug(&lt;font color="red"&gt;"no OAM Header"&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authentication = &lt;font color="navy"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; AnonymousAuthentication();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SecurityContextHolder.getContext().setAuthentication(authentication);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;&lt;font color="navy"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/font&gt; (Exception e) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.error(&lt;font color="red"&gt;"Exception occured while trying to authenticate OAM response: "&lt;/font&gt; + e.getMessage());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filterChain.doFilter(servletRequest,servletResponse);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; String extractUserDN(String header)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String userName = &lt;font color="navy"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/font&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String[] elements = StringUtils.split(header,&lt;font color="navy"&gt;','&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;for&lt;/b&gt;&lt;/font&gt;(String element: elements)&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Log.debug(&lt;font color="red"&gt;"processing header: "&lt;/font&gt; + element);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;(element.startsWith(OAMHEADER))&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String[] uniqueID = StringUtils.split(element,&lt;font color="navy"&gt;'='&lt;/font&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userName = uniqueID[1];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt;(userName);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; destroy()&lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; setUserManager(UserManager userManager) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.userManager = userManager;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; AuthenticationProvider getAuthenticationProvider() &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; authenticationProvider;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; setAuthenticationProvider(AuthenticationProvider authenticationProvider) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.authenticationProvider = authenticationProvider;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; String getOamHeaderName() &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; oamHeaderName;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; setOamHeaderName(String oamHeaderName) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.oamHeaderName = oamHeaderName;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;boolean&lt;/b&gt;&lt;/font&gt; isEnabled() &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; enabled;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="navy"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; setEnabled(&lt;font color="navy"&gt;&lt;b&gt;boolean&lt;/b&gt;&lt;/font&gt; enabled) &lt;font color="navy"&gt;{&lt;/font&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.enabled = enabled;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="navy"&gt;}&lt;/font&gt;
&lt;font color="navy"&gt;}&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:7c0f7a74-dfa4-4eb6-ae93-e7a4bdcff8c1]--&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I simply created a jar containing this one class that I deployed to the WEB-INF\lib directory of a expanded clearspace war file. You can use any IDE or VI and Ant to create the jar, nothing special about it or clearspace specific.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;After I had the jar. I needed to tell clearspace about the filter. Since 2.0 there is a back door that can be utilized to override the default implementation of clearspace managers,DAOs and other spring managed beans, this back door is your jiveHome\etc directoy. Within the jiveHome\etc directory you can copy and modify the various spring context files packaged in the clearspace.jar file found in \WEB\lib. This is done by extracting the appropriate spring context file from the clearspace.jar file found in WEB-INF\lib, make your edits to it and copy it into \jiveHome\etc. In my case the authentication filter stack is configured in spring-securityContext.xml so I extracted that and made the changes listed below:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:dbd1800a-cda5-4d75-b811-4c32430d5e35]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-xml"&gt;
&lt;span class="jive-xml-comment"&gt;&amp;lt;!-- NOTICE THE ADDITION OF oblixSS0Filter --&amp;gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy"&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;property name="filterInvocationDefinitionSource"&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;value&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PATTERN_TYPE_APACHE_ANT
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /upgrade/**=httpSessionContextIntegrationFilter, upgradeAuthenticationFilter, upgradeExceptionTranslationFilter,jiveAuthenticationTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /post-upgrade/**=httpSessionContextIntegrationFilter, postUpgradeAuthenticationFilter, postUpgradeExceptionTranslationFilter,jiveAuthenticationTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /admin/**=httpSessionContextIntegrationFilter, adminAuthenticationFilter, adminExceptionTranslationFilter,jiveAuthenticationTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /rpc/xmlrpc=wsRequireSSLFilter, httpSessionContextIntegrationFilter, basicAuthenticationFilter, wsExceptionTranslator, jiveAuthenticationTranslationFilter, wsAccessTypeCheckFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /rpc/rest/**=wsRequireSSLFilter, httpSessionContextIntegrationFilter, basicAuthenticationFilter, wsExceptionTranslator, jiveAuthenticationTranslationFilter, wsAccessTypeCheckFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /rpc/soap/**=wsRequireSSLFilter, httpSessionContextIntegrationFilter, jiveAuthenticationTranslationFilter 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**=httpSessionContextIntegrationFilter, oblixSSoFilter formAuthenticationFilter, rememberMeProcessingFilter, feedBasicAuthenticationFilter, jiveAuthenticationTranslationFilter
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;

&amp;lt;!-- DECLARE THE NEW FILTER --&amp;gt;&lt;/span&gt;
&lt;span class="jive-xml-tag"&gt;&amp;lt;bean id="oblixSSoFilter" class="com.jivesoftware.clearspace.sso.oblix.OblixSSOFilter"&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;property name="userManager" ref="userManager" &amp;gt;&lt;/span&gt;&lt;span class="jive-xml-tag"&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="jive-xml-tag"&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:dbd1800a-cda5-4d75-b811-4c32430d5e35]--&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As you can see the stack is configured to protect various resources within clearspace, you can add to this stack as required for your particular case, in my case it was simply a matter of declaring my filter, this allows spring to handle the creation of the object and changing the filter stack for the root path of the application to ensure the oblixSSOFilter fired off prior to formAuthentication. If the oblix filter is able to vouch for the user making the request (via the headers) the filter sets the Authentication on the SecurityContext and life moves forward with an authenticated user, if not, I allow it to fall to the next filter in the stack and the process repeats, with this new framework in place it makes it easy to support multiple authentication sources while still staying on the peripheral edges of the product which will help when it comes time to upgrade. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;After you have made the changes, restart your clearspace instance and you should be up and running with your new filter.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Enjoy!.&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:40c6e4d8-a57e-4722-8f58-a600052dc92c] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">sso</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">spring-security</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">acegi</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">code</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">customization</category>
      <pubDate>Tue, 01 Jul 2008 21:24:46 GMT</pubDate>
      <author>brockf</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/07/01/quick-sso-on-clearspace-20</guid>
      <dc:date>2008-07-01T21:24:46Z</dc:date>
      <clearspace:dateToText>4 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>11</clearspace:replyCount>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/quick-sso-on-clearspace-20</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1547</wfw:commentRss>
    </item>
    <item>
      <title>Customization Part 3: Widgets</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/30/customization-part-3-widgets</link>
      <description>&lt;!-- [DocumentBodyStart:c388bf73-9c02-4bf5-899c-392fb5ae8299] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;This post is the third in a series of blog posts about customizing for Clearspace 2.x. The previous posts covered general information about &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/24/customizations-in-clearspace-2x-part-one/"&gt;Customizations in Clearspace 2.x&lt;/a&gt; and &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/26/customization-part-2-upgrading-themes-and-ftl-files/"&gt;upgrading themes and FTL files&lt;/a&gt;. This post continues the series with more information about widgets.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Widgets can be used much more broadly in version 2 than previously, so most of your widget-specific upgrade changes are related to this broader support. In version 1 a system or space administrator could use widgets only to assemble a space or community overview page. In version 2 both administrators and users can customize page layouts in several areas. Widgets can be used on the Clearspace instance home page (which has been rendered from main.ftl), a user's personal home page, a community/space overview page, a project overview page.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Note that unless your widget is extremely simple, you're likely to also need to keep in mind API changes and FreeMarker changes. For example, version 2 requires that widgets acquire references to Clearspace manager beans using Spring. The rest of widget development model&amp;nbsp; -- artifacts involved, how you deploy them, and so on&amp;nbsp; -- is unchanged from version 1.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When upgrading a widget (or developing a new one on version 2), you use the @WidgetTypeMarker annotation to specify which of the display contexts your widget is allowed in. Deciding which contexts to allow is an important part of your widget's design. For example, you might decide that a widget that takes a very individual-oriented set of property values (such as the Tag widget, which displays content associated with a particular tag) isn't useful in high-level contexts such as the instance or space home pages (where the broad set of people viewing might want views on a large variety of tags).&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The @WidgetTypeMarker annotation supports values from the WidgetType enumeration. Here's an example that includes all of those values:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:bbb75626-b728-4a58-9530-8ad06a378dfa]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;@WidgetTypeMarker({WidgetType.HOMEPAGE, WidgetType.PERSONALIZEDHOMEPAGE, 
&amp;nbsp;&amp;nbsp;&amp;nbsp; WidgetType.COMMUNITY, WidgetType.PROJECT})
@PropertyNames("myProperty")
public class MyWidget extends BaseWidget {
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Implementation code omitted.
}&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:bbb75626-b728-4a58-9530-8ad06a378dfa]--&gt;&lt;p&gt;In order to reduce the tight coupling between the widget views (which are typically built using FreeMarker) and the rest of the Clearspace application, the widget context that was previously populated with a reference to the current context via a JiveContext instance has been modified so that the widget view no longer has access to that instance. That means that you'll need to provide everything that your widget view needs through the properties that the widget interface requires. Typically you'll create a widget class that extends BaseWidget and then you'll override this method:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:fcd66a6f-b366-4be9-9c4f-3beeb649ab29]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;protected Map&amp;lt;String, Object&amp;gt; loadProperties(WidgetContext widgetContext, ContainerSize size)
&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:fcd66a6f-b366-4be9-9c4f-3beeb649ab29]--&gt;&lt;p&gt;So in the previous version of Clearspace, you might have had something like this in the FTL file that's your widget's view:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:afa9ad8c-81ec-4dd2-90c5-abb3db3cff57]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;${widgetContext.jiveContext.communityManager.rootCommunity.ID?c}&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:afa9ad8c-81ec-4dd2-90c5-abb3db3cff57]--&gt;&lt;p&gt;Because the JiveContext instance has been removed from the WidgetContext class, you'll need to provide your view with the properties it needs explicitly in your widget. Here's an example:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:f0132ef1-d602-4b83-9db0-47aee9195f58]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;public class MyWidget extends BaseWidget {

&amp;nbsp;&amp;nbsp;&amp;nbsp; // Declare a property variable and setter for injection by Spring.
&amp;nbsp;&amp;nbsp;&amp;nbsp; private CommunityManager communityManager;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void setCommunityManager(CommunityManager cm) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.communityManager = cm;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; protected Map&amp;lt;String, Object&amp;gt; loadProperties(WidgetContext widgetContext, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ContainerSize size)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;lt;String, Object&amp;gt; properties = super.loadProperties(widgetContext, size);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Implementation code omitted.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; properties.put("rootCommunityID", communityManager.getRootCommunity().getID());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return properties;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:f0132ef1-d602-4b83-9db0-47aee9195f58]--&gt;&lt;p&gt;Finally, because you can create a widget that exists in multiple parts of the application (the homepage, a personalized homepage, a community, a project), you'll sometimes want to change the behavior of your widget based on where the widget is being rendered. You can determine the render context of your widget by checking the type of the WidgetContext class that you're given in the loadProperties method. Here's some example code that shows how you can determine what context the widget is in:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;!--[CodeBlockStart:5f353f74-4fc0-4570-9a74-2610d2f8b85b]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;public class MyWidget extends BaseWidget {
&amp;nbsp;&amp;nbsp;&amp;nbsp; protected Map&amp;lt;String, Object&amp;gt; loadProperties(WidgetContext widgetContext, ContainerSize size) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;lt;String, Object&amp;gt; properties = super.loadProperties(widgetContext, size);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (widgetContext.getWidgetType() == WidgetType.COMMUNITY) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CommunityWidgetContext cwc = (CommunityWidgetContext)widgetContext;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do something specific for the community
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (widgetContext.getWidgetType() == WidgetType.HOMEPAGE) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HomepageWidgetContext hwc = (HomepageWidgetContext)widgetContext;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do something specific for the homepage
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (widgetContext.getWidgetType() == WidgetType.PERSONALIZEDHOMEPAGE) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PersonalizedHomepageWidgetContext phwc = 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (PersonalizedHomepageWidgetContext)widgetContext;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do something specific for the personalized homepage&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (widgetContext.getWidgetType() == WidgetType.PROJECT) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProjectWidgetContext wwc = (ProjectWidgetContext)widgetContext;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do something specific for the project
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; properties.put("rootCommunityID", communityManager.getRootCommunity().getID());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return properties;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:5f353f74-4fc0-4570-9a74-2610d2f8b85b]--&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The information above along with more details can be found in the &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/docs/DOC-2060/"&gt;Upgrading Extensions to 2.0 documentation&lt;/a&gt;.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can also &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/podcasts/2008/06/05/more-widget-development-in-clearspace-20"&gt;watch a video and download a presentation&lt;/a&gt; to learn more about how to write new widgets for Clearspace 2.0 from Aaron Johnson, Engineering Manager at Jive.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:c388bf73-9c02-4bf5-899c-392fb5ae8299] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">widget</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">widgets</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">widget</category>
      <pubDate>Mon, 30 Jun 2008 15:12:39 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/30/customization-part-3-widgets</guid>
      <dc:date>2008-06-30T15:12:39Z</dc:date>
      <clearspace:dateToText>4 months, 3 weeks ago</clearspace:dateToText>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/customization-part-3-widgets</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1545</wfw:commentRss>
    </item>
    <item>
      <title>Customization Part 2: Upgrading Themes and FTL files</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/26/customization-part-2-upgrading-themes-and-ftl-files</link>
      <description>&lt;!-- [DocumentBodyStart:789139ac-b3f5-45a3-8ebc-6530f619b5c1] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;This post is the second in a series of blog posts about customizing for Clearspace 2.x. The first post covered general information about &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/clearspace/2008/06/24/customizations-in-clearspace-2x-part-one/"&gt;Customizations in Clearspace 2.x&lt;/a&gt;. This post continues the series with more information about upgrading themes and FreeMarker template (FTL) files.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Each new version of Clearspace includes changes to FTL files and version 2 is no exception. Typically these changes are needed to support new or enhanced features. The FTL changelog included with a Clearspace release provides a list of the FTL files that were changed from the previous version. However, changes in version 2 have pretty much touched every template. In most cases these changes require a simple search-and-replace to fix. But some changes are more substantial.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The information on upgrading themes suggests an incremental process for making your changes that could save you some aggravation.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The following list suggests the tips and best practices for upgrading your templates.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;When you've overridden existing Clearspace templates (as in a theme), start with new version 2 FTL files that correspond to the version 1 files in your theme. Then, working from your customized version of the version 1 template, transfer your changes to to the version 2 template. Updating the new templates might help you avoid accidentally transferring code from version 1 that no longer works on version 2. This is especially important given that FreeMarker errors are difficult to debug; errors don't show up until run time. Weaving your version 1 changes into the version 2 templates will make the process more systematic.As you copy your changes into the version 2 template, keep in mind the changed items described below. &lt;br/&gt; &lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;The version 1 pages whose templates were community.ftl and main.ftl -- community pages and the home page -- can be easily customized with widgets in version 2. Before you set out to upgrade these pages, take a look at how much of your customization work could be accomplished by using widgets on the version 2 templates. Using widgets might reduce the amount of customization you need to do and greatly reduce any work in future upgrades.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;If you've overridden community.ftl and want to upgrade it, note that the template has been split into multiple FTL files. This was done to divide logically what was a very large template.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Replace WebWork directives with their Struts counterparts. Clearspace version 2 replaces WebWork conventions with Struts. This is pretty much just search-and-replace work to replace @ww. (for WebWork) with @s (for Struts) . The following example shows how to update the url directive. Notice that the updated code also omits the includeParams='none' attribute; in Struts 2, which Clearspace version 2 uses, none is the default value for includeParams.Version 1 (supporting WebWork): &lt;br/&gt; &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;!--[CodeBlockStart:1b1569bb-0076-435e-98d4-948fe210405a]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;style type="text/css" media="screen"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @import "&amp;lt;@ww.url value='/styles/jive-blog.css' includeParams='none'/&amp;gt;";
&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:1b1569bb-0076-435e-98d4-948fe210405a]--&gt;&lt;p&gt;&lt;br/&gt; Version 2 (supporting Struts): &lt;br/&gt; &lt;/p&gt;&lt;!--[CodeBlockStart:6cbcb0c4-8fb4-4b69-af98-0aecda345c4a]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;style type="text/css" media="screen"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; @import "&amp;lt;@s.url value='/styles/jive-blog.css'/&amp;gt;";
&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:6cbcb0c4-8fb4-4b69-af98-0aecda345c4a]--&gt;&lt;p&gt;&lt;br/&gt; &lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Update calls to APIs that have been consolidated and simplified. Pay attention to the places in a template where code calls methods directly (although, as a best practice, you should avoid calling methods in FTL code and use actions instead). Here's an example in which you'd replace a call to a JiveGlobals methods with a call to JiveResourceResolver:Version 1 (using JiveGlobals ): &lt;br/&gt; &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;!--[CodeBlockStart:adee3966-eb89-4cf8-af1f-239330342209]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;@ww.text name="doc.viewer.more_recent_ver.text"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;@ww.param&amp;gt;&amp;lt;a href="&amp;gt;&amp;lt;/a&amp;gt;"&amp;gt;&amp;lt;/@ww.param&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;@ww.param&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/@ww.param&amp;gt;
&amp;lt;/@ww.text&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:adee3966-eb89-4cf8-af1f-239330342209]--&gt;&lt;p&gt;&lt;br/&gt; Version 2 (using JiveResourceResolver ): &lt;br/&gt; &lt;/p&gt;&lt;!--[CodeBlockStart:d212eacb-3520-4306-bdbd-8134a38a2be1]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;@s.text name="doc.viewer.more_recent_ver.text"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;@s.param&amp;gt;&amp;lt;a href="&amp;gt;&amp;lt;/a&amp;gt;"&amp;gt;&amp;lt;/@s.param&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;@s.param&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/@s.param&amp;gt;
&amp;lt;/@s.text&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:d212eacb-3520-4306-bdbd-8134a38a2be1]--&gt;&lt;p&gt;&lt;br/&gt; Here's another example where the change was from another class and method, but again to JiveResourceResolver: &lt;br/&gt; Version 1 (using CommunityUtils ): &lt;br/&gt; &lt;/p&gt;&lt;!--[CodeBlockStart:f786596a-a9db-4e3d-a39c-c6ffae54490f]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;a href="&amp;gt;&amp;lt;/a&amp;gt;?view=documents" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; class="jive-link-more"&amp;gt;&amp;lt;@ww.text name="doc.main.brdcrmb.documents.link" /&amp;gt;&amp;lt;/a&amp;gt; &lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:f786596a-a9db-4e3d-a39c-c6ffae54490f]--&gt;&lt;p&gt;&lt;br/&gt; Version 2 (using JiveResourceResolver ): &lt;br/&gt; &lt;/p&gt;&lt;!--[CodeBlockStart:cb9c71b0-b12f-4f25-a089-55bdf6613514]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;a href="&amp;gt;&amp;lt;/a&amp;gt;?view=documents" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; class="jive-link-more"&amp;gt;&amp;lt;@s.text name="doc.main.brdcrmb.documents.link" /&amp;gt;&amp;lt;/a&amp;gt; &lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:cb9c71b0-b12f-4f25-a089-55bdf6613514]--&gt;&lt;p&gt;&lt;br/&gt; &lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Update community references to container references. One twist on the API changes means that both projects and communities (also known as "spaces") are represented conceptually as containers. In the version 2 API, the Community and Project interfaces both inherit from JiveContainer. To disambiguate between the projects and communities, you'll need to pass a container &lt;em&gt;type&lt;/em&gt; with your action calls. The actual disambiguation is handled by Clearspace, however, when it intercepts the call before passing it to the action. The net effect is that the action itself receives only the container ID parameter, not the container type. Here's an FTL example:Version 1 (specifying a community by passing its community ID) &lt;br/&gt; &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;!--[CodeBlockStart:c71b0637-bcf5-4b80-9f85-4fa1288261c5]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;@ww.action name="community-breadcrumb" executeResult="true" ignoreContextParams="true"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;@ww.param name="communityID" value="${community.ID?c}" /&amp;gt;
&amp;lt;/@ww.action&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:c71b0637-bcf5-4b80-9f85-4fa1288261c5]--&gt;&lt;p&gt;&lt;br/&gt; Version 2 (specifying a community by passing both its type and its ID) &lt;br/&gt; &lt;/p&gt;&lt;!--[CodeBlockStart:ba896c46-6b16-4afc-9348-a94711662f11]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;@s.action name="community-breadcrumb" executeResult="true" ignoreContextParams="true"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;@s.param name="containerType" value="${container.objectType?c}" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;@s.param name="container" value="${container.ID?c}" /&amp;gt;
&amp;lt;/@s.action&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:ba896c46-6b16-4afc-9348-a94711662f11]--&gt;&lt;p&gt;&lt;br/&gt; &lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Update code that handles content. This includes code that gets content for display as wiki markup, HTML, and so on. Among the API changes were several designed to streamline and add structure to how you handle content. For example, in version 1, to get content as wiki markup you would have called methods of the message or document or comment itself. In version 2, you pass the content object to a method inherited from JiveActionSupport. These methods include renderToText, renderToHtml, renderSubjectToHtml, and so on. Here's an example using convertToWikiSyntax:Version 1 (using content object method) &lt;br/&gt; &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;!--[CodeBlockStart:59fdb165-50bf-4072-95f0-477e9e925b2c]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;textarea id="comment-body-edit-${comment.ID?c}" name="body" rows="10"
&amp;nbsp;&amp;nbsp;&amp;nbsp; style="width:100%;font-family:verdana,arial,helvetica,sans-serif;font-size:8pt;"
&amp;nbsp;&amp;nbsp;&amp;nbsp; class="jive-comment-textarea"&amp;gt;${comment.unfilteredBody!?html}&amp;lt;/textarea&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:59fdb165-50bf-4072-95f0-477e9e925b2c]--&gt;&lt;p&gt;&lt;br/&gt; Version 2 (using JiveActionSupport method) &lt;br/&gt; &lt;/p&gt;&lt;!--[CodeBlockStart:eaa41684-d924-4858-8ba3-249eac6d7724]--&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code"&gt;&amp;lt;textarea id="comment-body-edit-${comment.ID?c}" name="body" rows="10"
&amp;nbsp;&amp;nbsp;&amp;nbsp; style="width:100%;font-family:verdana,arial,helvetica,sans-serif;font-size:8pt;"
&amp;nbsp;&amp;nbsp;&amp;nbsp; class="jive-comment-textarea"&amp;gt;${action.convertToWikiSyntax(comment)!?html}&amp;lt;/textarea&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;!--[CodeBlockEnd:eaa41684-d924-4858-8ba3-249eac6d7724]--&gt;&lt;p&gt;&lt;br/&gt; &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Removed and Renamed FTL Files&lt;/span&gt;&lt;/h3&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;&lt;p&gt;Version 1 FTL File&lt;/p&gt;&lt;/th&gt;&lt;th&gt;&lt;p&gt;Version 2 Change&lt;/p&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;community-document-picker.ftl&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Renamed to container-document-picker.ftl&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;community-thread-picker.ftl&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Renamed to container-thread-picker.ftl&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;import-callback-communitynntp.ftl&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Removed.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;import-directory-error.ftl&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Removed.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;import-directory-updatetags.ftl&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Removed.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;import-directory.ftl&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Removed.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;datepicker.ftl&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p&gt;Renamed to datetimepicker.ftl&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;h2&gt;&lt;span&gt;Upgrading Themes&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;Nearly all of your work upgrading themes will focus on upgrading FreeMarker template (FTL) files. The way you build and deploy themes is unchanged from version 1.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;But wait -- there's more.&lt;/strong&gt; Having said that, the best practice recommendation in version 2 is to use widget-customized pages wherever possible as an alternative to custom FTLs. You can use widgets in more places than in version 1; check out the section on upgrading widgets for more.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here's why you should use widgets:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;You can do with widgets much of what you'd do with custom FTL markup. In addition, you can write logic in Java behind the your widget UI.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Building widgets to support new features is a good deal tidier than adding new FTL files. While custom FTL files override default FTL files, widgets are encapsulated by the plugin deployment model -- essentially sandboxed.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;When it's time to upgrade Clearspace, the work needed to upgrade FTL files you've customized would likely be a good deal greater than what's needed to upgrade a widget.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;span&gt;Suggested Upgrade Process&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;Use the following steps as a systematic way to upgrade your themes.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ol&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;Consider which custom FTLs in your themes can be replaced by customizing the page with widgets.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;Use jive.devMode Jive property for debugging. By default, Clearspace hides FreeMarker errors in themes. With dev mode on, you'll see them.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;Disable themes while upgrading them.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ol"&gt;&lt;p&gt;Enable your custom FTL files one at a time. Debugging incrementally will make the process smoother.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The information above along with more details can be found in the &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/docs/DOC-2060/"&gt;Upgrading Extensions to 2.0 documentation&lt;/a&gt;.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:789139ac-b3f5-45a3-8ebc-6530f619b5c1] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">templates</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">themes</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">templates</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">freemarker</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">ftl</category>
      <pubDate>Fri, 27 Jun 2008 03:37:27 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/26/customization-part-2-upgrading-themes-and-ftl-files</guid>
      <dc:date>2008-06-27T03:37:27Z</dc:date>
      <clearspace:dateToText>4 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/customization-part-2-upgrading-themes-and-ftl-files</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1543</wfw:commentRss>
    </item>
    <item>
      <title>Customizations in Clearspace 2.x Part One</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/24/customizations-in-clearspace-2x-part-one</link>
      <description>&lt;!-- [DocumentBodyStart:a2fe65f0-a4df-41d1-b57e-f28846a42eb6] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;We've been noticing more and more discussion on Jivespace about people migrating older customizations to the new Clearspace 2.x architecture along with quite a few people writing new customizations. I thought that now would be a good time for a refresher series of posts on customizing for Clearspace 2.x&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Clearspace version 2 includes a few big changes to the conventions and frameworks on which Clearspace is built. Many of these changes were made to improve Clearspace extensibility by letting the application and extensions be more loosely coupled -- and so be more durable during upgrade. Other changes that impact customizations were simply feature improvements in which some change to code is required.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here's a high-level list of the changes that effect extension and customization code:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Clearspace was &lt;strong&gt;migrated to the Spring framework&lt;/strong&gt;. This has both broad and deep effects on code written to run on Clearspace; such code must use the same conventions in order to integrate well. The changes include API refactoring to support dependency injection and integration of Spring modules (for security and transaction management, for example).&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Clearspace was &lt;strong&gt;migrated from WebWork2 to Struts2&lt;/strong&gt;. This has broad impact on plugins, but the changes are relatively small&amp;nbsp; -- primarily effecting syntax in FreeMarker templates and configuration files.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Widgets were enhanced&lt;/strong&gt; to support use in multiple contexts, rather than just space overview pages. Changes to widget development support this new feature.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;The &lt;strong&gt;macro-related API was narrowed&lt;/strong&gt; to the area documented in version 1, essentially excluding an undocumented area that some people used. Also, macros must now return HTML that qualifies as well-formed XML.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Web services support&lt;/strong&gt; is now provided through CXF, an evolution of XFire (the version 1 technology). A larger change results from the migration to Spring, which makes integrating new web services a bit more complex.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Custom user data providers&lt;/strong&gt; are now based on a streamlined API. These must be rewritten, but the new model is much simpler.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Custom authentication providers&lt;/strong&gt; are now based on Spring through Acegi. The change is pretty significant, including new API and configuration conventions.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;&lt;strong&gt;Myriad API changes&lt;/strong&gt; resulted from the migration to Spring and from an effort to streamline and modularize the Clearspace API. These include support for the projects feature, refactoring manager interfaces, content handling, and conventions such as dependency injection.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For those extensions and customizations deployed as plugins (widgets, actions, macros, and web services), there are a few changes in version 2 with broad effect.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Migration from WebWork to Struts means replacing your xwork-plugin.xml with a struts.xml&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Migration to Spring means adding a spring.xml for certain kinds of Spring support.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;One benefit of the new model is that modifying your plugin.xml, struts.xml, or spring.xml will provoke Clearspace to reload your plugin. This can be handy for debugging.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Support for a &amp;lt;maxserverversion&amp;gt; element was added. Similar to the &amp;lt;minserverversion&amp;gt; element, use the new one to specify that highest Clearspace version on which your plugin is supported. This can be useful when you want to ensure that upgrades to Clearspace prompt the plugin's users to upgrade the plugin also.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Plugin life cycle methods changed. If you used the version 1 com.jivesoftware.base.Plugin interface, you'll notice that its two methods have changed in order to support Spring. Semantics for the methods is unchanged. &lt;br/&gt; &lt;/p&gt;&lt;/li&gt;&lt;ul&gt;&lt;li level="2" type="ul"&gt;&lt;p&gt;Plugin.initialize(PluginManager, PluginMetaData) is now Plugin.init, a method without parameters. Use Spring dependency injection to receive a PluginManager instance; you can retrieve a PluginMetaData instance from the manager.&lt;/p&gt;&lt;/li&gt;&lt;li level="2" type="ul"&gt;&lt;p&gt;Plugin.destroyPlugin is now Plugin.destroy.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The information above along with more details can be found in the &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/docs/DOC-2060/"&gt;Upgrading Extensions to 2.0 documentation&lt;/a&gt;.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:a2fe65f0-a4df-41d1-b57e-f28846a42eb6] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">spring</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">plugins</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">spring</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">struts</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">webservices</category>
      <pubDate>Tue, 24 Jun 2008 20:00:29 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/24/customizations-in-clearspace-2x-part-one</guid>
      <dc:date>2008-06-24T20:00:29Z</dc:date>
      <clearspace:dateToText>4 months, 4 weeks ago</clearspace:dateToText>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/customizations-in-clearspace-2x-part-one</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1542</wfw:commentRss>
    </item>
    <item>
      <title>Web Services in Clearspace 2.0</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/18/web-services-in-clearspace-20</link>
      <description>&lt;!-- [DocumentBodyStart:b3656976-01ce-49fb-8071-82bd954b9a44] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Learn more about using web services to access your data in Clearspace 2.0 with &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/people/andrew/"&gt;Andrew Wright&lt;/a&gt;, Jive Software Engineer.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;object data="http://blip.tv/scripts/flash/blipplayer.swf?autoStart=false&amp;amp;file=http://blip.tv/file/get/Samjive-WebServicesInClearspace20851.flv&amp;amp;source=" height="294" type="application/x-shockwave-flash" width="400" wmode="transparent"&gt;&lt;param name="movie" value="http://blip.tv/scripts/flash/blipplayer.swf?autoStart=false&amp;amp;file=http://blip.tv/file/get/Samjive-WebServicesInClearspace20851.flv&amp;amp;source="/&gt;&lt;/object&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can also download the &lt;a class="jive-link-external-small" href="http://blip.tv/file/get/Samjive-WebServicesInClearspace20851.mov"&gt;Quicktime version&lt;/a&gt; (Caution: file is ~232MB), or you can &lt;a class="jive-link-external-small" href="http://blip.tv/file/998256"&gt;watch a larger version online&lt;/a&gt;, which will improve readability of embedded screenshots (&lt;strong&gt;recommended&lt;/strong&gt;).&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The entire presentation is also attached below as a PDF file.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:b3656976-01ce-49fb-8071-82bd954b9a44] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">web_services</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">plugins</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">web_services</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">rest</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">soap</category>
      <pubDate>Wed, 18 Jun 2008 09:11:49 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/18/web-services-in-clearspace-20</guid>
      <dc:date>2008-06-18T09:11:49Z</dc:date>
      <clearspace:dateToText>5 months, 5 days ago</clearspace:dateToText>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/web-services-in-clearspace-20</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1541</wfw:commentRss>
    </item>
    <item>
      <title>More Widget Development in Clearspace 2.0</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/05/more-widget-development-in-clearspace-20</link>
      <description>&lt;!-- [DocumentBodyStart:34de3468-621f-41b6-909b-9c09003c47bc] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Learn all about how to write new widgets for Clearspace 2.0 from &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/people/ajohnson1200/"&gt;Aaron Johnson&lt;/a&gt;, Engineering Manager at Jive.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;object data="http://blip.tv/scripts/flash/blipplayer.swf?autoStart=false&amp;amp;file=http://blip.tv/file/get/Samjive-WidgetsForClearspace20404.flv&amp;amp;source=" height="294" type="application/x-shockwave-flash" width="400" wmode="transparent"&gt;&lt;param name="movie" value="http://blip.tv/scripts/flash/blipplayer.swf?autoStart=false&amp;amp;file=http://blip.tv/file/get/Samjive-WidgetsForClearspace20404.flv&amp;amp;source="/&gt;&lt;/object&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can also download the &lt;a class="jive-link-external-small" href="http://blip.tv/file/get/Samjive-WidgetsForClearspace20404.mov"&gt;Quicktime version&lt;/a&gt; (Caution: file is ~285MB), or you can &lt;a class="jive-link-external-small" href="http://blip.tv/file/963811/"&gt;watch a larger version&lt;/a&gt; online, which will improve readability of embedded screenshots (&lt;strong&gt;recommended&lt;/strong&gt;).&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The entire presentation is also attached below as a PDF file.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can also watch an earlier video about &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/podcasts/2008/03/17/widget-development-in-clearspace-20/"&gt;developing widgets for Clearspace 2.0&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:34de3468-621f-41b6-909b-9c09003c47bc] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">jivespace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">widget</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">plugin</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">jivespace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">video</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">podcast</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <pubDate>Thu, 05 Jun 2008 15:45:45 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/06/05/more-widget-development-in-clearspace-20</guid>
      <dc:date>2008-06-05T15:45:45Z</dc:date>
      <clearspace:dateToText>5 months, 2 weeks ago</clearspace:dateToText>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/more-widget-development-in-clearspace-20</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1535</wfw:commentRss>
    </item>
    <item>
      <title>Clearspace 2.0 Plugins Now Available</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/21/clearspace-20-plugins-now-available</link>
      <description>&lt;!-- [DocumentBodyStart:25d35948-e559-4828-91af-b28a9547dd02] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;You can now &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/community/developer/clearspace/plugins/"&gt;view or download the Clearspace 2.0 plugins&lt;/a&gt; from the Plugin area on Jivespace. A big thank you to Jon Garrison, who spent several weeks porting most of the Jive plugins over from Clearspace 1.x to Clearspace 2.0. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Clearspace 2.0 Plugins include:&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Jotlet.net Calendar Widget: show and edit your Jotlet.net calendars&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Clearfox : View Clearspace content in a Firefox Sidebar&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Example Plugin: Several simple examples designed to show how plugins and macros work&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;blip.tv Macro: Embed Blip.tv videos in blogs, docs, or discussions&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;EmbedContent Macro: Embed into one document the content of another&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;SlideShare Macro: Display slideshare.net presentations in docs, blog posts, and discussions.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Vimeo Macro: Display Vimeo movies in documents, blog posts, and threads&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;User Stats Plugin: This widget displays the names of recently registered users.&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Yahoo Maps Plugin: Use yahoo maps in documents created in Clearspace to display a map of an address.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you just want to look at the code, you can access it from our &lt;a class="jive-link-external-small" href="https://svn.jivesoftware.com/svn/dev/repos/jive/clearspace_2_0/"&gt;svn repository&lt;/a&gt;.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:25d35948-e559-4828-91af-b28a9547dd02] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">plugins</category>
      <pubDate>Mon, 21 Apr 2008 23:12:48 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/21/clearspace-20-plugins-now-available</guid>
      <dc:date>2008-04-21T23:12:48Z</dc:date>
      <clearspace:dateToText>7 months, 2 days ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/clearspace-20-plugins-now-available</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1517</wfw:commentRss>
    </item>
    <item>
      <title>DWR in Clearspace 2.0</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/18/dwr-in-clearspace-20</link>
      <description>&lt;!-- [DocumentBodyStart:a5af2732-93e5-4549-98a4-9d2df4d17ec8] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Aaron Johnson, Jive Engineer, presented to our engineering team about how DWR is used in Clearspace 2.0. He started by walking us through an &lt;a class="jive-link-external-small" href="http://www.javapassion.com/j2ee/DWR.pdf"&gt;overview of DWR&lt;/a&gt;. After the overview, he showed us exactly how he used DWR in his &lt;a class="jive-link-external-small" href="https://svn.jivesoftware.com/svn/dev/repos/jive/clearspace_2_0/feedblog/"&gt;FeedBlog plugin&lt;/a&gt;. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This 7 minute video has the highlights from his presentation.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;object data="http://blip.tv/scripts/flash/blipplayer.swf?autoStart=false&amp;amp;file=http://blip.tv/file/get/Samjive-DWRInClearspace20176.flv&amp;amp;source=" height="294" type="application/x-shockwave-flash" width="400" wmode="transparent"&gt;&lt;param name="movie" value="http://blip.tv/scripts/flash/blipplayer.swf?autoStart=false&amp;amp;file=http://blip.tv/file/get/Samjive-DWRInClearspace20176.flv&amp;amp;source="/&gt;&lt;/object&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can watch a &lt;a class="jive-link-external-small" href="http://blip.tv/file/838305"&gt;larger Flash version&lt;/a&gt; or download the &lt;a class="jive-link-external-small" href="http://blip.tv/file/get/Samjive-DWRInClearspace20176.mov"&gt;Quicktime Movie&lt;/a&gt; version (Caution: 1761MB file)&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:a5af2732-93e5-4549-98a4-9d2df4d17ec8] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">video</category>
      <pubDate>Fri, 18 Apr 2008 22:50:52 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/18/dwr-in-clearspace-20</guid>
      <dc:date>2008-04-18T22:50:52Z</dc:date>
      <clearspace:dateToText>7 months, 5 days ago</clearspace:dateToText>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/dwr-in-clearspace-20</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1516</wfw:commentRss>
    </item>
    <item>
      <title>Developer Presentations on theming, plugins, widgets, and more for Clearspace 2.0</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/18/developer-presentations-on-theming-plugins-widgets-and-more-for-clearspace-20</link>
      <description>&lt;!-- [DocumentBodyStart:70f492a8-8fea-4731-a5db-5114bb562fbe] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Here are some resources for anyone wanting to migrate to Clearspace 2.0 or just learn more about the development environment for Clearspace 2.0.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A week ago, we did a series of presentations about Clearspace 2.0 development. We also videotaped all of the presentations, but the editing will take some time for the video, so I wanted to go ahead and share PDFs of the presentations now with the Jivespace community. The videos should be coming out at a rate of 1-2 per week over the next few weeks.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have attached 5 presentations, and I suggest reading them in this order:&lt;/p&gt;&lt;ul&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Clearspace 2.0 Overview&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Theming&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Plugins&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Widgets&lt;/p&gt;&lt;/li&gt;&lt;li level="1" type="ul"&gt;&lt;p&gt;Web Services&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:70f492a8-8fea-4731-a5db-5114bb562fbe] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">developers</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">jivespace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">developers</category>
      <pubDate>Fri, 18 Apr 2008 20:48:02 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/18/developer-presentations-on-theming-plugins-widgets-and-more-for-clearspace-20</guid>
      <dc:date>2008-04-18T20:48:02Z</dc:date>
      <clearspace:dateToText>7 months, 5 days ago</clearspace:dateToText>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/developer-presentations-on-theming-plugins-widgets-and-more-for-clearspace-20</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1515</wfw:commentRss>
    </item>
    <item>
      <title>Clearspace 2.0.1 Released</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/18/clearspace-201-released</link>
      <description>&lt;!-- [DocumentBodyStart:1da86a67-6cc5-44df-bbae-2b5f02ab8385] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Clearspace 2.0.1 was released last night. It has a number of bug fixes over the 2.0.0 release. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It also has significant improvements to the source build. Several people posted issues&amp;nbsp; with our source build here on Jivespace, and we think that this version should resolve those issues.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Existing customers can download the new source build or the new application files from your "My Account" page. If you want an evaluation version of Clearspace or Clearspace Community 2.0.1, you can find it on the &lt;a class="jive-link-external-small" href="index.jsp"&gt;Jivespace downloads&lt;/a&gt; page.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:1da86a67-6cc5-44df-bbae-2b5f02ab8385] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">jivespace</category>
      <pubDate>Fri, 18 Apr 2008 19:45:17 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/18/clearspace-201-released</guid>
      <dc:date>2008-04-18T19:45:17Z</dc:date>
      <clearspace:dateToText>7 months, 5 days ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/clearspace-201-released</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1514</wfw:commentRss>
    </item>
    <item>
      <title>Want to Display a Calendar in Clearspace?</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/18/want-to-display-a-calendar-in-clearspace</link>
      <description>&lt;!-- [DocumentBodyStart:e6acc4ed-9a35-4149-9788-f979de7ee35f] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;We've had requests for Calendar functionality in Clearspace, but so far, we haven't had an easy way to add a Calendar. Now, with Jive's &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/blogs/jivetalks/2008/04/06/jive-acquires-jotlet"&gt;recent Jotlet.net acquisition&lt;/a&gt;, we have a way for people to add calendars to Clearspace customized space pages with the Jotlet.net Calendar Plugin!&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This simple Jotlet.net Calendar Widget is a plugin that contains a widget that lets you show and edit any or all of your Jotlet.net calendars on your Clearspace community, homepage, or project pages.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Or if you just want to see how Adam Wulf created this widget, you can find the source code in our &lt;a class="jive-link-external-small" href="https://svn.jivesoftware.com/svn/dev/repos/jive/clearspace_2_0/jotlet/"&gt;svn repository&lt;/a&gt;. You can also find the Jotlet.net Calendar widget and more plugins for Clearspace in our &lt;a class="jive-link-external-small" href="community/developer/clearspace/plugins?view=overview"&gt;Jivespace plugin space&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:e6acc4ed-9a35-4149-9788-f979de7ee35f] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">widget</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">jotlet</category>
      <pubDate>Fri, 18 Apr 2008 16:41:03 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/04/18/want-to-display-a-calendar-in-clearspace</guid>
      <dc:date>2008-04-18T16:41:03Z</dc:date>
      <clearspace:dateToText>7 months, 5 days ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/want-to-display-a-calendar-in-clearspace</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1513</wfw:commentRss>
    </item>
    <item>
      <title>Prototype in Clearspace 2.0</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/03/25/prototype-in-clearspace-20</link>
      <description>&lt;!-- [DocumentBodyStart:14711c75-d604-4c81-a4f0-852bcb275af7] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;In this video, Clearspace developer, Nick Hill, talks about how Prototype, Scriptaculous and other Javascript technologies are used within Clearspace 2.0. This was originally presented as an internal Jive training to get our developers up to speed on some of the newer technologies used in Clearspace 2.0, and we wanted to share it with other people doing Clearspace development. If you want to learn more about the Clearspace 2.0 beta, you can visit the &lt;a class="jive-link-external-small" href="http://www.jivesoftware.com/community/community/developer/clearspace/beta"&gt;beta area on Jivespace&lt;/a&gt;.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The pdf file with the complete slides from the presentation is attached below.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;object data="http://blip.tv/scripts/flash/blipplayer.swf?autoStart=false&amp;amp;file=http://blip.tv/file/get/Samjive-PrototypeInClearspace20282.flv&amp;amp;source=" height="294" type="application/x-shockwave-flash" width="400" wmode="transparent"&gt;&lt;param name="movie" value="http://blip.tv/scripts/flash/blipplayer.swf?autoStart=false&amp;amp;file=http://blip.tv/file/get/Samjive-PrototypeInClearspace20282.flv&amp;amp;source="/&gt;&lt;/object&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can watch a &lt;a class="jive-link-external-small" href="http://blip.tv/file/772773"&gt;larger Flash version&lt;/a&gt; or download the &lt;a class="jive-link-external-small" href="http://blip.tv/file/get/Samjive-PrototypeInClearspace20282.mov"&gt;Quicktime Movie&lt;/a&gt; version (Caution: 179MB file)&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:14711c75-d604-4c81-a4f0-852bcb275af7] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">javascript</category>
      <pubDate>Tue, 25 Mar 2008 18:39:57 GMT</pubDate>
      <author>dawn</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/03/25/prototype-in-clearspace-20</guid>
      <dc:date>2008-03-25T18:39:57Z</dc:date>
      <clearspace:dateToText>7 months, 4 weeks ago</clearspace:dateToText>
      <wfw:comment>http://www.jivesoftware.com/jivespace/blogs/jivespace/comment/prototype-in-clearspace-20</wfw:comment>
      <wfw:commentRss>http://www.jivesoftware.com/jivespace/blogs/jivespace/feeds/comments?blogPost=1497</wfw:commentRss>
    </item>
    <item>
      <title>How and Where we used the Spring framework in Clearspace 2.0</title>
      <link>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/03/20/how-and-where-we-used-the-spring-framework-in-clearspace-20</link>
      <description>&lt;!-- [DocumentBodyStart:5a1ed783-6613-44a5-a2bc-8ff2eb185b73] --&gt;&lt;div class='jive-rendered-content'&gt;&lt;p&gt;For those of you who are fans of Spring, or those who are just plain curious, I'd like to briefly go over the parts of the framework we used in the latest release of Clearspace.&amp;nbsp; One of our goals for the new release was to take advantage of the power the framework offered where it made sense to us, and in the end it turned out Spring and Clearspace are a good fit for eachother.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Core Context and Struts&lt;/strong&gt;: The JiveContext now extends the Spring ApplicationContext.&amp;nbsp; Everything registered with the context is a Spring bean.&amp;nbsp; Struts actions and interceptors are autowired using these bean definitions.&amp;nbsp; Writing Actions just got a whole lot simpler. &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Data Access&lt;/strong&gt;: We changed a lot of our code to use Spring's JdbcTemplate and SimpleJdbcTemplate.&amp;nbsp; This has the advantage of making our DAO code much simpler and less error prone, as well as quicker to write.&amp;nbsp; Some classes ended up half the size after this effort.&amp;nbsp; We used annotation-based transactions, wired in using Spring's AspectJ support via the AnnotationTransactionAspect.&amp;nbsp; This allowed us to quickly add transactional coverage of far more DAO methods than before, and more easily make methods transactional in future development.&amp;nbsp; Finally we used Spring's LDAPTemplate in several places to simplify directory access code.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt;: We're using Acegi (Spring Security) for authentication.&amp;nbsp; This allows the possibility to authenticate against more than one data store.&amp;nbsp; For example, you could have one account that authenticates against LDAP, and a separate machine account that authenticates against a database.&amp;nbsp; It also provides a well documented, peer-reviewed framework to use as a platform for developing custom authentication solutions.&amp;nbsp; We are investigating using Acegi more fully for authorization in future releases.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Tasks&lt;/strong&gt;: We worked hard to externalize timed tasks so that they each have bean definitions.&amp;nbsp; This gives greater insight into what is being fired, why, and where.&amp;nbsp; It also makes it much easier to control when a task is firing, or turn it off completely for testing purposes.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Plugins&lt;/strong&gt;: We allow plugins to add their own Spring bean definitions to the context, so that Plugin actions and interceptors can be autowired as expected.&amp;nbsp; This is done via the plugin's "spring.xml" file.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Web Services and AJAX&lt;/strong&gt;: Apache CXF is now used to expose SOAP and REST style web services.&amp;nbsp; It relies heavily on Spring for its configuration.&amp;nbsp; We are also using Spring for DWR configuration, via the Spring 2.0 DWR namespace.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Customizations&lt;/strong&gt;: As part of the new release we also parse any XML file in the &amp;lt;jive home&amp;gt;/etc directory with the expectation that it's a Spring configuration file.&amp;nbsp; Developers can use this to extend or override bean definitions in the core application context.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In the end, we found Spring very helpful to simplifying our codebase and providing a point of cohesion.&amp;nbsp; We look forward to using it even more fully as we continue to develop Clearspace, and as the Spring framework itself evolves.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:5a1ed783-6613-44a5-a2bc-8ff2eb185b73] --&gt;</description>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspace</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">clearspacex</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">2.0</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">spring</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">springframework</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">struts</category>
      <category domain="http://www.jivesoftware.com/jivespace/blogs/jivespace/tags">differences</category>
      <pubDate>Thu, 20 Mar 2008 19:55:01 GMT</pubDate>
      <author>dolan</author>
      <guid>http://www.jivesoftware.com/jivespace/blogs/jivespace/2008/03/20/how-and-where-we-used-the-spring-framework-in-clearspace-20</guid>
      <dc:date>2008-03-20T19:55:01Z</dc:date>
      <clearspace:dateToText>8 months, 4 days ago</clearspace:dateTo