Return to Jive Software

1 2 Previous Next

Jivespace Community Blog

20 Posts tagged with the plugins tag

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

 

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.

 

Here's a high-level list of the changes that effect extension and customization code:

 

  • Clearspace was migrated to the Spring framework. 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).

  • Clearspace was migrated from WebWork2 to Struts2. This has broad impact on plugins, but the changes are relatively small  -- primarily effecting syntax in FreeMarker templates and configuration files.

  • Widgets were enhanced to support use in multiple contexts, rather than just space overview pages. Changes to widget development support this new feature.

  • The macro-related API was narrowed 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.

  • Web services support 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.

  • Custom user data providers are now based on a streamlined API. These must be rewritten, but the new model is much simpler.

  • Custom authentication providers are now based on Spring through Acegi. The change is pretty significant, including new API and configuration conventions.

  • Myriad API changes 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.

 

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.

 

  • Migration from WebWork to Struts means replacing your xwork-plugin.xml with a struts.xml

  • Migration to Spring means adding a spring.xml for certain kinds of Spring support.

  • 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.

  • Support for a <maxserverversion> element was added. Similar to the <minserverversion> 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.

  • 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.

    • 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.

    • Plugin.destroyPlugin is now Plugin.destroy.

 

The information above along with more details can be found in the Upgrading Extensions to 2.0 documentation.

 

 

1,650 Views 0 Comments Permalink Tags: clearspace, plugins, webservices, spring, spring, 2.0, struts

Learn more about using web services to access your data in Clearspace 2.0 with Andrew Wright, Jive Software Engineer.

 

 

You can also download the Quicktime version (Caution: file is ~232MB), or you can watch a larger version online, which will improve readability of embedded screenshots (recommended).

 

The entire presentation is also attached below as a PDF file.

1,300 Views 0 Comments Permalink Tags: clearspace, plugins, web_services, web_services, soap, rest, 2.0

We just launched our new Jivespace Plugin Directory for Clearspace plugins! You can now more easily find and download plugins from Jivespace, and if you are developing plugins, you can add your plugins to the new directory.

 

Plugin Directory

 

The really cool part is that we created the entire plugin directory as a plugin to Clearspace. Our web engineer, Tim, took our existing document content type and extended it to create a new plugin type with additional information relevant to plugins along with a new look and feel for the plugin directory.  He also used the plugin jar to pull almost all of the metadata displayed with the plugins, including license, logo, readme, compatible versions, and much more. For developers, this means that you only need to enter the information in your plugin, instead of having to duplicate all of the information by filling out redundant forms. It also means that when you update your plugin jar file with a new release, the plugin information will be automatically updated.

 

Tim is currently working on polishing the code a bit, but he will be releasing this as a plugin for other people to use as a plugin marketplace. It also provides a very useful example of how to extend an existing Clearspace content type to create a new content type in Clearspace.

 

Keep in mind that this is just the first version of our Plugin Directory, and we plan to start making incremental improvements and enhancements. But first, we want to hear from you. Take a look at the new Jivespace Plugin Directory. What do you like? dislike? How can we make this even better in future revisions?  Please leave comments with your ideas on this blog post!

 

 

 

 

1,086 Views 1 Comments Permalink Tags: jivespace, clearspace, plugins, plugin_directory, plugin_directory

Learn the basics of how to develop a plugin for Clearspace 2.0 from Jive engineer, Jon Garrison. Jon talks about spring, struts, and more in this video.

 

 

You can also download the Quicktime version (Caution: file is ~140MB), or you can watch a larger version online, which will improve readability of embedded screenshots (recommended).

 

The entire presentation is also attached below as a PDF file.

 

1,225 Views 0 Comments Permalink Tags: podcast, video, clearspace, plugins, customization, customization

Have you ever wanted to display your external (public) corporate blog inside the internal Clearspace instance used by your employees? Would you like to display content from your personal blog within your Clearspace instance?

 

The Feed Your Blog plugin gives you the ability to do both of the above and more. This plugin allows your Clearspace instance to periodically poll an RSS or Atom feed and have it post any new entries that it finds to a blog that you specify.

 

You can get this plugin and other plugins by visiting our plugin page. You can also view the source code of our plugins by browsing our svn repository.

1,055 Views 0 Comments Permalink Tags: plugin, clearspace, plugins, plugins, rss, feeds

You can now view or download the Clearspace 2.0 plugins 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.

 

