alfresco-mvc


Spring @MVC for Alfresco

Deprecated location.

Moved to https://github.com/dgradecak/alfresco-mvc

This project provides the glue between Alfresco and Spring @MVC. Use Springframework annotations instead of standard webscripts and speed up your development.

Alfresco @MVC enables the entire Spring MVC stack inside the Alfresco core repository. There is no need to maintain several webscript files. One simple annotated method and you have the result. Autowire any Alfresco service or configure a servlet-context.xml

Works with all newer Alfresco versions in both community and enterprise versions.

Helper annotations are : * @AlfrescoTransaction * @AlfrescoRunAs * @AlfrescoAuthentication

Sample : ``` @Controller @RequestMapping("/user/*") public class UserController {

@Autowired
private MyAlfrescoService myService;

@RequestMapping(value = "get", method = RequestMethod.GET) public String getUSer(@RequestParam String userId) { myService.save(userId); ... } }

public class MyAlfrescoService {

@Autowired private ServiceRegistry serviceRegistry;

@AlfrescoTransaction public void save(String userId) { ... serviceRegistry.getNodeService()... ... } } ```

Add to your pom.xml

Maven repositories <repositories> <repository> <id>gradecak</id> <url>http://gradecak.com/repository/releases/</url> </repository> <repository> <id>gradecak-snapshots</id> <url>http://gradecak.com/repository/snapshots/</url> </repository> </repositories>

and the dependency <dependency> <groupId>com.gradecak.alfresco</groupId> <artifactId>alfresco.mvc</artifactId> <version>2.0-SNAPSHOT</version> </dependency>

  • QuickStart
  • Query
  • MetadataManager

  • RoadMap

Project Information

Labels:
alfresco mvc spring annotation webscripts surf