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

A JavaScript library wrapping Packages.helma.extensions.helmagroups
To use this optional module, its repository needs to be added to the application, for example by calling app.addRepository('modules/helma/Group.js')
helma Group(javaGroup)
Constructs a new helma.Group Object.
parameters

FIXME | javaGroup | FIXME

methods

- getJavaObject()

- set(key, val, sendMode)

- remove(key, sendMode)

- get(key)

- listChildren()

- listProperties()

- countChildren()

- countProperties()

- callFunction(method, argArr, sendMode)

helma Group.GroupObject(Instance)
Constructs a new helma.Group.GroupObject.
parameters

Object | Instance | of helma.extensions.helmagroups.GroupObject

methods

- getJavaObject()

- set(key, The, The)

- remove(key, The)

- get(key)

- getProperty(key)

- wrap(The)

- unwrap()

- toJSObject()

- listChildren()

- listProperties()

- countChildren()

- countProperties()

- isLocal()

helma Group.Manager()
This is mounted as "groups".
methods

- get(name)

- checkWriteAccess(nameOrJGroup)

- connect(name)

- disconnect(name)

- reconnect(name)

- reset(name)

- destroy(name)

- restart(name)

- listMembers(name)

- listMemberApps(name)

- getContent(name)

- getFullContent(name)

- getConfig(name)

- getFullConfig(name)

- getConnection(name)

- isConnected(name)

- size(name)

- count(name)

helma. Group.GroupObject.GET_FIRST
Static properties of GroupObject constructor function. These values determine if and for how many confirmation of the group members this instance waits after a modification. These values are passed through to org.jgroups.blocks.GroupRequest, for further comments see the sourcecode of that class
Methods
helma.Group. getJavaObject()
returns

| the wrapped java object Group

helma.Group. set(key, val, sendMode)
sets a key/value pair on the group's root, wraps the function of the wrapper object
parameters

| key |
| val |
| sendMode |

helma.Group. remove(key, sendMode)
removes a key from the group's root, wraps the function of the root GroupObject
parameters

| key |
| sendMode |

helma.Group. get(key)
retrieves a key from the group's root, wraps the function of the root GroupObject
parameters

| key |

helma.Group. listChildren()
see

helma.Group.GroupObject.listChildren

helma.Group. listProperties()
see

helma.Group.GroupObject.listProperties

helma.Group. countChildren()
see

helma.Group.GroupObject.countChildren

helma.Group. countProperties()
see

helma.Group.GroupObject.countProperties

helma.Group. callFunction(method, argArr, sendMode)
calls a function in all connected applications (to be specific: in all registered localClients).
parameters

| method | name of the method in xmlrpc-style: test is called as root.test(), stories.137.render is called as root.stories.get("137").render() etc etc.
| argArr | array of arguments to the remote method
| sendMode | as defined for helma.Group.GroupObject

returns

| array of result objects

helma.Group.GroupObject. getJavaObject()
Returns the wrapped java GroupObject.
returns

| Instance of helma.extensions.helmagroups.GroupObject;

helma.Group.GroupObject. set(key, The, The)
Sets a property or a child GroupObject in this instance. The Key may be a String, an Array or a String with separator characters ("/"). In the latter two cases the argument is considered a path and all GroupObjects along this path are created if necessary.
parameters

Object

key

Either

- a String
- a String containing slashes
- an Array containing String keys

Number | The | value to set the property to.
Object | The | mode to use when committing the change to the helma.Group

helma.Group.GroupObject. remove(key, The)
Removes a property or a child GroupObject from this instance. The Key may be a String, an Array or a String with separator characters ("/"). In the latter two cases the argument is considered a path and the function walks down that path to find the GroupObject and deletes it.
parameters

Object

key

Either

- a String
- a String containing slashes
- an Array containing String keys

Number | The | mode to use when committing the change to the helma.Group

helma.Group.GroupObject. get(key)
Returns either a property or a child GroupObject from this GroupObject instance. The key passed as argument may be a String, an Array containing Strings or a String containing separator characters ("/"). In the latter two cases the argument is considered a path and the function walks down that path to find the requested GroupObject.
parameters

Object

key

Either

- a String
- a String containing slashes
- an Array containing String keys

returns

| Depending on the argument either the appropriate property value or a helma.Group.GroupObject

helma.Group.GroupObject. getProperty(key)
Gets a property from this GroupObject. The key passed as argument is always considered a property even if it contains a slash. This is actually a workaround for the fact that other instances of the group not using the javascript extension aren't forbidden to add properties containing a slash in the property's name. So, using this extension we can at least read the property.
parameters

