Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Alfresco Web Scripts
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learning Alfresco Web Scripts

Learning Alfresco Web Scripts

By : Ramesh Chauhan
4.5 (4)
close
close
Learning Alfresco Web Scripts

Learning Alfresco Web Scripts

4.5 (4)
By: Ramesh Chauhan

Overview of this book

If you are an Alfresco developer who has no experience with web scripts and you want to start developing Alfresco web scripts, then this book is definitely for you.
Table of Contents (12 chapters)
close
close
11
Index

Creating a response template


As a rule of thumb for a web script, we have to follow the naming convention as expected by the web script framework in Alfresco. As the web script is supposed to return the response in the JSON and XML formats, we need to create two response templates for the web script. Following the naming conventions, there are two files to be created—contentlocation.get.json.ftl and contentlocation.get.xml.ftl as response templates. Return filesystem_location and size in the response as follows:

  1. To create a JSON response template, create a file named contentlocation.get.json.ftl that has the following content:

    {
      "content" :
      {
        "filesystem_location" : "${contentFSLocation}",
        "size" : ${contentSize}
      }
    }
  2. To create an XML response template, create a file named contentlocation.get.xml.ftl that has the following content:

    <?xml version="1.0" encoding="UTF-8"?>
    <content>
      <filesystem_location>${contentFSLocation}
      </filesystem_location>
      <size...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Alfresco Web Scripts
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon