O'Reilly logo

Learning Alfresco Web Scripts by Ramesh Chauhan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Java controller

Now it's time to do some Java coding. Before we start the actual coding, it's always a good idea to quickly identify the logic that has to be taken care of by the code we are going to write. This exercise really does help a lot.

Controller logic at a high level

In order to develop a controller for this scenario, let's take a look at the implementation logic that we will include in the Java-backed controller at a high level:

  • A controller will expect nodeid as an input parameter
  • Check whether the given node is present in the repository
  • Check whether the user has at least read permissions on the given node
  • Get the filesystem location for the given node
  • Get the size on the filesystem for the given node
  • Prepare the model object and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required