Detailed reference of prototypes, properties and methods available in the
Javascript environment of your Helma web applications.

Methods of the helma.Aspects module.
To use this optional module, its repository needs to be added to the application, for example by calling app.addRepository('modules/helma/Aspects.js')
helma Aspects()
Library for adding Aspects
Provides static methods to wrap existing functions inside a javascript closure in order to add additional behavior without overriding the existing one.
Based on code by roman porotnikov, http://www.jroller.com/page/deep/20030701
Note: Each prototype that uses aspects must implement a method onCodeUpdate() to prevent aspects being lost when the prototype is re-compiled
methods

- addBefore(obj, fname, before)

- addAfter(obj, fname, after)

- addAround(obj, fname, around)

Methods
helma.Aspects. addBefore(obj, fname, before)
Adds a function to be called before the orginal function.
The return value of the added function needs to provide the array of arguments that is passed to the original function. The added function receives an array of the original arguments, the original function and the scope object of the original function as its parameters.
parameters

Object | obj | The object of which the original function is a property
String | fname | The property name of the original function
Function | before | The function to be called before the original function

returns

| Function A new function, wrapping the original function

helma.Aspects. addAfter(obj, fname, after)
Adds a function to be called after an existing function.
The return value of the original function is passed to the added function as its first argument. In addition, the added function also receives an array of the original arguments, the original function and the scope object of the original function as additional parameters.
parameters

Object | obj | as Object, the object of which the original function is a property
String | fname | as String, the property name of the original function
Function | after | as Function, the function to be called after the original function

returns

| Function A new function, wrapping the original function

helma.Aspects. addAround(obj, fname, around)
Wraps an additional function around the original function.
The added function receives as its arguments an array of the original arguments, the original function and the scope object of the original function. The original function is not called directly and needs to be invoked by the added function.
parameters

Object | obj | as Object, the object of which the original function is a property
String | fname | as String, the property name of the original function
Function | around | as Function, the function to be called inside the original function

returns

| Function A new function, wrapping the original function

Tue, 25 Nov 2008 16:50:10 GMT.

### core framework

- global
- app (application)
- req (request)
- res (response)
- session
- path
- root
- HopObject
- User
- File
- FtpClient
- Image
- Mail
- Remote
- Xml
- DatabaseObject
- MimePart
- Skin
- Object

### optional modules

- Array extensions
- Date extensions
- Number extensions
- Object extensions
- String extensions
- HopObject extensions
- global macros
- macro filters
- JSON methods
- helma.Aspects
- helma.Chart
- helma.Color
- helma.Database
- helma.File
- helma.Ftp
- helma.Group
- helma.Html
- helma.Http
- helma.Image
- helma.Mail
- helma.Search
- helma.Skin
- helma.Ssh
- helma.Url
- helma.Zip
- jala.BitTorrent
- jala.Captcha
- jala.Date
- jala.db
- jala.DnsClient
- jala.Form
- jala.History
- jala HopObject extensions
- jala.HtmlDocument
- jala.I18n
- jala.ImageFilter
- jala.IndexManager
- jala.ListRenderer
- jala.Mp3
- jala.PodcastWriter
- jala.RemoteContent
- jala.Rss20Writer
- jala.Utilities
- jala.XmlRpcRequest
- jala.XmlWriter

### java libraries

- browse docjar