Using Apache Camel with Scala and the Camel Scala DSL

Whenever I encounter a situation where I have to mix a blend of different services and endpoints and apply one or more of the traditional enterprise integration patterns then Apache Camel often is my weapon of choice. I simply love how easy it is to set up some datasources, add some routing magic, data transformers, load balancers, content enrichers and enjoy the result. Another thing that I’m beginning to love is Scala and so this is the perfect time to write an article about using Scala and Apache Camel together. ...

February 13, 2013 · 15 min · 3186 words · Micha Kops

How to create a Template Bundle Plugin in Confluence

Since Confluence 3.2. there is a new plugin module type that allows you to deploy templates in a bundle via the plugin API. In addition it is possible to assign these templates to specific spaces and preview available templates in the Confluence administration area. So let’s build some sample templates.. Creating a Template Bundle Plugin Creating a template bundle is easy – just create a class implementing TemplatePackage – there are two methods: one returns a list of bundled PageTemplate Objects the other the name for the template bundle. ...

July 12, 2010 · 4 min · 675 words · Micha Kops

Snippets: Getting License Information from the Confluence API

Sometimes one needs to look up license details of a running Confluence system .. perhaps for creating a commercial plugin or to display recommendations dependant from the license used. For this reason there are a few possibilities for receiving some license information from the Confluence API or the velocity context. Note: This article is outdated since the Atlassian Marketplace was launched and a shiny new licensing API was added. Until this article is updated I strongly recommend to take a closer look at the detailed information that Atlassian is providing in the Developer Documentation. ...

May 6, 2010 · 3 min · 637 words · Micha Kops

How to build a Confluence Macro Plugin

The goal is to build a small macro plugin deployable via the Confluence plugin API rendering some spaces. Please note that I am going to build the plugin using just Maven and not the Atlassian Maven Wrapper called the “Atlassian Plugin SDK” – more information about that is available at the Atlassian website. The macro output will be rendered using a Velocity template and all messages are stored for i18n in properties files bundled with the plugin. ...

April 13, 2010 · 7 min · 1431 words · Micha Kops

Atlassian Snippets

Disable YUI compressor <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <compressResources>false</compressResources> [..] </configuration> </plugin> Confluence – Get favourites by user Using the label manager. List getFavouriteSpaces(String username) Confluence – Determine the base URL Using the SettingsManager: String baseUrl = settingsManager.getGlobalSettings().getBaseUrl(); Confluence – Get the context path Using the BootstrapManager: String contextPath = bootstrapManager.getWebAppContextPath(); Confluence – Using Velocity Template for a Macro final VelocityContext contextMap = new VelocityContext(MacroUtils.defaultVelocityContext()); contextMap.put("key", obj); // references obj as variable named $key in the velocity template VelocityUtils.getRenderedTemplate("path/to/template.vm", contextMap); ...

March 1, 2010 · 3 min · 544 words · Micha Kops