cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco OpenCMIS Extension – access to aspects

fmui
Champ in-the-making
Champ in-the-making
Hi,

We have developed an extension for OpenCMIS that provides easy read and write access to aspects and aspect properties:
http://cmis.alfresco.com:8080/alfresco-opencmis-extension.html

It's a preview at the moment. Feedback is welcome!

Cheers,

Florian

Update: The Alfresco OpenCMIS Extension has moved to http://apache-extras.org/p/alfresco-opencmis-extension.
15 REPLIES 15

mkl
Champ in-the-making
Champ in-the-making
Hi!

For some reason the extension as downloaded ran into a NullPointerException in AlfrescoAspectsUtils.findAspect(Collection<ObjectType>, String) here. For some types type.getPropertyDefinitions() seems to be null.

After changing the code to check for null here at first, the extension works like a charm. Thanx!

Regards,   Mikel.

fmui
Champ in-the-making
Champ in-the-making
Thanks for the feeback! It should be fixed now.

Regards,

Florian

geert
Champ in-the-making
Champ in-the-making
Hi Florian,

We have a problem regarding the Alfresco OpenCMIS Extension.

When we query a CMIS document, we get a QueryResult object. We use this object to retrieve all values that we need. We use the following code to retrieve a date which is a custom property on a custom aspect on a custom type:

(GregorianCalendar) opencmisDocument.getPropertyValue(EmployeeDocumentProperty.EMPLOYEE_DATE_OF_BIRTH.getName());

This always worked, but since we use the Alfresco OpenCMIS Extension to use Aspects, we get the following error:

java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl cannot be cast to java.util.GregorianCalendar

We assume that this is a bug and that it should return a date of type java.util.GregorianCalendar. Is this correct? If so, could this be fixed in the next version?

Thanks in advance.

Regards,

Geert

fmui
Champ in-the-making
Champ in-the-making
Hi Geert,

I have made a quick fix and uploaded a new version. Please check if that works for you.


Thanks,

Florian

geert
Champ in-the-making
Champ in-the-making
Thanks Florian, works like a charm!

jabailo
Champ in-the-making
Champ in-the-making
Is this required if I want to use a CMIS query to return a list of documents based on the value of a custom aspect property?

If so, can you supply an example of how the CMIS query would look for doing the above using the Exension.

fmui
Champ in-the-making
Champ in-the-making
Hi jabailo,

No, this extension is not required to query aspect properties.
Please see http://wiki.alfresco.com/wiki/CMIS#Aspect_Query for an aspect query example.

- Florian

mkl
Champ in-the-making
Champ in-the-making
Hi!

In theory using the alfresco opencmis extensions with opencmis 0.3.0 should work, but as we still are dealing with 0.x versions, anything may happen. Thus my question, are there any problems to be expected?

Regards, Michael.

fmui
Champ in-the-making
Champ in-the-making
Hi Michael,

The Alfresco OpenCMIS Extension works fine with OpenCMIS 0.3.0 (and 0.4.0 snapshots). We will keep the extension in sync with OpenCMIS releases if this is necessary.

Don't get confused by the version number. The OpenCMIS code and API are stable for quite a while now and there are no plans to change the API.

Florian