String | key | The name of the property to return

returns

| The value of the property

helma.Group.GroupObject. wrap(The)
Exchanges this GroupObject with the one passed as argument. This is done by exchanging the wrapped instance of helma.extensions.helmagroups.GroupObject
parameters

GroupObject | The | GroupObject to use

returns

| The GroupObject with the exchanged wrapped java object

helma.Group.GroupObject. unwrap()
Clones this GroupObject and returns it. This method should be considered if many properties of a GroupObject must be set or modified since every change to an already replicated GroupObject will result in immediate network traffic. Using unwrap one can modify several properties and then commit the GroupObject at once using {@link #wrap).
returns

| A clone of this GroupObject

helma.Group.GroupObject. toJSObject()
Converts this GroupObject into a vanilla Object
returns

| An Object containing all properties of this GroupObject

helma.Group.GroupObject. listChildren()
Returns an Array containing all child GroupObjects
returns

| An Array containing GroupObjects

helma.Group.GroupObject. listProperties()
Returns an Array containing all property names of this GroupObject instance
returns

| An Array containing property names

helma.Group.GroupObject. countChildren()
Returns the number of child GroupObjects
returns

| The number of child GroupObjects of this helma.Group.GroupObject instance

helma.Group.GroupObject. countProperties()
Returns the number of properties of this GroupObject
returns

| The number of properties

helma.Group.GroupObject. isLocal()
Returns true if the GroupObject is not replicated
returns

| True if this GroupObject is still local

helma.Group.Manager. get(name)
visible to scripting env: get a group, wrapped as a javascript helma.Group object. the group must be defined in app.properties: group.nameXX = <configfile> and can then be accessed like this group.get("nameXX")
parameters

| name |

returns

| null if group is not defined or not connected

helma.Group.Manager. checkWriteAccess(nameOrJGroup)
checks for write access to a group according to app.properties group.nameXX.writable must be true so that this function returns
parameters

| nameOrJGroup | can be the name of a group or a java Group itself

exceptions

| an error if group is not writable

helma.Group.Manager. connect(name)
try to connect a group
parameters

| name |

returns

| false if group is not found

helma.Group.Manager. disconnect(name)
try to disconnect from a group
parameters

| name |

returns

| false if group is not found

helma.Group.Manager. reconnect(name)
try to disconnect and connect again to a group
parameters

| name |

returns

| false if group is not found

helma.Group.Manager. reset(name)
try to reset a group (if application may write in group). all instances of the group empty their cache.
parameters

| name |

returns

| false if group is not found

helma.Group.Manager. destroy(name)
try to destroy a group (if application may write in group). all other instances of the group disconnect
parameters

| name |

returns

| false if group is not found

helma.Group.Manager. restart(name)
try to restart a group (if application may write in group). all other instances of the group disconnect and reconnect - each app after a different pause so that they don't all come up at the same moment
parameters

| name |

returns

| false if group is not found

helma.Group.Manager. listMembers(name)
list the members of this group (ie instances of Group, one helma server is one instance)
parameters

| name |

returns

| array of strings, false if group is not found

helma.Group.Manager. listMemberApps(name)
lists the members applications of this group (may be more than one per instance but also none)
parameters

| name |

returns

| array of strings, false if group is not found

helma.Group.Manager. getContent(name)
dumps the keys of the group to a string
parameters

| name |

returns

| string, notice if group is not found

helma.Group.Manager. getFullContent(name)
dumps the keys and the content of the group to a string
parameters

| name |

returns

| string, notice if group is not found

helma.Group.Manager. getConfig(name)
dumps the config of the jgroups stack to a string
parameters

| name |

returns

| string, false if group is not found

helma.Group.Manager. getFullConfig(name)
dumps the config of the jgroups stack including all properties to a string
parameters

| name |

returns

| string, false if group is not found

helma.Group.Manager. getConnection(name)
returns the connection identifier of the Group instance (localname + multicast-target)
parameters

| name |

returns

| string, false if group is not found

helma.Group.Manager. isConnected(name)
returns true/false if the group is connected
parameters

| name |

helma.Group.Manager. size(name)
returns the total number of groupobjects in this group
parameters

| name |

helma.Group.Manager. count(name)
returns the total number of groupobjects in this group
parameters

| name |

Tue, 25 Nov 2008 16:50:19 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