November 22, 2024

Rivet RAAR API and Alfresco ECM

Alfresco is a platform for Enterprise Content Management Open Source. Using some of the open standards like JSR- 170, CMIS RESTful Web Services, we can inter-operate with Alfresco and its content repository .
CMIS (Alfresco has announced full support in April of 2012), is the open standard for ECM interoperability. Document management platforms such as SharePoint, Nuxeo, OpenText, Documentum, IBM FileNet and Alfresco can exchange data and information according to the CMIS standard , for example, facilitating complex porting procedures from one document platform to another. Even desktop publishing applications such as Adobe InDesign or LibreOffice support the CMIS standard .

CMIS however is not the only solution for Alfresco interoperability. Using RAAR , a GNU GPL Java API provided by Rivet Logic, you can inter-operate remotely with the Alfresco content repository creating a level of personalized service.

At the application level , for example , you can implement your own web application based on the Apache Struts MVC framework , which exposes end-user functionality and services that reflect the requirements of the business model of document management. The system is based on a distributed architecture with 3 levels . The first layer is Alfresco runtime environment . The second level is represented by RAAR (Remote Alfresco API rivet ) API, it exposes all the java and RESTful services needed to interact with the content repository . Finally, the web-struts application layer that exposes to the user a personalized web interface using the RAAR API to read and write on the Alfresco content repository .

Architettura Alfresco-RAAR

 

Here an example how to use the com.rivetlogic.core.cma.api.NodeService  object to create a space on Alfresco repository. The object RivetServices is used for the access to the RAAR services, in this case to the NodeService and its interface implementation:

/**
 * Support bean used to provide access to RAAr services
 */
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.rivetlogic.core.cma.api.NodeService;
import com.rivetlogic.core.cma.impl.NodeServiceImpl;

public class RivetServices {
	private ConfigurableApplicationContext configurationApplicationContext = null;
	private static final String APPLICATION_CONTEXT = "classpath*:cma-core-context.xml";
private NodeService nodeService;

public RivetServices(){ 
   configurationApplicationContext = new ClassPathXmlApplicationContext(APPLICATION_CONTEXT);
   nodeService = (NodeServiceImpl) configurationApplicationContext.getBean("nodeService"); }

public NodeService getNodeService() {
   return nodeService; }
}

The RivetServices object is used to access the CreateFolder RAAR method:

import org.alfresco.service.cmr.repository.NodeRef;
import com.rivetlogic.core.cma.repo.Ticket;
import org.alfresco.service.namespace.QName;
import com.rivetlogic.core.cma.exception.CmaRuntimeException;
import com.rivetlogic.core.cma.exception.InvalidTicketException;

public class ToECM {

public static NodeRef createFolder(
   RivetServices rivetServices,Ticket ticket,
   String folderName, NodeRef container,
   Map<QName, Serializable> properties) throws InvalidTicketException, CmaRuntimeException {

return rivetServices.getNodeService().createFolder(ticket, folderName, container, properties);
}
}

 

Related posts

2 Comments

Leave a Reply

Your email address will not be published.