Collaboration Stack Community Agenda and Stuff

So the first Collaboration Stack Community Event Agenda is out, my slot in it has be nailed down, it is already half full and I’m getting over excited again!

Why you ask is Stickfight getting over excited about something that is not caffeine or alcohol.

Because this is the first “more than IBM” conference that I have been to that I have been anything more than just an attendee also I’m going to LEARN stuff as it does not use the normal “Sit there an listen to people talk” format.

This new format gives everyone a far better chance of telling people about the cool stuff they know about, with the best fringe benifit that as its in central London there will be tons of opportunities to have a quiet chat with people about stuff we can do together over a pint or two 🙂

If you want to hear me Rant, I will be getting my 10 mins in the fine company of Mark Barton and Steven Chapman at 2.15 – 2.45 speaking on Web Development Technologies.

Ah yes, you need to register as well at Event Brite

New Anime Series: No-Rin

First Episode(s) Review for: No-Rin

A lad at a country farm school dreams of going to Toykyo and becoming a trendy farmer which is really just an excuse to send vegetables to the Idol that he is besotted with, when this Idol retires he is devastated, but then she turns up at his school as a transfer student….what could her reason be??


Completely standard Anime animation, better than western but nothing to see here, moving on

Plot Potential:

This I feel will not be a plot strong Anime, but that’s OK, its lots of fun to watch


Lovely Idol Pop tunes with jolly opening and closing themes

Reminds me of:

Yakitate!! Japan and an “Popular person falls for everyday Joe” anime something like Maid Sama


A genuinely funny Anime, the first one this season to make me laugh out loud, not one of the great plot series but treat it as a sitcom and you will be in for a good time




Disclaimer: These are mini reviews of anime’s that are fresh out in Japan and are not licensed in the UK, buy them once they have been licensed or at the very least buy the merchandise, remember if the anime makers make a loss, THEY WILL STOP MAKING ANIME!!

New Anime Series: Noragmi

First Episode(s) Review for: Noragmi

A young down on his luck homeless God or as he calls himself “A delivery God” is struggling his way though life, till he is saved from a passing bus by a young girl, the incident gives the girl the ability to leave her body, something she wants fixed, enter the world of street level small gods and their regalia


Good high detail animation the kind I associated with high action anime (I wonder if they get slowed down a lot and replayed one frame at a time), very nice and clear with excellent use of colour such as pastels at emotional times and mono chrome on the opening sequence

Plot Potential:

I have a week spot of any story to do with gods but this has tons of potential but currently no direction so I think it MIGHT be a great series, as long as the opportunity it has is not wasted.


Hooray the first MP3 player worthy opening theme this season, the rest of the music in this series is a bit ho-hum

Reminds me of:

bit of Yozakura Quartet bit of XxxHolic


So its basically the life of a street gang but in the supernatural world, good stuff, the characters are nothing new, but its still very much worth watching especially if the plot lives up to its potential.




Disclaimer: These are mini reviews of anime’s that are fresh out in Japan and are not licensed in the UK, buy them once they have been licensed or at the very least buy the merchandise, remember if the anime makers make a loss, THEY WILL STOP MAKING ANIME!!

Backing Up Websphere Config

