Lazy Web: Atlassian Confluence Search API usage

This is for any Atlassian Confluence developers or contributors reading my blog. I am trying to develop a simple plugin and wanted to use the Confluence Search (v2) API but couln’t find much in the way of documentation or examples.

So I posted a question to the Confluence Forum but got no reply in three days :(. Should anyone be able to help me, the forum thread is here but I am also reposting here the text of the question:

I’m looking for examples and guidance in using the Search (v2) API in Confluence, specifically from a plugin.

I got hold of a SearchManager via Dependency Injection and obtained some results with code like the following

SearchQuery query = ...;
Search search = new Search(query, null, null);
SearchResults results = this.searchManager.search(search);

My problem is that I have no idea about which implementation of the SearchQuery interface to use and in particular how to specify a phrase to search for, since no subclass seems to provide for a way to set a query term.

Thanks in advance.

Please, help us grow!

sourcesense-logo.gifIt’s that time of the year again when we make plans for the growth of our company and we realize we need more people.

We’re looking for developers who would like to work for a small company with a strong orientation towards Open Source, as in wanting to actively participate in Open Source communities and give back as well as take. We like agility, focus, getting real. We like to communicate openly: Open Source is mostly about communicating with your peers, after all. We have strong international ties, so you could find yourself traveling a bit, mostly across Europe, but we can also offer telecommuting arrangements if you like working from home.

What we need mostly are young software developers who are well versed in the Java language and its platform. You will need to become familiar with one or more of the products of our partners. This means: Alfresco, Atlassian, JBoss, Terracotta, Hippo CMS and others. Ideally we’d like to have at least one product specialist for every one of those, helping customers implement solutions based upon them. Working towards this goal, we will define with you an appropriate learning path.

If you’re interested, send your resume (in text, HTML or PDF formats only; any other format will be rejected immediately) to recruitment@sourcesense.com. We’d love to hear your story.

Ouch

I think this goalie was a bit too vehement, don’t you think?

Goalie

What’s more amazing is that all he got was just a yellow card. What did he have to do in order to deserve a red card? Spit on the adversary’s grave?

For the record, this happened during the Hamburg vs. Werder Brema match in the Bundesliga. More shocking pictures here.

Being Your Own OpenID Provider

I tried twice today to set up a this domain as my OpenID, delegating first to Yahoo! then to my GMail account (using http://openid-provider.appspot.com/ which is almost there but not quite yet). Ended up setting up my own OpenID provider using phpMyID, which might be a bit rough at the edges but works as advertised.

I was only briefly stumped because for some reason, hashing my password using openssl did not give the same result as hashing it via PHP. Turns out I had forgotten to use ‘-n’ with ‘echo’ D’oh!

Somehow I was hoping this OpenID stuff would have been a bit easier…

Mr. Strobist is famous




David Hobby on USA Today

Originally uploaded by Ugo Cei.

I’ve been traveling too much as of late and it shows, especially when you consider how seldom I have updated my blog. However, one of the joys of traveling to the US is that hotels will typically leave a complimentary copy of USA Today in front of your room every morning for your reading pleasure.

I don’t find USA Today to be a particularly good read, but the other day I was glad to find that their “Money” section carried a long interview with David “Mr. Strobist” Hobby. Kudos to David for having become famous: he certainly deserves it!

Bizarre Firefox 3 Beta 5 bug

I just upgraded my installation of Firefox 3 to the latest Beta 5 version, after having used Beta 4 for a while. I must say that Firefox 3 on the Mac is miles above version 2, especially with respect to speed and memory usage, and it has immediately become my browser of choice, despite the unavailability of most add-ons for this version.

Beta 5, however, has this very annoying bug, at least on my Tiger-powered MacBook Pro: The Back and Forward navigation buttons are duplicated in the toolbar. Urgh!

FF3B5.png

Update: customizing the toolbar using the appropriate dialog box (View > Toolbars > Customize) to remove the extra navigation control fixed it.

Alfresco Mail Attach Action

I am proud to announce the immediate availability of the Alfresco Mail Attach Action, a custom action for Alfresco ECM that allows sending documents as email attachments.

sourcesense-logo.gifThis is my first contribution to the Alfresco Forge and it’s a very small thing, but hopefully the first of many more to come. As you might know, Alfresco is the leading provider of open source Enterprise Content Management systems and my employer, Sourcesense, is an Alfresco Gold Partner. Alfresco being an open source product meant that we were able to quickly and easily extend the existing Mail Action without having to reverse-engineer it. Try doing this with Sharepoint!

The Alfresco Mail Attach Action is distributed under the GNU Public License v2.

Back from Morocco




Sunset in the desert

Originally uploaded by Ugo Cei.

We just got back home from Morocco, where we had a wonderful time and saw some truly incredible places. The eyes are still brimming with the colors of a magic country (you can see some of them here).

I also managed to survive driving through the traffic of Marrakesh, which is quite a feat in itself.

Firing up my email reader yesterday night I was greeted by a slew of work-related news, about which I’ll probably write later, but not now.

Hippo acquires Bluesunrise

Honestly, this it not even in the same league as Springsource acquiring Covalent, Sun buying MySQL, or Nokia getting their greedy, little hands ;) on Trolltech, and I had never heard of Bluesunrise before, but still:

Bluesunrise becomes Hippo - Hippo Open Source Enterprise Content Management: “We are pleased to announce that Hippo, Dutch supplier of open source enterprise content management and portal software, has taken over all Bluesunrise activities. We may have a new name, but the core BlueSunrise team is intact and happy to continue providing the quality service you have come to expect. Being a part of Hippo means greater resources to better our service and create new and productive software.”

After all, the Hippo guys are our partners and, more important, they are good friends, so I cherish this acquisition and wish the best of luck to Hippo.

I have no idea how much they payed for Bluesunrise, but with the current valuation of the US dollar, it’s got to be peanuts ;) . And to think that I’m still agonizing over which camera to buy!.