Clearspace 2.0 Plugins include:

  • Jotlet.net Calendar Widget: show and edit your Jotlet.net calendars

  • Clearfox : View Clearspace content in a Firefox Sidebar

  • Example Plugin: Several simple examples designed to show how plugins and macros work

  • blip.tv Macro: Embed Blip.tv videos in blogs, docs, or discussions

  • EmbedContent Macro: Embed into one document the content of another

  • SlideShare Macro: Display slideshare.net presentations in docs, blog posts, and discussions.

  • Vimeo Macro: Display Vimeo movies in documents, blog posts, and threads

  • User Stats Plugin: This widget displays the names of recently registered users.

  • Yahoo Maps Plugin: Use yahoo maps in documents created in Clearspace to display a map of an address.

 

If you just want to look at the code, you can access it from our svn repository.

 

 

1,300 Views 1 Comments Permalink Tags: plugins, 2.0

Do you have employees or customers who working in various locations around the world?

 

The Translations macro can help you easily translate documents into other languages only as the need arises. It will insert several flags into the document. When you click on one of the flags, a new window will open with the translated version of the current page.

 

Right now, it is using Google as the translation engine, and is fixed at having English as the original language. However, the source code is available if you want to tweak it to meet your specific needs (just don't forget to contribute back any enhancements)!

 

If you want to take a peek at the code to see how the translations macro was constructed, you can get the source from svn.

2,635 Views 3 Comments Permalink Tags: plugins, macro, language, translation, featured_cs_plugin, featured_cs_plugin

At Jive, we use our internal instance of Clearspace for everything, we call it Brewspace (hey, we're in Portland with a brew pub on every corner!) We keep all of our planning documents, weekly status updates, and more in Brewspace. We use the TaskList macro to track completion of tasks.

 

 

The TaskList macro gives authors the ability to generate and track a simple list of tasks. Each line inside the macro body is parsed as a separate task. Each task will display with a graphic button for marking the task complete. When this happens, the userid is also recorded and displayed.

 

The TaskListMacro applies authorization policies based on the surrounding context. In simpler terms, if you are an author for the piece of content, you can also edit the tasks.

 

Download or learn more about the TaskList Macro from Jivespace or visit our svn server to download the source and see how we did it!

 

If you are interested in writing your own plugin or macro for Clearspace, you can find plenty of information in our documentation space.

943 Views 1 Comments Permalink Tags: plugins, featured_cs_plugin, tasklist

Watch this video to learn more about how Rick Palmer from Jive Software created a widget for Clearspace to display more information about users. You can also get more information about the User Stats Widget Plugin, download it, or view the source code on Jivespace.<br><br>

 

 

 

Or you can download the Quicktime version (Caution! ~250 MB file!)

1,054 Views 0 Comments Permalink Tags: podcast, video, clearspace, plugins, plugins, widget

Have you ever wished you could easily download or browse all of the available Clearspace plugin source code? Now you can!

 

If you are interested in writing a Clearspace plugin, you can download our example plugin to use as a framework. The example plugin contains four sample plugins: action, macro, webservices, and widget. For those of you who are experienced writing Clearspace plugins, you might want to look at the code for all of the plugins to see some more complicated real world examples.

 

We have uploaded code for 4 community contributed plugins and 7 Jive developed plugins as a starting point.

 

If you are developing a plugin for Clearspace, and would like to get it in our svn repository send me a private message via Jivespace, and I'll get your commit permissions configured.

 

As always, our documentation space has more information about writing plugins.

1,473 Views 2 Comments Permalink Tags: clearspace, plugins

Having problems keeping up with all of the activity in your Clearspace community? You can always use the many RSS feeds to keep up with content, but if you are looking for another option, you should take a look at Clearfox.

 

The Clearfox plugin installs a sidebar in your Firefox browser that keeps you up to date with the latest and greatest content in your Clearspace community. It is a Clearspace plugin and a Firefox extension all wrapped into one nice package.

 

If you want more details about how Aaron Johnson built Clearfox, he has posted all of the gory details as a two-part series on his blog: Creating a Firefox Sidebar for Clearspace: Part I and Part II

 

Download the plugin or learn more about Firefox Sidebar Plugin: Clearfox.

 

If you are interested in writing your own plugin or macro for Clearspace, you can find plenty of information in our documentation space.

981 Views 0 Comments Permalink Tags: plugins, clearfox, featured_cs_plugin

We were really pleased at how popular widgets were from the start. It seems as if everyone has an idea for something they want to "widgetize." So it's great that they're so easy to build.

 

If you haven't checked out widget development in Clearspace, now's a great time to do it. Version 1.8 improves on widgets' debut by adding support for including them in plugins. Now you can build a widget and get that handy autodeployment support you already get with macros, actions, and the like.

 

If you have looked at building widgets, then you know that the version 1.8 changes make them easier to deploy, but they were easy to build from the start. For an introductory tutorial on building widgets, check out  #. And be sure to download the # for a sample.

1,018 Views 0 Comments Permalink Tags: clearspace, plugins, widgets

Have you ever wanted to pull a list of issues from JIRA into a document? Tim Colson, the winner of our first plugin contest, has developed an awesome JiraIssues Macro that makes it easy to interact with JIRA issues from within Clearspace using a slick Flex interface!

 

Because the input of the macro is an XML feed URL, you can customize it to show almost any cut of the data from Jira (only open issues on a specific project owned by a certain owner, etc.) The interface gives you the flexibility to filter, show/hide fields, and interact with the data in a variety of ways.

 

Download the plugin or learn more about the JiraIssues Macro Plugin with Flex.

 

If you are interested in writing your own plugin or macro for Clearspace, you can find plenty of information in our documentation space.

1,104 Views 0 Comments Permalink Tags: clearspace, plugins, macro, macro, jira, featured_cs_plugin

An easy way to extend Clearspace is by writing a macro. Macros can be used to modify and/or decorate a piece of a document, blog post or comment. For example: Say you wanted to include a map of downtown Portland, OR. Assuming you had the yahoomaps plugin installed, you could do so using the ymaps macro included in the plugin.

In a document or a blog post, you could write the following :


Jive Software is located in Downtown Portland
Address:
{ymaps}304 SW Adler, Portland, OR{ymaps}

 

When the document or the blog post is rendered, the


{ymaps}304 SW Adler, Portland, OR{ymaps}

 

portion of the document would be replaced by a map from Yahoo.

 

Writing a macro is simple, all you have to do is implement that Macro interface

public interface Macro{
    String render(String body, Map<String, String> parameters, MacroContext macroContext);
}

The return value (String) contains the HTML and/or Javascript code that replaces the macro tag in the document. For example, in case of Yahoo maps, the macro returns the following.

<script type="text/javascript" src="http://maps.yahooapis.com/v3.5/fl/javascript/apiloader.js?apid=foo"></script>
<div id="mapContainer_1234">
</div>
<script type="text/javascript">
...
</script>

When the document is rendered in the browser, the Javascript block executes and adds the Yahoo maps widget to the &lt;div&gt; element.

 

The render method of the Macro interface is passed three arguments.

  • body: This argument contains the text between tags. So, 304 SW Adler, Portland, OR, would mean that the render method would be passed the string "304 SW Adler, Portland, OR" as the body argument.

  • parameters: This argument is a map of name value pairs that capture the attributes set on the macro. For example, it is possible to specify the type of the map and zoom level by using "type" and "zoom" attributes on the yahoo maps plugin. So, 304 SW Adler, Portland, OR, will create a hybrid map with the zoom level set to 4. These two attributes will be passed inside the parameter map argument. In the code, you would access them using the name of the attribute as the key.

     String render(String body, Map<String, String> parameters, MacroContext macroContext){
          ....
          String mapType = parameters.get("type");//will return the string "hybrid"
          String zoomLevel = parameters.get("zoom"); //will return the string "4"
          ....
     }
  • macroContext: macroContext argument allows you to get handle to objects and managers inside Clearspace. Most macros never use this argument, but sometimes it is neccesary call into Clearspace to lookup a value or peek at the document that the macro was included in. For example, the yahoo maps macro needs to ensure that yahoo apis javascript is included only once in a document, regardless of the number of times a macro was included in the document. So, in the render method, it queries the macroContext for the document body and checks to see how many times it has been included and appropriately includes the &lt;script&gt; tag when needed.

 

Testing

Unit testing macros is extremely easy, since all of the arguments of the render method are easily mock-able. Macros are ideal candidates for TDD, since you know exactly what the input arguments and the HTML/Javascript return value should look like.

 

Packaging and additional docs

Macros are packaged as part of a plugin. So, the process is the same as a plugin. See Plugin and Clearspace documentation for additional details.

1,315 Views 0 Comments Permalink Tags: clearspacex, clearspace, plugins, developers

We have selected the winners for our first Clearspace plugin contest based on usefulness, completeness, creativity / elegance, and code quality.

 

(Drum Roll)

 

  1. First Place $5000: JiraIssues Macro Plugin with Flex by timcolson - bonus points for using Flex and targeting developer audiences!

  2. Second Place $2500: Google Maps plugin by Jay Allen - very cool way to get a feel for community member locations!

  3. Third Place $1500: Translations Macro by Lokkju - nice way to support international community members!

  4. Honorable Mention: Flickr Slideshow macro by Beans0063 - cool way to embed Flickr slide shows!

 

We will be contacting each of the winners shortly to work out all of the details!

1,363 Views 0 Comments Permalink Tags: jivespace, plugins, plugins, summer_2007_plugin_contest, contest
1 2 Previous Next

Actions

Incoming Links