As a connections developer you will be fiddling with you local Websphere configuration, and down that road madness lays, so before you touch anything the make the whole thing go BANG! (and quite frankly that can be anything, you need to know how to backup and restore the config.

To do this first go to the bin directory of your deployment manager, in my test server’s case that is (yours will most likely be very similar except for it being on “E”)


and just enter “backupconfig” giving the location of a new zip file you want created for everything to be stored in and wait for the stream of little dots to finish,


On a web sphere server with a ‘medium’ Connections installation on it, This will give you a Zip file of about 775Meg so make sure you have the space (on a side note go have a look inside the zip it’s fascinating, like some sort of config abattoir)
hopefully you wont want it but say your change broke everything and you need to put it all back as it was, you run the ‘restoreconfig’ comand, as follows using the Zip file you created


Again, just wait for it to be done, and things should start working again.
Of course its all fully documented on the IBM website if you know to look [Here]( And [Here](
_NOTE: I’m not a proper Web Sphere admin, If you want proper Web Sphere and Connections admin you want [the Turtle Partnership](

New Anime Series: Nobunagun

First Episode(s) Review for: Nobunagun

Violent dreams haunt a somewhat forgetful and easy goring girl, she is a bit of a flake but bumbles though life happily enough, that is until aliens arrive at a field trip, and she turns out to have the memories of a great Japanese military commander and the giant cannons to match.


A mix of open and cheerful for the human areas and dark and brooding the the dream sequences, A very nice touch is the use of coloured shadows to show a persons type i.e. normal girls get flowers in their shadows while the heroine gets camouflage colours

Plot Potential:

This depends, it could be as a simple power ranger series or as serious a samurai drama, hard to tell at this point as there is a mix of smiling bouncy bits and people with swords thought their bellies


Alt Rock though out, fairly generic stuff but good beats

Reminds me of:

Time travel between Neon Genesis Evangelion and Samurai Gun with a chunk of the plot of Gate Keepers


I am pleasantly surprised with this Anime it feels like it should be a jolly little jokey super powered team Anime, but it is far darker in execution, a real dark horse of the season, well worth watching.




Disclaimer: These are mini reviews of anime’s that are fresh out in Japan and are not licensed in the UK, buy them once they have been licensed or at the very least buy the merchandise, remember if the anime makers make a loss, THEY WILL STOP MAKING ANIME!!

Inserting HTML into word documents

Document generation is one of the most useful things that any system can do for users as basically users tend to think in terms of Microsoft word and Excel documents and in my opinion the best library for producing them via Java is

This library (I am using version 2.8) allows you to build everything from scratch, but its far easier to start with a template document normally supplied by a client and just substitute the values you want

so lets do that:

First create your empty “WordprocessingMLPackage” package which is the holding object for your word document, and create a normal java File object using your template file

Then load that file into your WordprocessingMLPackage

WordprocessingMLPackage wordMLPackage;
File templatefile = new File("C:\mytemplatefile.docx");
wordMLPackage = WordprocessingMLPackage.load(templatefile);

Ok, so now we have a word document, but its just a generic document its not personalised to our clients needs, to personalise it we first need to put placeholders in the template for our data to go in, these are just text in the word document in the format ${xxxxxxx} as you can see below


Once these are in you can use them to substitute your text
first build and populate yourself a hashmap of the values you want substituting

HashMap<String, String> mappings = new HashMap<String, String>();
mappings.put("Replace_Tex1", "This is some custome data");

As you can see the first part needs to be the placeholder name and the second part the value you want to be inserted.
Once that is ready you can do the substitution, but first you need to convert your existing WordprocessingMLPackage to XML so you have something easier to work with

String xml = XmlUtils.marshaltoString(wordMLPackage.getMainDocumentPart().getJaxbElement(), true);

with the resultant xml and the hashmap we can use the XmlUtils.unmarshallFromTemplate function to do the swap then stuff the result back into the WordprocessingMLPackage

wordMLPackage.getMainDocumentPart().setJaxbElement((org.docx4j.wml.Document) XmlUtils.unmarshallFromTemplate(xml, mappings));

And that is us done we can just “SaveToZipFile” (basically docx files are just renamed zip files with XML inside them) and save the file to the fie system

SaveToZipFile saver = new SaveToZipFile(wordMLPackage);"C:\finaldocument.docx");

But where you ask was the html insertion you promised, you have just shown us plain text, where is the formatted html inserts.
For that dear reader with need to add a bunch more code
There is no built in function to do that for HTML so we are going to have to:
1. Get a list of all the object (such as paragraphs, lines of text etc etc) in the WordprocessingMLPackage
2. Search though then to find the location of the text we want to replace (the placeholder)
3. Remove the Place holder text.
4. Add a wrapper object to our HTML, convert it to DOCX XML and insert it at the correct place.
for No.1 we will pinch from the fabulous Jos Dirksen’s [Create complex Word documents programatically with docx4j]( to get our list of objects.

private static List<Object> getAllElementFromObject(Object obj, Class<?> toSearch) {
    List<Object> result = new ArrayList<Object>();
    if (obj instanceof JAXBElement) obj = ((JAXBElement<?>) obj).getValue();
    if (obj.getClass().equals(toSearch))
    else if (obj instanceof ContentAccessor) {
        List<?> children = ((ContentAccessor) obj).getContent();
        for (Object child : children) {
            result.addAll(getAllElementFromObject(child, toSearch));
    return result;

That done we will use that function to go though and search each object for the placeholder text and if its found return the integer that tells us its location in the document (and while its at it, it removes the place holder text)

private int findPlaceHolder(String placeholder, WordprocessingMLPackage template) {
    int index = 0;
    List<Object> paragraphs = getAllElementFromObject(template.getMainDocumentPart(), P.class);
    P toReplace = null;
    for (Object p : paragraphs) {
        List<Object> texts = getAllElementFromObject(p, Text.class);
        for (Object t : texts) {
            Text content = (Text) t;
            if (content.getValue().equals(placeholder)) {
                toReplace = (P) p;
                index = template.getMainDocumentPart().getContent().indexOf(toReplace);
    if ( toReplace != null ) {
        //remove placeholder
    return index;

This finally gives us a way to insert the HTML at the correct place, so we do our mapping again, but this time with HTML rather than plain text

mappings.put("Replace_Tex1", "<b>This is some custom html data</b>");

Then loop though the HashMap, finding the correct location, importing the HTML and inserting the HTML into the WordprocessingMLPackage using the addall function.

Iterator iterator = mappings.entrySet().iterator();
while (iterator.hasNext()) {
    Map.Entry mapEntry = (Map.Entry);
    String xhtml = "<div>" + mapEntry.getValue().toString() + "</div>"; 
    int locationOfItem =  findPlaceHolder(mapEntry.getKey().toString(), wordMLPackage);
    if (locationOfItem > 0) {
        wordMLPackage.getMainDocumentPart().getContent().addAll(locationOfItem , XHTMLImporter.convert(xhtml, null, wordMLPackage)  );   
    xhtml = "";

Thats it you can now insert any HTML you want anywhere you want into an existing Document
You can see that I had to wrap the HTML in a “DIV” (any root element will do but DIV is easiest), you have to do this or the XHTMLImporter will fail its validation, also the smallest item the HTML will import in as is a Paragraph so you can not use this method to change text and formatting inside an existing line, you will always get a paragraph break before and after (not really a limitation given the use cases)
As always yell if anything seems off.

New Anime Series: Magical Warfare

First Episode(s) Review for: Magical Warfare

A normal Japanese high school boy who happens to be good at Kendo (stop me if you have heard this one before) Saves a young female magician who is being being hunted by her brain washed brother and his gang of evil magicians, the young lads friends join the fight and start manifesting magic of their own (to much comic surprise)


The quality varies at different times, you get the feeling that the the artists who are painting the backgrounds are more talented than the ones drawing the characters, but still excellent quality all rounds

Plot Potential:

After a very grim start, it moves happily into “you perv” misunderstanding territory and then back to grim, then on to standard high school battle territory (where the only loser seems to be concrete), it looks like we are going to have to save the world again with the help of epic battles series, but I do like the “attack a magician with magic in the living world and get stripped of your magic” touch


Good rousing opening music and solid rock end theme, the kind of music that makes people new to anime go “Cooo!! they have proper music on these cartoons”

Reminds me of:

Code Geass is obviously a huge influence but with shades of Tenchi Muyo and a pinch of Needless


The visual aspect of this anime totally out ways the plot, but hopefully that should improve, in the mean time its a solid series you could recommend to someone new to the genre, minor note: whats with the bloody stupid swords!!, there are hundreds of viable sword shapes without making up ones that would be naff to use




Disclaimer: These are mini reviews of anime’s that are fresh out in Japan and are not licensed in the UK, buy them once they have been licensed or at the very least buy the merchandise, remember if the anime makers make a loss, THEY WILL STOP MAKING ANIME!!

Connections aide memoire 01: Changing XML config

Now that we are all “connections developers” according to IBM, sooner or later you will need to starting dealing with Web sphere in a serious fashion, this is no simple task, as Web Sphere admin as far more complex that developing for Web sphere and the documentation makes massive assumptions, so I will be doing a series of simple and essential tips for developers so make your life a bit easier, starting off will be changing XML config on connections.

Most of the connections config resides in a file called “LotusConnections-config.xml”, now there are copies of this file all over the place, to change them you check them all out, make the change in one place then check them back in, this not only keeps the changes consistent over your connections installation but it validates your changes and keeps a backup.

To do this first go to the bin directory of your deployment manager, in my test server’s case that is (yours will most likely be very similar except for it being on “E”)


Then enter the wasadmin console with

wsadmin -lang jython

Next run the Connections Config jpython file


Once that is done (after a load of output to the screen) you need to check out the config files, you need to provide a location to check the files out to (just create a directory somewhere safe) and the name of the web sphere cell you want to get the files from (see below on how to get that)


If you don’t know the name of the cell you are working on (hell I never know) you can find out by typing the following.


You can now alter the files in the directory to suit what ever changes you want to make, the best way though is to use the “updateConfig” command which makes sure that you don’t make any bad types and screw your config up.


Once you are happy with your changes, you can check them them back in with the following (you will most likely need to restart the connections apps for the changes to take effect


_NOTE: I’m not a proper Web Sphere admin, If you want proper Web Sphere and Connections admin you want [the Turtle Partnership](

IBM Connect 2014 Slide Decks

This year was my busiest year yet at Connect with 6 hours total on stage, and as there is a good chance that technical content will be cut from next years conference these might be my last presentations there, so enjoy

SHOW104 – Practical Java (with Julian Robichaux)

Sunday | 13:30-15:30 PM | Swan Osprey

Take a whirlwind tour of the many ways in which Java can make your life better as a developer. We’ll use Java in IBM Notes, Eclipse, and the latest IDEs. And we’ll show you examples of best of breed libraries that can analyze data, create PDFs, and perform image processing on the fly. Get connected to IBM Connections, access relational data, open sockets, and parse feeds. And along the way we’ll throw in tips for testing, performance, and writing good code.

#####SHOW303 – Proper Connections Development for Proper Domino Developers (with [Matt White](

_Tuesday | 10:30-12:15 | Swan Osprey_

This is a session with a mission: to take a much loved IBM Domino app and deploy it to a client’s new IBM Connections environment. We’ll show different solutions such as the use of iWidgets or creating a REST API to make the application available to IBM Connections users and walk you through the process, from beginning to end. If you’re an IBM Domino developer who knows nothing about IBM Connections, this is the session for you.

Source Code Snippets to be uploaded in a bit

IBM Connect 2014 Round up

So I’m back from Connections 2014 and Ignoring a terrible case of the IBM Connect flu (which has been upgraded to include vomiting and diarrhoea) the event has been a great success

The previous 2 years of LotusSphere and IBM connection have been more than a little depressed and to a certain extent ‘desperate’ feeling, this year it felt much different, not the happy go Lucky ‘lets have a party’ of older Lotuspheres, but a heads down lets do some work feeling.

I ended up making far more contacts and having far more business conversations than in previous years, which has ended with the best set of business leads to be got from the conference in many a year. If I was honest this is largely due to the assistance provided to me by The turtle partnership and other members of LDC, which made my skill set perfectly timed for IBMs current focus.

IBM have re-badged us “Connections Developers” when what they really mean is ‘Web sphere Developers’, it’s what they have wanted us to be for years with little success and at last they have found a way to sell it to us without a revolt, this is fine by me as I had already started the transition, but it is a little bit ‘marketing’

The scheduling sucked, sorry but it did, people found lots of sessions with similar subjects matched against each other, there are tracks for a reason people!!, if you are a developer you should be able to follow the developer track without constantly deciding which developer sessions you can attend due to there being 3 on at once.

The social side of the conference was excellently done with Veronica Belmont (who’s autograph I got) providing a professional touch, plenty of things for people to do and the placement of the social cafe was just right as it provided a excellent amount of foot fall though the vendor area (always a good idea)

There were some indication that IBM is tightening the purse strings, such as the lack of entertainment at the party and there only being 4 rides open at the fairground trip, but that was compensated by none of the messing about with speaker tickets that we had last year, mind you as I was working neither worried me, but I might have cared if had paid 2k for a ticket.

My habit of walking though a crowd just listening in order to get a feel for it revealed a surprising large amount of Germanic and eastern European languages and quite a lot of Japanese, far more than I remember in previous years, perhaps market areas to pay attention to in the next year. Hmmmmmm

Conclusion: A good conference all round, and other than the scheduling, well done, if IBM can repeat it next year then I will be there, but if only 30% of the rumours of changes are true, it might only be a conference for management and HR staff, who tend not to ask difficult questions about technical products.

The Other LDC Blogs on the same subject

Matt White

Julian Woodward

LDC Group Photo for Connect 2014: aren’t we beautiful