Does Your Camera Really Matter?

There’s a pretty harsh debate going on these days between Michael Reichmann of Luminous Landscape and Ken Rockwell. This started with a rebuttal, titled Your Camera Does Matter, written by Reichman in response to Rockwell’s Your Camera Doesn’t Matter article.

This is an old and tired debate and, when it starts up again with words like “clowns of cliche”, it doesn’t look like it is going very far this time either. Still I cannot resist throwing in my two cents of an opinion, which is that Ken is basically right and Michael, while not being totally wrong, is at least misrepresenting Ken’s position.

Michael is not wrong because, obviously, it would be foolish to say that the quality of the equipment you are using is not going to influence the quality of the product. But that’s not what Ken is saying. What Ken is saying, and what I agree with is that you will not get better pictures simply by using better equipment, unless you define “better” as sharper, cleaner, bigger, with more dynamic range or all these things together. Photography is art (well, at least we like to think that it is) and those qualities do not make a picture artistically worthier than a small, noisy, fuzzy, distorted Holga picture.

Spanish Steps

When Michael writes:

Discussing the merits of one tool over another is relevant. Some lenses, cameras and other photographic tools are better than others. In some cases they are objectively better, while in others their degree of betterness will be subjetive and will depend on the specific needs of a particular photographer.

It appears as he hasn’t ever read Ken’s website, because if he had he would have seen tens of articles discussing the merits of cameras and lenses.

So isn’t Ken a bit hypocritical by saying that cameras don’t matter and, on the same website, extolling the virtues of the latest Nikon offerings, like the D300 which he nominates “the world’s best amateur camera”?

And what to make of this?

4×5″ Cameras Still Rule the Roost: For serious photographers who need quality, versatility and convenience, 4×5″ has been the king for decades. I often point out that while Outdoor Photographer magazine does almost nothing but push the new digital products of its advertisers, their showcase and cover shots are usually made on 4×5″ cameras.

Well, what I think Ken is getting at (and I hope he is reading this and feels like commenting, in case I missed the point) is that a particular kind of camera, with particular qualities, will let you make a particular kind of picture, which you will not be able to do with an inferior camera. It’s true that you cannot shoot a great landscape picture with a pinhole camera, but it might as well be that the low-quality street scene shot with the pinhole camera is better (according to some subjective but shared by a sufficiently large number of people) than the perfectly sharp landscape. And it is not only possible, but highly probable, that millions of people will buy an expensive camera and hope to replicate an Ansel Adams masterpiece. They will usually fail and blame the camera for their failure. What they don’t realize is that their camera truly does not matter.

Ostatic

Ostatic logoOstatic is a new website which aims “to be the most comprehensive web destination for information and insight on open source software and services.” I remember at least two other services with a similar aim, here and here, but they didn’t go anywhere, even if the latter was part of the O’Reilly juggernaut.

On the other hand, Ostatic is part of the GigaOM network and this fact, far from being a guarantee of success, might however help if they don’t just let it die on the vine, like O’Reilly did with CodeZoo. I sincerely hope so, since it’s my opinion that we need a site like this, to supplement the venerable Freshmeat.net.

For now I have subscribed to the blog and am hoping for the best.

