cancel
Showing results for 
Search instead for 
Did you mean: 

Remote Alfresco API rivet

rivetlogic
Champ on-the-rise
Champ on-the-rise
RAAr

RAAr is an abstraction layer for remote communication with Alfresco ECM. RAAr provides a simple, Java-based local library that may be used by one or more content rich applications and allows these applications to interface to Alfresco (including multiple Alfresco repositories from the same application). RAAr's lower layers handle communication to remote Alfresco instances over ReSTful calls to Alfresco that get mapped to calls to the Alfresco Foundation Services (AFS) API.

Motivation for RAAr

Certain classes of content rich applications require one or more of the following:

    * Remote full coverage of the AFS API (e.g., version management and version history traversal, dictionary services for model introspection, multi-store access, etc.)
    * Streaming content directly from the application and not from Alfresco (i.e., not using download servlet)
    * SSO support
    * Middle-tier business logic within the application where not all processing is done on Alfresco app server
    * Support for un-marshalling of result sets
RAAr lives here:
http://wiki.rivetlogic.org/display/RAAR/

Feel free to ask questions about RAAr in this thread.

–Sumer
112 REPLIES 112

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi danipixel,

Indeed RAAr 3.3 won't work well with Alfresco 3.4.

We created 2 tickets to support Alfresco 3.4 C and E:
http://issues.rivetlogic.com/browse/CMA-54
http://issues.rivetlogic.com/browse/CMA-55

We'll start work on that as early as today, and let you know on this forum when RAAr 3.4 is ready.

Cheers.

–sumer

danipixel
Champ in-the-making
Champ in-the-making
Hi,
   thanx a lot for your quick answer. I'll be waiting for this new release. Meanwhile we'll continue working with the 3.3.0g version.

Best regards.

rivetlogic
Champ on-the-rise
Champ on-the-rise
Support for Alfresco 3.4.0 Community, and 3.4.0 Enterprise is now ready. You can download it here: http://raar.rivetlogic.com

–sumer

danipixel
Champ in-the-making
Champ in-the-making
Hi,
    I've tested the 3.4.0 Community version and it's ok!

Thanx a lot.

Best regards.

razieltd
Champ in-the-making
Champ in-the-making
Hi!

iam using the Alfresco Remote API Rivet (cma-alfresco-1.11.0.amp) with alfresco 3.1

i have a problem with the ContentService - when i try to write from a stream into specific node i receive this error:

com.rivetlogic.core.cma.exception.CmaRuntimeException: org.alfresco.service.cmr.repository.ContentIOException: Failed to set content property on stream closure

this is the line code

contentService.writeContentFromStream(ticket, node, ContentModel.PROP_CONTENT, new FileInputStream(file));

what can i do?

schalasani
Champ in-the-making
Champ in-the-making
Hi RazielTD,

    cma-alfresco-1.11.0.amp uses Alfresco 3.0.  cma-alfresco-3.1.0-E-1.amp can be used with Alfresco Enterprise 3.1. You can download it here: http://raar.rivetlogic.com. Let us know how that works.

Thanks,
Sweta Chalasani

razieltd
Champ in-the-making
Champ in-the-making
Hi Sweta Chalasani,

Thx for the answare - but i have the same error with cma-alfresco-3.1.0-E-1.amp  Smiley Sad  but something is different if i try now i receive the old error and a new one that say to me about the mimetype cant be null - but how can i set the mimetype?

and i have another question before installing the cma-alfresco-1.11.0.amp i have do a copy of my alfresco.war (for backup) and than install the cma-alfresco-1.11.0.amp - now for try your amp i have reused my blank alfresco.war and installed the amp - but today if i try to reused my old alfresco.war with the cma-alfresco-1.11.0.amp it says me that:
Downgrading of modules is not supported.
Module 'RemoteAlfrescoAPIrivet' version 1.14.1 is currently installed and must be uninstalled before version 1.11.0 can be installed.

but how is it possible? i have 3 war file
1 - alfresco.war - my old alfresco before every cma amp (and work!)
2 - alfresco.war - with only cma-alfresco-1.11.0.amp (and dont work!)
3 - alfresco.war - with only cma-alfresco-3.1.0-E-1.amp (and work!)

:shock: if i want to go back at cma-alfresco-1.11.0.amp what can i do?

Thank you.

schalasani
Champ in-the-making
Champ in-the-making
Hi RazielTD,

  You can set mimetype using the guessMimetype in the MimetypeService of RAAr or you can use setMimetype on the content data.

  Regarding the amps, to downgrade a module you can refer to this topic:
http://forums.alfresco.com/en/viewtopic.php?t=11589

Thanks,
Sweta Chalasani
Rivet Logic

razieltd
Champ in-the-making
Champ in-the-making
Hi Sweta Chalasani

Thx again for your support  Smiley Happy

but i dont have understand how can i set the mimetype… :?:

in my method i simply call the contentService

contentService.writeContentFromStream(ticket, node, ContentModel.PROP_CONTENT, new FileInputStream(file));

and as you can see i pass the Ticket, NodeRef, the QName of cm:content and finally the stream..

the method of the MimeTypeService (mimetypeService.guessMimetype(ticket, string)) return a String, ok! but where can i set this String? in the contentService (is the method that writes the file on alfresco i suppose) there isn't any set mimetype…

can you describe me this step?

ah! thx for the answare of the downgrade - i succes to downgrade the amp  :wink:

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi RazielTD,

  1. You can use MimetypeService to guess the mimetype of the file.
 
  And using the getProperty of nodeService can get the ContentData and setMimeType on it. You can use the string from the guessMimetypeService here to set the mimetype.

  For Example,
  ContentData content = (ContentData)nodeService.getProperty(ticket, nodeRef, ContentModel.PROP_CONTENT);
  content = ContentData.setMimetype(content, mimetypeService.guessMimetype(ticket, fileName));

  2. You can also set mimetype on the node properties while creating the node using nodeService.createNode
   
   For Example,  
   nodeProperties.put(mimetypeQName, mimetype);

Thanks,
Sweta chalasani