Book Image

Learning Alfresco Web Scripts

By : Ramesh Chauhan
Book Image

Learning Alfresco Web Scripts

By: Ramesh Chauhan

Overview of this book

Table of Contents (18 chapters)
Learning Alfresco Web Scripts
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

DeclarativeWebScript versus AbstractWebScript


The web script framework in Alfresco provides two different helper classes from which the Java-backed controller can be derived. It's important to understand the difference between them.

The first helper class is the one we used while developing the web script in this chapter, org.springframework.extensions.webscripts.DeclarativeWebScript. The second one is org.springframework.extensions.webscripts.AbstractWebScript.

DeclarativeWebScript in turn only extends the AbstractWebScript class.

If the Java-backed controller is derived from DeclarativeWebScript, then execution assistance is provided by the DeclarativeWebScript class. This helper class basically encapsulates the execution of the web script and checks if any controller written in JavaScript is associated with the web script or not. If any JavaScript controller is found for the web script, then this helper class will execute it. This class will locate the associated response template of the...