Nikon D60 in stock at online stores

Nikon D60Apparently some online stores have started advertising the new Nikon D60 as “in stock”. You can find it at one of Amazon.com’s affiliated stores or pre-order it on Amazon.com itself and wait “1 to 2 months” (though I expect it to be available sooner than that).

Personally I’m not convinced the D60 is worth the extra $250 over a D40. I would just get the D40 with a 55-200mm VR lens and still have money to spare. But in any case I’m waiting for the D40 to decrease a bit in price before ordering it myself.

Lowepro SlingShot 200 AW




Lowepro SlingShot 200 AW

Originally uploaded by Ugo Cei.

I just received my new Lowepro Slingshot 200 AW camera bag. It’s a great bag for photo gear, though it deserves to be filled with better content than what I can provide at the moment. In any case I’m sure it will come in handy during our upcoming trip to Morocco, where I plan to carry at the very least my Panasonic Lumix and a small point&shoot as a backup, and a video camera.

Hot Nikon camera bargains at Amazon.com

Ken Rockwell reports that you can get some very good bargains on Nikon DSLR cameras and lenses. You get $100 instant rebates if you buy any of these three cameras:

together with any of these three extra lenses:

But that is not all, because you can get an even better deal if you buy an extra battery with the D40. The price for the battery is about $40, but if you buy it together with the camera, you get an extra $74 discount, which means the combined price of the two items is less than the cost of the camera alone!

You have to add the items to your cart and the savings will be deducted as separate line items at checkout. Be sure to select Amazon as the seller, otherwise the deal won’t be there. You also have to be patient, because the D40 and the 55-200 VR won’t be shipping for 1-2 months. However, I just placed an order and got $174 in extra savings for the D40—which is already the cheapest good DSLR out there— together with the 55-200 VR and an extra battery, which makes this pretty much the deal of the century. Hey, I could sell all this stuff separately on eBay for much more than will have payed for it, but I figure I’ll just keep it all.

If you would like to get the same deal, you can either follow the links on this page, or use the ones on Ken’s page, depending on who you would like to get a small percentage of the sale price.

Update: Apparently the $100 instant rebate on the combined purchase of a camera and a lens is gone. I am glad that I placed my order on time.

Update (Feb 20): Just received the following email from Amazon.com:

We regret to inform you that an error caused an incorrect promotional
code to be displayed on our website. We are not offering this
promotion at this time.

In accordance with our posted policies on pricing, we are unable to
offer the item(s) you ordered for the incorrectly posted promotional
price. Therefore, we have cancelled the item(s) from your order.

Argh! I assume the error refers to the incorrect pricing of the extra battery. Well, I suppose I could live without that, but now even the $100 rebate on the extra lens is gone and the only option I’m left with is getting just the camera for just a little less than $500, which is not a bargain at all :(.

Oxford




Oxford

Originally uploaded by Ugo Cei.

I went to Oxford and all I got was this crappy picture.

I had hoped to meet Richard Dawkins, but alas, I wasn’t so lucky. Maybe next time.

Room with a view




From the balcony

Originally uploaded by Carlfish.

Charles just moved into his new apartment and the view from the balcony is just… well, judge by yourself.

Only thing I can say is that I’m envious. Does Atlassian have any job openings in Sidney?

Flickr rebranding




Microsoft Flickr Live

Originally uploaded by dr_lopbot.

It was bound to happen, you know…

New Sony Alphas: Viable competition for Canon and Nikon?

Sony Alpha A200KI don’t want to turn this blog into a place where you can find digital camera feature comparisons, but since Google is sending quite a few people towards my Canon 450D vs. Nikon D60 article, I might quickly mention that Sony has announced two new entry-level DSLRs that could be an interesting alternative to the “big two”: the Sony Alpha A300 and Sony Alpha A350. Priced at $800 and $900 with a 18-70mm kit lens, respectively, they compete head-to-head with the 450D and the D60.

One has to wonder, however, at Sony’s marketing strategy. The two models are basically the same camera, the A300 being lower resolution (10MP instead of 14MP) and faster (3fps instead of 2fps). Every other specification seems to be exactly identical.

Personally, I would have no doubts and go for the A300 every day, saving $100, and you know how much I value megapixels: 10 looks plenty to me. But won’t two products which are so similar tend to confuse most buyers? Add to the mix the A200, which costs $100 less but does not have either Live View or a tiltable LCD, and the potential for confusion increases. I would personally be content with having to choose only between the A200 and the A300, but maybe Sony just wanted to one-up Canon in the silly megapixel race.

SpringSource acquires Covalent

Oh my, one more Open Source company acquisition, again. I’m finding harder and harder to keep up, with an almost daily occurrence of this kind of news.

SpringSource - Covalent: “On January 29, 2008, SpringSource announced that it has acquired enterprise open source leader Covalent Technologies. The acquisition brings together two open source market leaders and addresses widespread demand for a simplified application infrastructure based on the Spring Portfolio and Apache projects such as the Apache Tomcat application server, one of the most popular open source technologies in the world today.”

In this case, however, the buyer is not Sun, Oracle, or Nokia, but an Open Source company itself: SpringSource (born Interface21). Interface21 was formed in August 2004 and in a mere three and a half years it has grown so much that it was able to snatch up the venerable Covalent. Kudos to Rod Johnson and friends, and to their business model, which obviously seems to be working rather well.

Canon 450D (Rebel XSi) vs. Nikon D60

Nikon D60In anticipation of PMA 2008, the big names in digital photography, Canon and Nikon, just announced new additions to their line of DSLRs, with a new entry-level model each: to the 450D (a.k.a. Digital Rebel XSi) announcement from the Canon front, Nikon responded with the D60. Let’s see how they stack up against each other, by comparing specifications in a totally unscientific and subjective way. I will try to focus on the differences that really matter in practice, according to my judgment, brushing away briefly the megapixels issue.

The Canon has a 12 megapixel sensor, the Nikon only has 10. If you think this makes any difference, think again. The difference in linear dimensions is only about 10% (4272 vs. 3872 pixels) and 10MP is already plenty resolution for printing at sizes most people consider reasonable. People who print larger are not going to use an entry-level DSLR anyway.

Canon 450DBoth cameras are sold in a kit version that includes a good 18-55mm zoom lens with an anti-shake system. Canon calls its system IS (Image Stabilization), whereas Nikon calls it VR (Vibration Reduction), but it’s just the same thing. This feature alone, combined with high ISO sensitivity, makes it possible to shoot hand-held in situations that would have required the use of a tripod previously. This is also a feature that is entirely implemented inside the lens, so you don’t need a new body to exploit it, just a new lens with IS/VR.

Both cameras have auto-ISO (sensitivity). This is very important, as it allows you to shoot in situations where the lighting is going to change dramatically between shots. Set the camera to P (Program mode) or A (Aperture priority) and auto-ISO and shoot away without adjusting sensitivity when going from brightly lit areas to darker ones. Reportedly, Canon’s auto-ISO setting only covers the 100-400 ISO range, which is somewhat limited. The D60’s sensitivity can also be set as high as 3200 ISO, probably owing to the lesser pixel density. The Canon can only go as far as 1600. It’s hard to say whether this makes any difference in practice, as ISO 3200 might produce images so noisy, or so dull from excessive noise reduction, to make it almost unusable in practice.

The D60 has Active D-Lighting. This is the same feature that is available on the D300 and the D3. As Ken Rockwell says: “This feature automatically identifies highlight areas that will be lost, and does its best to bring them under control. It works, and it works automatically.” If what matters to you, in photography, is getting good tonal rendition and great shadow/highlight balance, then this is the feature that could tilt the balance in Nikon’s favor.

The Canon has Live View, meaning that you can view the image in the rear LCD while composing, just like people are used to be doing with a point&shoot camera. This can be useful in some situations, but it’s hard to say how often this will be used by the amateur who is the typical target market for this range of cameras. The Canon also has a larger (3″ vs. 2.5″) LCD, even though both screens only comprise 230,000 pixels. Too bad the D60 doesn’t sport the gorgeous 920,000 pixels screen of the D300.

The Nikon does not have a focusing motor in the camera body, meaning you can only use newer AF-S (Silent Wave Motor) lenses with it. This is not a big deal if you only have AF-S lenses or are going to buy new ones anyway, since all new Nikon lenses are AF-S, but older AF and AI lenses will have to be focused manually, so watch out.

There are many other elements that could be compared between the two, but these are the most relevant ones, in my opinion. Both are probably very good cameras and you won’t be disappointed with either one. Personally, I would go with the Nikon because of the higher auto-ISO range and the Active D-Lighting, but that’s just me. You might be a big fan of composing and reviewing using the LCD, so the larger screen and the Live View feature of the Canon will certainly appeal to you.

I can’t certainly say more about this comparison without having tried both cameras personally. If you want to help me do this, you can click on this affiliate link and buy some stuff on Amazon.com. They will give me a small percentage of the sale, which I will put away in my small cache dedicated to buying photo gear. Every little cent helps ;).