Month: September 2013

Notes from Alfresco Office Hours

Today we had another Live Alfresco Office Hours session on Google Hangouts on Air. If you missed it, here is the recording. Below that I’ve got rough notes on what was discussed.

What’s new in Alfresco 4.2.d Community Edition

  • New Share look-and-feel, including ribbon
  • My Files
  • Shared Files
  • Document library enhancements (Filmstrip view, Table view)
  • Saved search
  • Folder Templates in Share (Yes, rules come across)
  • Manage permissions
  • Admin console
  • User Trashcan

Did you know you can do a proximity search? Allows you to search for words within a specified proximity of one other. Examples: big *(2) apple finds results where those two words are within two words of each other.

Did you know you can index inside of zips? There is a setting that must be changed in order to enable this.

Did you know you can use the “ALL” keyword to search all metadata instead of the default fields that are normally indexed? Example: ALL:SomeCo finds any document with “SomeCo” in any property. (Thanks, Peter Lofgren, who contributed that tidbit via IRC during the session).

Nightly build now includes PT and Norwegian language packs, both community contributions.

Question from IRC: Alfresco and NoSQL–Any plans to support NoSQL as a back-end for metadata?

  • The Big Data Server is still on the roadmap
  • Lots of people publish content out of Alfresco to a NoSQL target
  • Other than that, no plans

Alfresco Summit – Don’t miss out, register at http://summit.alfresco.com

Alfresco community survey

REMINDER: Alfresco Forge will be turned off completely in December. Add-Ons that point to Forge will be deleted on December 1.

Next Tech Talk Live is October 2. We’ll be talking to Dave Draper about Share customizations in 4.2

Recent meetups:

  • New York, September 24.
  • Chicago, September 25.

Upcoming meetups:

  • Seville, October 8.
  • Madrid, October 18
  • Leuven, Friday December 13.
  • Helsinki, TBD

Thanks to everyone who joined us live or watched the recording. We’ll do it again in two weeks.

 

Alfresco 4.2.d: The Public API & some CMIS changes you should be aware of

Well, Alfresco Community Edition 4.2.d has been out for a couple of weeks now and everyone I’ve talked to seems pretty excited about the new release. The new ribbon header in the Share user interface, the filmstrip view, and the table view for the document library seems to have gotten all of the attention (and it does look sharp) but my favorite new feature is actually behind-the-scenes: The Alfresco Public API has finally made its way from Alfresco in the cloud to on-premise.

What is the Alfresco Public API?

We’ve talked about it a lot over the last year, but it’s always been cloud-only, so you’re forgiven if you need a refresher. Basically, it means that we now have a documented, versioned, and backward compatible API that you can use to do things like:

  • Get a list of sites a user can see
  • Get some information about a site, including its members
  • Add, update, or remove someone from a site
  • Get information about a person, including their favorite sites and preferences
  • Get the tags for a node, including updating a tag on a node
  • Create, update, and delete comments on a node
  • Like/unlike a node
  • Do everything that CMIS can do

The Public API is comprised of CMIS for doing things like performing CRUD functions on documents and folders, querying for content, modifying ACLs, and creating relationships plus non-CMIS calls for things that CMIS doesn’t cover. When you run against Alfresco in the cloud you use OAuth2 for authentication. When you run against Alfresco on-premise, you use basic authentication.

Some Examples

I created some Java API examples for cloud a while ago. This week I spent some time on those examples to get them cleaned up a bit here and there and to have a really clear separation between what’s specific to running against Alfresco on-premise versus Alfresco in the cloud and what’s common to both. The result is a single set of code that runs against either one.

Here’s how the project is set up:

The remaining classes in com.alfresco.api.example are the actual examples. These would probably be better structured as unit tests but for now, they are just runnable Java classes. Currently there are only four:

  • GetSitesExample.java simply fetches the short names of up to 10 sites the current user has access to.
  • CmisRepositoryInfoExample.java is the simplest CMIS example you can write. It retrieves some basic information about the repository.
  • CmisCreateDocumentExample.java creates a folder, creates a document, likes the folder, and comments on the document. This is a mix of CMIS and non-CMIS calls.
  • CmisAspectExample.java imports some images, uses Apache Tika to extract some metadata from the binary image file, then uses the OpenCMIS Extension to store those metadata values in properties defined in aspects. The extension has to be used because CMIS 1.0 doesn’t support aspects.

Take a look at the readme.md file to see what changes you need to make to run these examples in your own environment.

New CMIS URLs in Alfresco Community Edition 4.2.d

One thing to notice is that starting with this release there are two new CMIS URLs. Which one you use depends on which version of CMIS you would like to leverage. If you want to use CMIS 1.0, the URL is:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom

If you would rather use CMIS 1.1, the URL is:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom

New with 4.2.d is the CMIS 1.1 browser binding. Currently Alfresco in the cloud only supports Atom Pub, but if you are only running against on-premise, you might decide that the browser binding, which uses JSON instead XML, is more performant. If you want to use the browser binding, the service URL is:

http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser

CMIS Repository ID and Object ID Changes

When using the new URLs, you’ll notice a couple of things right away. First, the repositoryId is coming back as “-default-” instead of the 32-byte string it used to return.

Second, the format of the object IDs has changed. The CMIS specification dictates that object IDs are supposed to be opaque. You shouldn’t build any logic on the content of a CMIS object ID. However, if you have built a client application that stores object IDs, you may want to pay particular attention to this when you test against the new version. The object IDs for the same object will be different than they were when using the old CMIS URLs.

You can see this in 4.2.d. If I use the old “/alfresco/cmisatom” URL, and I ask for the ID of the root folder, I’ll get:
workspace://SpacesStore/ae045ec3-5578-4c7b-b5a6-f893810e63dc

But if I use either the new CMIS 1.0 URL or the new CMIS 1.1 URL and ask for the ID of the same root folder, I’ll get:
ae045ec3-5578-4c7b-b5a6-f893810e63dc

In order to minimize the impact of this change, you can issue a getObject call using either the old ID or the new ID and you’ll get the same object back. And if you ask for the object’s ID you’ll get it back in the same format that was used to retrieve it, as shown in this Python example:

>>> repo.getObject('ae045ec3-5578-4c7b-b5a6-f893810e63dc').id
'ae045ec3-5578-4c7b-b5a6-f893810e63dc'
>>> repo.getObject('ae045ec3-5578-4c7b-b5a6-f893810e63dc').name
u'Company Home'
>>> repo.getObject('workspace://SpacesStore/ae045ec3-5578-4c7b-b5a6-f893810e63dc').id
'workspace://SpacesStore/ae045ec3-5578-4c7b-b5a6-f893810e63dc'
>>> repo.getObject('workspace://SpacesStore/ae045ec3-5578-4c7b-b5a6-f893810e63dc').name
u'Company Home'

Still Missing Some CMIS 1.1 Goodness

The browser binding is great but 4.2.d is still missing some of the CMIS 1.1 goodness. For example, CMIS 1.1 defines a new concept called “secondary types”. In Alfresco land we call those aspects. Unfortunately, 4.2.d does not yet appear to have full support for aspects. You can see what aspects a node has applied by inspecting the cmis:secondaryObjectTypeIds property, which is useful. But in my test, changing the value of that property did not affect the aspects on the object as I would expect if secondary type support was fully functional.

Summary

The Public API is new. There are still a lot of areas not covered by either CMIS or the rest of the Alfresco API. Hopefully those gaps will close over time. If you have an opinion on what should be the next area to be added to the Alfresco API, please comment here or mention it to your account rep.

An Alfresco Summit letter-to-your-boss template for every type of boss

Office SpaceThese days every conference seems to provide a pretty standard letter-to-your-boss template. And they may be helpful for people who have normal, rational bosses. But we all know there are many different types of bosses out there and some require specialized strategies for getting them to do what you need them to do. That’s why the Alfresco Summit team has put together a list of letter-to-your-boss templates with one for every type of boss.

Don’t see your boss type listed? Let us know. We don’t want you to miss out on the conference!

Help us improve the ecosystem: Take the Alfresco Community 2013 Survey

Surveying by IamNotUniqueHopefully, you find the Alfresco community team and our company in general extremely approachable. My perception is that people aren’t afraid to reach out and give us feedback directly, which is exactly how we like it. But I think it is important for us to stop and ask for specific feedback on areas we are tracking on a regular basis. That’s why we do a survey of the Alfresco community every year.

So if you are involved at all with Alfresco, whether you are an Alfresco One subscriber, a partner, an employee, or a Community Edition user, please take 15 minutes to complete the survey.

We’ll use your feedback to make the Alfresco ecosystem a better place. If you’ve participated in the past, I hope you’ve seen some of your suggestions become a reality as we continuously improve over time. I’m hoping to consolidate the feedback and report on the results during my session at this year’s Alfresco Summit.

As a small way to say thanks for your time, we’re going to randomly draw two prize winners from valid, completed surveys. Each lucky winner will receive a $250 USD gift card from Amazon (see survey for contest rules and details).