Compare commits
101 commits
Author | SHA1 | Date | |
---|---|---|---|
5821630d7d | |||
1f1163704a | |||
cd05af552e | |||
|
74b927244e | ||
|
a9e1cf3f51 | ||
e246589cdf | |||
2ca34c70b5 | |||
a2d9dae06e | |||
d540b38a98 | |||
19a3961207 | |||
b90143adf7 | |||
e40b78230c | |||
a9163bd66f | |||
94ce6dac49 | |||
70a0b2d9a1 | |||
a4635aefb6 | |||
e4a36582f7 | |||
efd5617a89 | |||
387066f34d | |||
7eebeee1d0 | |||
ced560f0c7 | |||
c0cbe38fc5 | |||
1bc6653499 | |||
|
78ccdfced9 | ||
fcb01e21cd | |||
ad04d90940 | |||
938456e014 | |||
1008524b35 | |||
7dc2ffe46c | |||
ffbf863046 | |||
e82dd613db | |||
468e8a9298 | |||
6860ea589e | |||
7185214a5d | |||
1054413a10 | |||
51b568f099 | |||
3927f86e58 | |||
7d07ac4f2d | |||
29743f0608 | |||
049ee71b43 | |||
5f68f40579 | |||
43cc3ca243 | |||
c50fec4abb | |||
8820821f41 | |||
5c0e36e48b | |||
c468e8e865 | |||
2a41085419 | |||
5f0ff9f635 | |||
4ebc1182f1 | |||
e322fb80dd | |||
6e196e857f | |||
ecb0003a37 | |||
dd822d4e24 | |||
948dc9a76b | |||
735de0bbf6 | |||
80dfe53204 | |||
ed8f6ce9b6 | |||
fc51cb398b | |||
835c56afcf | |||
2cfb7e4b15 | |||
f763a0896e | |||
60b31e6133 | |||
af2c37bda6 | |||
6ca7261976 | |||
7e6c6c6d5b | |||
32eb71677e | |||
b0eb4ecba3 | |||
69adddafed | |||
0d31d25d7b | |||
4c9114fac4 | |||
22a23c45a2 | |||
8a6c58ad74 | |||
e9e8a4aa34 | |||
48d77455f8 | |||
96a037d508 | |||
921b074e6b | |||
2acff557d0 | |||
e2fe90126b | |||
a7dd487d3e | |||
f6f6475908 | |||
b5adad0eaa | |||
59d127e089 | |||
ff7bba76cf | |||
a9a6b0d753 | |||
e28ad52e80 | |||
964fcc1e54 | |||
9310ccd2f8 | |||
|
bb4e494ec6 | ||
|
503005eac8 | ||
|
892078eb4e | ||
|
aff951c964 | ||
|
56871c7072 | ||
|
c7e9f4c6cb | ||
|
1db31dc405 | ||
|
d8757f6aa3 | ||
|
578c654541 | ||
|
786a5e86bd | ||
|
bb8aba7adc | ||
|
d0c555e62a | ||
|
d26bc06459 | ||
a094f59a28 |
632 changed files with 88954 additions and 1437 deletions
16
.editorconfig
Normal file
16
.editorconfig
Normal file
|
@ -0,0 +1,16 @@
|
|||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = spaces
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.java]
|
||||
indent_size = 4
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
23
.gitignore
vendored
23
.gitignore
vendored
|
@ -1,3 +1,20 @@
|
|||
classes/*
|
||||
launcher.jar
|
||||
lib/helma*.jar
|
||||
.gradle
|
||||
.settings
|
||||
build
|
||||
|
||||
/apps
|
||||
/bin
|
||||
/backups
|
||||
/db
|
||||
/docs
|
||||
/extras
|
||||
/lib
|
||||
/log
|
||||
/static
|
||||
|
||||
/*.properties
|
||||
/launcher.jar
|
||||
/passwd
|
||||
/start.*
|
||||
|
||||
!/gradle.properties
|
||||
|
|
37
LICENSE.md
Normal file
37
LICENSE.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# License
|
||||
|
||||
Copyright (c) 1999-2008 Helma Project. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. Products derived from this software may not be called "Helma"
|
||||
or "Hop", nor may "Helma" or "Hop" appear in their name, without
|
||||
prior written permission of the Helma Project Group. For written
|
||||
permission, please contact helma@helma.org.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE HELMA PROJECT OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Helma includes third party software released under different specific
|
||||
license terms. See the licenses directory in the Helma distribution
|
||||
for a list of these licenses.
|
59
README.md
Normal file
59
README.md
Normal file
|
@ -0,0 +1,59 @@
|
|||
# How to Helma
|
||||
|
||||
## TL;DR
|
||||
|
||||
- Make sure you have Java 1.6 or higher installed
|
||||
- Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform
|
||||
- Direct your web browser to <http://localhost:8080>
|
||||
|
||||
## Introduction
|
||||
|
||||
Helma is an open source web application framework for fast and efficient scripting and serving of your websites and Internet applications.
|
||||
|
||||
Helma is written in Java and employs JavaScript for its server-side scripting environment, removing the need for compilation cycles and reducing development costs while giving you instant access to leverage the whole wealth of Java libraries out there.
|
||||
|
||||
Helma pioneered the simple and codeless mapping of application objects to database tables, which has only recently come into vogue with other web frameworks. In addition, an embedded object-oriented database performs automatic data persistence of unmapped objects.
|
||||
|
||||
Helma has proven itself to be stable and fast, capable of serving high traffic sites with hundreds of thousands of dynamic pages per day. The Austrian Broadcasting Corporation, popular weblog hosting sites such as antville.org, twoday.net, and blogger.de, among many others, have successfully been deploying Helma for several years now.
|
||||
|
||||
Although Helma became a Grande Dame of server-side JavaScript already decades ago when she performed in cozy Finnish clubs, she appears somehow retired nowadays. Nevertheless, she is here to stay for those last ones out there still tinkering with this nostalgic and wonderful piece of software.
|
||||
|
||||
## System Requirements
|
||||
|
||||
You need a Java virtual machine 1.6 or higher to run Helma.
|
||||
|
||||
Please consult the documentation of your platform how to obtain and install Java.
|
||||
|
||||
You also can directly download a [Java runtime or development kit](https://www.oracle.com/java/technologies/javase-downloads.html#javasejdk) from Oracle.
|
||||
|
||||
Helma is built with [Gradle](https://gradle.org).
|
||||
|
||||
## Development
|
||||
|
||||
Clone this repository to your machine and start the build process with `./gradlew install`. The build script is going to ask you if you want to update the installation, enter `y`.
|
||||
|
||||
> ⚠️ Please be aware that this step is going to overwrite files in the installation directory – escpecially at a later time when there might be substantial changes. Should this happen by accident you find the previous installation in the `backups` directory.
|
||||
|
||||
After compilation start Helma by invoking `./bin/helma.bat` or `./bin/helma`, depending on whether you are on Windows or Linux / Unix / OS X, respectively. If the `java` command is not found, try setting the `JAVA_HOME` variable in the start script to the location of your Java installation.
|
||||
|
||||
You can adjust server-wide settings in the `server.properties` file. For example, you could set the `smtp` property to the name of the SMTP server that Helma should use to send e-mail. Applications can be started or stopped by editing the `apps.properties` file through the web interface using the management application that is part of Helma.
|
||||
|
||||
After startup you should be able to connect your browser to <http://localhost:8080> – port 8080 on the local machine, that is.
|
||||
|
||||
Helma comes with a version of [Jetty](http://eclipse.org/jetty/), a lightweight yet industrial strenth web server.
|
||||
|
||||
While Jetty works well for development and in fact deploying real web sites, you might want to run Helma with the web server you are already using. This is most easily done by proxying Helma. Please consult the documentation of your web server how to achieve this.
|
||||
|
||||
Finally, Helma can be plugged into Servlet containers using Servlet classes that communicate with Helma either directly or via Java RMI. Be warned that these options may be harder to set up and maintain though, since most of the recent development efforts have been geared towards a proxied setup.
|
||||
|
||||
## Documentation and Further Information
|
||||
|
||||
After installing and running Helma, you will be able to access introductions to the features of Helma and the various included development tools. Further information you will find on the helma.org website:
|
||||
|
||||
> 😿 Unfortunately, the Helma website disappeard in the meantime. However, with some archeological web digging and thanks to the great search engines and archive services out there it is still possible to find useful resources.
|
||||
|
||||
- [helma.org at Internet Archive](http://web.archive.org/web/20180122132315/http://helma.org)
|
||||
- [Documentation](http://web.archive.org/web/20100530234322/http://helma.org/documentation/)
|
||||
- [API Reference](https://helma.serverjs.org/reference/)
|
||||
- [Tutorial](http://web.archive.org/web/20100526182848/http://helma.org/Documentation/Object-Relational+Mapping+Tutorial/)
|
||||
- [DocBook](http://dev.orf.at/download/helma/documentation/documentation.pdf)
|
107
README.txt
107
README.txt
|
@ -1,107 +0,0 @@
|
|||
This is the README file for version 1.7.4 of the Helma Javascript
|
||||
Web Application Framework.
|
||||
|
||||
==============
|
||||
STARTING HELMA
|
||||
==============
|
||||
|
||||
With the default package installed, all you need to do to get
|
||||
started is:
|
||||
-> make sure that you have Java 1.8 or higher installed
|
||||
-> call start.sh, resp. start.bat depending on your platform
|
||||
-> direct your web browser to http://localhost:8080/manage/
|
||||
See below for more detailed information.
|
||||
|
||||
===========
|
||||
ABOUT HELMA
|
||||
===========
|
||||
|
||||
Helma is an open source web application framework for fast
|
||||
and efficient scripting and serving of your websites and
|
||||
Internet applications.
|
||||
|
||||
Helma is written in Java and employs Javascript for its server-side
|
||||
scripting environment, removing the need for compilation cycles and
|
||||
reducing development costs while giving you instant access to leverage
|
||||
the whole wealth of Java libraries out there.
|
||||
|
||||
Helma pioneered the simple and codeless mapping of application objects
|
||||
to database tables, which has only recently come into vogue with other
|
||||
web frameworks. In addition, an embedded object-oriented database
|
||||
performs automatic data persistence of unmapped objects.
|
||||
|
||||
Helma has proven itself to be stable and fast, capable of serving high
|
||||
traffic sites with hundreds of thousands of dynamic pages per day. The
|
||||
Austrian Broadcasting Corporation, popular weblog hosting sites such
|
||||
as antville.org, twoday.net, and blogger.de, among many others, have
|
||||
successfully been deploying Helma for several years now.
|
||||
|
||||
===================
|
||||
SYSTEM REQUIREMENTS
|
||||
===================
|
||||
|
||||
You need a Java virtual machine 1.8 or higher to run Helma.
|
||||
|
||||
For Windows, Linux and Solaris you can get a Java runtime or development
|
||||
kit from http://java.sun.com/j2se/downloads.html. If you are on Mac OS X,
|
||||
you already have a Java runtime that will work well with Helma.
|
||||
|
||||
For other operating systems, please consult the documentation about the
|
||||
availabilty of a Java 1.4 (or higher) runtime.
|
||||
|
||||
============================
|
||||
INSTALLING AND RUNNING HELMA
|
||||
============================
|
||||
|
||||
Simply unzip or untar the contents of the archive file into any place
|
||||
on your hard disk. Start Helma by invoking start.bat or start.sh from
|
||||
the command line, depending on whether you are on Windows or
|
||||
Linux/Unix/MacOSX. If the java command is not found, try setting the
|
||||
JAVA_HOME variable in the start script to the location of your Java
|
||||
installation.
|
||||
|
||||
You may also want to have a look at the start script for other settings.
|
||||
You can adjust server wide settings in the server.properties file. For
|
||||
example, you should set the smtp property to the name of the SMTP server
|
||||
that Helma should use to send Email. Applications can be started or
|
||||
stopped by editing the apps.properties file through the web interface
|
||||
using the Management application that is part of Helma.
|
||||
|
||||
If you manage to get it running you should be able to connect your
|
||||
browser to http://localhost:8080/ or http://127.0.0.1:8080/
|
||||
(port 8080 on the local machine, that is).
|
||||
|
||||
Helma comes with a version of Jetty, a lightweight yet industrial strenth
|
||||
web server developed by Mortbay Consulting. See https://www.eclipse.org/jetty/
|
||||
for more information. While Jetty works well for deploying real web sites,
|
||||
you may want to run Helma behind an existing web server. This is most
|
||||
easily done by using a HTTP-Proxy module like mod_proxy for Apache.
|
||||
|
||||
Finally, Helma can be plugged into Servlet containers using Servlet
|
||||
classes that communicate with Helma either directly or via Java RMI.
|
||||
(Be warned that these options may be harder to set up and maintain though,
|
||||
since most of the recent development efforts have been geared towards the
|
||||
HTTP-Proxy setup).
|
||||
|
||||
=====================================
|
||||
DOCUMENTATION AND FURTHER INFORMATION
|
||||
=====================================
|
||||
|
||||
You can find further information on the helma.org website:
|
||||
|
||||
http://helma.org/docs/guide/
|
||||
http://helma.org/docs/reference/
|
||||
http://helma.org/docs/tutorial/
|
||||
http://helma.org/docs/docbook/
|
||||
|
||||
========================
|
||||
MAILING LIST AND SUPPORT
|
||||
========================
|
||||
|
||||
Please join us on the Helma mailing lists where we will be happy to
|
||||
answer any further questions you may have!
|
||||
|
||||
https://groups.google.com/forum/#!forum/helma
|
||||
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# List of apps to start.
|
||||
|
||||
test
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
To get the manage-application to work you must:
|
||||
|
||||
- add it to the apps.properties file with the following line:
|
||||
manage
|
||||
|
||||
- use helma distribution 1.5 or later.
|
||||
|
||||
- add the following properties to server.properties:
|
||||
|
||||
allowAdmin = [comma-separated list of hosts or ip-addresses that
|
||||
are allowed to access this application. wildcards
|
||||
are only allowed in addresses, not in hostnames!]
|
||||
adminAccess = <MD5-encoded credentials>
|
||||
|
||||
Creating the credentials can be done after you've got the application
|
||||
up and running at this address: http://<your-server-name>/manage/makekey
|
||||
|
231
build.gradle
Normal file
231
build.gradle
Normal file
|
@ -0,0 +1,231 @@
|
|||
import org.apache.tools.ant.filters.FixCrLfFilter
|
||||
|
||||
def jettyLogLevel = '-Dorg.eclipse.jetty.LEVEL=WARN'
|
||||
|
||||
// Suppress menu bar and default icon being shown in macos dock (Radar #5754483)
|
||||
// See https://developer.apple.com/library/content/releasenotes/Java/JavaLeopardUpdate1RN/ResolvedIssues/ResolvedIssues.html
|
||||
def suppressMacosDockIcon = '-Dapple.awt.UIElement=true'
|
||||
|
||||
// This list is used to determine which files need processing of line endings
|
||||
def textFiles = ['**/*.hac', '**/.html', '**/*.js', '**/*.md', '**/*.properties', '**/*.skin', '**/*.txt', '**/*.xml']
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'java'
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_6
|
||||
targetCompatibility = JavaVersion.VERSION_1_6
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'application'
|
||||
|
||||
version = new Date().format("yyyyMMdd")
|
||||
|
||||
tasks.build.dependsOn javadoc, 'jsdoc'
|
||||
tasks.compileJava.dependsOn 'processSource'
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
// Sources in `src` will be available here after processing
|
||||
srcDirs = ["$buildDir/src/main/java"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
configurations {
|
||||
// Wrapping implementation because it does not allow access to its files
|
||||
// (i.e. cannot be resolved)
|
||||
library.extendsFrom implementation
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'commons-codec:commons-codec:1.14'
|
||||
implementation 'commons-fileupload:commons-fileupload:1.4'
|
||||
implementation 'commons-logging:commons-logging:1.2'
|
||||
implementation 'commons-net:commons-net:3.6'
|
||||
implementation 'com.sun.activation:javax.activation:1.2.0'
|
||||
implementation 'javax.mail:javax.mail-api:1.6.2'
|
||||
implementation 'javax.servlet:javax.servlet-api:4.0.1'
|
||||
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
|
||||
implementation 'org.eclipse.jetty:jetty-servlet:9.4.27.v20200227'
|
||||
implementation 'org.eclipse.jetty:jetty-xml:9.4.27.v20200227'
|
||||
implementation 'org.mozilla:rhino:1.7.12'
|
||||
implementation 'xerces:xercesImpl:2.12.0'
|
||||
implementation 'xmlrpc:xmlrpc:2.0.1'
|
||||
}
|
||||
|
||||
startScripts {
|
||||
applicationName = 'helma'
|
||||
classpath = files('../launcher.jar')
|
||||
mainClassName = 'helma.main.launcher.Main'
|
||||
|
||||
defaultJvmOpts = [jettyLogLevel, suppressMacosDockIcon]
|
||||
|
||||
doLast {
|
||||
// Work-around to make the classpath above work (launcher.jar is located outside of `lib` dir)
|
||||
// See https://discuss.gradle.org/t/classpath-in-application-plugin-is-building-always-relative-to-app-home-lib-directory/2012
|
||||
def unixScriptFile = file getUnixScript()
|
||||
def windowsScriptFile = file getWindowsScript()
|
||||
unixScriptFile.text = unixScriptFile.text.replace('$APP_HOME/lib', '$APP_HOME')
|
||||
windowsScriptFile.text = windowsScriptFile.text.replace('%APP_HOME%\\lib', '%APP_HOME%')
|
||||
}
|
||||
}
|
||||
|
||||
distributions {
|
||||
main {
|
||||
contents {
|
||||
from project(':launcher').jar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
applicationDistribution.from(projectDir) {
|
||||
include 'modules/**'
|
||||
include 'LICENSE.md'
|
||||
include 'README.md'
|
||||
include 'start.*'
|
||||
}
|
||||
|
||||
applicationDistribution.from(javadoc.destinationDir) {
|
||||
include '**'
|
||||
into 'docs/javadoc'
|
||||
}
|
||||
|
||||
applicationDistribution.from("${project.buildDir}/docs/jsdoc") {
|
||||
include '**'
|
||||
into 'docs/jsdoc'
|
||||
}
|
||||
|
||||
distTar {
|
||||
compression = Compression.GZIP
|
||||
|
||||
filesMatching(textFiles) {
|
||||
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("lf"))
|
||||
}
|
||||
}
|
||||
|
||||
distZip {
|
||||
filesMatching(textFiles) {
|
||||
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("crlf"))
|
||||
}
|
||||
}
|
||||
|
||||
installDist {
|
||||
dependsOn javadoc, 'jsdoc'
|
||||
finalizedBy 'update'
|
||||
}
|
||||
|
||||
run {
|
||||
classpath = files('launcher.jar')
|
||||
jvmArgs jettyLogLevel, suppressMacosDockIcon
|
||||
}
|
||||
|
||||
task processSource(type: Sync) {
|
||||
def date = new Date().format("MMMM dd, yyyy")
|
||||
def gitOutput = new ByteArrayOutputStream()
|
||||
|
||||
exec {
|
||||
commandLine 'git', 'describe'
|
||||
standardOutput = gitOutput
|
||||
errorOutput = new ByteArrayOutputStream()
|
||||
ignoreExitValue = true
|
||||
}
|
||||
|
||||
def description = date
|
||||
def tag = gitOutput.toString().trim()
|
||||
|
||||
// TODO: Implement extended description in Java code
|
||||
if (tag) description = "$tag; $description"
|
||||
|
||||
from 'src'
|
||||
|
||||
filter {
|
||||
line -> line.replaceAll('__builddate__', date)
|
||||
} into "${project.buildDir}/src"
|
||||
}
|
||||
|
||||
task update {
|
||||
def rsyncArgs = ['-a', '--info=progress2', '--exclude', 'backups']
|
||||
|
||||
def confirm = {
|
||||
ant.input(message: 'Update this installation?', validargs: 'y,n', addproperty: 'continue')
|
||||
return ant.continue == 'y'
|
||||
}
|
||||
|
||||
onlyIf { confirm() }
|
||||
|
||||
doFirst {
|
||||
def backupDir = 'backups/' + new Date().format('yyyyMMdd-HHmmss')
|
||||
|
||||
mkdir backupDir
|
||||
|
||||
exec {
|
||||
// Using rsync instead of a CopyTask because the latter chokes on multi-byte characters
|
||||
// See https://github.com/gradle/gradle/issues/789
|
||||
executable 'rsync'
|
||||
args rsyncArgs
|
||||
args "$projectDir/", backupDir
|
||||
}
|
||||
}
|
||||
|
||||
doLast {
|
||||
exec {
|
||||
// Using rsync instead of installDist task because it does not overwrite the project directory
|
||||
executable 'rsync'
|
||||
args rsyncArgs
|
||||
args '--exclude', 'bin'
|
||||
args "${installDist.destinationDir}/", projectDir
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task jsdoc(type: Exec) {
|
||||
group 'Documentation'
|
||||
description 'Generates JSDoc API documentation for the included JavaScript modules'
|
||||
|
||||
def sources = ['modules/core', 'modules/helma', 'modules/jala/code']
|
||||
def destination = "${project.buildDir}/docs/jsdoc"
|
||||
|
||||
sources.each { dir -> inputs.dir dir }
|
||||
outputs.dir destination
|
||||
|
||||
executable 'npx'
|
||||
args = ['jsdoc', '-d', "$destination"].plus(sources)
|
||||
|
||||
// As of writing jsdoc throws the following error:
|
||||
// Unable to parse /home/tobi/Projects/helma/current/modules/jala/code/Database.js: Unexpected token, expected "(" (844:10)
|
||||
// Seems to be related to the `for each` syntax but did not find any further references.
|
||||
ignoreExitValue true
|
||||
}
|
||||
|
||||
task rhinoShell(type: JavaExec) {
|
||||
group 'Application'
|
||||
description 'Runs the interactive Rhino JavaScript shell'
|
||||
|
||||
def rhinoJar = configurations.library.files.find { jar ->
|
||||
jar.name.startsWith('rhino')
|
||||
}
|
||||
|
||||
classpath = files(rhinoJar)
|
||||
main = 'org.mozilla.javascript.tools.shell.Main'
|
||||
|
||||
standardInput = System.in
|
||||
}
|
||||
|
||||
// Call this task with a function definition using the `-P` parameter, e.g.
|
||||
// `./gradlew commandLine -Pfunction=manage.getAllApplications`
|
||||
task commandLine(type: JavaExec) {
|
||||
group 'Application'
|
||||
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`'
|
||||
|
||||
classpath = files('launcher.jar')
|
||||
main = 'helma.main.launcher.Commandline'
|
||||
args '-h', projectDir, function
|
||||
}
|
401
build.xml
401
build.xml
|
@ -1,401 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<project name="Helma" default="usage" basedir=".">
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Initializes some variables -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="init">
|
||||
<property name="Name" value="helma"/>
|
||||
<property name="year" value="1998-${year}"/>
|
||||
<property name="version" value="1.7.4"/>
|
||||
<property name="project" value="helma"/>
|
||||
|
||||
<property name="home.dir" value="."/>
|
||||
<property name="build.dir" value="${home.dir}/build"/>
|
||||
<property name="build.src" value="${home.dir}/src"/>
|
||||
<property name="build.lib" value="${home.dir}/lib"/>
|
||||
<property name="build.classes" value="${home.dir}/classes"/>
|
||||
<property name="build.docs" value="${home.dir}/docs"/>
|
||||
<property name="build.externals" value="${build.dir}/externals"/>
|
||||
|
||||
<property name="build.work" value="${home.dir}/work"/>
|
||||
<property name="build.dist" value="${home.dir}/dist"/>
|
||||
|
||||
<property name="jar.name" value="${project}"/>
|
||||
<property name="package.name" value="${project}-${version}"/>
|
||||
<property name="core.name" value="${project}-core-${version}"/>
|
||||
|
||||
<property name="debug" value="on"/>
|
||||
<property name="optimize" value="on"/>
|
||||
<property name="deprecation" value="off"/>
|
||||
|
||||
<path id="build.class.path">
|
||||
<fileset dir="${home.dir}/lib">
|
||||
<exclude name="**/helma*.jar" />
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<tstamp/>
|
||||
|
||||
<filter token="year" value="${year}"/>
|
||||
<filter token="version" value="${version}"/>
|
||||
<filter token="date" value="${TODAY}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Help on usage -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="help" depends="usage" />
|
||||
<target name="usage">
|
||||
<echo message=""/>
|
||||
<echo message=""/>
|
||||
<echo message="Helma build instructions"/>
|
||||
<echo message="-------------------------------------------------------------"/>
|
||||
<echo message=""/>
|
||||
<echo message=" available targets are:"/>
|
||||
<echo message=""/>
|
||||
<echo message=" compile --> compiles the source code to ./classes"/>
|
||||
<echo message=" jar --> generates the ./lib/helma-YYYYMMDD.jar file"/>
|
||||
<echo message=" package --> generates the distribution (zip and tar.gz)"/>
|
||||
<echo message=" app [name] --> gets an application from svn and zips it"/>
|
||||
<echo message=" module [name] --> gets a module from svn and zips it"/>
|
||||
<echo message=" core --> generates core for production updates (zip and tar.gz)"/>
|
||||
<echo message=" clean --> clean up temporary build directories and files"/>
|
||||
<echo message=""/>
|
||||
<echo message=" usage --> provides help on using the build tool (default)"/>
|
||||
<echo message=""/>
|
||||
<echo message=" See comments inside the build.xml file for more details."/>
|
||||
<echo message="-------------------------------------------------------------"/>
|
||||
<echo message=""/>
|
||||
<echo message=""/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Compiles the source directory -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="compile" depends="init">
|
||||
<mkdir dir="${build.classes}"/>
|
||||
<!-- copy the imageio file -->
|
||||
<copy file="${build.src}/META-INF/services/javax.imageio.spi.ImageWriterSpi"
|
||||
todir="${build.classes}/META-INF/services"/>
|
||||
<!-- copy helma db style sheet -->
|
||||
<copy file="${build.src}/helma/objectmodel/dom/helma.xsl"
|
||||
todir="${build.classes}/helma/objectmodel/dom" />
|
||||
<!-- copy source files over to work directory -->
|
||||
<delete dir="${build.work}/src" quiet="true"/>
|
||||
<mkdir dir="${build.work}/src" />
|
||||
<copy todir="${build.work}/src" overwrite="true">
|
||||
<fileset dir="${build.src}" includes="**/*.java"/>
|
||||
</copy>
|
||||
<replace file="${build.work}/src/helma/main/Server.java"
|
||||
token="__builddate__" value="${TODAY}"/>
|
||||
<javac srcdir="${build.work}/src"
|
||||
source="1.8"
|
||||
target="1.8"
|
||||
destdir="${build.classes}"
|
||||
debug="${debug}"
|
||||
deprecation="${deprecation}"
|
||||
optimize="${optimize}"
|
||||
includeAntRuntime="no">
|
||||
<classpath refid="build.class.path" />
|
||||
</javac>
|
||||
<delete dir="${build.work}/src"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Creates a helma.jar file (snapshot) in the lib-directory -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="jar" depends="compile">
|
||||
<jar jarfile="${build.lib}/${jar.name}-${DSTAMP}.jar"
|
||||
basedir="${build.classes}"
|
||||
excludes="**/package.html,**/main/launcher/**"/>
|
||||
<jar jarfile="${home.dir}/launcher.jar"
|
||||
basedir="${build.classes}"
|
||||
includes="**/main/launcher/**"
|
||||
manifest="${build.src}/helma/main/launcher/manifest.txt"/>
|
||||
<!-- Copy timestamped helma jar file to lib/helma.jar -->
|
||||
<copy file="${build.lib}/${jar.name}-${DSTAMP}.jar"
|
||||
tofile="${build.lib}/${jar.name}.jar"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Get the documentation (currently can fail due to request time-out -->
|
||||
<!-- or missing support for proxies) -->
|
||||
<!-- =================================================================== -->
|
||||
<!-- <target name="docs" depends="init"> -->
|
||||
<!-- <get src="http://www.helma.org/docs/reference/print" -->
|
||||
<!-- dest="${build.docs}/reference.html" -->
|
||||
<!-- ignoreerrors="true" -->
|
||||
<!-- /> -->
|
||||
<!-- </target> -->
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Builds and packages only the core for the deployment and updating -->
|
||||
<!-- of production environments -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="core" depends="init, jar">
|
||||
<mkdir dir="${build.work}"/>
|
||||
|
||||
<!-- copy all libraries except helma-YYYYMMDD.jar -->
|
||||
<copy todir="${build.work}/lib">
|
||||
<fileset dir="${home.dir}/lib">
|
||||
<exclude name="**/helma-*.jar" />
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- copy the launcher jar and start files-->
|
||||
<copy file="${home.dir}/launcher.jar" todir="${build.work}/lib"/>
|
||||
|
||||
<!-- create lib/ext directory -->
|
||||
<mkdir dir="${build.work}/lib/ext"/>
|
||||
|
||||
<!-- copy the license files -->
|
||||
<copy todir="${build.work}/licenses">
|
||||
<fileset dir="${home.dir}/licenses" excludes="**/.svn**"/>
|
||||
</copy>
|
||||
<copy file="${home.dir}/license.txt" todir="${build.work}/licenses"/>
|
||||
|
||||
<!-- zip up the whole thing -->
|
||||
<antcall target="package-zip">
|
||||
<param name="filename" value="${core.name}"/>
|
||||
</antcall>
|
||||
<antcall target="package-tgz">
|
||||
<param name="filename" value="${core.name}"/>
|
||||
</antcall>
|
||||
|
||||
<!-- clean up -->
|
||||
<delete dir="${build.work}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Creates the full helma distribution -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="package" depends="init">
|
||||
<mkdir dir="${build.work}"/>
|
||||
|
||||
<!-- checkout the demo apps (and zip manage-app) -->
|
||||
<antcall target="package-apps" />
|
||||
|
||||
<!-- create the main part of helma -->
|
||||
<antcall target="package-raw">
|
||||
<param name="distribution" value="main" />
|
||||
</antcall>
|
||||
|
||||
<!-- copy modules -->
|
||||
<antcall target="package-modules" />
|
||||
|
||||
<chmod perm="755">
|
||||
<fileset dir="${build.work}">
|
||||
<include name="start.sh"/>
|
||||
</fileset>
|
||||
</chmod>
|
||||
|
||||
<!-- zip up the whole thing -->
|
||||
<antcall target="package-zip">
|
||||
<param name="filename" value="${package.name}"/>
|
||||
</antcall>
|
||||
<antcall target="package-tgz">
|
||||
<param name="filename" value="${package.name}"/>
|
||||
</antcall>
|
||||
|
||||
<!-- make the src distributions -->
|
||||
<antcall target="package-src-zip">
|
||||
<param name="filename" value="${package.name}"/>
|
||||
</antcall>
|
||||
<antcall target="package-src-tgz">
|
||||
<param name="filename" value="${package.name}"/>
|
||||
</antcall>
|
||||
|
||||
<!-- clean up -->
|
||||
<delete dir="${build.work}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Compile Helma and prepare the skeleton in a temporary directory. -->
|
||||
<!-- Used by package . -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="package-raw" depends="init, jar">
|
||||
|
||||
<!-- copy the framework (apps.props, server.props, hop/db, hop/static) -->
|
||||
<copy todir="${build.work}">
|
||||
<fileset dir="${build.dir}/${distribution}" excludes="**/.svn**"/>
|
||||
</copy>
|
||||
|
||||
<!-- copy the launcher jar and start files -->
|
||||
<copy file="${home.dir}/launcher.jar" todir="${build.work}/"/>
|
||||
<copy file="${home.dir}/start.sh" todir="${build.work}"/>
|
||||
<copy file="${home.dir}/start.bat" todir="${build.work}"/>
|
||||
|
||||
<!-- copy README.txt -->
|
||||
<copy file="${home.dir}/README.txt" todir="${build.work}/"/>
|
||||
|
||||
<!-- copy all libraries except helma-YYYYMMDD.jar -->
|
||||
<copy todir="${build.work}/lib">
|
||||
<fileset dir="${home.dir}/lib">
|
||||
<exclude name="**/helma-*.jar" />
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<!-- create lib/ext directory -->
|
||||
<mkdir dir="${build.work}/lib/ext"/>
|
||||
|
||||
<!-- copy the license files -->
|
||||
<copy todir="${build.work}/licenses">
|
||||
<fileset dir="${home.dir}/licenses" excludes="**/.svn**"/>
|
||||
</copy>
|
||||
<copy file="${home.dir}/license.txt" todir="${build.work}/licenses"/>
|
||||
|
||||
<!-- copy the scripts directory -->
|
||||
<copy todir="${build.work}/scripts">
|
||||
<fileset dir="${home.dir}/scripts" excludes="**/.svn**"/>
|
||||
</copy>
|
||||
|
||||
<!-- zip the sourcecode -->
|
||||
<!-- mkdir dir="${build.work}/src"/>
|
||||
<tar tarfile="${build.work}/src/helma-src.tar" basedir="${build.src}/">
|
||||
<tarfileset dir="${build.src}">
|
||||
<include name="${build.src}/**"/>
|
||||
</tarfileset>
|
||||
</tar>
|
||||
<gzip zipfile="${build.work}/src/helma-src.tar.gz" src="${build.work}/src/helma-src.tar"/>
|
||||
<delete file="${build.work}/src/helma-src.tar"/ -->
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- zip manage app -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="package-apps" depends="init">
|
||||
|
||||
<mkdir dir="${build.work}/apps" />
|
||||
|
||||
<mkdir dir="${build.work}/apps/manage"/>
|
||||
<zip zipfile="${build.work}/apps/manage/manage.zip" basedir="${home.dir}/apps/manage/"
|
||||
includes="**" excludes="**/properties,readme/**" />
|
||||
<copy todir="${build.work}/apps/manage">
|
||||
<fileset dir="${home.dir}/apps/manage" includes="app.properties,class.properties,readme.txt"/>
|
||||
</copy>
|
||||
<!-- delete dir="${build.work}/manage" /-->
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Checkout modules including helmaTools -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="package-modules" depends="init">
|
||||
|
||||
<!-- add a copy of the modules -->
|
||||
<mkdir dir="${build.work}/modules"/>
|
||||
<copy todir="${build.work}/modules">
|
||||
<fileset dir="${home.dir}/modules"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Packages the work directory with TAR-GZIP -->
|
||||
<!-- needs parameter ${filename} for final dist-file -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="package-tgz" depends="init">
|
||||
<mkdir dir="${build.dist}" />
|
||||
<fixcrlf srcdir="${build.work}" eol="lf" eof="remove" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin" />
|
||||
<tar tarfile="${build.dist}/${filename}.tar" basedir="${build.work}" excludes="**">
|
||||
<tarfileset prefix="${filename}" dir="${build.work}" mode="755">
|
||||
<include name="start.sh"/>
|
||||
</tarfileset>
|
||||
<tarfileset prefix="${filename}" dir="${build.work}">
|
||||
<include name="**"/>
|
||||
<exclude name="start.sh"/>
|
||||
<exclude name="lib/jimi.jar"/>
|
||||
<exclude name="lib/apache-dom.jar"/>
|
||||
</tarfileset>
|
||||
</tar>
|
||||
<gzip zipfile="${build.dist}/${filename}.tar.gz" src="${build.dist}/${filename}.tar"/>
|
||||
<delete file="${build.dist}/${filename}.tar"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Packages the work directory with ZIP -->
|
||||
<!-- needs parameter ${filename} for final dist-file -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="package-zip" depends="init">
|
||||
<mkdir dir="${build.dist}" />
|
||||
<fixcrlf srcdir="${build.work}" eol="crlf" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin, **/*.xml" />
|
||||
<zip zipfile="${build.dist}/${filename}.zip">
|
||||
<zipfileset dir="${build.work}" prefix="${filename}">
|
||||
<include name="**"/>
|
||||
<exclude name="start.sh"/>
|
||||
<exclude name="lib/jimi.jar"/>
|
||||
<exclude name="lib/apache-dom.jar"/>
|
||||
</zipfileset>
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Packages Helma src and build directories with TAR-GZIP -->
|
||||
<!-- needs parameter ${filename} for final dist-file -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="package-src-tgz" depends="init">
|
||||
<mkdir dir="${build.dist}" />
|
||||
<tar tarfile="${build.dist}/${filename}-src.tar">
|
||||
<tarfileset prefix="${filename}" dir="${home.dir}">
|
||||
<include name="src/**"/>
|
||||
<include name="build/**"/>
|
||||
<include name="build.xml"/>
|
||||
<include name="licenses/**"/>
|
||||
<include name="license.txt"/>
|
||||
<include name="lib/jimi.jar"/>
|
||||
<include name="lib/apache-dom.jar"/>
|
||||
</tarfileset>
|
||||
</tar>
|
||||
<gzip zipfile="${build.dist}/${filename}-src.tar.gz" src="${build.dist}/${filename}-src.tar"/>
|
||||
<delete file="${build.dist}/${filename}-src.tar"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Packages Helma src and build directories with ZIP -->
|
||||
<!-- needs parameter ${filename} for final dist-file -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="package-src-zip" depends="init">
|
||||
<mkdir dir="${build.dist}" />
|
||||
<zip zipfile="${build.dist}/${filename}-src.zip">
|
||||
<zipfileset dir="${home.dir}" prefix="${filename}">
|
||||
<include name="src/**"/>
|
||||
<include name="build/**"/>
|
||||
<include name="build.xml"/>
|
||||
<include name="licenses/**"/>
|
||||
<include name="license.txt"/>
|
||||
<include name="lib/jimi.jar"/>
|
||||
<include name="lib/apache-dom.jar"/>
|
||||
</zipfileset>
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Cleans up temporary build directories -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="clean" depends="init">
|
||||
<delete dir="${build.work}" />
|
||||
<delete dir="${build.classes}" />
|
||||
<delete dir="${build.dist}"/>
|
||||
<delete file="${home.dir}/launcher.jar" quiet="true"/>
|
||||
<delete>
|
||||
<fileset dir="${build.lib}" includes="${jar.name}*.jar"/>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -1,52 +0,0 @@
|
|||
This is the README file for the Helma build files as part of the Helma Object Publisher.
|
||||
|
||||
PREREQUISITES
|
||||
=============
|
||||
|
||||
The Helma build script is uses Apache Ant.
|
||||
For more information about Ant, see <http://ant.apache.org/>.
|
||||
|
||||
For checking out the source files from Helma's CVS you also need a CVS client.
|
||||
More information about CVS at <http://www.cvshome.org/>.
|
||||
|
||||
|
||||
STARTING BUILD
|
||||
==============
|
||||
|
||||
The build system is started by invoking the shell script appropriate to your
|
||||
platform, ie. build.sh for *nix (Linux, NetBSD etc.) and build.bat for Windows
|
||||
systems. You need to modify the script and set the JAVA_HOME to fit your system.
|
||||
|
||||
The generic syntax is
|
||||
|
||||
ant target
|
||||
|
||||
The parameter "target" specifies one of the build targets listed below.
|
||||
|
||||
|
||||
BUILD TARGETS
|
||||
=============
|
||||
|
||||
compile
|
||||
Compiles the source files contained in the work/checkout/hop/ directory into the work/classes/ directory (which will be created if necessary).
|
||||
|
||||
jar
|
||||
Creates a helma.jar file (snapshot) in the lib-directory. The file is named helma-yyyymmdd.jar.
|
||||
|
||||
javadocs
|
||||
Creates the javadoc API documentation.
|
||||
|
||||
package
|
||||
Creates the full helma distribution packages and places them in the dist directory.
|
||||
|
||||
app [name]
|
||||
Gets an application from the cvs, zips/targzs it and places the files in the dist directory.
|
||||
|
||||
module [name]
|
||||
Gets a module from the cvs, zips it and places the file in the dist directory.
|
||||
|
||||
|
||||
--
|
||||
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# List of applications to start.
|
||||
# More information about this file is available at
|
||||
# http://helma.org/Documentation/Properties+Files/apps.properties/
|
||||
|
||||
|
||||
# Administrative application to manage all other apps on this server,
|
||||
# accessible via its default mountpoint at http://<host>:<port>/manage
|
||||
# and using its default repository at apps/manage
|
||||
|
||||
manage
|
||||
|
||||
|
3
gradle.properties
Normal file
3
gradle.properties
Normal file
|
@ -0,0 +1,3 @@
|
|||
org.gradle.console = plain
|
||||
|
||||
function =
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
5
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
5
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
172
gradlew
vendored
Executable file
172
gradlew
vendored
Executable file
|
@ -0,0 +1,172 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
84
gradlew.bat
vendored
Normal file
84
gradlew.bat
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
7
launcher/build.gradle
Normal file
7
launcher/build.gradle
Normal file
|
@ -0,0 +1,7 @@
|
|||
jar {
|
||||
manifest {
|
||||
from 'src/main/java/helma/main/launcher/manifest.txt'
|
||||
}
|
||||
}
|
||||
|
||||
//startScripts.enabled = false
|
|
@ -34,19 +34,6 @@ import java.util.ArrayList;
|
|||
* be able to set up class and install paths.
|
||||
*/
|
||||
public class Main {
|
||||
public static final String[] jars = {
|
||||
"helma.jar", "rhino.jar",
|
||||
"jetty-server.jar", "jetty-io.jar", "jetty-http.jar",
|
||||
"jetty-security.jar", "jetty-xml.jar",
|
||||
"jetty-servlet.jar", "jetty-util.jar",
|
||||
"commons-logging.jar",
|
||||
"xmlrpc.jar", "servlet.jar",
|
||||
"mail.jar",
|
||||
"commons-fileupload.jar", "commons-codec.jar",
|
||||
"commons-io.jar", "commons-net.jar",
|
||||
"tagsoup.jar"
|
||||
};
|
||||
|
||||
private Class serverClass;
|
||||
private Object server;
|
||||
|
||||
|
@ -123,6 +110,21 @@ public class Main {
|
|||
}
|
||||
}
|
||||
|
||||
static void addJars(ArrayList jarlist, File dir) throws MalformedURLException {
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
String n = name.toLowerCase();
|
||||
return n.endsWith(".jar") || n.endsWith(".zip"); //$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
});
|
||||
|
||||
if (files != null) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
jarlist.add(new URL("file:" + files[i].getAbsolutePath())); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a server-wide ClassLoader from our install directory.
|
||||
* This will be used as parent ClassLoader for all application
|
||||
|
@ -142,26 +144,11 @@ public class Main {
|
|||
File libdir = new File(installDir, "lib");
|
||||
ArrayList jarlist = new ArrayList();
|
||||
|
||||
for (int i = 0; i < jars.length; i++) {
|
||||
File jar = new File(libdir, jars[i]);
|
||||
jarlist.add(new URL("file:" + jar.getAbsolutePath()));
|
||||
}
|
||||
// add all jar files from the lib directory
|
||||
addJars(jarlist, libdir);
|
||||
|
||||
// add all jar files from the lib/ext directory
|
||||
File extdir = new File(libdir, "ext");
|
||||
File[] files = extdir.listFiles(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
String n = name.toLowerCase();
|
||||
return n.endsWith(".jar") || n.endsWith(".zip");
|
||||
}
|
||||
});
|
||||
|
||||
if (files != null) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
jarlist.add(new URL("file:" + files[i].getAbsolutePath()));
|
||||
System.err.println("Adding to classpath: " + files[i].getAbsolutePath());
|
||||
}
|
||||
}
|
||||
addJars(jarlist, new File(libdir, "ext")); //$NON-NLS-1$
|
||||
|
||||
URL[] urls = new URL[jarlist.size()];
|
||||
|
||||
|
@ -208,12 +195,10 @@ public class Main {
|
|||
}
|
||||
}
|
||||
|
||||
URLClassLoader apploader = (URLClassLoader)
|
||||
ClassLoader.getSystemClassLoader();
|
||||
|
||||
// try to get Helma installation directory
|
||||
if (installDir == null) {
|
||||
URL launcherUrl = apploader.findResource("helma/main/launcher/Main.class");
|
||||
URL launcherUrl = ClassLoader.getSystemClassLoader()
|
||||
.getResource("helma/main/launcher/Main.class"); //$NON-NLS-1$
|
||||
|
||||
// this is a JAR URL of the form
|
||||
// jar:<url>!/{entry}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/jetty-io.jar
BIN
lib/jetty-io.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/jimi.jar
BIN
lib/jimi.jar
Binary file not shown.
BIN
lib/mail.jar
BIN
lib/mail.jar
Binary file not shown.
BIN
lib/rhino.jar
BIN
lib/rhino.jar
Binary file not shown.
BIN
lib/servlet.jar
BIN
lib/servlet.jar
Binary file not shown.
BIN
lib/tagsoup.jar
BIN
lib/tagsoup.jar
Binary file not shown.
BIN
lib/xmlrpc.jar
BIN
lib/xmlrpc.jar
Binary file not shown.
15
modules/README.md
Normal file
15
modules/README.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Helma Modules
|
||||
|
||||
The Helma modules directory is organized in several groups:
|
||||
|
||||
* **modules/core** which contains extensions to core JavaScript types such as
|
||||
Object, Array, or Date.
|
||||
* **modules/helma** which provide new functionality to JavaScript, usually by
|
||||
wrapping a Java library.
|
||||
* **modules/jala**, a Git submodule providing the very useful ORF.at libraries for Helma
|
||||
|
||||
To use a HelmaLib module in your Helma application, you need to add it to the
|
||||
app's repositories. The simplest way to do so is by using the `app.addRepository()`
|
||||
function:
|
||||
|
||||
app.addRepository('modules/helma/Search.js');
|
|
@ -19,13 +19,12 @@
|
|||
* <br /><br />
|
||||
* To use this optional module, its repository needs to be added to the
|
||||
* application, for example by calling app.addRepository('modules/core/Array.js')
|
||||
*
|
||||
* @addon
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Check if this array contains a specific value.
|
||||
* @external
|
||||
* @memberof {Array}
|
||||
* @param {Object} val the value to check
|
||||
* @return {boolean} true if the value is contained
|
||||
*/
|
||||
|
@ -35,6 +34,8 @@ Array.prototype.contains = function(val) {
|
|||
|
||||
/**
|
||||
* Retrieve the union set of a bunch of arrays
|
||||
* @external
|
||||
* @memberof {Array}
|
||||
* @param {Array} array1,... the arrays to unify
|
||||
* @return {Array} the union set
|
||||
*/
|
||||
|
@ -55,6 +56,8 @@ Array.union = function() {
|
|||
|
||||
/**
|
||||
* Retrieve the intersection set of a bunch of arrays
|
||||
* @external
|
||||
* @memberof {Array}
|
||||
* @param {Array} array1,... the arrays to intersect
|
||||
* @return {Array} the intersection set
|
||||
*/
|
||||
|
|
|
@ -34,7 +34,9 @@ Date.ISOFORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
|
|||
/**
|
||||
* Format a Date to a string.
|
||||
* For details on the format pattern, see
|
||||
* http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
|
||||
* http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html *
|
||||
* @external
|
||||
* @memberof {Date}
|
||||
*
|
||||
* @param String Format pattern
|
||||
* @param Object Java Locale Object (optional)
|
||||
|
@ -56,6 +58,8 @@ Date.prototype.format = function (format, locale, timezone) {
|
|||
/**
|
||||
* set the date/time to UTC by subtracting
|
||||
* the timezone offset
|
||||
* @external
|
||||
* @memberof {Date}
|
||||
*/
|
||||
Date.prototype.toUtc = function() {
|
||||
this.setMinutes(this.getMinutes() + this.getTimezoneOffset());
|
||||
|
@ -65,6 +69,8 @@ Date.prototype.toUtc = function() {
|
|||
/**
|
||||
* set the date/time to local time by adding
|
||||
* the timezone offset
|
||||
* @external
|
||||
* @memberof {Date}
|
||||
*/
|
||||
Date.prototype.toLocalTime = function() {
|
||||
this.setMinutes(this.getMinutes() - this.getTimezoneOffset());
|
||||
|
@ -74,6 +80,8 @@ Date.prototype.toLocalTime = function() {
|
|||
/**
|
||||
* returns the difference between this and another
|
||||
* date object in milliseconds
|
||||
* @external
|
||||
* @memberof {Date}
|
||||
*/
|
||||
Date.prototype.diff = function(dateObj) {
|
||||
return this.getTime() - dateObj.getTime();
|
||||
|
@ -82,6 +90,8 @@ Date.prototype.diff = function(dateObj) {
|
|||
|
||||
/**
|
||||
* return the timespan to current date/time or a different Date object
|
||||
* @external
|
||||
* @memberof {Date}
|
||||
* @param Object parameter object containing optional properties:
|
||||
* .now = String to use if difference is < 1 minute
|
||||
* .day|days = String to use for single|multiple day(s)
|
||||
|
@ -134,6 +144,8 @@ Date.prototype.getTimespan = function(param) {
|
|||
* return the past timespan between this Date object and
|
||||
* the current Date or a different Date object
|
||||
* @see Date.prototype.getTimespan
|
||||
* @external
|
||||
* @memberof {Date}
|
||||
*/
|
||||
Date.prototype.getAge = function(param) {
|
||||
var age = this.getTimespan(param);
|
||||
|
@ -147,6 +159,8 @@ Date.prototype.getAge = function(param) {
|
|||
* return the future timespan between this Date object and
|
||||
* the current Date or a different Date object
|
||||
* @see Date.prototype.getTimespan
|
||||
* @external
|
||||
* @memberof {Date}
|
||||
*/
|
||||
Date.prototype.getExpiry = function(param) {
|
||||
var age = this.getTimespan(param);
|
||||
|
@ -158,6 +172,8 @@ Date.prototype.getExpiry = function(param) {
|
|||
|
||||
/**
|
||||
* checks if a date object equals another date object
|
||||
* @external
|
||||
* @memberof {Date}
|
||||
* @param Object Date object to compare
|
||||
* @param Int indicating how far the comparison should go
|
||||
* @return Boolean
|
||||
|
|
|
@ -168,11 +168,10 @@ function linebreakToHtml_filter(input) {
|
|||
* @param new
|
||||
*/
|
||||
function replace_filter(input, param, oldString, newString) {
|
||||
var str = (input || "").toString();
|
||||
var oldString = param["old"] != null ? param["old"] : oldString;
|
||||
var newString = param["new"] != null ? param["new"] : newString;
|
||||
var replace = Packages.org.eclipse.jetty.util.StringUtil.replace;
|
||||
return replace(str, oldString, newString);
|
||||
var str = String(input || '');
|
||||
var oldString = param.old || oldString;
|
||||
var newString = param['new'] || newString;
|
||||
return str.replace(new RegExp(oldString, 'g'), newString);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ app.addRepository("modules/core/String.js");
|
|||
|
||||
/**
|
||||
* Iterates over each child node of the HopObject.
|
||||
* @external
|
||||
* @memberof {HopObject}
|
||||
* @param {Function} callback The callback function to be
|
||||
* called for each child node. On every call the first
|
||||
* argument of this function is set to the current value
|
||||
|
@ -45,6 +47,8 @@ HopObject.prototype.forEach = function(callback) {
|
|||
|
||||
/**
|
||||
* macro returns the id of a HopObject
|
||||
* @external
|
||||
* @memberof {HopObject}
|
||||
*/
|
||||
HopObject.prototype.id_macro = function() {
|
||||
res.write(this._id);
|
||||
|
@ -54,6 +58,8 @@ HopObject.prototype.id_macro = function() {
|
|||
|
||||
/**
|
||||
* macro returns the url for any hopobject
|
||||
* @external
|
||||
* @memberof {HopObject}
|
||||
*/
|
||||
HopObject.prototype.href_macro = function(param, action) {
|
||||
res.write(this.href(action || param.action || String.NULLSTR));
|
||||
|
@ -64,6 +70,8 @@ HopObject.prototype.href_macro = function(param, action) {
|
|||
/**
|
||||
* macro rendering a skin or displaying
|
||||
* its source (param.as == "source")
|
||||
* @external
|
||||
* @memberof {HopObject}
|
||||
*/
|
||||
HopObject.prototype.skin_macro = function(param, name) {
|
||||
var skinName = name || param.name;
|
||||
|
@ -85,6 +93,8 @@ HopObject.prototype.skin_macro = function(param, name) {
|
|||
/**
|
||||
* this macro renders a text depending on
|
||||
* the value of a given property
|
||||
* @external
|
||||
* @memberof {HopObject}
|
||||
*/
|
||||
HopObject.prototype.switch_macro = function(param) {
|
||||
if (param.name) {
|
||||
|
@ -97,6 +107,8 @@ HopObject.prototype.switch_macro = function(param) {
|
|||
/**
|
||||
* generic macro that loops over the childobjects
|
||||
* and renders a specified skin for each of them
|
||||
* @external
|
||||
* @memberof {HopObject}
|
||||
* @param Object providing the following properties:
|
||||
* skin: the skin to render for each item (required)
|
||||
* collection: the collection containing the items
|
||||
|
@ -170,6 +182,8 @@ HopObject.prototype.loop_macro = function(param, collection) {
|
|||
* <li>param.one - exactly one child node</li>
|
||||
* <li>param.many - more than one child node</li>
|
||||
* </ol>
|
||||
* @external
|
||||
* @memberof {HopObject}
|
||||
* @param {Object} param The default macro parameter
|
||||
* @param {String} name The default name for a child node
|
||||
*/
|
||||
|
|
|
@ -1,179 +1,2 @@
|
|||
/*
|
||||
* Helma License Notice
|
||||
*
|
||||
* The contents of this file are subject to the Helma License
|
||||
* Version 2.0 (the "License"). You may not use this file except in
|
||||
* compliance with the License. A copy of the License is available at
|
||||
* http://adele.helma.org/download/helma/license.txt
|
||||
*
|
||||
* Copyright 1998-2006 Helma Software. All Rights Reserved.
|
||||
*
|
||||
* $RCSfile: JSON.js,v $
|
||||
* $Author$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Adds JSON methods to the Object, Array and String prototypes.
|
||||
* <br /><br />
|
||||
* To use this optional module, its repository needs to be added to the
|
||||
* application, for example by calling app.addRepository('modules/core/JSON.js')
|
||||
*/
|
||||
|
||||
/*
|
||||
json.js
|
||||
2006-04-28 [http://www.json.org/json.js]
|
||||
|
||||
This file adds these methods to JavaScript:
|
||||
|
||||
object.toJSON()
|
||||
|
||||
This method produces a JSON text from an object. The
|
||||
object must not contain any cyclical references.
|
||||
|
||||
array.toJSON()
|
||||
|
||||
This method produces a JSON text from an array. The
|
||||
array must not contain any cyclical references.
|
||||
|
||||
string.parseJSON()
|
||||
|
||||
This method parses a JSON text to produce an object or
|
||||
array. It will return false if there is an error.
|
||||
*/
|
||||
|
||||
(function () {
|
||||
var m = {
|
||||
'\b': '\\b',
|
||||
'\t': '\\t',
|
||||
'\n': '\\n',
|
||||
'\f': '\\f',
|
||||
'\r': '\\r',
|
||||
'"' : '\\"',
|
||||
'\\': '\\\\'
|
||||
},
|
||||
|
||||
s = {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
array: function (x) {
|
||||
var a = ['['], b, f, i, l = x.length, v;
|
||||
for (i = 0; i < l; i += 1) {
|
||||
v = x[i];
|
||||
f = s[typeof v];
|
||||
if (f) {
|
||||
v = f(v);
|
||||
if (typeof v == 'string') {
|
||||
if (b) {
|
||||
a[a.length] = ',';
|
||||
}
|
||||
a[a.length] = v;
|
||||
b = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
a[a.length] = ']';
|
||||
return a.join('');
|
||||
},
|
||||
|
||||
'boolean': function (x) {
|
||||
return String(x);
|
||||
},
|
||||
|
||||
'null': function (x) {
|
||||
return "null";
|
||||
},
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
number: function (x) {
|
||||
return isFinite(x) ? String(x) : 'null';
|
||||
},
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
object: function (x) {
|
||||
if (x) {
|
||||
if (x instanceof Array) {
|
||||
return s.array(x);
|
||||
}
|
||||
var a = ['{'], b, f, i, v;
|
||||
for (i in x) {
|
||||
v = x[i];
|
||||
f = s[typeof v];
|
||||
if (f) {
|
||||
v = f(v);
|
||||
if (typeof v == 'string') {
|
||||
if (b) {
|
||||
a[a.length] = ',';
|
||||
}
|
||||
a.push(s.string(i), ':', v);
|
||||
b = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
a[a.length] = '}';
|
||||
return a.join('');
|
||||
}
|
||||
return 'null';
|
||||
},
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
string: function (x) {
|
||||
if (/["\\\x00-\x1f]/.test(x)) {
|
||||
x = x.replace(/([\x00-\x1f\\"])/g, function(a, b) {
|
||||
var c = m[b];
|
||||
if (c) {
|
||||
return c;
|
||||
}
|
||||
c = b.charCodeAt();
|
||||
return '\\u00' +
|
||||
Math.floor(c / 16).toString(16) +
|
||||
(c % 16).toString(16);
|
||||
});
|
||||
}
|
||||
return '"' + x + '"';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* This method produces a JSON text from an object.
|
||||
* The object must not contain any cyclical references.
|
||||
*/
|
||||
Object.prototype.toJSON = function () {
|
||||
return s.object(this);
|
||||
};
|
||||
|
||||
/**
|
||||
* This method produces a JSON text from an array.
|
||||
* The array must not contain any cyclical references.
|
||||
*/
|
||||
Array.prototype.toJSON = function () {
|
||||
return s.array(this);
|
||||
};
|
||||
|
||||
Object.prototype.dontEnum("toJSON");
|
||||
Array.prototype.dontEnum("toJSON");
|
||||
return;
|
||||
})();
|
||||
|
||||
|
||||
/**
|
||||
* This method parses a JSON text to produce an object or
|
||||
* array. It will return false if there is an error.
|
||||
*/
|
||||
String.prototype.parseJSON = function () {
|
||||
try {
|
||||
return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(this.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + this + ')');
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
String.prototype.dontEnum("parseJSON");
|
||||
// This file intentionally left blank to prevent legacy code from
|
||||
// breaking when trying to include the obsolete JSON module.
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
/**
|
||||
* format a Number to a String
|
||||
* @external
|
||||
* @memberof {Number}
|
||||
* @param String Format pattern
|
||||
* @param java.util.Locale An optional Locale instance
|
||||
* @return String Number formatted to a String
|
||||
|
@ -42,6 +44,8 @@ Number.prototype.format = function(fmt, locale) {
|
|||
/**
|
||||
* return the percentage of a Number
|
||||
* according to a given total Number
|
||||
* @external
|
||||
* @memberof {Number}
|
||||
* @param Int Total
|
||||
* @param String Format Pattern
|
||||
* @param java.util.Locale An optional Locale instance
|
||||
|
@ -57,6 +61,8 @@ Number.prototype.toPercent = function(total, fmt, locale) {
|
|||
|
||||
/**
|
||||
* factory to create functions for sorting objects in an array
|
||||
* @external
|
||||
* @memberof {Number}
|
||||
* @param String name of the field each object is compared with
|
||||
* @param Number order (ascending or descending)
|
||||
* @return Function ready for use in Array.prototype.sort
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
/**
|
||||
* Copies the properties of this object into a clone.
|
||||
* @external
|
||||
* @memberof {Object}
|
||||
* @param {Object} clone The optional target object
|
||||
* @param {Boolean} recursive If true child objects are cloned as well, otherwise
|
||||
* the clone contains references to the child objects
|
||||
|
@ -31,38 +33,39 @@
|
|||
Object.prototype.clone = function(clone, recursive) {
|
||||
|
||||
var getValue = function(value, recursive) {
|
||||
if ((value == null || typeof(value) !== "object") || recursive !== true) {
|
||||
if (recursive !== true || value == null
|
||||
|| (typeof (value) !== "object" && typeof (value) !== "function")) {
|
||||
return value;
|
||||
}
|
||||
return value.clone(null, recursive);
|
||||
};
|
||||
|
||||
if (typeof(this) === "object") {
|
||||
if (typeof (this) === "object") {
|
||||
if (this === null) {
|
||||
return null;
|
||||
}
|
||||
switch (this.constructor) {
|
||||
case String:
|
||||
case Number:
|
||||
case Boolean:
|
||||
case Date:
|
||||
return new this.constructor(this.valueOf());
|
||||
|
||||
case Array:
|
||||
return this.map(function(value) {
|
||||
return getValue(value, recursive);
|
||||
});
|
||||
|
||||
case null: // e.g. macro parameter objects
|
||||
if (clone == null) {
|
||||
clone = {};
|
||||
}
|
||||
// continue below
|
||||
case Object:
|
||||
case HopObject:
|
||||
default:
|
||||
if (clone == null) {
|
||||
clone = new this.constructor();
|
||||
}
|
||||
for (var propName in this) {
|
||||
for ( var propName in this) {
|
||||
clone[propName] = getValue(this[propName], recursive);
|
||||
}
|
||||
return clone;
|
||||
|
||||
default:
|
||||
return new this.constructor(this.valueOf());
|
||||
}
|
||||
} else if (typeof(this) === "function" && this.constructor === RegExp) {
|
||||
} else if (typeof (this) === "function" && this.constructor === RegExp) {
|
||||
return new RegExp(this.valueOf());
|
||||
}
|
||||
return this;
|
||||
|
@ -72,24 +75,27 @@ Object.prototype.clone = function(clone, recursive) {
|
|||
/**
|
||||
* reduce an extended object (ie. a HopObject)
|
||||
* to a generic javascript object
|
||||
* @external
|
||||
* @memberof {Object}
|
||||
* @param HopObject the HopObject to be reduced
|
||||
* @return Object the resulting generic object
|
||||
*/
|
||||
Object.prototype.reduce = function(recursive) {
|
||||
var result = {};
|
||||
for (var i in this) {
|
||||
if (this[i] instanceof HopObject == false) {
|
||||
if (this[i] instanceof HopObject == false)
|
||||
result[i] = this[i];
|
||||
} else if (recursive) {
|
||||
else if (recursive)
|
||||
result[i] = this.reduce(true);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* print the contents of an object for debugging
|
||||
* @external
|
||||
* @memberof {Object}
|
||||
* @param Object the object to dump
|
||||
* @param Boolean recursive flag (if true, dump child objects, too)
|
||||
*/
|
||||
|
|
|
@ -20,10 +20,6 @@ String.APATTERN = /[^a-zA-Z]/;
|
|||
String.NUMPATTERN = /[^0-9]/;
|
||||
String.FILEPATTERN = /[^a-zA-Z0-9-_\. ]/;
|
||||
String.HEXPATTERN = /[^a-fA-F0-9]/;
|
||||
// Email and URL RegExps contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
|
||||
// licensed unter MIT license - http://www.opensource.org/licenses/mit-license.php
|
||||
String.EMAILPATTERN = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;
|
||||
String.URLPATTERN = /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;
|
||||
String.LEFT = -1
|
||||
String.BALANCE = 0
|
||||
String.RIGHT = 1
|
||||
|
@ -32,6 +28,13 @@ String.SPACE = " ";
|
|||
String.EMPTY = "";
|
||||
String.NULL = String.EMPTY; // to be deprecated?
|
||||
|
||||
// Email and URL RegExps contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
|
||||
// licensed unter MIT license - http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
String.EMAILPATTERN = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;
|
||||
|
||||
String.URLPATTERN = /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;
|
||||
|
||||
/**
|
||||
* @fileoverview Adds useful methods to the JavaScript String type.
|
||||
* <br /><br />
|
||||
|
@ -41,6 +44,8 @@ String.NULL = String.EMPTY; // to be deprecated?
|
|||
|
||||
/**
|
||||
* checks if a date format pattern is correct
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return Boolean true if the pattern is correct
|
||||
*/
|
||||
String.prototype.isDateFormat = function() {
|
||||
|
@ -56,6 +61,8 @@ String.prototype.isDateFormat = function() {
|
|||
/**
|
||||
* parse a timestamp into a date object. This is used when users
|
||||
* want to set createtime explicitly when creating/editing stories.
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param String date format to be applied
|
||||
* @param Object Java TimeZone Object (optional)
|
||||
* @return Object contains the resulting date
|
||||
|
@ -81,6 +88,8 @@ String.prototype.toDate = function(format, timezone) {
|
|||
* function checks if the string passed contains any characters that
|
||||
* are forbidden in URLs and tries to create a java.net.URL from it
|
||||
* FIXME: probably deprecated -> helma.Url
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return Boolean
|
||||
* @see helma.Url.PATTERN
|
||||
*/
|
||||
|
@ -92,6 +101,8 @@ String.prototype.isUrl = function() {
|
|||
/**
|
||||
* function checks if the string passed contains any characters
|
||||
* that are forbidden in image- or filenames
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return Boolean
|
||||
*/
|
||||
String.prototype.isFileName = function() {
|
||||
|
@ -102,6 +113,8 @@ String.prototype.isFileName = function() {
|
|||
/**
|
||||
* function cleans the string passed as argument from any characters
|
||||
* that are forbidden or shouldn't be used in filenames
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return Boolean
|
||||
*/
|
||||
String.prototype.toFileName = function() {
|
||||
|
@ -112,6 +125,8 @@ String.prototype.toFileName = function() {
|
|||
/**
|
||||
* function checks a string for a valid color value in hexadecimal format.
|
||||
* it may also contain # as first character
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @returns Boolean false, if string length (without #) > 6 or < 6 or
|
||||
* contains any character which is not a valid hex value
|
||||
*/
|
||||
|
@ -129,6 +144,8 @@ String.prototype.isHexColor = function() {
|
|||
* converts a string into a hexadecimal color
|
||||
* representation (e.g. "ffcc33"). also knows how to
|
||||
* convert a color string like "rgb (255, 204, 51)".
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return String the resulting hex color (w/o "#")
|
||||
*/
|
||||
String.prototype.toHexColor = function() {
|
||||
|
@ -151,6 +168,8 @@ String.prototype.toHexColor = function() {
|
|||
/**
|
||||
* function returns true if the string contains
|
||||
* only a-z and 0-9 (case insensitive!)
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return Boolean true in case string is alpha, false otherwise
|
||||
*/
|
||||
String.prototype.isAlphanumeric = function() {
|
||||
|
@ -163,6 +182,8 @@ String.prototype.isAlphanumeric = function() {
|
|||
/**
|
||||
* function cleans a string by throwing away all
|
||||
* non-alphanumeric characters
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return cleaned string
|
||||
*/
|
||||
String.prototype.toAlphanumeric = function() {
|
||||
|
@ -173,6 +194,8 @@ String.prototype.toAlphanumeric = function() {
|
|||
/**
|
||||
* function returns true if the string contains
|
||||
* only characters a-z
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return Boolean true in case string is alpha, false otherwise
|
||||
*/
|
||||
String.prototype.isAlpha = function() {
|
||||
|
@ -185,6 +208,8 @@ String.prototype.isAlpha = function() {
|
|||
/**
|
||||
* function returns true if the string contains
|
||||
* only 0-9
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return Boolean true in case string is numeric, false otherwise
|
||||
*/
|
||||
String.prototype.isNumeric = function() {
|
||||
|
@ -196,6 +221,8 @@ String.prototype.isNumeric = function() {
|
|||
|
||||
/**
|
||||
* transforms the first n characters of a string to uppercase
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param Number amount of characters to transform
|
||||
* @return String the resulting string
|
||||
*/
|
||||
|
@ -211,6 +238,8 @@ String.prototype.capitalize = function(limit) {
|
|||
/**
|
||||
* transforms the first n characters of each
|
||||
* word in a string to uppercase
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return String the resulting string
|
||||
*/
|
||||
String.prototype.titleize = function() {
|
||||
|
@ -227,6 +256,8 @@ String.prototype.titleize = function() {
|
|||
|
||||
/**
|
||||
* translates all characters of a string into HTML entities
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return String translated result
|
||||
*/
|
||||
String.prototype.entitize = function() {
|
||||
|
@ -244,6 +275,8 @@ String.prototype.entitize = function() {
|
|||
* breaks up a string into two parts called
|
||||
* head and tail at the given position
|
||||
* don't apply this to HTML, i.e. use stripTags() in advance
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param Number number of charactrers or of segments separated by the delimiter
|
||||
* @param String pre-/suffix to be pre-/appended to shortened string
|
||||
* @param String delimiter
|
||||
|
@ -276,6 +309,8 @@ String.prototype.embody = function(limit, clipping, delimiter) {
|
|||
|
||||
/**
|
||||
* get the head of a string
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @see String.prototype.embody()
|
||||
*/
|
||||
String.prototype.head = function(limit, clipping, delimiter) {
|
||||
|
@ -285,6 +320,8 @@ String.prototype.head = function(limit, clipping, delimiter) {
|
|||
|
||||
/**
|
||||
* get the tail of a string
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @see String.prototype.embody()
|
||||
*/
|
||||
String.prototype.tail = function(limit, clipping, delimiter) {
|
||||
|
@ -292,9 +329,12 @@ String.prototype.tail = function(limit, clipping, delimiter) {
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
* set clip method out of compatibility/convenience reason
|
||||
/**
|
||||
* FIXME: we eventually have to get rid of this one...
|
||||
* set clip method out of compatibility/convenience reason
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @deprecated
|
||||
* @see String.prototype.head()
|
||||
*/
|
||||
String.prototype.clip = String.prototype.head;
|
||||
|
@ -302,6 +342,8 @@ String.prototype.clip = String.prototype.head;
|
|||
|
||||
/**
|
||||
* function inserts a string every number of characters
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param Int number of characters after which insertion should take place
|
||||
* @param String string to be inserted
|
||||
* @param Boolean definitely insert at each interval position
|
||||
|
@ -327,6 +369,8 @@ String.prototype.group = function(interval, str, ignoreWhiteSpace) {
|
|||
|
||||
/**
|
||||
* replace all linebreaks and optionally all w/br tags
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param Boolean flag indicating if html tags should be replaced
|
||||
* @param String replacement for the linebreaks / html tags
|
||||
* @return String the unwrapped string
|
||||
|
@ -343,6 +387,8 @@ String.prototype.unwrap = function(removeTags, replacement) {
|
|||
|
||||
/**
|
||||
* function calculates the md5 hash of a string
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @return String md5 hash of the string
|
||||
*/
|
||||
String.prototype.md5 = function() {
|
||||
|
@ -352,6 +398,8 @@ String.prototype.md5 = function() {
|
|||
|
||||
/**
|
||||
* function repeats a string the specified amount of times
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param Int amount of repetitions
|
||||
* @return String resulting string
|
||||
*/
|
||||
|
@ -366,6 +414,8 @@ String.prototype.repeat = function(multiplier) {
|
|||
/**
|
||||
* function returns true if the string starts with
|
||||
* the string passed as argument
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param String string pattern to search for
|
||||
* @return Boolean true in case it matches the beginning
|
||||
* of the string, false otherwise
|
||||
|
@ -381,6 +431,8 @@ String.prototype.startsWith = function(str, offset) {
|
|||
/**
|
||||
* function returns true if the string ends with
|
||||
* the string passed as argument
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param String string pattern to search for
|
||||
* @return Boolean true in case it matches the end of
|
||||
* the string, false otherwise
|
||||
|
@ -393,6 +445,8 @@ String.prototype.endsWith = function(str) {
|
|||
|
||||
/**
|
||||
* fills a string with another string up to a desired length
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param String the filling string
|
||||
* @param Number the desired length of the resulting string
|
||||
* @param Number the direction which the string will be padded in:
|
||||
|
@ -429,6 +483,8 @@ String.prototype.pad = function(str, len, mode) {
|
|||
/**
|
||||
* function returns true if a string contains the string
|
||||
* passed as argument
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param String string to search for
|
||||
* @param Int Position to start search
|
||||
* @param Boolean
|
||||
|
@ -443,6 +499,8 @@ String.prototype.contains = function(str, fromIndex) {
|
|||
/**
|
||||
* function compares a string with the one passed as argument
|
||||
* using diff
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param String String to compare against String object value
|
||||
* @param String Optional regular expression string to use for
|
||||
* splitting. If not defined, newlines will be used.
|
||||
|
@ -502,6 +560,8 @@ String.prototype.diff = function(mod, separator) {
|
|||
|
||||
/**
|
||||
* remove leading and trailing whitespace
|
||||
* @external
|
||||
* @memberof {String}
|
||||
*/
|
||||
String.prototype.trim = function () {
|
||||
var s = new java.lang.String(this);
|
||||
|
@ -511,6 +571,8 @@ String.prototype.trim = function () {
|
|||
|
||||
/**
|
||||
* returns true if the string looks like an e-mail
|
||||
* @external
|
||||
* @memberof {String}
|
||||
*/
|
||||
String.prototype.isEmail = function() {
|
||||
return String.EMAILPATTERN.test(this);
|
||||
|
@ -519,6 +581,8 @@ String.prototype.isEmail = function() {
|
|||
|
||||
/**
|
||||
* returns the amount of occurences of one string in another
|
||||
* @external
|
||||
* @memberof {String}
|
||||
*/
|
||||
String.prototype.count = function(str) {
|
||||
var count = 0;
|
||||
|
@ -533,6 +597,8 @@ String.prototype.count = function(str) {
|
|||
|
||||
/**
|
||||
* returns the string encoded using the base64 algorithm
|
||||
* @external
|
||||
* @memberof {String}
|
||||
*/
|
||||
String.prototype.enbase64 = function() {
|
||||
var bytes = new java.lang.String(this) . getBytes();
|
||||
|
@ -542,6 +608,8 @@ String.prototype.enbase64 = function() {
|
|||
|
||||
/**
|
||||
* returns the decoded string using the base64 algorithm
|
||||
* @external
|
||||
* @memberof {String}
|
||||
*/
|
||||
String.prototype.debase64 = function() {
|
||||
var bytes = new Packages.sun.misc.BASE64Decoder().decodeBuffer(this);
|
||||
|
@ -574,6 +642,8 @@ String.prototype.stripTags = function() {
|
|||
|
||||
/**
|
||||
* factory to create functions for sorting objects in an array
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param String name of the field each object is compared with
|
||||
* @param Number order (ascending or descending)
|
||||
* @return Function ready for use in Array.prototype.sort
|
||||
|
@ -603,6 +673,8 @@ String.Sorter.cache = {};
|
|||
|
||||
/**
|
||||
* create a string from a bunch of substrings
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param String one or more strings as arguments
|
||||
* @return String the resulting string
|
||||
*/
|
||||
|
@ -616,6 +688,8 @@ String.compose = function() {
|
|||
|
||||
/**
|
||||
* creates a random string (numbers and chars)
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param len length of key
|
||||
* @param mode determines which letters to use. null or 0 = all letters;
|
||||
* 1 = skip 0, 1, l and o which can easily be mixed with numbers;
|
||||
|
@ -650,6 +724,8 @@ String.random = function(len, mode) {
|
|||
/**
|
||||
* append one string onto another and add some "glue"
|
||||
* if none of the strings is empty or null.
|
||||
* @external
|
||||
* @memberof {String}
|
||||
* @param String the first string
|
||||
* @param String the string to be appended onto the first one
|
||||
* @param String the "glue" to be inserted between both strings
|
||||
|
|
|
@ -24,5 +24,4 @@ app.addRepository('modules/core/Object.js');
|
|||
app.addRepository('modules/core/String.js');
|
||||
app.addRepository('modules/core/HopObject.js');
|
||||
app.addRepository('modules/core/Global.js');
|
||||
app.addRepository('modules/core/JSON.js');
|
||||
app.addRepository('modules/core/Filters.js');
|
||||
|
|
|
@ -267,9 +267,7 @@ helma.Html.prototype.input = function(param) {
|
|||
return;
|
||||
}
|
||||
var attr = Object.prototype.reduce.call(param);
|
||||
attr.type = "text";
|
||||
if (!attr.size)
|
||||
attr.size = 20;
|
||||
attr.type = param.type || "text";
|
||||
attr.value = (attr.value != null) ? encodeForm(attr.value) : "";
|
||||
this.tag("input", attr);
|
||||
return;
|
||||
|
@ -467,8 +465,6 @@ helma.Html.prototype.dropDown = function(param, options, selectedValue, firstOpt
|
|||
return;
|
||||
}
|
||||
var attr = Object.prototype.reduce.call(param);
|
||||
if (!attr.size)
|
||||
attr.size = 1;
|
||||
this.openTag("select", attr);
|
||||
res.write("\n ");
|
||||
if (firstOption) {
|
||||
|
@ -477,7 +473,13 @@ helma.Html.prototype.dropDown = function(param, options, selectedValue, firstOpt
|
|||
this.closeTag("option");
|
||||
res.write("\n ");
|
||||
}
|
||||
var hasOpenGroup = false;
|
||||
for (var i in options) {
|
||||
if (options[i].group) {
|
||||
hasOpenGroup && html.closeTag("optgroup");
|
||||
html.openTag("optgroup", {label: options[i].group});
|
||||
hasOpenGroup = true;
|
||||
}
|
||||
var attr = new Object();
|
||||
var display = "";
|
||||
if ((options[i] instanceof Array) && options[i].length > 0) {
|
||||
|
@ -503,6 +505,7 @@ helma.Html.prototype.dropDown = function(param, options, selectedValue, firstOpt
|
|||
this.closeTag("option");
|
||||
res.write("\n ");
|
||||
}
|
||||
hasOpenGroup && html.closeTag("optgroup");
|
||||
this.closeTag("select");
|
||||
res.write("\n ");
|
||||
return;
|
||||
|
@ -751,8 +754,6 @@ helma.Html.prototype.password = function(attr) {
|
|||
return;
|
||||
}
|
||||
attr.type = "password";
|
||||
if (!attr.size)
|
||||
attr.size = 20;
|
||||
this.tag("input", attr);
|
||||
return;
|
||||
};
|
||||
|
|
|
@ -61,7 +61,9 @@ helma.Http = function() {
|
|||
var responseHandler = function(connection, result) {
|
||||
var input;
|
||||
try {
|
||||
if (method !== 'DELETE') {
|
||||
input = new java.io.BufferedInputStream(connection.getInputStream());
|
||||
}
|
||||
} catch (error) {
|
||||
input = new java.io.BufferedInputStream(connection.getErrorStream());
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ helma.Zip = function(file) {
|
|||
var outStream = new java.io.BufferedOutputStream(new java.io.FileOutputStream(dest));
|
||||
outStream.write(buf, 0, size);
|
||||
} finally {
|
||||
outStream.close();
|
||||
if (outStream) outStream.close();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -304,6 +304,23 @@ helma.Zip = function(file) {
|
|||
* @type ByteArray
|
||||
*/
|
||||
this.getData = function() {
|
||||
zOutStream.close();
|
||||
fOutStream.close();
|
||||
var inputStream = new java.io.FileInputStream(tempFile);
|
||||
var bOutStream = new java.io.ByteArrayOutputStream();
|
||||
var buffer = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 8192);
|
||||
try {
|
||||
var chunk;
|
||||
while ((chunk = inputStream.read(buffer)) !== -1) {
|
||||
bOutStream.write(buffer, 0, chunk);
|
||||
}
|
||||
bOutStream.flush();
|
||||
} catch (ex) {
|
||||
app.log(ex);
|
||||
} finally {
|
||||
if (inputStream) inputStream.close();
|
||||
if (bOutStream) bOutStream.close();
|
||||
}
|
||||
return bOutStream.toByteArray();
|
||||
};
|
||||
|
||||
|
@ -317,12 +334,13 @@ helma.Zip = function(file) {
|
|||
throw new Error("no destination for ZipFile given");
|
||||
// first of all, close the ZipOutputStream
|
||||
zOutStream.close();
|
||||
fOutStream.close();
|
||||
var destFile = new java.io.File(dest);
|
||||
try {
|
||||
var outStream = new java.io.FileOutputStream(destFile);
|
||||
bOutStream.writeTo(outStream);
|
||||
} finally {
|
||||
outStream.close();
|
||||
if (destFile.exists()) destFile['delete']();
|
||||
java.nio.file.Files.move(tempFile.toPath(), destFile.toPath());
|
||||
} catch (ex) {
|
||||
app.log(ex);
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
@ -339,8 +357,10 @@ helma.Zip = function(file) {
|
|||
/**
|
||||
* constructor body
|
||||
*/
|
||||
var bOutStream = new java.io.ByteArrayOutputStream();
|
||||
var zOutStream = new java.util.zip.ZipOutputStream(bOutStream);
|
||||
var tempFile = new java.io.File.createTempFile('zip-', '');
|
||||
var fOutStream = new java.io.FileOutputStream(tempFile);
|
||||
var zOutStream = new java.util.zip.ZipOutputStream(fOutStream);
|
||||
|
||||
if (file) {
|
||||
file = evalFile(file);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
// convenience SingleFileRepository to load all the
|
||||
// Javascript library files in ./modules/helma
|
||||
|
||||
/** @namespace helma */
|
||||
|
||||
app.addRepository('modules/helma/Aspects.js');
|
||||
app.addRepository('modules/helma/Chart.js');
|
||||
app.addRepository('modules/helma/Color.js');
|
||||
|
|
35
modules/jala/README.md
Normal file
35
modules/jala/README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# About Jala
|
||||
|
||||
Jala is an open-source collection of JavaScript modules for Helma Object Publisher. Copyright 2004 ORF Online und Teletext GmbH, Vienna (Austria). You can find more information about each module in the API Documentation located in the `docs` directory.
|
||||
|
||||
## Licensing
|
||||
|
||||
Jala itself is licensed under the Apache 2.0 License, but parts of Jala require third party libraries coming with different licenses. You can find all necessary information in the `licenses` directory.
|
||||
|
||||
## Installation
|
||||
|
||||
Move the Jala folder into the `modules` directory of your Helma installation. To include a certain Jala module simply add the following line to your Helma application's source code (replace `[name]` with the desired module name):
|
||||
|
||||
app.addRepository("./modules/jala/code/[name].js");
|
||||
|
||||
If you want to include the whole Jala package at once, you can use the `all` module for convenience:
|
||||
|
||||
app.addRepository("./modules/jala/code/all.js");
|
||||
|
||||
Alternatively, you can import the Jala module from within Helma's
|
||||
`apps.properties` file (replace `[appName]` with the name of your Helma application, `[n]` with a number between 0 and 9 and `[moduleName]` with the desired module
|
||||
name):
|
||||
|
||||
[appName].respository.[n] = ./modules/jala/code/[moduleName].js
|
||||
|
||||
More information about the `addRepository()` method and generally including repositories in a Helma application is available at
|
||||
http://helma.org/stories/77712/.
|
||||
|
||||
## Contact, Bugs and Feedback
|
||||
|
||||
The Jala Project is hosted at https://dev.orf.at/jala/ providing all necessary information about Subversion access, Ticketing, Releases etc.
|
||||
|
||||
Although we encourage you to post your questions and comments as ticket, we also provide a mailing list for convenience (details at
|
||||
https://dev.orf.at/trac/jala/wiki/MailingList).
|
||||
|
||||
For immediate contact you can reach the developers via jaladev AT gmail.com.
|
7
modules/jala/build.properties
Normal file
7
modules/jala/build.properties
Normal file
|
@ -0,0 +1,7 @@
|
|||
## build properties for jsdoc api documentation
|
||||
## all paths *must* be relative to the directory where
|
||||
## this file is located
|
||||
|
||||
docs.source = ./code
|
||||
docs.destination = ./docs
|
||||
docs.projectName = Jala 1.3
|
1
modules/jala/code/.jsdoc/summary.html
Normal file
1
modules/jala/code/.jsdoc/summary.html
Normal file
|
@ -0,0 +1 @@
|
|||
Jala is a <a href="http://helma.org">Helma</a>-based library and utility project initially developed to ease the work at <a href="http://orf.at">ORF.at</a>'s software development department.
|
175
modules/jala/code/AsyncRequest.js
Normal file
175
modules/jala/code/AsyncRequest.js
Normal file
|
@ -0,0 +1,175 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.AsyncRequest class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new AsyncRequest instance.
|
||||
* @class This class is used to create requests of type "INTERNAL"
|
||||
* (like cron-jobs) that are processed in a separate thread and
|
||||
* therefor asynchronous.
|
||||
* @param {Object} obj Object in whose context the method should be called
|
||||
* @param {String} funcName Name of the function to call
|
||||
* @param {Array} args Array containing the arguments that should be passed
|
||||
* to the function (optional). This option is <em>deprecated</em>, instead
|
||||
* pass the arguments directly to the {@link #run} method.
|
||||
* @constructor
|
||||
* @returns A new instance of AsyncRequest
|
||||
* @type AsyncRequest
|
||||
* @deprecated Use the {@link http://helma.zumbrunn.net/reference/core/app.html#invokeAsync
|
||||
* app.invokeAsync} method instead (built-in into Helma as
|
||||
* of version 1.6)
|
||||
*/
|
||||
jala.AsyncRequest = function(obj, funcName, args) {
|
||||
app.logger.warn("Use of jala.AsyncRequest is deprecated in this version.");
|
||||
app.logger.warn("This module will probably be removed in a " +
|
||||
"future version of Jala.");
|
||||
|
||||
/**
|
||||
* Contains a reference to the thread started by this AsyncRequest
|
||||
* @type java.lang.Thread
|
||||
* @private
|
||||
*/
|
||||
var thread;
|
||||
|
||||
/**
|
||||
* Contains the timeout defined for this AsyncRequest (in milliseconds)
|
||||
* @type Number
|
||||
* @private
|
||||
*/
|
||||
var timeout;
|
||||
|
||||
/**
|
||||
* Contains the number of milliseconds to wait before starting
|
||||
* the asynchronous request.
|
||||
* @type Number
|
||||
* @private
|
||||
*/
|
||||
var delay;
|
||||
|
||||
/**
|
||||
* Run method necessary to implement java.lang.Runnable.
|
||||
* @private
|
||||
*/
|
||||
var runner = function() {
|
||||
// evaluator that will handle the request
|
||||
var ev = app.__app__.getEvaluator();
|
||||
|
||||
if (delay != null) {
|
||||
java.lang.Thread.sleep(delay);
|
||||
}
|
||||
try {
|
||||
if (args === undefined || args === null || args.constructor != Array) {
|
||||
args = [];
|
||||
}
|
||||
if (timeout != null) {
|
||||
ev.invokeInternal(obj, funcName, args, timeout);
|
||||
} else {
|
||||
ev.invokeInternal(obj, funcName, args);
|
||||
}
|
||||
} catch (e) {
|
||||
// ignore it, but log it
|
||||
app.log("[Runner] Caught Exception: " + e);
|
||||
} finally {
|
||||
// release the ev in any case
|
||||
app.__app__.releaseEvaluator(ev);
|
||||
// remove reference to underlying thread
|
||||
thread = null;
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the timeout of this asynchronous request.
|
||||
* @param {Number} seconds Thread-timeout.
|
||||
*/
|
||||
this.setTimeout = function(seconds) {
|
||||
timeout = seconds * 1000;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Defines the delay to wait before evaluating this asynchronous request.
|
||||
* @param {Number} millis Milliseconds to wait
|
||||
*/
|
||||
this.setDelay = function(millis) {
|
||||
delay = millis;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Starts this asynchronous request. Any arguments passed to
|
||||
* this method will be passed to the method executed by
|
||||
* this AsyncRequest instance.
|
||||
*/
|
||||
this.run = function() {
|
||||
if (arguments.length > 0) {
|
||||
// convert arguments object into array
|
||||
args = Array.prototype.slice.call(arguments, 0, arguments.length);
|
||||
}
|
||||
thread = (new java.lang.Thread(new java.lang.Runnable({"run": runner})));
|
||||
thread.start();
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Starts this asynchronous request.
|
||||
* @deprecated Use {@link #run} instead
|
||||
*/
|
||||
this.evaluate = function() {
|
||||
this.run.apply(this, arguments);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the underlying thread is alive
|
||||
* @returns True if the underlying thread is alive,
|
||||
* false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
this.isAlive = function() {
|
||||
return thread != null && thread.isAlive();
|
||||
}
|
||||
|
||||
/** @ignore */
|
||||
this.toString = function() {
|
||||
return "[jala.AsyncRequest]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Main constructor body
|
||||
*/
|
||||
if (!obj || !funcName)
|
||||
throw "jala.AsyncRequest: insufficient arguments.";
|
||||
return this;
|
||||
}
|
429
modules/jala/code/BitTorrent.js
Normal file
429
modules/jala/code/BitTorrent.js
Normal file
|
@ -0,0 +1,429 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.BitTorrent class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Module dependencies
|
||||
*/
|
||||
app.addRepository("modules/core/String.js");
|
||||
app.addRepository("modules/helma/File.js");
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new BitTorrent file.
|
||||
* @class This class provides methods to create a BitTorrent
|
||||
* metadata file from any desired file.
|
||||
* @param {String} trackerUrl The URL string of the tracker.
|
||||
* @param {String} filePath The path to the original file.
|
||||
* @returns A new BitTorrent file.
|
||||
* @constructor
|
||||
*/
|
||||
jala.BitTorrent = function(filePath, trackerUrl) {
|
||||
var self = this;
|
||||
self.arguments = arguments;
|
||||
|
||||
// FIXME: Add support for multitracker mode as specified in
|
||||
// http://www.bittornado.com/docs/multitracker-spec.txt
|
||||
|
||||
var torrent, sourceFile, torrentFile;
|
||||
var pieceLength = 256;
|
||||
|
||||
var updateTorrent = function() {
|
||||
if (torrent.info) {
|
||||
return torrent;
|
||||
}
|
||||
|
||||
var file = new java.io.File(filePath);
|
||||
if (!file.exists()) {
|
||||
throw Error("File " + file + " does not exist!");
|
||||
}
|
||||
|
||||
var md5 = java.security.MessageDigest.getInstance("MD5");
|
||||
var sha1 = java.security.MessageDigest.getInstance("SHA-1");
|
||||
|
||||
var fis = new java.io.FileInputStream(file);
|
||||
var bis = new java.io.BufferedInputStream(fis);
|
||||
var cache = new java.io.ByteArrayOutputStream();
|
||||
|
||||
var pieces = [];
|
||||
var length = pieceLength * 1024;
|
||||
var buffer = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, length);
|
||||
|
||||
while (bis.read(buffer, 0, buffer.length) > -1) {
|
||||
app.debug("Updating SHA-1 hash with " + buffer.length + " bytes");
|
||||
sha1.reset();
|
||||
sha1["update(byte[])"](buffer);
|
||||
cache["write(byte[])"](buffer);
|
||||
pieces.push(new java.lang.String(sha1.digest()));
|
||||
}
|
||||
|
||||
bis.close();
|
||||
fis.close();
|
||||
|
||||
torrent.info = {
|
||||
//md5sum: new java.lang.String(md5.digest(cache.toByteArray())),
|
||||
length: cache.size(),
|
||||
name: file.getName(),
|
||||
"piece length": length,
|
||||
pieces: pieces.join("")
|
||||
};
|
||||
|
||||
return torrent;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get all available property names.
|
||||
* @returns The list of property names.
|
||||
* @type Array
|
||||
*/
|
||||
this.keys = function() {
|
||||
var keys = [];
|
||||
for (var i in torrent) {
|
||||
keys.push(i);
|
||||
}
|
||||
keys.sort();
|
||||
return keys;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a torrent property.
|
||||
* @param {String} name The name of the property.
|
||||
* @returns The value of the property.
|
||||
*/
|
||||
this.get = function(name) {
|
||||
return torrent[name];
|
||||
};
|
||||
|
||||
/**
|
||||
* Set a torrent property.
|
||||
* @param {String} name The name of the property.
|
||||
* @param {Object} value The property's value.
|
||||
*/
|
||||
this.set = function(name, value) {
|
||||
if (typeof torrent[name] == "undefined") {
|
||||
throw Error("Cannot set torrent property " + name);
|
||||
}
|
||||
torrent[name] = value;
|
||||
delete torrent.info;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the creation date of the torrent.
|
||||
* @returns The torrent's creation date.
|
||||
* @type Date
|
||||
*/
|
||||
this.getCreationDate = function() {
|
||||
return new Date(torrent["creation date"] * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the creation date of the torrent.
|
||||
* @param {Date} date The desired creation date.
|
||||
*/
|
||||
this.setCreationDate = function(date) {
|
||||
this.set("creation date", Math.round((date || new Date()).getTime() / 1000));
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the piece length of the torrent.
|
||||
* @returns The torrent's piece length.
|
||||
* @type Number
|
||||
*/
|
||||
this.getPieceLength = function() {
|
||||
return pieceLength;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the piece length of the torrent.
|
||||
* @param {Number} length The desired piece length.
|
||||
*/
|
||||
this.setPieceLength = function(length) {
|
||||
pieceLength = length;
|
||||
delete torrent.info;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the underlying torrent file.
|
||||
* @returns The torrent file.
|
||||
* @type helma.File
|
||||
*/
|
||||
this.getTorrentFile = function() {
|
||||
return torrentFile;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the underlying source file.
|
||||
* @returns The source file.
|
||||
* @type helma.File
|
||||
*/
|
||||
this.getSourceFile = function() {
|
||||
return sourceFile;
|
||||
};
|
||||
|
||||
/**
|
||||
* Saves the torrent as file.
|
||||
* @param {String} filename An optional name for the torrent file.
|
||||
* If no name is given it will be composed from name of source
|
||||
* file as defined in the torrent plus the ending ".torrent".
|
||||
*/
|
||||
this.save = function(filename) {
|
||||
updateTorrent();
|
||||
if (!filename) {
|
||||
filename = torrent.info.name + ".torrent";
|
||||
}
|
||||
torrentFile = new helma.File(sourceFile.getParent(), filename);
|
||||
torrentFile.remove();
|
||||
torrentFile.open();
|
||||
torrentFile.write(jala.BitTorrent.bencode(torrent));
|
||||
torrentFile.close();
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a string representation of the torrent.
|
||||
* @returns The torrent as string.
|
||||
* @type String
|
||||
*/
|
||||
this.toString = function() {
|
||||
return "[jala.BitTorrent " + filePath + "]";
|
||||
};
|
||||
|
||||
if (String(filePath).endsWith(".torrent")) {
|
||||
torrentFile = new helma.File(filePath);
|
||||
torrent = jala.BitTorrent.bdecode(torrentFile.readAll());
|
||||
sourceFile = new helma.File(torrent.info.name);
|
||||
} else {
|
||||
torrent = {
|
||||
announce: trackerUrl || null,
|
||||
"announce-list": null,
|
||||
"creation date": null,
|
||||
comment: null,
|
||||
"created by": null,
|
||||
};
|
||||
this.setCreationDate();
|
||||
sourceFile = new helma.File(filePath);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The bencode method. Turns an arbitrary JavaScript
|
||||
* object structure into a corresponding encoded
|
||||
* string.
|
||||
* @param {Object} obj The target JavaScript object.
|
||||
* @returns The encoded string.
|
||||
* @type String
|
||||
*/
|
||||
jala.BitTorrent.bencode = function(obj) {
|
||||
var bencode = arguments.callee;
|
||||
var str = obj.toString();
|
||||
res.push();
|
||||
switch (obj.constructor) {
|
||||
case Array:
|
||||
res.write("l");
|
||||
for (var i in obj) {
|
||||
if (obj[i])
|
||||
res.write(bencode(obj[i]));
|
||||
}
|
||||
res.write("e");
|
||||
break;
|
||||
|
||||
case Number:
|
||||
res.write("i" + str + "e");
|
||||
break;
|
||||
|
||||
case Object:
|
||||
res.write("d");
|
||||
var keys = [];
|
||||
for (var i in obj) {
|
||||
keys.push(i);
|
||||
}
|
||||
keys.sort();
|
||||
var key;
|
||||
for (var i in keys) {
|
||||
key = keys[i];
|
||||
if (obj[key]) {
|
||||
res.write(bencode(key));
|
||||
res.write(bencode(obj[key]));
|
||||
}
|
||||
}
|
||||
res.write("e");
|
||||
break;
|
||||
|
||||
default:
|
||||
res.write(str.length + ":" + str);
|
||||
}
|
||||
return res.pop();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The bdecode method. Turns an encoded string into
|
||||
* a corresponding JavaScript object structure.
|
||||
* FIXME: Handle with caution...
|
||||
* @param {String} code The encoded string.
|
||||
* @returns The decoded JavaScript structure.
|
||||
* @type Object
|
||||
*/
|
||||
jala.BitTorrent.bdecode = function(code) {
|
||||
var DICTIONARY = "d";
|
||||
var LIST = "l";
|
||||
var INTEGER = "i";
|
||||
var STRING = "s";
|
||||
var END = "e";
|
||||
|
||||
var stack = [];
|
||||
var overflowCounter = 0;
|
||||
|
||||
var position = -1, current;
|
||||
|
||||
function getResult() {
|
||||
update();
|
||||
var result;
|
||||
switch (current) {
|
||||
case DICTIONARY:
|
||||
result = bdecodeDictionary();
|
||||
break;
|
||||
case LIST:
|
||||
result = bdecodeList();
|
||||
break;
|
||||
case INTEGER:
|
||||
result = bdecodeInteger();
|
||||
break;
|
||||
case END:
|
||||
case null:
|
||||
//res.debug("*** end detected in getResult()");
|
||||
result = null;
|
||||
break;
|
||||
default:
|
||||
result = bdecodeString();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function update() {
|
||||
position += 1;
|
||||
current = code.charAt(position);
|
||||
/* res.debug("stack: " + stack);
|
||||
res.debug("position: " + position);
|
||||
res.debug("current: " + current);
|
||||
res.debug("remains: " + code.substr(position)); */
|
||||
return;
|
||||
}
|
||||
|
||||
function overflow() {
|
||||
if (overflowCounter++ > 100)
|
||||
throw Error("Error parsing bdecoded string");
|
||||
return false;
|
||||
}
|
||||
|
||||
function bdecodeDictionary() {
|
||||
stack.push(DICTIONARY);
|
||||
var dictionary = {}, key, value;
|
||||
while (current && !overflow()) {
|
||||
key = getResult();
|
||||
if (key === null)
|
||||
break;
|
||||
value = getResult();
|
||||
if (key && value)
|
||||
dictionary[key] = value;
|
||||
else
|
||||
break;
|
||||
}
|
||||
stack.pop();
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
function bdecodeList() {
|
||||
stack.push(LIST);
|
||||
var list = [], value;
|
||||
while (current && !overflow()) {
|
||||
var value = getResult();
|
||||
if (value)
|
||||
list.push(value);
|
||||
else
|
||||
break;
|
||||
}
|
||||
stack.pop();
|
||||
return list;
|
||||
}
|
||||
|
||||
function bdecodeInteger() {
|
||||
var integer = "";
|
||||
stack.push(integer);
|
||||
while (current && !overflow()) {
|
||||
update();
|
||||
if (current == "e")
|
||||
break;
|
||||
integer += current;
|
||||
}
|
||||
if (isNaN(integer))
|
||||
throw("Error in bdecoded integer: " + integer + " is not a number");
|
||||
//res.debug("integer = " + integer);
|
||||
stack.pop();
|
||||
return parseInt(integer);
|
||||
}
|
||||
|
||||
function bdecodeString() {
|
||||
var length = current, string = "";
|
||||
stack.push(string);
|
||||
update();
|
||||
while (current && current != ":" && !overflow()) {
|
||||
length += current;
|
||||
update();
|
||||
}
|
||||
if (isNaN(length))
|
||||
throw("Error in bdecoded string: invalid length " + length);
|
||||
//res.debug("length = " + length);
|
||||
length = parseInt(length);
|
||||
if (length > code.length - position)
|
||||
throw Error("Error parsing bdecoded string");
|
||||
for (var i=0; i<length; i+=1) {
|
||||
update();
|
||||
string += current;
|
||||
}
|
||||
//res.debug("string = " + string);
|
||||
if (string == "creation date")
|
||||
void(null);
|
||||
stack.pop();
|
||||
return string;
|
||||
}
|
||||
|
||||
return getResult();
|
||||
};
|
119
modules/jala/code/Captcha.js
Normal file
119
modules/jala/code/Captcha.js
Normal file
|
@ -0,0 +1,119 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.Captcha class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new captcha.
|
||||
* @returns A new captcha.
|
||||
* @class Wrapper class for the
|
||||
* {@link http://jcaptcha.sourceforge.net/ JCaptcha library}.
|
||||
* A captcha (an acronym for "completely automated public
|
||||
* Turing test to tell computers and humans apart") is a
|
||||
* type of challenge-response test used in computing to
|
||||
* determine whether or not the user is human.
|
||||
* @constructor
|
||||
*/
|
||||
jala.Captcha = function() {
|
||||
/**
|
||||
* Jala dependencies
|
||||
*/
|
||||
app.addRepository(getProperty("jala.dir", "modules/jala") +
|
||||
"/lib/jcaptcha-all-1.0-RC3.jar");
|
||||
|
||||
var gimpy;
|
||||
|
||||
try {
|
||||
var ref = Packages.com.octo.captcha.engine.image.gimpy;
|
||||
gimpy = ref.DefaultGimpyEngine();
|
||||
} catch(e) {
|
||||
throw("Cannot instantiate object due to missing java class: " +
|
||||
arguments.callee.toString());
|
||||
}
|
||||
var captcha = gimpy.getNextCaptcha();
|
||||
|
||||
/**
|
||||
* Get a new captcha object.
|
||||
* @returns A new captcha object.
|
||||
* @type com.octo.captcha.Captcha
|
||||
*/
|
||||
this.getCaptcha = function getCaptcha() {
|
||||
return captcha;
|
||||
};
|
||||
|
||||
/**
|
||||
* Render a new captcha image.
|
||||
*/
|
||||
this.renderImage = function renderImage() {
|
||||
var image = captcha.getImageChallenge();
|
||||
var stream = new java.io.ByteArrayOutputStream();
|
||||
var ref = Packages.com.sun.image.codec.jpeg.JPEGCodec;
|
||||
var encoder = ref.createJPEGEncoder(stream);
|
||||
encoder.encode(image);
|
||||
res.contentType = "image/jpeg";
|
||||
res.writeBinary(stream.toByteArray());
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Validate a user's input with the prompted captcha.
|
||||
* @param {String} input The user's input.
|
||||
* @returns True if the user's input matches the captcha.
|
||||
* @type Boolean
|
||||
*/
|
||||
this.validate = function validate(input) {
|
||||
return !input || captcha.validateResponse(input);
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get a string representation of the captcha class.
|
||||
* @returns A string representation of the capthca class.
|
||||
* @type String
|
||||
* @ignore
|
||||
*/
|
||||
jala.Captcha.toString = function toString() {
|
||||
return "[jala.Captcha http://jcaptcha.sourceforge.net]";
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get a string representation of the captcha object.
|
||||
* @returns A string representation of the captcha object.
|
||||
* @type String
|
||||
*/
|
||||
jala.Captcha.prototype.toString = function toString() {
|
||||
return "[jala.Captcha Object]";
|
||||
};
|
1121
modules/jala/code/Database.js
Normal file
1121
modules/jala/code/Database.js
Normal file
File diff suppressed because it is too large
Load diff
545
modules/jala/code/Date.js
Normal file
545
modules/jala/code/Date.js
Normal file
|
@ -0,0 +1,545 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.Date class.
|
||||
*/
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* HelmaLib dependencies
|
||||
*/
|
||||
app.addRepository("modules/core/Date.js");
|
||||
app.addRepository("modules/helma/Html.js");
|
||||
|
||||
/**
|
||||
* Constructs a new Renderings object.
|
||||
* @class This class provides various convenience
|
||||
* methods for rendering purposes.
|
||||
* @constructor
|
||||
*/
|
||||
jala.Date = function() {
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders a timestamp as set of DropDown boxes, following the
|
||||
* format passed as argument. Every <select>
|
||||
* item is prefixed with a string so that it can be retrieved
|
||||
* easily from the values of a submitted POST request.
|
||||
* @param {String} prefix The prefix to use for all dropdown boxes, eg. "postdate"
|
||||
* @param {Date} date A Date object to use as preselection (optional)
|
||||
* @param {Object} fmt Array containing one parameter object for every single
|
||||
* select box that should be rendered, with the following properties set:
|
||||
* <ul>
|
||||
* <li>pattern - The date format pattern that should be rendered. Valid
|
||||
* patterns are: "dd", "MM", "yyyy", "HH", "ss".</li>
|
||||
* <li>firstOption - The string to use as first option, eg.: "choose a day"</li>
|
||||
* </ul>
|
||||
*/
|
||||
jala.Date.prototype.renderEditor = function(prefix, date, fmt) {
|
||||
/**
|
||||
* rendering method
|
||||
* @private
|
||||
*/
|
||||
var render = function(param, date) {
|
||||
switch (param.pattern) {
|
||||
case "dd":
|
||||
param.offset = 1;
|
||||
param.max = 31;
|
||||
param.selected = (date ? date.getDate() : null);
|
||||
break;
|
||||
|
||||
case "MM":
|
||||
param.offset = 1;
|
||||
param.max = 12;
|
||||
param.selected = (date ? date.getMonth() +1 : null);
|
||||
break;
|
||||
|
||||
case "yyyy":
|
||||
param.offset = 2002;
|
||||
param.max = 20;
|
||||
param.selected = (date ? date.getFullYear() : null);
|
||||
break;
|
||||
|
||||
case "HH":
|
||||
param.offset = 0;
|
||||
param.max = 24;
|
||||
param.selected = (date ? date.getHours() : null);
|
||||
break;
|
||||
|
||||
case "mm":
|
||||
param.offset = 0;
|
||||
param.max = 60;
|
||||
param.selected = (date ? date.getMinutes() : null);
|
||||
break;
|
||||
|
||||
case "ss":
|
||||
param.offset = 0;
|
||||
param.max = 60;
|
||||
param.selected = (date ? date.getSeconds() : null);
|
||||
break;
|
||||
}
|
||||
|
||||
var key = prefix + ":" + param.pattern;
|
||||
if (req.data[key])
|
||||
param.selected = req.data[key];
|
||||
var options = [];
|
||||
var opt;
|
||||
for (var i=0;i<param.max;i++) {
|
||||
opt = (param.offset + i).format("00");
|
||||
options[i] = [opt, opt];
|
||||
}
|
||||
var html = new helma.Html();
|
||||
html.dropDown({name: key}, options, param.selected, param.firstOption);
|
||||
}
|
||||
|
||||
if (!fmt)
|
||||
var fmt = [{pattern: "dd", firstOption: "day"},
|
||||
{pattern: "MM", firstOption: "month"},
|
||||
{pattern: "yyyy", firstOption: "year"},
|
||||
{pattern: "HH", firstOption: "hour"},
|
||||
{pattern: "mm", firstOption: "minute"}];
|
||||
|
||||
for (var i in fmt) {
|
||||
render(fmt[i], date);
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a timestamp as set of dropdown-boxes
|
||||
* @see #renderEditor
|
||||
* @type String
|
||||
*/
|
||||
jala.Date.prototype.renderEditorAsString = function(prefix, date, pattern) {
|
||||
res.push();
|
||||
this.renderEditor(prefix, date, pattern);
|
||||
return res.pop();
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a new instance of jala.Data.Calendar
|
||||
* @class This class represents a calendar based based on a grouped
|
||||
* collection of HopObjects. It provides several methods for rendering
|
||||
* the calendar plus defining locale and timezone settings.
|
||||
* @param {HopObject} collection A grouped HopObject collection to work on
|
||||
* @returns A newly created jala.Date.Calendar instance
|
||||
* @constructor
|
||||
*/
|
||||
jala.Date.Calendar = function(collection) {
|
||||
var renderer = null;
|
||||
var locale = java.util.Locale.getDefault();
|
||||
var timezone = java.util.TimeZone.getDefault();
|
||||
var hrefFormat = "yyyyMMdd";
|
||||
var accessNameFormat = "yyyyMMdd";
|
||||
|
||||
/**
|
||||
* Returns the collection this calendar object works on
|
||||
* @returns The HopObject collection of this calendar
|
||||
* @type HopObject
|
||||
*/
|
||||
this.getCollection = function() {
|
||||
return collection;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the renderer to use.
|
||||
* @param {Object} r The renderer to use
|
||||
* @see #getRenderer
|
||||
*/
|
||||
this.setRenderer = function(r) {
|
||||
renderer = r;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the renderer used by this calendar.
|
||||
* @returns The calendar renderer
|
||||
* @type Object
|
||||
* @see #setRenderer
|
||||
*/
|
||||
this.getRenderer = function() {
|
||||
if (!renderer) {
|
||||
renderer = new jala.Date.Calendar.Renderer(this);
|
||||
}
|
||||
return renderer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the locale to use within this calendar object
|
||||
* @param {java.util.Locale} loc The locale to use
|
||||
* @see #getLocale
|
||||
*/
|
||||
this.setLocale = function(loc) {
|
||||
locale = loc;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the locale used within this calendar instance. By default
|
||||
* the locale used by this calendar is the default locale of the
|
||||
* Java Virtual Machine running Helma.
|
||||
* @returns The locale of this calendar
|
||||
* @type java.util.Locale
|
||||
* @see #setLocale
|
||||
*/
|
||||
this.getLocale = function() {
|
||||
return locale;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the locale to use within this calendar object
|
||||
* @param {java.util.Locale} loc The locale to use
|
||||
* @see #getTimeZone
|
||||
*/
|
||||
this.setTimeZone = function(tz) {
|
||||
timezone = tz;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the locale used within this calendar instance. By default
|
||||
* the timezone used by this calendar is the default timezone
|
||||
* of the Java Virtual Machine running Helma.
|
||||
* @returns The locale of this calendar
|
||||
* @type java.util.Locale
|
||||
* @see #setTimeZone
|
||||
*/
|
||||
this.getTimeZone = function() {
|
||||
return timezone;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the format of the hrefs to render by this calendar
|
||||
* to the format pattern passed as argument.
|
||||
* @param {String} fmt The date format pattern to use for
|
||||
* rendering the href
|
||||
* @see #getHrefFormat
|
||||
*/
|
||||
this.setHrefFormat = function(fmt) {
|
||||
hrefFormat = fmt;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the date formatting pattern used to render hrefs. The default
|
||||
* format is "yyyyMMdd".
|
||||
* @returns The date formatting pattern
|
||||
* @type String
|
||||
* @see #setHrefFormat
|
||||
*/
|
||||
this.getHrefFormat = function() {
|
||||
return hrefFormat;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the format of the group name to use when trying to access
|
||||
* child objects of the collection this calendar is operating on.
|
||||
* @param {String} fmt The date format pattern to use for
|
||||
* accessing child objects
|
||||
* @see #getAccessNameFormat
|
||||
*/
|
||||
this.setAccessNameFormat = function(fmt) {
|
||||
accessNameFormat = fmt;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the format of the access name used by this calendar to access
|
||||
* child group objects of the collection this calendar is operating on.
|
||||
* The default format is "yyyyMMdd".
|
||||
* @returns The date formatting pattern used to access child objects
|
||||
* @type String
|
||||
* @see #setAccessNameFormat
|
||||
*/
|
||||
this.getAccessNameFormat = function() {
|
||||
return accessNameFormat;
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
jala.Date.Calendar.prototype.toString = function() {
|
||||
return "[Jala Calendar]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders the calendar using either a custom renderer defined
|
||||
* using {@link #setRenderer} or the default one.
|
||||
* @see #setRenderer
|
||||
* @see jala.Date.Calendar.Renderer
|
||||
*/
|
||||
jala.Date.Calendar.prototype.render = function(today) {
|
||||
var renderer = this.getRenderer();
|
||||
var collection = this.getCollection();
|
||||
var hrefFormat = this.getHrefFormat();
|
||||
var accessNameFormat = this.getAccessNameFormat();
|
||||
var locale = this.getLocale();
|
||||
var timezone = this.getTimeZone();
|
||||
var size = collection.size();
|
||||
if (size == null)
|
||||
return;
|
||||
|
||||
/**
|
||||
* private method that creates a date object set
|
||||
* to the last date of the previous month or the
|
||||
* first date of the next month (if available)
|
||||
*/
|
||||
var prevNextMonth = function(which, dayIndex) {
|
||||
var obj;
|
||||
if (which == "prev") {
|
||||
if (size <= dayIndex || !(obj = collection.get(dayIndex +1)))
|
||||
return;
|
||||
} else if (which == "next") {
|
||||
if (dayIndex == 0 || !(obj = collection.get(dayIndex - 1)))
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
return new Date(obj.groupname.substring(0, 4),
|
||||
obj.groupname.substring(4, 6) -1,
|
||||
obj.groupname.substring(6));
|
||||
};
|
||||
|
||||
// create the calendar object used for date calculations
|
||||
var cal = java.util.Calendar.getInstance(timezone, locale);
|
||||
var firstDayOfWeek = cal.getFirstDayOfWeek();
|
||||
var symbols = new java.text.DateFormatSymbols(locale);
|
||||
|
||||
res.push();
|
||||
// render the header-row
|
||||
res.push();
|
||||
var weekdays = symbols.getShortWeekdays();
|
||||
for (var i=0;i<7;i++) {
|
||||
renderer.renderDayHeader(weekdays[(i+firstDayOfWeek-1)%7+1]);
|
||||
}
|
||||
renderer.renderRow(res.pop());
|
||||
|
||||
cal.set(java.util.Calendar.DATE, 1);
|
||||
|
||||
// check whether there's a day in path
|
||||
// if so, use it to determine the month to render
|
||||
if (today) {
|
||||
cal.set(java.util.Calendar.YEAR, today.getFullYear());
|
||||
cal.set(java.util.Calendar.MONTH, today.getMonth());
|
||||
}
|
||||
// nr. of empty days in rendered calendar before the first day of month appears
|
||||
var pre = (7-firstDayOfWeek+cal.get(java.util.Calendar.DAY_OF_WEEK)) % 7;
|
||||
var days = cal.getActualMaximum(java.util.Calendar.DATE);
|
||||
var weeks = Math.ceil((pre + days) / 7);
|
||||
var daycnt = 1;
|
||||
|
||||
var date = new Date(cal.get(java.util.Calendar.YEAR), cal.get(java.util.Calendar.MONTH), 1);
|
||||
// remember the index of the first and last days within this month.
|
||||
// this is needed to optimize previous and next month links.
|
||||
var lastDayIndex = Number.MAX_VALUE;
|
||||
var firstDayIndex = -1;
|
||||
|
||||
var dayObj, idx, selected;
|
||||
for (var i=0;i<weeks;i++) {
|
||||
res.push();
|
||||
for (var j=0;j<7;j++) {
|
||||
if ((i == 0 && j < pre) || daycnt > days) {
|
||||
renderer.renderDay(null);
|
||||
} else {
|
||||
date.setDate(daycnt);
|
||||
if ((dayObj = collection.get(date.format(accessNameFormat))) != null) {
|
||||
idx = collection.contains(dayObj);
|
||||
if (idx > -1) {
|
||||
if (idx > firstDayIndex) {
|
||||
firstDayIndex = idx;
|
||||
}
|
||||
if (idx < lastDayIndex) {
|
||||
lastDayIndex = idx;
|
||||
}
|
||||
}
|
||||
}
|
||||
selected = (today != null) ? date.equals(today) : false;
|
||||
renderer.renderDay(date, dayObj != null, selected);
|
||||
daycnt++;
|
||||
}
|
||||
}
|
||||
renderer.renderRow(res.pop());
|
||||
}
|
||||
var prevMonth = prevNextMonth("prev", firstDayIndex) || null;
|
||||
var nextMonth = prevNextMonth("next", lastDayIndex) || null;
|
||||
renderer.renderCalendar(date, res.pop(), prevMonth, nextMonth);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a rendered calendar
|
||||
* @see #renderCalendar
|
||||
* @type String
|
||||
*/
|
||||
jala.Date.Calendar.prototype.getCalendar = function(today) {
|
||||
res.push();
|
||||
this.render(today);
|
||||
return res.pop();
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a new instance of the default calendar renderer.
|
||||
* @class A default renderer to use in conjunction with jala.Date.Calendar
|
||||
* @param {jala.Date.Calendar} calendar The calendar utilizing this renderer
|
||||
* @returns A newly created instance of jala.Date.Calendar.Renderer
|
||||
* @constructor
|
||||
*/
|
||||
jala.Date.Calendar.Renderer = function(calendar) {
|
||||
|
||||
/**
|
||||
* An instance of helma.Html used for rendering the calendar
|
||||
* @type helma.Html
|
||||
*/
|
||||
this.html = new helma.Html();
|
||||
|
||||
/**
|
||||
* The calendar utilizing this renderer instance
|
||||
* @type jala.Date.Calendar
|
||||
*/
|
||||
this.calendar = calendar;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
jala.Date.Calendar.Renderer.prototype.toString = function() {
|
||||
return "[Jala Calendar Default Renderer]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders a single cell in the calendar day header row directly to response.
|
||||
* @param {String} text The text to display in the header field.
|
||||
*/
|
||||
jala.Date.Calendar.Renderer.prototype.renderDayHeader = function(text) {
|
||||
this.html.element("th", text);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders a single calendar row directly to response.
|
||||
* @param {String} row The body of the calendar row.
|
||||
*/
|
||||
jala.Date.Calendar.Renderer.prototype.renderRow = function(row) {
|
||||
this.html.element("tr", row);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders a single day within the calendar directly to response.
|
||||
* @param {Date} date A date instance representing the day within the calendar.
|
||||
* @param {Boolean} isExisting True if there is a child object in the calendar's
|
||||
* collection to which the date cell should link to
|
||||
* @param {Boolean} isSelected True if this calendar day should be rendered
|
||||
* as selected day.
|
||||
*/
|
||||
jala.Date.Calendar.Renderer.prototype.renderDay = function(date, isExisting, isSelected) {
|
||||
var attr = {"class": "jala-calendar-day day"};
|
||||
if (isSelected === true) {
|
||||
attr["class"] += " jala-calendar-selected selected";
|
||||
}
|
||||
this.html.openTag("td", attr);
|
||||
if (date != null) {
|
||||
var text = date.getDate();
|
||||
if (isExisting === true) {
|
||||
attr = {"href": this.calendar.getCollection().href() +
|
||||
date.format(this.calendar.getHrefFormat())};
|
||||
this.html.link(attr, text);
|
||||
} else {
|
||||
res.write(text);
|
||||
}
|
||||
}
|
||||
this.html.closeTag("td");
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders a link to the previous or next month's calendar directly to response.
|
||||
* @param {Date} date A date object set to the previous or next available
|
||||
* month. This can be null in case there is no previous or next month.
|
||||
*/
|
||||
jala.Date.Calendar.Renderer.prototype.renderPrevNextLink = function(date) {
|
||||
if (date != null) {
|
||||
var attr = {"href": this.calendar.getCollection().href() +
|
||||
date.format(this.calendar.getHrefFormat())};
|
||||
this.html.link(attr, date.format("MMMM", this.calendar.getLocale()));
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders the calendar directly to response.
|
||||
* @param {Date} date A date object representing this calendar's month and year.
|
||||
* Please mind that the day will be set to the <em>last</em> date in this
|
||||
* month.
|
||||
* @param {String} body The rendered calendar weeks including the day header
|
||||
* (basically the whole kernel of the table).
|
||||
* @param {Date} prevMonth A date object set to the last available date of
|
||||
* the previous month. This can be used to render a navigation link to
|
||||
* the previous month.
|
||||
* @param {Date} nextMonth A date object set to the first available date
|
||||
* of the next month. This can be used to render a navigation link to
|
||||
* the next month.
|
||||
*/
|
||||
jala.Date.Calendar.Renderer.prototype.renderCalendar = function(date, body, prevMonth, nextMonth) {
|
||||
var locale = this.calendar.getLocale();
|
||||
this.html.openTag("table", {"class": "jala-calendar calendar"});
|
||||
this.html.openTag("thead");
|
||||
this.html.openTag("tr");
|
||||
this.html.openTag("th", {"colspan": 7});
|
||||
res.write(date.format("MMMM", locale));
|
||||
res.write(' ');
|
||||
res.write(date.format("yyyy", locale));
|
||||
this.html.closeTag("th");
|
||||
this.html.closeTag("tr");
|
||||
this.html.closeTag("thead");
|
||||
this.html.element("tbody", body);
|
||||
this.html.openTag("tfoot");
|
||||
this.html.openTag("tr");
|
||||
this.html.openTag("td", {"class": "jala-calendar-left left", "colspan": 3});
|
||||
this.renderPrevNextLink(prevMonth);
|
||||
this.html.closeTag("td");
|
||||
this.html.openTag("td");
|
||||
this.html.closeTag("td");
|
||||
this.html.openTag("td", {"class": "jala-calendar-right right", "colspan": 3});
|
||||
this.renderPrevNextLink(nextMonth);
|
||||
this.html.closeTag("td");
|
||||
this.html.closeTag("tr");
|
||||
this.html.closeTag("tfoot");
|
||||
this.html.closeTag("table");
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Default date class instance.
|
||||
* @type jala.Date
|
||||
* @final
|
||||
*/
|
||||
jala.date = new jala.Date();
|
312
modules/jala/code/DnsClient.js
Normal file
312
modules/jala/code/DnsClient.js
Normal file
|
@ -0,0 +1,312 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.DnsClient class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Jala dependencies
|
||||
*/
|
||||
app.addRepository(getProperty("jala.dir", "modules/jala") +
|
||||
"/lib/javadns.jar");
|
||||
|
||||
/**
|
||||
* Constructs a new DnsClient object.
|
||||
* @class This is a wrapper around the Dns Client by wonderly.org
|
||||
* providing methods for querying Dns servers. For more information
|
||||
* about the Java DNS client visit
|
||||
* <a href="https://javadns.dev.java.net/">https://javadns.dev.java.net/</a>.
|
||||
* Please mind that the nameserver specified must accept queries on port
|
||||
* 53 TCP (the Java DNS client used doesn't support UDP nameserver queries),
|
||||
* and that reverse lookups are not supported.
|
||||
* @param {String} nameServer IP-Address or FQDN of nameserver to query
|
||||
* @constructor
|
||||
*/
|
||||
jala.DnsClient = function(nameServer) {
|
||||
/**
|
||||
* Contains the IP Adress/FQDN of the name server to query.
|
||||
* @type String
|
||||
*/
|
||||
this.nameServer = nameServer;
|
||||
|
||||
if (!this.nameServer) {
|
||||
throw "jala.DnsClient: missing nameserver argument";
|
||||
} else {
|
||||
// test if required javadns library is available
|
||||
try {
|
||||
var clazz = java.lang.Class.forName("org.wonderly.net.dns.Query",
|
||||
false, app.getClassLoader())
|
||||
} catch (e) {
|
||||
throw "jala.DnsClient requires JavaDNS.jar"
|
||||
+ " in lib/ext or application directory "
|
||||
+ "[https://javadns.dev.java.net/]";
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
jala.DnsClient.PKG = Packages.org.wonderly.net.dns;
|
||||
|
||||
/**
|
||||
* The "A" record/query type.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.DnsClient.TYPE_A = jala.DnsClient.PKG.Question.TYPE_A;
|
||||
|
||||
/**
|
||||
* The "CNAME" record/query type.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.DnsClient.TYPE_CNAME = jala.DnsClient.PKG.Question.TYPE_CNAME;
|
||||
|
||||
/**
|
||||
* The "MX" record/query type.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.DnsClient.TYPE_MX = jala.DnsClient.PKG.Question.TYPE_MX;
|
||||
|
||||
/**
|
||||
* The "NS" record/query type.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.DnsClient.TYPE_NS = jala.DnsClient.PKG.Question.TYPE_NS;
|
||||
|
||||
/**
|
||||
* The "PTR" record/query type.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.DnsClient.TYPE_PTR = jala.DnsClient.PKG.Question.TYPE_PTR;
|
||||
|
||||
/**
|
||||
* The "SOA" record/query type.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.DnsClient.TYPE_SOA = jala.DnsClient.PKG.Question.TYPE_SOA;
|
||||
|
||||
/**
|
||||
* The "TXT" record/query type.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.DnsClient.TYPE_TXT = jala.DnsClient.PKG.Question.TYPE_TXT;
|
||||
|
||||
/**
|
||||
* The "WKS" record/query type.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.DnsClient.TYPE_WKS = jala.DnsClient.PKG.Question.TYPE_WKS;
|
||||
|
||||
/**
|
||||
* Queries the nameserver for a specific domain
|
||||
* and the given type of record.
|
||||
* @param {String} dName The domain name to query for
|
||||
* @param {Number} queryType The type of records to retrieve
|
||||
* @returns The records retrieved from the nameserver
|
||||
* @type org.wonderly.net.dns.RR
|
||||
*/
|
||||
jala.DnsClient.prototype.query = function(dName, queryType) {
|
||||
if (dName == null) {
|
||||
throw new Error("no domain-name to query for");
|
||||
}
|
||||
if (queryType == null) {
|
||||
queryType = jala.DnsClient.TYPE_A;
|
||||
}
|
||||
// construct the question for querying the nameserver
|
||||
var question = new jala.DnsClient.PKG.Question(dName,
|
||||
queryType,
|
||||
jala.DnsClient.PKG.Question.CLASS_IN);
|
||||
// construct the query
|
||||
var query = new jala.DnsClient.PKG.Query(question);
|
||||
// run the query
|
||||
query.runQuery(this.nameServer);
|
||||
// wrap the records received in instances of jala.DnsClient.Record
|
||||
var answers = query.getAnswers();
|
||||
var arr = [];
|
||||
for (var i=0;i<answers.length;i++) {
|
||||
arr[i] = new jala.DnsClient.Record(answers[i]);
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convenience method to query for the MX-records
|
||||
* of the domain passed as argument.
|
||||
* @param {String} dName The domain name to query for
|
||||
* @returns The records retrieved from the nameserver
|
||||
* @type org.wonderly.net.dns.RR
|
||||
*/
|
||||
jala.DnsClient.prototype.queryMailHost = function (dName) {
|
||||
return this.query(dName, this.TYPE_MX);
|
||||
};
|
||||
|
||||
|
||||
/** @ignore */
|
||||
jala.DnsClient.toString = function() {
|
||||
return "[jala.DnsClient]";
|
||||
};
|
||||
|
||||
|
||||
/** @ignore */
|
||||
jala.DnsClient.prototype.toString = function() {
|
||||
return "[jala.DnsClient (" + this.nameServer + ")]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a new instance of jala.DnsClient.Record.
|
||||
* @class Instances of this class wrap record data as received
|
||||
* from the nameserver.
|
||||
* @param {org.wonderly.net.dns.RR} data The data as received from
|
||||
* the nameserver
|
||||
* @returns A newly constructed Record instance
|
||||
* @constructor
|
||||
*/
|
||||
jala.DnsClient.Record = function(data) {
|
||||
/**
|
||||
* The type of the nameserver record represented by this Answer instance.
|
||||
* @type Number
|
||||
* @see #TYPE_A
|
||||
* @see #TYPE_CNAME
|
||||
* @see #TYPE_HINFO
|
||||
* @see #TYPE_MX
|
||||
* @see #TYPE_NS
|
||||
* @see #TYPE_PTR
|
||||
* @see #TYPE_SOA
|
||||
* @see #TYPE_TXT
|
||||
* @see #TYPE_WKS
|
||||
*/
|
||||
this.type = data.getType();
|
||||
|
||||
/**
|
||||
* The name of the host. This will only be set for records
|
||||
* of type A, AAAA and NS.
|
||||
* @type String
|
||||
* @see #TYPE_A
|
||||
* @see #TYPE_AAAA
|
||||
* @see #TYPE_NS
|
||||
*/
|
||||
this.host = null;
|
||||
|
||||
/**
|
||||
* The IP address of the host. This will only be set for records
|
||||
* of type A and AAAA
|
||||
* @type String
|
||||
* @see #TYPE_A
|
||||
* @see #TYPE_AAAA
|
||||
*/
|
||||
this.ipAddress = null;
|
||||
|
||||
/**
|
||||
* The CNAME of this record. This will only be set for records
|
||||
* of type CNAME
|
||||
* @type String
|
||||
* @see #TYPE_CNAME
|
||||
*/
|
||||
this.cname = null;
|
||||
|
||||
/**
|
||||
* The name of the mail exchanging server. This is only set for
|
||||
* records of type MX
|
||||
* @type String
|
||||
* @see #TYPE_MX
|
||||
*/
|
||||
this.mx = null;
|
||||
|
||||
/**
|
||||
* The email address responsible for a name server. This property
|
||||
* will only be set for records of type SOA
|
||||
* @type String
|
||||
* @see #TYPE_SOA
|
||||
*/
|
||||
this.email = null;
|
||||
|
||||
/**
|
||||
* Descriptive text as received from the nameserver. This is only
|
||||
* set for records of type TXT
|
||||
* @type String
|
||||
* @see #TYPE_TXT
|
||||
*/
|
||||
this.text = null;
|
||||
|
||||
/**
|
||||
* Returns the wrapped nameserver record data
|
||||
* @returns The wrapped data
|
||||
* @type org.wonderly.net.dns.RR
|
||||
*/
|
||||
this.getData = function() {
|
||||
return data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Main constructor body
|
||||
*/
|
||||
switch (data.getClass()) {
|
||||
case jala.DnsClient.PKG.ARR:
|
||||
case jala.DnsClient.PKG.AAAARR:
|
||||
this.host = data.getHost();
|
||||
this.ipAddress = data.getIPAddress();
|
||||
break;
|
||||
case jala.DnsClient.PKG.NSRR:
|
||||
this.host = data.getHost();
|
||||
break;
|
||||
case jala.DnsClient.PKG.CNAMERR:
|
||||
this.cname = data.getCName();
|
||||
break;
|
||||
case jala.DnsClient.PKG.MXRR:
|
||||
this.mx = data.getExchanger();
|
||||
break;
|
||||
case jala.DnsClient.PKG.SOARR:
|
||||
this.host = data.getNSHost();
|
||||
this.email = data.getResponsibleEmail();
|
||||
break;
|
||||
case jala.DnsClient.PKG.TXTRR:
|
||||
this.text = data.getText();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
jala.DnsClient.Record.prototype.toString = function() {
|
||||
return "[jala.DnsClient.Record]";
|
||||
};
|
2523
modules/jala/code/Form.js
Normal file
2523
modules/jala/code/Form.js
Normal file
File diff suppressed because it is too large
Load diff
130
modules/jala/code/Global.js
Normal file
130
modules/jala/code/Global.js
Normal file
|
@ -0,0 +1,130 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the Global prototype.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the value passed as argument is either a string literal,
|
||||
* an instance of String or of java.lang.String.
|
||||
* @param {Object} val The value to test
|
||||
* @returns True if the value is a string, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
function isString(val) {
|
||||
return typeof(val) == "string" ||
|
||||
val instanceof java.lang.String ||
|
||||
val instanceof String;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the value passed as argument is either a boolean
|
||||
* literal or an instance of Boolean.
|
||||
* @param {Object} val The value to test
|
||||
* @returns True if the value is a boolean, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
function isBoolean(val) {
|
||||
return typeof(val) == "boolean" ||
|
||||
val instanceof Boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the value passed as argument is either a number,
|
||||
* an instance of Number or of java.lang.Number.
|
||||
* @param {Object} val The value to test
|
||||
* @returns True if the value is a number, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
function isNumber(val) {
|
||||
return typeof(val) == "number" ||
|
||||
val instanceof java.lang.Number ||
|
||||
val instanceof Number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the value passed as argument is null.
|
||||
* @param {Object} val The value to test
|
||||
* @returns True if the value is null, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
function isNull(val) {
|
||||
return val === null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the value passed as argument is undefined.
|
||||
* @param {Object} val The value to test
|
||||
* @returns True if the value is undefined, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
function isUndefined(val) {
|
||||
return val === undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the value passed as argument is an array.
|
||||
* @param {Object} val The value to test
|
||||
* @returns True if the value is an array, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
function isArray(val) {
|
||||
return val instanceof Array;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the value passed as argument is either a Javascript date
|
||||
* or an instance of java.util.Date.
|
||||
* @param {Object} val The value to test
|
||||
* @returns True if the value is a date, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
function isDate(val) {
|
||||
return val instanceof Date ||
|
||||
val instanceof java.util.Date;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the value passed as argument is either a Javascript
|
||||
* object or an instance of java.lang.Object.
|
||||
* @param {Object} val The value to test
|
||||
* @returns True if the value is an object, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
function isObject(val) {
|
||||
return val instanceof Object ||
|
||||
val instanceof java.lang.Object;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the value passed as argument is a function.
|
||||
* @param {Object} val The value to test
|
||||
* @returns True if the argument is a function, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
function isFunction(val) {
|
||||
return val instanceof Function;
|
||||
};
|
253
modules/jala/code/History.js
Normal file
253
modules/jala/code/History.js
Normal file
|
@ -0,0 +1,253 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.History class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new History object.
|
||||
* @class This class is an implementation of a Browser-like history
|
||||
* stack suitable to use in any Helma application. The difference
|
||||
* to a Browser's history is that this implementation ignores
|
||||
* POST requests and checks if Urls in the stack are still valid to
|
||||
* prevent eg. redirections to a HopObject's url that has been deleted.
|
||||
* Plus it is capable to create new "intermediate" history-stacks
|
||||
* and this way maintain a "history of histories" which is needed for
|
||||
* eg. editing sessions in a popup window that should use their own
|
||||
* request history without interfering with the history of the
|
||||
* main window.
|
||||
* @constructor
|
||||
*/
|
||||
jala.History = function() {
|
||||
var MAX = 40;
|
||||
|
||||
/**
|
||||
* Stack constructor
|
||||
* @private
|
||||
*/
|
||||
var Stack = function(id) {
|
||||
this.items = [];
|
||||
this.id = id;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the current url including query string
|
||||
* @private
|
||||
*/
|
||||
var getUrl = function() {
|
||||
var query;
|
||||
var url = path.href(req.action);
|
||||
try {
|
||||
if (query = req.getServletRequest().getQueryString())
|
||||
url += "?" + query;
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a request is valid for being added
|
||||
* to the history stack. This method returns false
|
||||
* for all POST-requests or requests whose action name
|
||||
* contains a dot (to prevent requests for external stylesheets
|
||||
* or the like from being recorded).
|
||||
* @private
|
||||
* @type Boolean
|
||||
*/
|
||||
var isValid = function() {
|
||||
// FIXME: we should check for mimetype of response instead
|
||||
// of assuming that requests containing a dot aren't worth
|
||||
// being put into history stack ...
|
||||
if (req.isPost() || (req.action && req.action.contains(".")))
|
||||
return false;
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* returns a single Stack instance
|
||||
* @private
|
||||
*/
|
||||
var getStack = function() {
|
||||
if (history.length < 1)
|
||||
history.push(new Stack(getUrl()));
|
||||
return history[history.length -1];
|
||||
};
|
||||
|
||||
/**
|
||||
* Variable containing the history-stacks
|
||||
* @private
|
||||
*/
|
||||
var history = [];
|
||||
|
||||
/**
|
||||
* Initializes a new history stack, adds
|
||||
* it to the array of stacks (which makes it
|
||||
* the default one to use for further requests)
|
||||
* and records the current request Url.
|
||||
*/
|
||||
this.add = function() {
|
||||
if (!isValid())
|
||||
return;
|
||||
var url = getUrl();
|
||||
if (getStack().id != url) {
|
||||
history.push(new Stack(url));
|
||||
this.push();
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes the current history stack
|
||||
*/
|
||||
this.remove = function() {
|
||||
history.pop();
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Records a request Url in the currently active
|
||||
* history stack.
|
||||
*/
|
||||
this.push = function() {
|
||||
if (isValid()) {
|
||||
var obj = path[path.length-1];
|
||||
var url = getUrl();
|
||||
var stack = getStack();
|
||||
if (stack.items.length < 1 || stack.items[stack.items.length -1].url != url) {
|
||||
if (stack.items.length >= MAX)
|
||||
stack.items.shift();
|
||||
stack.items.push({
|
||||
url: url,
|
||||
path: path.href().substring(root.href().length).replace(/\+/g, " ")
|
||||
});
|
||||
}
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Clears the currently active history stack
|
||||
*/
|
||||
this.clear = function() {
|
||||
getStack().items.length = 0;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Redirects the client back to the first valid
|
||||
* request in history. Please mind that searching for
|
||||
* a valid Url starts at <em>history.length - 2</em>.
|
||||
* @param {Number} offset The index position in the stack to start
|
||||
* searching at
|
||||
*/
|
||||
this.redirect = function(offset) {
|
||||
res.redirect(this.pop(offset));
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the first valid request Url in history
|
||||
* stack starting with a given offset. The default offset is 1.
|
||||
* Any valid Url found is removed from the stack, therefor
|
||||
* this method <em>alters the contents of the history stack</em>.
|
||||
* @param {Number} offset The index position in history stack to start
|
||||
* searching at
|
||||
* @return The Url of the request
|
||||
* @type String
|
||||
*/
|
||||
this.pop = function(offset) {
|
||||
/**
|
||||
* checks if a referrer is stil valid
|
||||
* @private
|
||||
*/
|
||||
var isValidPath = function(p) {
|
||||
var arr = p.split("/");
|
||||
var obj = root;
|
||||
for (var i=0;i<arr.length -1;i++) {
|
||||
if (!(obj = obj.get(unescape(arr[i]))) || obj.__node__.getState() == 3)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var obj;
|
||||
var cut = offset != null ? offset : 1;
|
||||
var stack = getStack();
|
||||
if (stack.items.length > 0) {
|
||||
while (cut-- > 0) {
|
||||
obj = stack.items.pop();
|
||||
}
|
||||
}
|
||||
while (stack.items.length > 0) {
|
||||
obj = stack.items.pop();
|
||||
// check if url is valid
|
||||
if (isValidPath(obj.path)) {
|
||||
return obj.url;
|
||||
}
|
||||
}
|
||||
return path.href();
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the request Url at the given position
|
||||
* in the current history stack. If no offset is given
|
||||
* the last Url in the stack is returned. This method
|
||||
* <em>does not alter the stack contents</em>!
|
||||
* @param {Number} offset The index position in history stack to start
|
||||
* searching at
|
||||
* @return The Url of the request
|
||||
* @type String
|
||||
*/
|
||||
this.peek = function(offset) {
|
||||
var stack = getStack();
|
||||
return stack.items[stack.items.length - (offset != null ? offset : 1)];
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the contents of all history stacks
|
||||
* as string
|
||||
* @return The history stacks as string
|
||||
* @type String
|
||||
*/
|
||||
this.dump = function() {
|
||||
return history.toSource();
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
this.toString = function() {
|
||||
return "[History " + getStack().toSource() + "]";
|
||||
};
|
||||
|
||||
return this;
|
||||
}
|
177
modules/jala/code/HopObject.js
Normal file
177
modules/jala/code/HopObject.js
Normal file
|
@ -0,0 +1,177 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
/**
|
||||
* @fileoverview Additional fields and methods of the HopObject class.
|
||||
*/
|
||||
|
||||
/**
|
||||
* HelmaLib dependencies
|
||||
*/
|
||||
app.addRepository("modules/core/String.js");
|
||||
app.addRepository("modules/helma/File.js");
|
||||
|
||||
/**
|
||||
* Constructs a name from an object which
|
||||
* is unique in the underlying HopObject collection.
|
||||
* @param {Object} obj The object representing or containing
|
||||
* the alias name. Possible object types include:
|
||||
* <ul>
|
||||
* <li>File</li>
|
||||
* <li>helma.File</li>
|
||||
* <li>java.io.File</li>
|
||||
* <li>String</li>
|
||||
* <li>java.lang.String</li>
|
||||
* <li>Packages.helma.util.MimePart</li>
|
||||
* </ul>
|
||||
* @param {Number} maxLength The maximum length of the alias
|
||||
* @returns The resulting alias
|
||||
* @type String
|
||||
*/
|
||||
HopObject.prototype.getAccessName = function(obj, maxLength) {
|
||||
/**
|
||||
* Private method checking if the key passed as argument is already
|
||||
* existing in this object
|
||||
* @param {String} key The key string to test
|
||||
* @returns True in case the key is already in use, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
var isReserved = function(obj, key) {
|
||||
return key === "." ||
|
||||
key === ".." ||
|
||||
obj[key] != null ||
|
||||
obj[key + "_action"] != null ||
|
||||
obj.get(key) != null
|
||||
};
|
||||
|
||||
// prepare name depending on argument
|
||||
var name;
|
||||
var clazz = obj.constructor || obj.getClass();
|
||||
switch (clazz) {
|
||||
case File:
|
||||
case helma.File:
|
||||
case java.io.File:
|
||||
case Packages.helma.util.MimePart:
|
||||
// first fix bloody ie/win file paths containing backslashes
|
||||
name = obj.getName().split(/[\\\/]/).pop();
|
||||
if (name.contains("."))
|
||||
name = name.substring(0, name.lastIndexOf("."));
|
||||
break;
|
||||
case String:
|
||||
case java.lang.String:
|
||||
name = obj;
|
||||
break;
|
||||
default:
|
||||
name = obj.toString();
|
||||
}
|
||||
|
||||
// remove all (back)slashes
|
||||
var accessName = name.replace(/[\\\/]/g, "");
|
||||
// remove all plus signs
|
||||
accessName = accessName.replace("+","");
|
||||
if (accessName.length > maxLength) {
|
||||
accessName = accessName.substring(0, maxLength);
|
||||
}
|
||||
var result = accessName;
|
||||
if (isReserved(this, result)) {
|
||||
var len = result.length;
|
||||
var counter = 1;
|
||||
var overflow;
|
||||
while (isReserved(this, result)) {
|
||||
result = accessName + "-" + counter.toString();
|
||||
if ((overflow = result.length - maxLength) > 0) {
|
||||
result = accessName.substring(0, accessName.length - overflow) +
|
||||
"-" + counter.toString();
|
||||
if (result.length > maxLength) {
|
||||
throw "Unable to create accessname due to limit restriction";
|
||||
}
|
||||
}
|
||||
counter += 1;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the internal state of this HopObject is TRANSIENT.
|
||||
* @returns True if this HopObject is marked as <em>transient</em>, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
HopObject.prototype.isTransient = function() {
|
||||
return this.__node__.getState() === Packages.helma.objectmodel.INodeState.TRANSIENT;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the internal state of this HopObject is VIRTUAL.
|
||||
* @returns True if this HopObject is marked as <em>virtual</em>, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
HopObject.prototype.isVirtual = function() {
|
||||
return this.__node__.getState() === Packages.helma.objectmodel.INodeState.VIRTUAL;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the internal state of this HopObject is INVALID.
|
||||
* @returns True if this HopObject is marked as <em>invalid</em>, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
HopObject.prototype.isInvalid = function() {
|
||||
return this.__node__.getState() === Packages.helma.objectmodel.INodeState.INVALID;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the internal state of this HopObject is CLEAN.
|
||||
* @returns True if this HopObject is marked as <em>clean</em>, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
HopObject.prototype.isClean = function() {
|
||||
return this.__node__.getState() === Packages.helma.objectmodel.INodeState.CLEAN;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the internal state of this HopObject is NEW.
|
||||
* @returns True if this HopObject is marked as <em>new</em>, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
HopObject.prototype.isNew = function() {
|
||||
return this.__node__.getState() === Packages.helma.objectmodel.INodeState.NEW;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the internal state of this HopObject is MODIFIED.
|
||||
* @returns True if this HopObject is marked as <em>modified</em>, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
HopObject.prototype.isModified = function() {
|
||||
return this.__node__.getState() === Packages.helma.objectmodel.INodeState.MODIFIED;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the internal state of this HopObject is DELETED.
|
||||
* @returns True if this HopObject is marked as <em>deleted</em>, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
HopObject.prototype.isDeleted = function() {
|
||||
return this.__node__.getState() === Packages.helma.objectmodel.INodeState.DELETED;
|
||||
};
|
156
modules/jala/code/HtmlDocument.js
Normal file
156
modules/jala/code/HtmlDocument.js
Normal file
|
@ -0,0 +1,156 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.HtmlDocument class.
|
||||
*/
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Jala dependencies
|
||||
*/
|
||||
(function() {
|
||||
var jalaDir = getProperty("jala.dir", "modules/jala");
|
||||
app.addRepository(jalaDir + "/lib/dom4j-1.6.1.jar");
|
||||
app.addRepository(jalaDir + "/lib/jaxen-1.1-beta-8.jar");
|
||||
})();
|
||||
|
||||
/**
|
||||
* Construct a new HTML document.
|
||||
* @class This class provides easy access to the elements of
|
||||
* an arbitrary HTML document. By using TagSoup, Dom4J and Jaxen
|
||||
* even invalid HTML can be parsed, turned into an object tree
|
||||
* and easily be processed with XPath expressions.
|
||||
* @param {String} source The HTML source code.
|
||||
* @returns A new HTML document.
|
||||
* @constructor
|
||||
*/
|
||||
jala.HtmlDocument = function(source) {
|
||||
var REQUIREMENTS = {
|
||||
"dom4j-1.6.1": "http://www.dom4j.org",
|
||||
"jaxen-1.1-beta-8": "http://www.jaxen.org"
|
||||
};
|
||||
|
||||
var reader = new java.io.StringReader(source);
|
||||
var dom4j = Packages.org.dom4j;
|
||||
var tagsoup = "org.ccil.cowan.tagsoup.Parser";
|
||||
|
||||
try {
|
||||
var saxReader = new dom4j.io.SAXReader(tagsoup);
|
||||
var document = saxReader.read(reader);
|
||||
document.normalize();
|
||||
} catch(e) {
|
||||
res.push();
|
||||
res.write("\njala.HtmlDocument requires the following Java ");
|
||||
res.write("packages in ext/lib or application directory:\n");
|
||||
for (var i in REQUIREMENTS) {
|
||||
res.write(i);
|
||||
res.write(".jar");
|
||||
res.write(" [");
|
||||
res.write(REQUIREMENTS[i]);
|
||||
res.write("]\n");
|
||||
}
|
||||
throw (e + res.pop());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all document nodes from an XPath expression.
|
||||
* @param {String} xpathExpr An XPath expression.
|
||||
* @returns A list of HTML elements.
|
||||
* @type org.dom4j.tree.DefaultElement
|
||||
*/
|
||||
this.scrape = function(xpathExpr) {
|
||||
return document.selectNodes(xpathExpr);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get all link elements of the HTML document.
|
||||
* @returns A list of link elements.
|
||||
* @type Array
|
||||
*/
|
||||
this.getLinks = function() {
|
||||
var result = [];
|
||||
var list = this.scrape("//html:a");
|
||||
for (var i=0; i<list.size(); i+=1) {
|
||||
var element = list.get(i);
|
||||
var text = element.getText();
|
||||
var href = element.attribute("href");
|
||||
if (text && href) {
|
||||
result.push({
|
||||
text: text,
|
||||
url: href.getText()
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves all elements by name from the document.
|
||||
* The returned object structure is compatible for usage
|
||||
* in {@link jala.XmlWriter}.
|
||||
* @param {String} elementName The name of the desired element
|
||||
* @returns The list of available elements in the document
|
||||
* @type Array
|
||||
*/
|
||||
this.getAll = function(elementName) {
|
||||
var result = [], object;
|
||||
var list = this.scrape("//html:" + elementName);
|
||||
var i, n, element, text, attributes, attr, size;
|
||||
for (i=0; i<list.size(); i+=1) {
|
||||
element = list.get(i);
|
||||
object = {
|
||||
name: element.getName(),
|
||||
value: element.getText() || null
|
||||
};
|
||||
attributes = element.attributes();
|
||||
if ((size = attributes.size()) > 0) {
|
||||
object.attributes = new Array;
|
||||
for (n=0; n<size; n+=1) {
|
||||
attr = attributes.get(n);
|
||||
object.attributes.push({
|
||||
name: attr.getName(),
|
||||
value: attr.getData() || null
|
||||
});
|
||||
}
|
||||
}
|
||||
result.push(object);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a string representation of the HTML document.
|
||||
* @returns A string representation of the HTML document.
|
||||
* @type String
|
||||
*/
|
||||
this.toString = function() {
|
||||
return "[jala.HtmlDocument " + source.length + " Bytes]";
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
403
modules/jala/code/I18n.js
Normal file
403
modules/jala/code/I18n.js
Normal file
|
@ -0,0 +1,403 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
/**
|
||||
* @fileoverview Methods and macros for internationalization
|
||||
* of Helma applications.
|
||||
*/
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new instance of jala.I18n
|
||||
* @class This class provides various functions and macros for
|
||||
* internationalization of Helma applications.
|
||||
* @constructor
|
||||
* @type jala.I18n
|
||||
*/
|
||||
jala.I18n = function() {
|
||||
/**
|
||||
* The default object containing the messages.
|
||||
* @ignore
|
||||
*/
|
||||
var messages = global.messages;
|
||||
|
||||
/**
|
||||
* The default method for retrieving the locale.
|
||||
* @ignore
|
||||
*/
|
||||
var localeGetter = function() {
|
||||
return java.util.Locale.getDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
* Overwrite the default object containing
|
||||
* the messages (ie. a vanilla EcmaScript object).
|
||||
* @param {Object} msgObject The object containing the messages
|
||||
*/
|
||||
this.setMessages = function(msgObject) {
|
||||
messages = msgObject;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the message object.
|
||||
* @returns The object containing the messages
|
||||
* @type Object
|
||||
*/
|
||||
this.getMessages = function() {
|
||||
return messages;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the method for retrieving the locale.
|
||||
* @param {Function} func The getter method
|
||||
*/
|
||||
this.setLocaleGetter = function(func) {
|
||||
if (func && func.constructor == Function) {
|
||||
localeGetter = func;
|
||||
} else {
|
||||
throw Error("Getter method to retrieve locale must be a function");
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the method for retrieving the locale.
|
||||
* @returns The getter method
|
||||
* @type Function
|
||||
*/
|
||||
this.getLocaleGetter = function() {
|
||||
return localeGetter;
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* The default handler containing the messages.
|
||||
* @ignore
|
||||
*/
|
||||
jala.I18n.HANDLER = global;
|
||||
|
||||
/** @ignore */
|
||||
jala.I18n.prototype.toString = function() {
|
||||
return "[Jala i18n]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Set (overwrite) the default handler containing
|
||||
* the messages (ie. a vanilla EcmaScript object).
|
||||
* @param {Object} handler The handler containing the message object
|
||||
* @deprecated Use {@link #setMessages} instead
|
||||
*/
|
||||
jala.I18n.prototype.setHandler = function(handler) {
|
||||
this.setMessages(handler.messages);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the locale for the given id, which is expected to follow
|
||||
* the form <code>language[_COUNTRY][_variant]</code>, where <code>language</code>
|
||||
* is a valid ISO Language Code (eg. "de"), <code>COUNTRY</code> a valid ISO
|
||||
* Country Code (eg. "AT"), and variant an identifier for the variant to use.
|
||||
* @returns The locale for the given id
|
||||
* @type java.util.Locale
|
||||
*/
|
||||
jala.I18n.prototype.getLocale = function(localeId) {
|
||||
if (localeId) {
|
||||
if (localeId.indexOf("_") > -1) {
|
||||
var arr = localeId.split("_");
|
||||
if (arr.length == 3) {
|
||||
return new java.util.Locale(arr[0], arr[1], arr[2]);
|
||||
} else {
|
||||
return new java.util.Locale(arr[0], arr[1]);
|
||||
}
|
||||
} else {
|
||||
return new java.util.Locale(localeId);
|
||||
}
|
||||
}
|
||||
return java.util.Locale.getDefault();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to "translate" the given message key into a localized
|
||||
* message.
|
||||
* @param {String} key The message to translate (required)
|
||||
* @param {String} plural The plural form of the message to translate
|
||||
* @param {Number} amount A number to determine whether to use the
|
||||
* singular or plural form of the message
|
||||
* @returns The localized message or the appropriate key if no
|
||||
* localized message was found
|
||||
* @type String
|
||||
*/
|
||||
jala.I18n.prototype.translate = function(singularKey, pluralKey, amount) {
|
||||
var translation = null;
|
||||
if (singularKey) {
|
||||
// use the getter method for retrieving the locale
|
||||
var locale = this.getLocaleGetter()();
|
||||
var catalog, key;
|
||||
if ((catalog = jala.i18n.getCatalog(locale))) {
|
||||
if (arguments.length == 3 && amount != 1) { // is plural
|
||||
key = pluralKey;
|
||||
} else {
|
||||
key = singularKey;
|
||||
}
|
||||
if (!(translation = catalog[key])) {
|
||||
translation = key;
|
||||
app.logger.debug("jala.i18n.translate(): Can't find message '" +
|
||||
key + "' for locale '" + locale + "'");
|
||||
}
|
||||
} else {
|
||||
app.logger.debug("jala.i18n.translate(): Can't find message catalog for locale '" + locale + "'");
|
||||
if (!pluralKey || amount == 1) {
|
||||
translation = singularKey;
|
||||
} else {
|
||||
translation = pluralKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
return translation;
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper method to get the message catalog
|
||||
* corresponding to the actual locale.
|
||||
* @params {java.util.Locale} locale
|
||||
* @returns The message catalog.
|
||||
*/
|
||||
jala.I18n.prototype.getCatalog = function(locale) {
|
||||
if (!jala.I18n.catalogs) {
|
||||
jala.I18n.catalogs = {};
|
||||
}
|
||||
|
||||
var catalog = jala.I18n.catalogs[locale];
|
||||
|
||||
if (catalog) return catalog;
|
||||
|
||||
var messages = this.getMessages();
|
||||
|
||||
if (locale && messages) {
|
||||
catalog = messages[locale.toLanguageTag()];
|
||||
jala.I18n.catalogs[locale] = catalog;
|
||||
}
|
||||
|
||||
return catalog;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts the message passed as argument into an instance
|
||||
* of java.text.MessageFormat, and formats it using the
|
||||
* replacement values passed.
|
||||
* @param {String} message The message to format
|
||||
* @param {Array} values An optional array containing replacement values
|
||||
* @returns The formatted message or, if the formatting fails, the
|
||||
* message passed as argument.
|
||||
* @type String
|
||||
* @see http://java.sun.com/j2se/1.5.0/docs/api/java/text/MessageFormat.html
|
||||
*/
|
||||
jala.I18n.prototype.formatMessage = function(message, values) {
|
||||
if (message) {
|
||||
var args = null;
|
||||
if (values != null && values.length > 0) {
|
||||
args = java.lang.reflect.Array.newInstance(java.lang.Object, values.length);
|
||||
var arg;
|
||||
for (var i=0;i<values.length;i++) {
|
||||
if ((arg = values[i]) != null) {
|
||||
// MessageFormat can't deal with javascript date objects
|
||||
// so we need to convert them into java.util.Date instances
|
||||
if (arg instanceof Date) {
|
||||
args[i] = new java.util.Date(arg.getTime());
|
||||
} else {
|
||||
args[i] = arg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// use the getter method for retrieving the locale
|
||||
var locale = this.getLocaleGetter()();
|
||||
// format the message
|
||||
try {
|
||||
var msgFormat = new java.text.MessageFormat(message, locale);
|
||||
return msgFormat.format(args);
|
||||
} catch (e) {
|
||||
app.logger.warn("jala.i18n.formatMessage(): Unable to format message '"
|
||||
+ message + "', reason: " + e, e.javaException);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a localized message for the message key passed as
|
||||
* argument. If no localization is found, the message key
|
||||
* is returned. Any additional arguments passed to this function
|
||||
* will be used as replacement values during message rendering.
|
||||
* To reference these values the message can contain placeholders
|
||||
* following "{number}" notation, where <code>number</code> must
|
||||
* match the number of the additional argument (starting with zero).
|
||||
* @param {String} key The message to localize
|
||||
* @returns The translated message
|
||||
* @type String
|
||||
* @see #translate
|
||||
* @see #formatMessage
|
||||
*/
|
||||
jala.I18n.prototype.gettext = function(key /** [value 0][, value 1][, ...] */) {
|
||||
return this.formatMessage(this.translate(key),
|
||||
Array.prototype.splice.call(arguments, 1));
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a localized message for the message key passed as
|
||||
* argument. In contrast to gettext() this method
|
||||
* can handle plural forms based on the amount passed as argument.
|
||||
* If no localization is found, the appropriate message key is
|
||||
* returned. Any additional arguments passed to this function
|
||||
* will be used as replacement values during message rendering.
|
||||
* To reference these values the message can contain placeholders
|
||||
* following "{number}" notation, where <code>number</code> must
|
||||
* match the number of the additional argument (starting with zero).
|
||||
* @param {String} singularKey The singular message to localize
|
||||
* @param {String} pluralKey The plural form of the message to localize
|
||||
* @param {Number} amount The amount which is used to determine
|
||||
* whether the singular or plural form of the message should be returned.
|
||||
* @returns The translated message
|
||||
* @type String
|
||||
* @see #translate
|
||||
* @see #formatMessage
|
||||
*/
|
||||
jala.I18n.prototype.ngettext = function(singularKey, pluralKey, amount /** [value 0][, value 1][, ...] */) {
|
||||
return this.formatMessage(this.translate(singularKey, pluralKey, amount || 0),
|
||||
Array.prototype.splice.call(arguments, 2));
|
||||
};
|
||||
|
||||
/**
|
||||
* A simple proxy method which is used to mark a message string
|
||||
* for the i18n parser as to be translated.
|
||||
* @param {String} key The message that should be seen by the
|
||||
* i18n parser as to be translated.
|
||||
* @returns The message in unmodified form
|
||||
* @type String
|
||||
*/
|
||||
jala.I18n.prototype.markgettext = function(key) {
|
||||
return key;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a translated message. The following macro attributes
|
||||
* are accepted:
|
||||
* <ul>
|
||||
* <li>text: The message to translate (required)</li>
|
||||
* <li>plural: The plural form of the message</li>
|
||||
* <li>values: A list of replacement values. Use a comma to separate more
|
||||
* than one value. Each value is either interpreted as a global property
|
||||
* (if it doesn't containg a dot) or as a property name of the given macro
|
||||
* handler object (eg. "user.name"). If the value of the property is a
|
||||
* HopObject or an Array this macro uses the size() resp. length of the
|
||||
* object, otherwise the string representation of the object will be used.</li>
|
||||
* </ul>
|
||||
* @returns The translated message
|
||||
* @type String
|
||||
* @see #gettext
|
||||
* @see #ngettext
|
||||
*/
|
||||
jala.I18n.prototype.message_macro = function(param) {
|
||||
if (param.text) {
|
||||
var args = [param.text];
|
||||
if (param.plural) {
|
||||
args[args.length] = param.plural;
|
||||
}
|
||||
if (param.values != null) {
|
||||
var arr = param.values.split(/\s*,\s*/g);
|
||||
// convert replacement values: if the value name doesn't contain
|
||||
// a dot, look for a global property with that name, otherwise
|
||||
// for a property of the specified macro handler object.
|
||||
var propName, dotIdx, handlerName, handler;
|
||||
for (var i=0;i<arr.length;i++) {
|
||||
if ((propName = arr[i]) != null) {
|
||||
var value = null;
|
||||
if ((dotIdx = propName.indexOf(".")) > 0) {
|
||||
var handlerName = propName.substring(0, dotIdx);
|
||||
if (handlerName == "request") {
|
||||
handler = req.data;
|
||||
} else if (handlerName == "response") {
|
||||
handler = res.data;
|
||||
} else if (!(handler = res.handlers[handlerName])) {
|
||||
continue;
|
||||
}
|
||||
propName = propName.substring(dotIdx + 1);
|
||||
// primitive security: don't allow access to internal properties
|
||||
// and a property named "password"
|
||||
if (propName.charAt(0) != "_" && propName.toLowerCase() != "password") {
|
||||
value = handler[propName];
|
||||
}
|
||||
} else {
|
||||
value = global[propName];
|
||||
}
|
||||
if (value != null) {
|
||||
// if its a HopObject collection or Array, use its size/length
|
||||
// as value
|
||||
if (value instanceof HopObject) {
|
||||
value = value.size();
|
||||
} else if (value instanceof Array) {
|
||||
value = value.length;
|
||||
}
|
||||
}
|
||||
args[args.length] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (param.plural) {
|
||||
return this.ngettext.apply(this, args);
|
||||
} else {
|
||||
return this.gettext.apply(this, args);
|
||||
}
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Default i18n class instance.
|
||||
* @type jala.I18n
|
||||
* @final
|
||||
*/
|
||||
jala.i18n = new jala.I18n();
|
||||
|
||||
/**
|
||||
* For convenience reasons the public methods and macros are
|
||||
* put into global scope too
|
||||
*/
|
||||
var gettext = function() {
|
||||
return jala.i18n.gettext.apply(jala.i18n, arguments);
|
||||
};
|
||||
var ngettext = function() {
|
||||
return jala.i18n.ngettext.apply(jala.i18n, arguments);
|
||||
};
|
||||
var markgettext = function() {
|
||||
return jala.i18n.markgettext.apply(jala.i18n, arguments);
|
||||
};
|
||||
var message_macro = function() {
|
||||
return jala.i18n.message_macro.apply(jala.i18n, arguments);
|
||||
};
|
362
modules/jala/code/ImageFilter.js
Normal file
362
modules/jala/code/ImageFilter.js
Normal file
|
@ -0,0 +1,362 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.ImageFilter class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new ImageFilter object
|
||||
* @class This class provides several image manipulating
|
||||
* methods. Most of this filter library is based on filters created
|
||||
* by Janne Kipinä for JAlbum. For more information have a look
|
||||
* at http://www.ratol.fi/~jakipina/java/
|
||||
* @param {Object} img Either
|
||||
<ul>
|
||||
<li>an instance of helma.image.ImageWrapper</li>
|
||||
<li>the path to the image file as String</li>
|
||||
<li>an instance of helma.File representing the image file</li>
|
||||
<li>an instance of java.io.File representing the image file</li>
|
||||
</ul>
|
||||
* @constructor
|
||||
*/
|
||||
jala.ImageFilter = function(img) {
|
||||
/**
|
||||
* The buffered image to work on
|
||||
* @type java.awt.image.BufferedImage
|
||||
* @private
|
||||
*/
|
||||
var bi;
|
||||
|
||||
/**
|
||||
* Perfoms a gaussian operation (unsharp masking or blurring)
|
||||
* on the image using the kernelFactory passed as argument
|
||||
* @param {Number} radius The radius
|
||||
* @param {Number} amount The amount
|
||||
* @param {Function} kernelFactory Factory method to call for building the kernel
|
||||
* @private
|
||||
*/
|
||||
var gaussianOp = function(radius, amount, kernelFactory) {
|
||||
var DEFAULT_RADIUS = 2;
|
||||
var MINIMUM_RADIUS = 1;
|
||||
var MAXIMUM_RADIUS = 10;
|
||||
var DEFAULT_AMOUNT = 15;
|
||||
var MINIMUM_AMOUNT = 1;
|
||||
var MAXIMUM_AMOUNT = 100;
|
||||
|
||||
// correct arguments if necessary
|
||||
if (isNaN(radius = Math.min(Math.max(radius, MINIMUM_RADIUS), MAXIMUM_RADIUS)))
|
||||
radius = DEFAULT_RADIUS;
|
||||
if (isNaN(amount = Math.min(Math.max(amount, MINIMUM_AMOUNT), MAXIMUM_AMOUNT)))
|
||||
amount = DEFAULT_AMOUNT;
|
||||
|
||||
if ((bi.getWidth() < bi.getHeight()) && (radius > bi.getWidth())) {
|
||||
radius = bi.getWidth();
|
||||
} else if ((bi.getHeight() < bi.getWidth()) && (radius > bi.getHeight())) {
|
||||
radius = bi.getHeight();
|
||||
}
|
||||
|
||||
var size = (radius * 2) + 1;
|
||||
var deviation = amount / 20;
|
||||
var elements = kernelFactory(size, deviation);
|
||||
var large = jala.ImageFilter.getEnlargedImageWithMirroring(bi, radius);
|
||||
var resultImg = new java.awt.image.BufferedImage(large.getWidth(), large.getHeight(), large.getType());
|
||||
var kernel = new java.awt.image.Kernel(size, size, elements);
|
||||
var cop = new java.awt.image.ConvolveOp(kernel, java.awt.image.ConvolveOp.EDGE_NO_OP, null);
|
||||
cop.filter(large, resultImg);
|
||||
// replace the wrapped buffered image with the modified one
|
||||
bi = resultImg.getSubimage(radius, radius, bi.getWidth(), bi.getHeight());
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sharpens the image using a plain sharpening kernel.
|
||||
* @param {Number} amount The amount of sharpening to apply
|
||||
*/
|
||||
this.sharpen = function(amount) {
|
||||
var DEFAULT = 20;
|
||||
var MINIMUM = 1;
|
||||
var MAXIMUM = 100;
|
||||
// correct argument if necessary
|
||||
if (isNaN(Math.min(Math.max(amount, MINIMUM), MAXIMUM)))
|
||||
amount = DEFAULT;
|
||||
var sharpened = new java.awt.image.BufferedImage(bi.getWidth(), bi.getHeight(), bi.getType());
|
||||
var kernel = new java.awt.image.Kernel(3, 3, jala.ImageFilter.getSharpeningKernel(amount));
|
||||
var cop = new java.awt.image.ConvolveOp(kernel, java.awt.image.ConvolveOp.EDGE_NO_OP, null);
|
||||
cop.filter(bi, sharpened);
|
||||
bi = sharpened;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Performs an unsharp mask operation on the image
|
||||
* @param {Number} radius The radius
|
||||
* @param {Number} amount The amount
|
||||
*/
|
||||
this.unsharpMask = function(radius, amount) {
|
||||
gaussianOp(radius, amount, jala.ImageFilter.getUnsharpMaskKernel);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Performs a gaussian blur operation on the image
|
||||
* @param {Number} radius The radius
|
||||
* @param {Number} amount The amount
|
||||
*/
|
||||
this.gaussianBlur = function(radius, amount) {
|
||||
gaussianOp(radius, amount, jala.ImageFilter.getGaussianBlurKernel);
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns the image that has been worked on
|
||||
* @return An instance of helma.image.ImageWrapper
|
||||
* @type helma.image.ImageWrapper
|
||||
*/
|
||||
this.getImage = function() {
|
||||
var generator = Packages.helma.image.ImageGenerator.getInstance();
|
||||
return new Packages.helma.image.ImageWrapper(bi,
|
||||
bi.getWidth(),
|
||||
bi.getHeight(),
|
||||
generator);
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the wrapped image as byte array, to use eg. in conjunction
|
||||
* with res.writeBinary()
|
||||
* @returns The wrapped image as byte array
|
||||
* @type byte[]
|
||||
*/
|
||||
this.getBytes = function() {
|
||||
var outStream = new java.io.ByteArrayOutputStream();
|
||||
Packages.javax.imageio.ImageIO.write(bi, "jpeg", outStream);
|
||||
var bytes = outStream.toByteArray();
|
||||
outStream.close();
|
||||
return bytes;
|
||||
};
|
||||
|
||||
/**
|
||||
* constructor body
|
||||
* @ignore
|
||||
*/
|
||||
if (arguments.length == 0 || img == null) {
|
||||
throw "jala.ImageFilter: insufficient arguments";
|
||||
} else if (img instanceof Packages.helma.image.ImageWrapper) {
|
||||
bi = img.getBufferedImage();
|
||||
} else {
|
||||
if (typeof(img) == "string") {
|
||||
var inStream = new java.io.FileInputStream(new java.io.File(img));
|
||||
} else {
|
||||
var inStream = new java.io.FileInputStream(img);
|
||||
}
|
||||
var decoder = Packages.com.sun.image.codec.jpeg.JPEGCodec.createJPEGDecoder(inStream);
|
||||
bi = decoder.decodeAsBufferedImage();
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
jala.ImageFilter.prototype.toString = function() {
|
||||
return "[jala.ImageFilter]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Transforms an image into a bigger one while mirroring the edges
|
||||
* This method is used to apply the filtering up to the edges
|
||||
* of an image (otherwise the image would keep an unmodified
|
||||
* border).
|
||||
* @param {java.awt.image.BufferedImage} bi The buffered image to transform
|
||||
* @param {Number} size The size of the border area
|
||||
* @returns The transformed image
|
||||
* @type java.awt.image.BufferedImage
|
||||
* @private
|
||||
*/
|
||||
jala.ImageFilter.getEnlargedImageWithMirroring = function(bi, size) {
|
||||
|
||||
var doFlip = function(bi, sx, sy, dist) {
|
||||
var out = new java.awt.image.BufferedImage(bi.getWidth(), bi.getHeight(), bi.getType());
|
||||
var transform = java.awt.geom.AffineTransform.getScaleInstance(sx, sy);
|
||||
(sx < sy) ? transform.translate(-dist, 0) : transform.translate(0, -dist);
|
||||
var atop = new java.awt.image.AffineTransformOp(transform,
|
||||
java.awt.image.AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
|
||||
out = atop["filter(java.awt.image.BufferedImage,java.awt.image.BufferedImage)"](bi, null);
|
||||
return out;
|
||||
}
|
||||
|
||||
var doHorizontalFlip = function(bi) {
|
||||
return doFlip(bi, -1, 1, bi.getWidth());
|
||||
}
|
||||
|
||||
var doVerticalFlip = function(bi) {
|
||||
return doFlip(bi, 1, -1, bi.getHeight());
|
||||
}
|
||||
|
||||
var width = bi.getWidth() + 2 * size;
|
||||
var height = bi.getHeight() + 2 * size;
|
||||
var out = new java.awt.image.BufferedImage(width, height, bi.getType());
|
||||
var g = out.createGraphics();
|
||||
// due to method overloading exactly define the method to be called
|
||||
var func = "drawImage(java.awt.Image,int,int,java.awt.image.ImageObserver)";
|
||||
g[func](bi, size, size, null);
|
||||
|
||||
var part;
|
||||
//top-left corner
|
||||
part = bi.getSubimage(0, 0, size, size);
|
||||
part = doHorizontalFlip(part);
|
||||
part = doVerticalFlip(part);
|
||||
g[func](part, 0, 0, null);
|
||||
//top-right corner
|
||||
part = bi.getSubimage(bi.getWidth()-size, 0, size, size);
|
||||
part = doHorizontalFlip(part);
|
||||
part = doVerticalFlip(part);
|
||||
g[func](part, width-size, 0, null);
|
||||
//bottom-left corner
|
||||
part = bi.getSubimage(0, bi.getHeight()-size, size, size);
|
||||
part = doHorizontalFlip(part);
|
||||
part = doVerticalFlip(part);
|
||||
g[func](part, 0, height-size, null);
|
||||
//bottom-right corner
|
||||
part = bi.getSubimage(bi.getWidth()-size, bi.getHeight()-size, size, size);
|
||||
part = doHorizontalFlip(part);
|
||||
part = doVerticalFlip(part);
|
||||
g[func](part, width-size, height-size, null);
|
||||
//left border
|
||||
part = bi.getSubimage(0, 0, size, bi.getHeight());
|
||||
part = doHorizontalFlip(part);
|
||||
g[func](part, 0, size, null);
|
||||
//right border
|
||||
part = bi.getSubimage(bi.getWidth()-size, 0, size, bi.getHeight());
|
||||
part = doHorizontalFlip(part);
|
||||
g[func](part, width-size, size, null);
|
||||
//top border
|
||||
part = bi.getSubimage(0, 0, bi.getWidth(), size);
|
||||
part = doVerticalFlip(part);
|
||||
g[func](part, size, 0, null);
|
||||
//bottom border
|
||||
part = bi.getSubimage(0, bi.getHeight()-size, bi.getWidth(), size);
|
||||
part = doVerticalFlip(part);
|
||||
g[func](part, size, height-size, null);
|
||||
return out;
|
||||
};
|
||||
|
||||
/**
|
||||
* Factory method for a gaussian blur kernel
|
||||
* @returns The gaussian blur kernel
|
||||
* @param {Number} size The size of the kernel
|
||||
* @param {Number} deviation The deviation to use
|
||||
* @returns The gaussian blur kernel
|
||||
* @type float[]
|
||||
* @private
|
||||
*/
|
||||
jala.ImageFilter.getGaussianBlurKernel = function(size, deviation) {
|
||||
var nominator = 2 * deviation * deviation;
|
||||
var kernel = java.lang.reflect.Array.newInstance(java.lang.Float.TYPE, size*size);
|
||||
var center = (size - 1) / 2;
|
||||
var limit = size - 1;
|
||||
var xx, yy;
|
||||
var sum = 0;
|
||||
var value = 0;
|
||||
for (var y=0; y<size; y++) {
|
||||
for (var x=0; x<size; x++) {
|
||||
if ((y <= center) && (x <= center)) {
|
||||
if (x >= y) {
|
||||
//calculate new value
|
||||
xx = center - x;
|
||||
yy = center - y;
|
||||
value = Math.exp(-(xx*xx + yy*yy) / nominator);
|
||||
kernel[(y*size)+x] = value;
|
||||
sum += value;
|
||||
} else {
|
||||
//copy existing value
|
||||
value = kernel[(x*size)+y];
|
||||
kernel[(y*size)+x] = value;
|
||||
sum += value;
|
||||
}
|
||||
} else {
|
||||
xx = x;
|
||||
yy = y;
|
||||
if (yy > center)
|
||||
yy = limit - yy;
|
||||
if (xx > center)
|
||||
xx = limit - xx;
|
||||
value = kernel[(yy*size)+xx];
|
||||
kernel[(y*size)+x] = value;
|
||||
sum += value;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i=0; i<kernel.length; i++) {
|
||||
kernel[i] = kernel[i] / sum;
|
||||
}
|
||||
return kernel;
|
||||
};
|
||||
|
||||
/**
|
||||
* Factory method for an unsharp mask kernel
|
||||
* @param {Number} size The size of the kernel
|
||||
* @param {Number} deviation The deviation to use
|
||||
* @returns The unsharp mask kernel
|
||||
* @type float[]
|
||||
* @private
|
||||
*/
|
||||
jala.ImageFilter.getUnsharpMaskKernel = function(size, deviation) {
|
||||
var elements = jala.ImageFilter.getGaussianBlurKernel(size, deviation);
|
||||
var center = ((size * size) - 1) / 2;
|
||||
elements[center] = 0;
|
||||
var sum = 0;
|
||||
for (var i=0; i<elements.length; i++) {
|
||||
sum += elements[i];
|
||||
elements[i] = -elements[i];
|
||||
}
|
||||
elements[center] = sum + 1;
|
||||
return elements;
|
||||
};
|
||||
|
||||
/**
|
||||
* Factory method for a sharpening kernel
|
||||
* @param {Number} amount The amount of sharpening to use
|
||||
* @return The sharpening kernel
|
||||
* @type float[]
|
||||
* @private
|
||||
*/
|
||||
jala.ImageFilter.getSharpeningKernel = function(amount) {
|
||||
var kernel = java.lang.reflect.Array.newInstance(java.lang.Float.TYPE, 9);
|
||||
var corner = 0;
|
||||
var side = amount / -50;
|
||||
var center = (side * -4.0) + (corner * -4.0) + 1.0;
|
||||
kernel[0] = kernel[2] = kernel[6] = kernel[8] = corner;
|
||||
kernel[1] = kernel[3] = kernel[5] = kernel[7] = side;
|
||||
kernel[4] = center;
|
||||
return kernel;
|
||||
};
|
||||
|
765
modules/jala/code/IndexManager.js
Normal file
765
modules/jala/code/IndexManager.js
Normal file
|
@ -0,0 +1,765 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.IndexManager class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* HelmaLib dependencies
|
||||
*/
|
||||
app.addRepository("modules/helma/Search.js");
|
||||
app.addRepository("modules/helma/File.js");
|
||||
|
||||
/**
|
||||
* Constructs a new IndexManager object.
|
||||
* @class This class basically sits on top of a helma.Search.Index instance
|
||||
* and provides methods for adding, removing and optimizing the underlying index.
|
||||
* All methods generate jobs that are put into an internal queue which is
|
||||
* processed asynchronously by a separate worker thread. This means all calls
|
||||
* to add(), remove() and optimize() will return immediately, but the changes to
|
||||
* the index will be done within a short delay. Please keep in mind to change the
|
||||
* status of this IndexManager instance to REBUILDING before starting to rebuild
|
||||
* the index, as this ensures that all add/remove/optimize jobs will stay in the
|
||||
* queue and will only be processed after switching the status back to NORMAL.
|
||||
* This ensures that objects that have been modified during a rebuilding process
|
||||
* are re-indexed properly afterwards.
|
||||
* @param {String} name The name of the index, which is the name of the directory
|
||||
* the index already resides or will be created in.
|
||||
* @param {helma.File} dir The base directory where this index's directory
|
||||
* is already existing or will be created in. If not specified a RAM directory
|
||||
* is used.
|
||||
* @param {String} lang The language of the documents in this index. This leads
|
||||
* to the proper Lucene analyzer being used for indexing documents.
|
||||
* @constructor
|
||||
* @see helma.Search.createIndex
|
||||
*/
|
||||
jala.IndexManager = function IndexManager(name, dir, lang) {
|
||||
|
||||
/**
|
||||
* Private variable containing the worker thread
|
||||
* @private
|
||||
*/
|
||||
var thread = null;
|
||||
|
||||
/**
|
||||
* Private flag indicating that the worker thread should stop
|
||||
* @type Boolean
|
||||
* @private
|
||||
*/
|
||||
var interrupted = false;
|
||||
|
||||
/**
|
||||
* Private variable containing the index managed by
|
||||
* this IndexManager instance.
|
||||
* @private
|
||||
*/
|
||||
var index = null;
|
||||
|
||||
/**
|
||||
* Private variable containing a status indicator.
|
||||
* @type Number
|
||||
* @private
|
||||
*/
|
||||
var status = jala.IndexManager.NORMAL;
|
||||
|
||||
/**
|
||||
* Synchronized linked list that functions as a queue for
|
||||
* asynchronous processing of index manipulation jobs.
|
||||
* @type java.util.LinkedList
|
||||
* @private
|
||||
* @see jala.IndexManager.Job
|
||||
*/
|
||||
var queue = java.util.Collections.synchronizedList(new java.util.LinkedList());
|
||||
|
||||
/**
|
||||
* The name of the unique identifier field in the index. Defaults to "id".
|
||||
* @type String
|
||||
* @private
|
||||
*/
|
||||
var idFieldname = "id";
|
||||
|
||||
/**
|
||||
* The index directory
|
||||
* @type Packages.org.apache.lucene.store.Directory
|
||||
* @private
|
||||
*/
|
||||
var indexDirectory = null;
|
||||
|
||||
/**
|
||||
* The searcher utilized by {@link #search}
|
||||
* @type jala.IndexManager.Searcher
|
||||
* @private
|
||||
*/
|
||||
var searcher = null;
|
||||
|
||||
/**
|
||||
* Returns the directory of the underlying index
|
||||
* @returns The directory of the underlying index
|
||||
* @type Packages.org.apache.lucene.store.Directory
|
||||
*/
|
||||
this.getDirectory = function() {
|
||||
return indexDirectory;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the underlying index.
|
||||
* @returns The index this queue is working on.
|
||||
* @type helma.Search.Index
|
||||
*/
|
||||
this.getIndex = function() {
|
||||
return index;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the status of this manager.
|
||||
* @returns The status of this index manager.
|
||||
* @type Number
|
||||
* @see #NORMAL
|
||||
* @see #REBUILDING
|
||||
*/
|
||||
this.getStatus = function() {
|
||||
return status;
|
||||
};
|
||||
|
||||
/**
|
||||
* Modifies the status of this manager, which has implications
|
||||
* on how index modifying jobs are handled. If the status
|
||||
* is {@link #REBUILDING}, all jobs are queued until the status
|
||||
* is set back to {@link #NORMAL}.
|
||||
* @param {Number} s The new status of this manager.
|
||||
* @see #NORMAL
|
||||
* @see #REBUILDING
|
||||
*/
|
||||
this.setStatus = function(s) {
|
||||
status = s;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the queue this index manager is using.
|
||||
* @returns The queue.
|
||||
* @type java.util.LinkedList
|
||||
*/
|
||||
this.getQueue = function() {
|
||||
return queue;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the name of the index manger, which
|
||||
* is equal to the name of the underlying index
|
||||
* @returns The name of the index manager
|
||||
* @type String
|
||||
*/
|
||||
this.getName = function() {
|
||||
return name;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the name of the field containing the unique identifier
|
||||
* of document objects in the index wrapped by this IndexManager.
|
||||
* Defaults to "id".
|
||||
* @returns The name of the id field in the index
|
||||
* @type String
|
||||
* @see #setIdFieldname
|
||||
*/
|
||||
this.getIdFieldname = function() {
|
||||
return idFieldname;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the name of the field containing the unique identifier
|
||||
* of document objects in the index wrapped by this IndexManager.
|
||||
* @see #getIdFieldname
|
||||
*/
|
||||
this.setIdFieldname = function(name) {
|
||||
idFieldname = name;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the underlying index is currently optimized.
|
||||
* @returns True in case the index is optimized, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
this.hasOptimizingJob = function() {
|
||||
for (var i=0; i<queue.size(); i++) {
|
||||
if (queue.get(i).type == jala.IndexManager.Job.OPTIMIZE) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if the underlying index is currently rebuilding.
|
||||
* @returns True in case the index is rebuilding, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
this.isRebuilding = function() {
|
||||
return status == jala.IndexManager.REBUILDING;
|
||||
};
|
||||
|
||||
/**
|
||||
* Starts the IndexManager worker thread that processes the job queue
|
||||
*/
|
||||
this.start = function() {
|
||||
if (!this.isRunning()) {
|
||||
interrupted = false;
|
||||
thread = app.invokeAsync(this, function() {
|
||||
while (interrupted === false) {
|
||||
if (this.getStatus() != jala.IndexManager.REBUILDING && !queue.isEmpty()) {
|
||||
var job = queue.remove(0);
|
||||
if (this.processJob(job) === false) {
|
||||
// processing job failed, check if we should re-add
|
||||
if (job.errors < jala.IndexManager.MAXTRIES) {
|
||||
// increment error counter and put back into queue
|
||||
job.errors += 1;
|
||||
queue.add(job);
|
||||
} else {
|
||||
this.log("error", "error during queue flush: tried " +
|
||||
jala.IndexManager.MAXTRIES + " times to handle " +
|
||||
job.type + " job " + ", giving up.");
|
||||
}
|
||||
}
|
||||
this.log("debug", "remaining jobs " + queue.size());
|
||||
// if no more jobs are waiting, optimize the index and re-open
|
||||
// the index searcher to make changes visible
|
||||
if (queue.isEmpty()) {
|
||||
var start = java.lang.System.currentTimeMillis();
|
||||
try {
|
||||
this.getIndex().optimize();
|
||||
this.log("optimized index in " + jala.IndexManager.getRuntime(start) + " ms");
|
||||
this.initSearcher();
|
||||
} catch (e) {
|
||||
this.log("error", "Unable to optimize index or re-open searcher, reason: " + e.toString());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// wait for 100ms before checking again
|
||||
java.lang.Thread.sleep(100);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}, [], -1);
|
||||
this.log("started successfully");
|
||||
} else {
|
||||
this.log("already running");
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Stops this IndexManager instance. This function waits for 10 seconds
|
||||
* maximum for the worker thread to stop.
|
||||
* @returns True if the worker thread stopped successfully, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
this.stop = function() {
|
||||
interrupted = true;
|
||||
var result;
|
||||
if ((result = this.isRunning()) === true) {
|
||||
if ((result = thread.waitForResult(10000)) === true) {
|
||||
thread = null;
|
||||
this.log("stopped successfully");
|
||||
} else {
|
||||
result = false;
|
||||
this.log("error", "unable to stop");
|
||||
}
|
||||
} else {
|
||||
this.log("info", "already stopped");
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if this IndexManager instance is running
|
||||
* @returns True if this IndexManager instance is running, false otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
this.isRunning = function() {
|
||||
if (thread != null) {
|
||||
return thread.running;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Read only reference containing the running status of this IndexManager
|
||||
* @type Boolean
|
||||
*/
|
||||
this.running; // for api documentation only, is overwritten by getter below
|
||||
this.__defineGetter__("running", function() {
|
||||
return this.isRunning()
|
||||
});
|
||||
|
||||
/**
|
||||
* Read only reference containing the number of pending jobs
|
||||
* @type Number
|
||||
*/
|
||||
this.pending; // for api documentation only, is overwritten by getter below
|
||||
this.__defineGetter__("pending", function() {
|
||||
return queue.size()
|
||||
});
|
||||
|
||||
/**
|
||||
* Initializes the searcher
|
||||
* @private
|
||||
*/
|
||||
this.initSearcher = function() {
|
||||
searcher = new Packages.org.apache.lucene.search.IndexSearcher(indexDirectory);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the searcher of this index manager
|
||||
* @returns The searcher of this index manager
|
||||
* @type org.apache.lucene.search.IndexSearcher
|
||||
* @private
|
||||
*/
|
||||
this.getSearcher = function() {
|
||||
if (searcher === null) {
|
||||
this.initSearcher();
|
||||
}
|
||||
return searcher;
|
||||
};
|
||||
|
||||
/**
|
||||
* Main constructor body. Initializes the underlying index.
|
||||
*/
|
||||
var search = new helma.Search();
|
||||
var analyzer = helma.Search.getAnalyzer(lang);
|
||||
if (dir != null) {
|
||||
indexDirectory = search.getDirectory(new helma.File(dir, name));
|
||||
this.log("created/mounted " + indexDirectory);
|
||||
} else {
|
||||
indexDirectory = search.getRAMDirectory();
|
||||
this.log("created new RAM directory");
|
||||
}
|
||||
index = search.createIndex(indexDirectory, analyzer);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant defining the maximum number of tries to add/remove
|
||||
* an object to/from the underlying index.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.IndexManager.MAXTRIES = 10;
|
||||
|
||||
/**
|
||||
* Constant defining normal mode of this index manager.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.IndexManager.NORMAL = 1;
|
||||
|
||||
/**
|
||||
* Constant defining rebuilding mode of this index manager.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.IndexManager.REBUILDING = 2;
|
||||
|
||||
/**
|
||||
* Returns the milliseconds elapsed between the current timestamp
|
||||
* and the one passed as argument.
|
||||
* @returns The elapsed time in millis.
|
||||
* @type Number
|
||||
* @private
|
||||
*/
|
||||
jala.IndexManager.getRuntime = function(millis) {
|
||||
return java.lang.System.currentTimeMillis() - millis;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
jala.IndexManager.prototype.toString = function() {
|
||||
return "[" + this.constructor.name + " '" + this.getName() + "' (" +
|
||||
this.pending + " objects queued)]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper function that prefixes every log message with
|
||||
* the name of the IndexManager.
|
||||
* @param {String} level An optional logging level. Accepted values
|
||||
* @param {String} msg The log message
|
||||
* are "debug", "info", "warn" and "error".
|
||||
*/
|
||||
jala.IndexManager.prototype.log = function(/* msg, level */) {
|
||||
var level = "info", message;
|
||||
if (arguments.length == 2) {
|
||||
level = arguments[0];
|
||||
message = arguments[1];
|
||||
} else {
|
||||
message = arguments[0];
|
||||
}
|
||||
app.logger[level]("[" + this.constructor.name + " '" +
|
||||
this.getName() + "'] " + message);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Static helper method that returns the value of the "id"
|
||||
* field of a document object.
|
||||
* @param {helma.Search.Document} doc The document whose id
|
||||
* should be returned.
|
||||
* @private
|
||||
*/
|
||||
jala.IndexManager.prototype.getDocumentId = function(doc) {
|
||||
try {
|
||||
return doc.getField(this.getIdFieldname()).value;
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Queues the document object passed as argument for addition to the underlying
|
||||
* index. This includes that all existing documents with the same identifier will
|
||||
* be removed before the object passed as argument is added.
|
||||
* @param {helma.Search.Document} doc The document object that should be
|
||||
* added to the underlying index.
|
||||
* @returns True if the job was added successfully to the internal queue,
|
||||
* false otherwise.
|
||||
* @type Boolean
|
||||
* @see helma.Search.Document
|
||||
*/
|
||||
jala.IndexManager.prototype.add = function(doc) {
|
||||
var id;
|
||||
if (!doc) {
|
||||
this.log("error", "missing document object to add");
|
||||
return false;
|
||||
} else if ((id = this.getDocumentId(doc)) == null) {
|
||||
this.log("error", "document doesn't contain an Id field '" +
|
||||
this.getIdFieldname() + "'");
|
||||
return false;
|
||||
}
|
||||
// the job's callback function which actually adds the document to the index
|
||||
var callback = function() {
|
||||
var start = java.lang.System.currentTimeMillis();
|
||||
this.getIndex().updateDocument(doc, this.getIdFieldname());
|
||||
this.log("debug", "added document with Id " + id +
|
||||
" to index in " + jala.IndexManager.getRuntime(start) + " ms");
|
||||
return;
|
||||
}
|
||||
var job = new jala.IndexManager.Job(jala.IndexManager.Job.ADD, callback);
|
||||
this.getQueue().add(job);
|
||||
this.log("debug", "queued adding document " + id + " to index");
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Queues the removal of all index documents whose identifier value ("id" by default)
|
||||
* matches the number passed as argument.
|
||||
* @param {Number} id The identifier value
|
||||
* @returns True if the removal job was added successfully to the queue, false
|
||||
* otherwise.
|
||||
* @type Boolean
|
||||
*/
|
||||
jala.IndexManager.prototype.remove = function(id) {
|
||||
if (id === null || isNaN(id)) {
|
||||
this.log("error", "missing or invalid document id to remove");
|
||||
return false;
|
||||
}
|
||||
// the job's callback function which actually removes all documents
|
||||
// with the given id from the index
|
||||
var callback = function() {
|
||||
var start = java.lang.System.currentTimeMillis();
|
||||
this.getIndex().removeDocument(this.getIdFieldname(), parseInt(id, 10));
|
||||
this.log("debug", "removed document with Id " + id +
|
||||
" from index in " + jala.IndexManager.getRuntime(start) + " ms");
|
||||
};
|
||||
var job = new jala.IndexManager.Job(jala.IndexManager.Job.REMOVE, callback);
|
||||
this.getQueue().add(job);
|
||||
this.log("debug", "queued removal of document with Id " + id);
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Queues the optimization of the underlying index. Normally there is no need
|
||||
* to call this method explicitly, as the index will be optimized after all
|
||||
* queued jobs have been processed.
|
||||
* @returns True if the optimizing job was added, false otherwise, which means
|
||||
* that there is already an optimizing job waiting in the queue.
|
||||
* @type Boolean
|
||||
*/
|
||||
jala.IndexManager.prototype.optimize = function() {
|
||||
if (this.hasOptimizingJob()) {
|
||||
return false;
|
||||
}
|
||||
var callback = function() {
|
||||
var start = java.lang.System.currentTimeMillis();
|
||||
this.getIndex().optimize();
|
||||
this.log("optimized index in " + jala.IndexManager.getRuntime(start) + " ms");
|
||||
// re-open index searcher, so that changes are seen
|
||||
this.initSearcher();
|
||||
return;
|
||||
};
|
||||
var job = new jala.IndexManager.Job(jala.IndexManager.Job.OPTIMIZE, callback);
|
||||
this.getQueue().add(job);
|
||||
this.log("debug", "queued index optimization");
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Processes a single queued job
|
||||
* @param {Object} job
|
||||
* @private
|
||||
*/
|
||||
jala.IndexManager.prototype.processJob = function(job) {
|
||||
this.log("debug", job.type + " job has been in queue for " +
|
||||
jala.IndexManager.getRuntime(job.createtime.getTime()) +
|
||||
" ms, processing now...");
|
||||
try {
|
||||
job.callback.call(this);
|
||||
} catch (e) {
|
||||
this.log("error", "Exception while processing job " + job.type + ": " + e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Searches the underlying index using the searcher of this index manager
|
||||
* @param {helma.Search.Query|org.apache.lucene.search.Query} query The query
|
||||
* to execute. Can be either an instance of helma.Search.Query, or an instance
|
||||
* of org.apache.lucene.search.Query
|
||||
* @param {helma.Search.QueryFilter|org.apache.lucene.search.Filter} filter
|
||||
* An optional query filter
|
||||
* @param {Array} sortFields An optional array containing
|
||||
* org.apache.lucene.search.SortField instances to use for sorting the result
|
||||
* @returns A HitCollection containing the search results
|
||||
* @type helma.Search.HitCollection
|
||||
*/
|
||||
jala.IndexManager.prototype.search = function(query, filter, sortFields) {
|
||||
var pkg = Packages.org.apache.lucene;
|
||||
if (query == null || (!(query instanceof helma.Search.Query) &&
|
||||
!(query instanceof pkg.search.Query))) {
|
||||
throw "jala.IndexManager search(): missing or invalid query";
|
||||
} else if (query instanceof helma.Search.Query) {
|
||||
// unwrap query
|
||||
query = query.getQuery();
|
||||
}
|
||||
if (filter != null && filter instanceof helma.Search.QueryFilter) {
|
||||
// unwrap filter
|
||||
filter = filter.getFilter();
|
||||
}
|
||||
|
||||
var searcher = this.getSearcher();
|
||||
var analyzer = this.getIndex().getAnalyzer();
|
||||
var hits;
|
||||
if (sortFields != null && sortFields.length > 0) {
|
||||
// convert the array with sortfields to a java array
|
||||
var arr = java.lang.reflect.Array.newInstance(pkg.search.SortField, sortFields.length);
|
||||
sortFields.forEach(function(sortField, idx) {
|
||||
arr[idx] = sortField;
|
||||
});
|
||||
var sort = pkg.search.Sort(arr);
|
||||
if (filter) {
|
||||
hits = searcher.search(query, filter, sort);
|
||||
} else {
|
||||
hits = searcher.search(query, sort);
|
||||
}
|
||||
} else if (filter) {
|
||||
hits = searcher.search(query, filter);
|
||||
} else {
|
||||
hits = searcher.search(query);
|
||||
}
|
||||
this.log("debug", "Query: " + query.toString());
|
||||
return new helma.Search.HitCollection(hits);
|
||||
};
|
||||
|
||||
/**
|
||||
* Parses the query string passed as argument into a lucene Query instance
|
||||
* @param {String} queryStr The query string to parse
|
||||
* @param {Array} fields An array containing the names of the files to search in
|
||||
* @param {Object} boostMap An optional object containing properties whose name denotes
|
||||
* the name of the field to boost in the query, and the value the boost value.
|
||||
* @returns The query
|
||||
* @type org.apache.lucene.search.Query
|
||||
*/
|
||||
jala.IndexManager.prototype.parseQuery = function(queryStr, fields, boostMap) {
|
||||
if (queryStr == null || typeof(queryStr) !== "string") {
|
||||
throw "IndexManager.parseQuery(): missing or invalid query string";
|
||||
}
|
||||
if (fields == null || fields.constructor !== Array || fields.length < 1) {
|
||||
throw "IndexManager.parseQuery(): missing fields argument";
|
||||
}
|
||||
var query = null;
|
||||
var analyzer = this.getIndex().getAnalyzer();
|
||||
var pkg = Packages.org.apache.lucene;
|
||||
var map = null;
|
||||
if (boostMap != null) {
|
||||
// convert the javascript object into a HashMap
|
||||
map = new java.util.HashMap();
|
||||
for (var name in boostMap) {
|
||||
map.put(name, new java.lang.Float(boostMap[name]));
|
||||
}
|
||||
}
|
||||
var parser;
|
||||
try {
|
||||
if (fields.length > 1) {
|
||||
parser = new pkg.queryParser.MultiFieldQueryParser(fields, analyzer, map);
|
||||
} else {
|
||||
parser = new pkg.queryParser.QueryParser(fields, analyzer);
|
||||
}
|
||||
query = parser.parse(queryStr);
|
||||
} catch (e) {
|
||||
// ignore, but write a message to debug log
|
||||
app.logger.debug("Unable to construct search query '" + queryStr +
|
||||
"', reason: " + e);
|
||||
}
|
||||
return query;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parses the query passed as argument and returns a caching filter. If an array
|
||||
* with more than one query strings is passed as argument, this method constructs
|
||||
* a boolean query filter where all queries in the array must match.
|
||||
* @param {String|Array} query Either a query string, or an array containing
|
||||
* one or more query strings
|
||||
* @param {org.apache.lucene.analysis.Analyzer} analyzer Optional analyzer
|
||||
* to use when parsing the filter query
|
||||
* @returns A caching query filter
|
||||
* @type org.apache.lucene.search.CachingWrapperFilter
|
||||
*/
|
||||
jala.IndexManager.prototype.parseQueryFilter = function(query, analyzer) {
|
||||
var filter = null;
|
||||
if (query != null) {
|
||||
var pkg = Packages.org.apache.lucene;
|
||||
// use the index' analyzer if none has been specified
|
||||
if (analyzer == null) {
|
||||
analyzer = this.getIndex().getAnalyzer();
|
||||
}
|
||||
var parser = new pkg.queryParser.QueryParser("", analyzer);
|
||||
var filterQuery;
|
||||
try {
|
||||
if (query.constructor === Array) {
|
||||
if (query.length > 1) {
|
||||
filterQuery = new pkg.search.BooleanQuery();
|
||||
query.forEach(function(queryStr){
|
||||
filterQuery.add(parser.parse(queryStr), pkg.search.BooleanClause.Occur.MUST);
|
||||
}, this);
|
||||
} else {
|
||||
filterQuery = parser.parse(query[0]);
|
||||
}
|
||||
} else {
|
||||
filterQuery = parser.parse(query);
|
||||
}
|
||||
filter = new pkg.search.CachingWrapperFilter(new pkg.search.QueryWrapperFilter(filterQuery));
|
||||
} catch (e) {
|
||||
app.logger.debug("Unable to parse query filter '" + query + "', reason: " + e);
|
||||
}
|
||||
}
|
||||
return filter;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*********************
|
||||
***** J O B *****
|
||||
*********************/
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new Job instance.
|
||||
* @class Instances of this class represent a single index
|
||||
* manipulation job to be processed by the index manager.
|
||||
* @param {Number} id The Id of the job
|
||||
* @param {Number} type The type of job, which can be either
|
||||
* jala.IndexManager.Job.ADD, jala.IndexManager.Job.REMOVE
|
||||
* or jala.IndexManager.Job.OPTIMIZE.
|
||||
* @param {Object} data The data needed to process the job.
|
||||
* @returns A newly created Job instance.
|
||||
* @constructor
|
||||
* @see jala.IndexManager.Job
|
||||
*/
|
||||
jala.IndexManager.Job = function(type, callback) {
|
||||
/**
|
||||
* The type of the job
|
||||
* @type Number
|
||||
*/
|
||||
this.type = type;
|
||||
|
||||
/**
|
||||
* The data needed to process this job. For adding jobs this property
|
||||
* must contain the {@link helma.Search.Document} instance to add to
|
||||
* the index. For removal job this property must contain the unique identifier
|
||||
* of the document that should be removed from the index. For optimizing
|
||||
* jobs this property is null.
|
||||
*/
|
||||
this.callback = callback;
|
||||
|
||||
/**
|
||||
* An internal error counter which is increased whenever processing
|
||||
* the job failed.
|
||||
* @type Number
|
||||
* @see jala.IndexManager.MAXTRIES
|
||||
*/
|
||||
this.errors = 0;
|
||||
|
||||
/**
|
||||
* The date and time at which this job was created.
|
||||
* @type Date
|
||||
*/
|
||||
this.createtime = new Date();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
jala.IndexManager.Job.prototype.toString = function() {
|
||||
return "[Job (type: " + this.type + ")]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Constant defining an add job
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.IndexManager.Job.ADD = "add";
|
||||
|
||||
/**
|
||||
* Constant defining a removal job
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.IndexManager.Job.REMOVE = "remove";
|
||||
|
||||
/**
|
||||
* Constant defining an optimizing job
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.IndexManager.Job.OPTIMIZE = "optimize";
|
1130
modules/jala/code/ListRenderer.js
Normal file
1130
modules/jala/code/ListRenderer.js
Normal file
File diff suppressed because it is too large
Load diff
1521
modules/jala/code/Mp3.js
Normal file
1521
modules/jala/code/Mp3.js
Normal file
File diff suppressed because it is too large
Load diff
130
modules/jala/code/PodcastWriter.js
Normal file
130
modules/jala/code/PodcastWriter.js
Normal file
|
@ -0,0 +1,130 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.PodcastWriter class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Jala dependencies
|
||||
*/
|
||||
app.addRepository(getProperty("jala.dir", "modules/jala") +
|
||||
"/code/Rss20Writer.js");
|
||||
|
||||
/**
|
||||
* @class Class to create, modify and render standard-compliant
|
||||
* RSS 2.0 feeds including support for Apple's Podcast specification.
|
||||
* @constructor
|
||||
* @extends jala.Rss20Writer
|
||||
* @param {String} header Optional XML header.
|
||||
*/
|
||||
jala.PodcastWriter = function(header) {
|
||||
jala.Rss20Writer.apply(this, arguments);
|
||||
|
||||
var CATEGORY = {
|
||||
name: "itunes:category",
|
||||
attributes: {
|
||||
name: "text"
|
||||
}
|
||||
};
|
||||
|
||||
var OWNER = {
|
||||
name: "itunes:owner",
|
||||
value: [{
|
||||
name: "itunes:name"
|
||||
}, {
|
||||
name: "itunes:email"
|
||||
}]
|
||||
};
|
||||
|
||||
this.addNamespace("itunes", "http://www.itunes.com/dtds/podcast-1.0.dtd");
|
||||
|
||||
this.extendChannel([{
|
||||
name: "itunes:author"
|
||||
}, {
|
||||
name: "itunes:subtitle"
|
||||
}, {
|
||||
name: "itunes:summary"
|
||||
}, {
|
||||
name: "itunes:new-feed-url"
|
||||
}, {
|
||||
name: "itunes:image",
|
||||
attributes: [{
|
||||
name: "href"
|
||||
}]
|
||||
}, {
|
||||
name: "itunes:link",
|
||||
attributes: [{
|
||||
name: "rel"
|
||||
}, {
|
||||
name: "type"
|
||||
}, {
|
||||
name: "href"
|
||||
}]
|
||||
}]);
|
||||
|
||||
this.getChannel().setValue(this.createElement(OWNER));
|
||||
|
||||
this.extendItem([{
|
||||
name: "itunes:duration"
|
||||
}, {
|
||||
name: "itunes:subtitle"
|
||||
}]);
|
||||
|
||||
/**
|
||||
* Add an iTunes Podcast category.
|
||||
* @param {String} name The category's name.
|
||||
* @param {String} subName The (optional) sub-category's name.
|
||||
* @param {jala.XmlWriter.XmlElement} parent Optional parent
|
||||
* element to add the category to.
|
||||
*/
|
||||
this.addItunesCategory = function(name, subName, parent) {
|
||||
if (!parent)
|
||||
parent = this.getChannel();
|
||||
var cat = this.createElement(CATEGORY);
|
||||
cat.populate({attributes: {text: name}});
|
||||
if (subName) {
|
||||
var subCat = this.createElement(CATEGORY);
|
||||
subCat.populate({attributes: {text: subName}});
|
||||
cat.addValue(subCat);
|
||||
}
|
||||
parent.addValue(cat);
|
||||
return;
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
/** A typical XML header as default.
|
||||
@type {String}
|
||||
@final */
|
||||
jala.PodcastWriter.XMLHEADER = '<?xml version="1.0" encoding="UTF-8"?>';
|
307
modules/jala/code/RemoteContent.js
Normal file
307
modules/jala/code/RemoteContent.js
Normal file
|
@ -0,0 +1,307 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.RemoteContent class.
|
||||
*/
|
||||
|
||||
// HelmaLib dependencies
|
||||
app.addRepository("modules/core/String.js");
|
||||
app.addRepository("modules/core/Object.js");
|
||||
app.addRepository("modules/core/Date.js");
|
||||
app.addRepository("modules/helma/Http.js");
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new remote content handler.
|
||||
* @class API to define, fetch and update content
|
||||
* from a remote site.
|
||||
* @param {String} url The URL string of the remote site.
|
||||
* @param {Integer} method The method to retrieve the remote content.
|
||||
* @param {File} storage The cache directory.
|
||||
* @returns A new remote content handler.
|
||||
* @extends helma.Http
|
||||
* @constructor
|
||||
*/
|
||||
jala.RemoteContent = function(url, method, storage) {
|
||||
if (typeof PropertyMgr == "undefined")
|
||||
var PropertyMgr = {};
|
||||
|
||||
var NULLSTR = "";
|
||||
var key = url.md5();
|
||||
var fname = key + jala.RemoteContent.SUFFIX;
|
||||
var cache;
|
||||
method = (method != null ? method.toLowerCase() : null);
|
||||
|
||||
// depending on the method argument the instance
|
||||
// becomes extent of the appropriate remote client
|
||||
switch (method) {
|
||||
case jala.RemoteContent.XMLRPC:
|
||||
break;
|
||||
default:
|
||||
helma.Http.call(this);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!storage) {
|
||||
storage = jala.RemoteContent.CACHEDIR;
|
||||
if (!storage.exists() || !storage.isDirectory())
|
||||
storage.mkdir(storage.getAbsolutePath());
|
||||
}
|
||||
|
||||
var getCache = function() {
|
||||
switch (storage.constructor) {
|
||||
case HopObject:
|
||||
cache = storage;
|
||||
break;
|
||||
|
||||
case PropertyMgr:
|
||||
cache = storage.getAll();
|
||||
break;
|
||||
|
||||
default:
|
||||
var f = new File(storage, fname);
|
||||
cache = f.exists() ? Xml.read(f) : new HopObject();
|
||||
}
|
||||
return cache;
|
||||
};
|
||||
|
||||
var setCache = function() {
|
||||
cache.url = url;
|
||||
cache.method = method;
|
||||
if (!cache.interval) {
|
||||
cache.interval = Date.ONEHOUR;
|
||||
}
|
||||
cache.lastUpdate = new Date();
|
||||
cache = cache.clone(new HopObject());
|
||||
|
||||
switch (storage.constructor) {
|
||||
case HopObject:
|
||||
for (var i in cache)
|
||||
storage[i] = cache[i];
|
||||
break;
|
||||
|
||||
case PropertyMgr:
|
||||
storage.setAll(cache);
|
||||
break;
|
||||
|
||||
default:
|
||||
var f = new File(storage, fname);
|
||||
Xml.write(cache, f);
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
cache = getCache();
|
||||
|
||||
/**
|
||||
* Set the interval the remote content's
|
||||
* cache is bound to be updated.
|
||||
* @param {Number} interval The interval value in milliseconds.
|
||||
*/
|
||||
this.setInterval = function(interval) {
|
||||
cache.interval = parseInt(interval, 10);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get an arbitrary property of the remote content.
|
||||
* @param {String} key The name of the property.
|
||||
* @returns The value of the property.
|
||||
*/
|
||||
this.get = function(key) {
|
||||
return cache[key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all available property names.
|
||||
* @returns The list of property names.
|
||||
* @type Array
|
||||
*/
|
||||
this.getKeys = function() {
|
||||
var keys = [];
|
||||
for (var i in cache) {
|
||||
keys.push(i);
|
||||
}
|
||||
return keys.sort();
|
||||
};
|
||||
|
||||
/**
|
||||
* Tests whether the remote content needs to be updated.
|
||||
* @returns True if the remote content needs to be updated.
|
||||
* @type Boolean
|
||||
*/
|
||||
this.needsUpdate = function() {
|
||||
if (!cache.lastUpdate) {
|
||||
return true;
|
||||
} else {
|
||||
var max = new Date() - cache.interval;
|
||||
if (max - cache.lastUpdate > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the updated and cached remote content.
|
||||
* @returns The content as retrieved from the remote site.
|
||||
* @type String
|
||||
*/
|
||||
this.update = function() {
|
||||
app.debug("[jala.RemoteContent] Retrieving " + url);
|
||||
var result;
|
||||
switch (method) {
|
||||
case jala.RemoteContent.XMLRPC:
|
||||
break;
|
||||
default:
|
||||
result = this.getUrl(url, cache.lastModified || cache.eTag);
|
||||
if (result.code != 200 && cache.content) {
|
||||
// preserve the content received before
|
||||
result.content = cache.content;
|
||||
}
|
||||
result.interval = cache.interval;
|
||||
cache = result;
|
||||
}
|
||||
setCache();
|
||||
return cache.content;
|
||||
};
|
||||
|
||||
/**
|
||||
* Flushes (empties) the cached remote content.
|
||||
*/
|
||||
this.clear = function() {
|
||||
switch (storage.constructor) {
|
||||
case HopObject:
|
||||
for (var i in storage)
|
||||
delete storage[i];
|
||||
break;
|
||||
|
||||
case PropertyMgr:
|
||||
storage.reset();
|
||||
break;
|
||||
|
||||
default:
|
||||
var f = new File(storage, fname);
|
||||
f.remove();
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a string representation of the remote content.
|
||||
* @returns The remote content as string.
|
||||
* @type String
|
||||
*/
|
||||
this.toString = function() {
|
||||
return cache.content || NULLSTR;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the value of the remote content.
|
||||
* @returns The remote content including response header data.
|
||||
* @type Object
|
||||
*/
|
||||
this.valueOf = function() {
|
||||
return cache;
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* A constant representing the HTTP retrieval method.
|
||||
* @type int
|
||||
* @final
|
||||
*/
|
||||
jala.RemoteContent.HTTP = 1;
|
||||
|
||||
/**
|
||||
* A constant representing the XML-RPC retrieval method.
|
||||
* @type int
|
||||
* @final
|
||||
*/
|
||||
jala.RemoteContent.XMLRPC = 2;
|
||||
|
||||
/**
|
||||
* The default name of the cache directory.
|
||||
* @type String
|
||||
* @final
|
||||
*/
|
||||
jala.RemoteContent.SUFFIX = ".cache";
|
||||
|
||||
/**
|
||||
* The default cache directory.
|
||||
* @type File
|
||||
* @final
|
||||
*/
|
||||
jala.RemoteContent.CACHEDIR = new File(app.dir, jala.RemoteContent.SUFFIX);
|
||||
|
||||
/**
|
||||
* Remove all remote content from a file-based cache.
|
||||
* @param {File} cache An optional target directory.
|
||||
*/
|
||||
jala.RemoteContent.flush = function(cache) {
|
||||
jala.RemoteContent.forEach(function(rc) {
|
||||
rc.clear();
|
||||
return;
|
||||
});
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Apply a custom method on all remote content in a file-based cache.
|
||||
* @param {Function} callback The callback method to be executed
|
||||
* for each remote content file.
|
||||
* @param {File} cache An optional target directory.
|
||||
*/
|
||||
jala.RemoteContent.forEach = function(callback, cache) {
|
||||
if (!cache)
|
||||
cache = jala.RemoteContent.CACHEDIR;
|
||||
var f, rc;
|
||||
var files = cache.list();
|
||||
for (var i in files) {
|
||||
f = new File(cache, files[i]);
|
||||
if (!files[i].endsWith(jala.RemoteContent.SUFFIX))
|
||||
continue;
|
||||
rc = new jala.RemoteContent(Xml.read(f).url);
|
||||
if (callback && callback.constructor == Function)
|
||||
callback(rc);
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Apply a custom method on all remote content in a file-based cache.
|
||||
* @param {Function} callback The callback method to be executed
|
||||
* for each remote content file.
|
||||
* @param {File} cache An optional target directory.
|
||||
* @deprecated Use {@link #forEach} instead.
|
||||
*/
|
||||
jala.RemoteContent.exec = function() {
|
||||
jala.RemoteContent.forEach.apply(this, arguments);
|
||||
};
|
334
modules/jala/code/Rss20Writer.js
Normal file
334
modules/jala/code/Rss20Writer.js
Normal file
|
@ -0,0 +1,334 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.Rss20Writer class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Jala dependencies
|
||||
*/
|
||||
app.addRepository(getProperty("jala.dir", "modules/jala") +
|
||||
"/code/XmlWriter.js");
|
||||
|
||||
/**
|
||||
* @class Class to create, modify and render standard-compliant
|
||||
* RSS 2.0 feeds.
|
||||
* @constructor
|
||||
* @extends jala.XmlWriter
|
||||
* @param {String} header Optional XML header.
|
||||
*/
|
||||
jala.Rss20Writer = function(header) {
|
||||
// defines the prototype of this constructor
|
||||
jala.XmlWriter.apply(this, arguments);
|
||||
|
||||
// this should do the same but alas, helma throws
|
||||
// an error the very first time it is executed:
|
||||
//arguments.callee.prototype = new jala.XmlWriterInterface();
|
||||
|
||||
var DATEFMT = "EEE, dd MMM yyyy HH:mm:ss Z";
|
||||
|
||||
var CATEGORY = {
|
||||
name: "category",
|
||||
amount: Infinity,
|
||||
attributes: {
|
||||
name: "domain",
|
||||
}
|
||||
};
|
||||
|
||||
var ITEM = {
|
||||
name: "item",
|
||||
amount: Infinity,
|
||||
value: [{
|
||||
name: "title",
|
||||
required: true
|
||||
}, {
|
||||
name: "link",
|
||||
}, {
|
||||
name: "description",
|
||||
}, {
|
||||
name: "author",
|
||||
}, {
|
||||
name: "comments",
|
||||
}, {
|
||||
name: "enclosure",
|
||||
attributes: [{
|
||||
name: "url",
|
||||
required: true
|
||||
}, {
|
||||
name: "length",
|
||||
required: true
|
||||
}, {
|
||||
name: "type",
|
||||
required: true
|
||||
}]
|
||||
}, {
|
||||
name: "guid",
|
||||
attributes: [{
|
||||
name: "isPermaLink",
|
||||
type: Boolean
|
||||
}]
|
||||
}, {
|
||||
name: "pubDate",
|
||||
type: Date,
|
||||
format: DATEFMT
|
||||
}, {
|
||||
name: "source",
|
||||
attributes: [{
|
||||
name: "url",
|
||||
required: true
|
||||
}]
|
||||
}]
|
||||
};
|
||||
|
||||
var CHANNEL = {
|
||||
name: "channel",
|
||||
value: [{
|
||||
name: "title",
|
||||
required: true
|
||||
}, {
|
||||
name: "link",
|
||||
required: true
|
||||
}, {
|
||||
name: "description",
|
||||
required: true
|
||||
}, {
|
||||
name: "language",
|
||||
}, {
|
||||
name: "copyright",
|
||||
}, {
|
||||
name: "managingEditor",
|
||||
}, {
|
||||
name: "webMaster",
|
||||
}, {
|
||||
name: "pubDate",
|
||||
type: Date,
|
||||
format: DATEFMT
|
||||
}, {
|
||||
name: "lastBuildDate",
|
||||
type: Date,
|
||||
format: DATEFMT
|
||||
}, {
|
||||
name: "generator",
|
||||
}, {
|
||||
name: "docs",
|
||||
}, {
|
||||
name: "cloud",
|
||||
attributes: [{
|
||||
name: "domain",
|
||||
}, {
|
||||
name: "port",
|
||||
type: Number,
|
||||
format: "#"
|
||||
}, {
|
||||
name: "path",
|
||||
}, {
|
||||
name: "registerProcedure",
|
||||
}, {
|
||||
name: "protocol",
|
||||
}]
|
||||
}, {
|
||||
name: "ttl",
|
||||
type: Number,
|
||||
format: "#"
|
||||
}, {
|
||||
name: "rating",
|
||||
}, {
|
||||
name: "skipHours",
|
||||
}, {
|
||||
name: "skipDays",
|
||||
}]
|
||||
};
|
||||
|
||||
var IMAGE = {
|
||||
name: "image",
|
||||
value: [{
|
||||
name: "url",
|
||||
required: true
|
||||
}, {
|
||||
name: "title",
|
||||
required: true
|
||||
}, {
|
||||
name: "link",
|
||||
required: true
|
||||
}, {
|
||||
name: "width",
|
||||
type: Number,
|
||||
format: "#"
|
||||
}, {
|
||||
name: "height",
|
||||
type: Number,
|
||||
format: "#"
|
||||
}, {
|
||||
name: "description",
|
||||
}]
|
||||
};
|
||||
|
||||
var TEXTINPUT = {
|
||||
name: "textinput",
|
||||
value: [{
|
||||
name: "title",
|
||||
required: true
|
||||
}, {
|
||||
name: "description",
|
||||
required: true
|
||||
}, {
|
||||
name: "name",
|
||||
required: true
|
||||
}, {
|
||||
name: "link",
|
||||
required: true
|
||||
}]
|
||||
};
|
||||
|
||||
var ROOT = {
|
||||
name: "rss",
|
||||
attributes: [{
|
||||
name: "version",
|
||||
value: "2.0"
|
||||
}]
|
||||
};
|
||||
|
||||
var xmlroot = this.createElement(ROOT);
|
||||
var channel = this.createElement(CHANNEL);
|
||||
xmlroot.setValue(channel);
|
||||
|
||||
/**
|
||||
* Get the writer's root element.
|
||||
* @returns The writer's root element.
|
||||
* @type jala.XmlWriter.XmlElement
|
||||
*/
|
||||
this.getRoot = function() {
|
||||
return xmlroot;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add child elements to the channel template.
|
||||
* @param {Array} ext List of additional child elements.
|
||||
*/
|
||||
this.extendChannel = function(ext) {
|
||||
this.extend(CHANNEL, ext);
|
||||
channel = this.createElement(CHANNEL);
|
||||
xmlroot.setValue(channel);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the writer's channel element.
|
||||
* @returns The writer's channel element.
|
||||
* @type jala.XmlWriter.XmlElement
|
||||
*/
|
||||
this.getChannel = function() {
|
||||
return channel;
|
||||
};
|
||||
|
||||
/**
|
||||
* Populate the channel element with data.
|
||||
* @param {Object} data An XmlWriter-compliant object structure.
|
||||
* @returns The populated channel element.
|
||||
* @type jala.XmlWriter.XmlElement
|
||||
*/
|
||||
this.setChannel = function(data) {
|
||||
return channel.populate(data);
|
||||
};
|
||||
|
||||
/**
|
||||
* Add child elements to the item template.
|
||||
* @param {Array} ext List of additional child elements.
|
||||
*/
|
||||
this.extendItem = function(ext) {
|
||||
this.extend(ITEM, ext);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a new and innocent item element.
|
||||
* @param {Object} data An XmlWriter-compliant object structure.
|
||||
* @returns A new and innocent item element.
|
||||
* @type jala.XmlWriter.XmlElement
|
||||
*/
|
||||
this.createItem = function(data) {
|
||||
var item = this.createElement(ITEM);
|
||||
item.populate(data);
|
||||
return item;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add an item element to the channel element.
|
||||
* @param {jala.XmlWriter.XmlElement} item The item element to add.
|
||||
*/
|
||||
this.addItem = function(item) {
|
||||
channel.addValue(item);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add a category element to an arbitrary element.
|
||||
* @param {String} name The name of the category.
|
||||
* @param {String} domain The domain of the category.
|
||||
* @param {jala.XmlWriter.XmlElement} parent The optional parent element.
|
||||
*/
|
||||
this.addCategory = function(name, domain, parent) {
|
||||
if (!parent)
|
||||
parent = channel;
|
||||
var cat = this.createElement(CATEGORY);
|
||||
cat.populate({
|
||||
value: name,
|
||||
attributes: {domain: domain}
|
||||
});
|
||||
parent.addValue(cat);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Populate the image element with data.
|
||||
* @param {Object} data An XmlWriter-compliant object structure.
|
||||
*/
|
||||
this.setImage = function(data) {
|
||||
var image = this.createElement(IMAGE);
|
||||
image.populate(data);
|
||||
channel.setValue(image);
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Populate the textInput element with data.
|
||||
* @param {Object} data An XmlWriter-compliant object structure.
|
||||
*/
|
||||
this.setTextInput = function(data) {
|
||||
var textInput = this.createElement(TEXTINPUT);
|
||||
textInput.populate(data);
|
||||
channel.setValue(textInput);
|
||||
return;
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
246
modules/jala/code/Utilities.js
Normal file
246
modules/jala/code/Utilities.js
Normal file
|
@ -0,0 +1,246 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.Utilities class.
|
||||
*/
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* HelmaLib dependencies
|
||||
*/
|
||||
app.addRepository("modules/core/Number.js");
|
||||
|
||||
/**
|
||||
* Construct a utility object.
|
||||
* @class This class contains various convenience methods
|
||||
* which do not fit in any other class.
|
||||
* @returns A new utitilty object.
|
||||
* @constructor
|
||||
*/
|
||||
jala.Utilities = function() {
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a string representation of the utitility class.
|
||||
* @returns [jala.Utilities]
|
||||
* @type String
|
||||
*/
|
||||
jala.Utilities.toString = function() {
|
||||
return "[jala.Utilities]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a string representation of the utitility object.
|
||||
* @returns [jala.Utilities Object]
|
||||
* @type String
|
||||
*/
|
||||
jala.Utilities.prototype.toString = function() {
|
||||
return "[jala.Utilities Object]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Default utility class instance.
|
||||
* @type jala.Utilities
|
||||
* @final
|
||||
*/
|
||||
jala.util = new jala.Utilities();
|
||||
|
||||
/**
|
||||
* Creates a random password with different levels of security.
|
||||
* @param {Number} len The length of the password (default: 8)
|
||||
* @param {Number} level The security level
|
||||
* <ul>
|
||||
* <li>0 - containing only vowels or consonants (default)</li>
|
||||
* <li>1 - throws in a number at random position</li>
|
||||
* <li>2 - throws in a number and a special character at random position</li>
|
||||
* </ul>
|
||||
* @returns The resulting password
|
||||
* @type String
|
||||
*/
|
||||
jala.Utilities.prototype.createPassword = function(len, level) {
|
||||
len = len || 8;
|
||||
level = level || 0;
|
||||
|
||||
var LETTERSONLY = 0;
|
||||
var WITHNUMBERS = 1;
|
||||
var WITHSPECIALS = 2;
|
||||
|
||||
var vowels = ['a', 'e', 'i', 'o', 'u'];
|
||||
var consonants = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z'];
|
||||
var specials = ['.', '#', '!', '$', '%', '&', '?'];
|
||||
|
||||
var posNum = level > LETTERSONLY ? Math.floor(Math.random() * (len - 2)) : -1;
|
||||
var posSpecial = level > WITHNUMBERS ? Math.floor(Math.random() * (len - 3)) : -2;
|
||||
if (posNum == posSpecial) {
|
||||
posSpecial += 1;
|
||||
}
|
||||
|
||||
res.push();
|
||||
// loop to create characters:
|
||||
var i, rnd;
|
||||
for (i=0; i<(len-level); i+=1) {
|
||||
if(i % 2 == 0) {
|
||||
// every 2nd one is a vowel
|
||||
rnd = Math.floor(Math.random() * vowels.length);
|
||||
res.write(vowels[rnd]);
|
||||
} else {
|
||||
// every 2nd one is a consonant
|
||||
rnd = Math.floor(Math.random() * consonants.length);
|
||||
res.write(consonants[rnd]);
|
||||
}
|
||||
if (i == posNum) {
|
||||
// increased password security:
|
||||
// throw in a number at random
|
||||
rnd = Math.floor(Math.random() * specials.length);
|
||||
res.write(String(rnd + 1));
|
||||
}
|
||||
if (i == posSpecial) {
|
||||
// increased password security:
|
||||
// throw in a number at random
|
||||
rnd = Math.floor(Math.random() * specials.length);
|
||||
res.write(specials[rnd]);
|
||||
}
|
||||
}
|
||||
return res.pop();
|
||||
};
|
||||
|
||||
/**
|
||||
* Static field indicating a removed object property.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.Utilities.VALUE_REMOVED = -1;
|
||||
|
||||
/**
|
||||
* Static field indicating ad added object property.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.Utilities.VALUE_ADDED = 1;
|
||||
|
||||
/**
|
||||
* Static field indicating a modified object property.
|
||||
* @type Number
|
||||
* @final
|
||||
*/
|
||||
jala.Utilities.VALUE_MODIFIED = 2;
|
||||
|
||||
/**
|
||||
* Returns an array containing the properties that are
|
||||
* added, removed or modified in one object compared to another.
|
||||
* @param {Object} obj1 The first of two objects which should be compared
|
||||
* @param {Object} obj2 The second of two objects which should be compared
|
||||
* @returns An Object containing all properties that are added, removed
|
||||
* or modified in the second object compared to the first.
|
||||
* Each property contains a status field with an integer value
|
||||
* which can be checked against the static jala.Utility fields
|
||||
* VALUE_ADDED, VALUE_MODIFIED and VALUE_REMOVED.
|
||||
* @type Object
|
||||
*/
|
||||
jala.Utilities.prototype.diffObjects = function(obj1, obj2) {
|
||||
var childDiff, value1, value2;
|
||||
var diff = {};
|
||||
var foundDiff = false;
|
||||
|
||||
for (var propName in obj1) {
|
||||
if (obj2[propName] === undefined || obj2[propName] === "" || obj2[propName] === null) {
|
||||
diff[propName] = {status: jala.Utilities.VALUE_REMOVED};
|
||||
foundDiff = true;
|
||||
}
|
||||
}
|
||||
for (var propName in obj2) {
|
||||
value1 = obj1[propName];
|
||||
value2 = obj2[propName];
|
||||
if (value1 == null) {
|
||||
diff[propName] = {status: jala.Utilities.VALUE_ADDED,
|
||||
value: value2};
|
||||
foundDiff = true;
|
||||
} else {
|
||||
switch (value2.constructor) {
|
||||
case HopObject:
|
||||
case Object:
|
||||
if (childDiff = this.diffObjects(value1, value2)) {
|
||||
diff[propName] = childDiff;
|
||||
foundDiff = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (value2 != null && value2 !== "") {
|
||||
if (value1 === null || value1 === undefined || value1 === "") {
|
||||
diff[propName] = {status: jala.Utilities.VALUE_ADDED,
|
||||
value: value2};
|
||||
foundDiff = true;
|
||||
} else if (value1 != value2) {
|
||||
diff[propName] = {status: jala.Utilities.VALUE_MODIFIED,
|
||||
value: value2};
|
||||
foundDiff = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return foundDiff ? diff : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Patches an object with a "diff" object created by the
|
||||
* {@link #diffObjects} method.
|
||||
* Please mind that this method is recursive, it descends
|
||||
* along the "diff" object structure.
|
||||
* @param {Object} obj The Object the diff should be applied to
|
||||
* @param {Object} diff A "diff" object created by the {@link #diffObjects} method
|
||||
* @returns The patched Object with all differences applied
|
||||
* @type Object
|
||||
*/
|
||||
jala.Utilities.prototype.patchObject = function(obj, diff) {
|
||||
var propDiff, value1;
|
||||
for (var propName in diff) {
|
||||
propDiff = diff[propName];
|
||||
value1 = obj[propName];
|
||||
if (propDiff.status != null) {
|
||||
switch (propDiff.status) {
|
||||
case jala.Utilities.VALUE_REMOVED:
|
||||
// app.debug("applyDiff(): removing property " + propName);
|
||||
delete obj[propName];
|
||||
break;
|
||||
case jala.Utilities.VALUE_ADDED:
|
||||
case jala.Utilities.VALUE_MODIFIED:
|
||||
default:
|
||||
// app.debug("applyDiff(): changing property " + propName + " to " + propDiff.value);
|
||||
obj[propName] = propDiff.value;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// app.debug("applyDiff(): descending to child object " + propName);
|
||||
this.patchObject(value1, propDiff);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
461
modules/jala/code/XmlRpcRequest.js
Normal file
461
modules/jala/code/XmlRpcRequest.js
Normal file
|
@ -0,0 +1,461 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.XmlRpcRequest class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A constructor for XmlRpc request objects
|
||||
* @class Instances of this class provide the necessary functionality
|
||||
* for issueing XmlRpc requests to a remote service.
|
||||
* @param {String} url The url of the XmlRpc entry point
|
||||
* @param {String} methodName The name of the method to call
|
||||
* @returns A newly created jala.XmlRpcRequest instance
|
||||
* @constructor
|
||||
*/
|
||||
jala.XmlRpcRequest = function(url, methodName) {
|
||||
/** @ignore */
|
||||
var proxy = null;
|
||||
/** @ignore */
|
||||
var timeout = {
|
||||
"connect": 0,
|
||||
"socket": 0
|
||||
};
|
||||
/** @ignore */
|
||||
var debug = false;
|
||||
/** @ignore */
|
||||
var credentials = null;
|
||||
// default input and output encoding
|
||||
/** @ignore */
|
||||
var inputEncoding = "UTF-8";
|
||||
/** @ignore */
|
||||
var outputEncoding = "UTF-8";
|
||||
|
||||
/**
|
||||
* Returns the URL of this request
|
||||
* @returns The URL of this request
|
||||
* @type java.net.URL
|
||||
*/
|
||||
this.getUrl = function() {
|
||||
return new java.net.URL(url);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the proxy host and port. For Java runtimes < 1.5 this method
|
||||
* sets the appropriate system properties (so this has an effect on
|
||||
* all requests based on java.net.URL), for all others the proxy
|
||||
* is only set for this request.
|
||||
* @param {String} proxyString The proxy string in the form 'fqdn:port'
|
||||
* (eg. my.proxy.com:3128)
|
||||
*/
|
||||
this.setProxy = function(proxyString) {
|
||||
if (proxyString && proxyString.trim()) {
|
||||
var idx = proxyString.indexOf(":");
|
||||
if (idx > 0) {
|
||||
var host = proxyString.substring(0, idx);
|
||||
var port = proxyString.substring(idx+1);
|
||||
if (host != null && port != null) {
|
||||
if (java.lang.Class.forName("java.net.Proxy") != null) {
|
||||
// construct a proxy instance
|
||||
var socket = new java.net.InetSocketAddress(host, port);
|
||||
proxy = new java.net.Proxy(java.net.Proxy.Type.HTTP, socket);
|
||||
} else {
|
||||
// the pre jdk1.5 way: set the system properties
|
||||
var sys = java.lang.System.getProperties();
|
||||
if (host) {
|
||||
app.log("[Jala XmlRpc Client] WARNING: setting system http proxy to "
|
||||
+ host + ":" + port);
|
||||
sys.put("http.proxySet", "true");
|
||||
sys.put("http.proxyHost", host);
|
||||
sys.put("http.proxyPort", port);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the proxy object. This method will only return
|
||||
* a value if using a java runtime > 1.5
|
||||
* @returns The proxy to use for this request
|
||||
* @type java.net.Proxy
|
||||
* @see #setProxy
|
||||
*/
|
||||
this.getProxy = function() {
|
||||
return proxy;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the credentials for basic http authentication to
|
||||
* use with this request.
|
||||
* @param {String} username The username
|
||||
* @param {String} password The password
|
||||
*/
|
||||
this.setCredentials = function(username, password) {
|
||||
var str = new java.lang.String(username + ":" + password);
|
||||
credentials = (new Packages.sun.misc.BASE64Encoder()).encode(str.getBytes());
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the credentials of this request
|
||||
* @returns The base46 encoded credentials of this request
|
||||
* @type String
|
||||
*/
|
||||
this.getCredentials = function() {
|
||||
return credentials;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the connection timeout to the specified milliseconds.
|
||||
* @param {Number} millis The timeout to use as connection timeout
|
||||
*/
|
||||
this.setTimeout = function(millis) {
|
||||
timeout.connect = millis;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the socket timeout to the specified milliseconds.
|
||||
* @param {Number} millis The timeout to use as socket timeout
|
||||
*/
|
||||
this.setReadTimeout = function(millis) {
|
||||
timeout.socket = millis;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the connection timeout of this request
|
||||
* @returns The connection timeout value in milliseconds
|
||||
* @type Number
|
||||
*/
|
||||
this.getTimeout = function() {
|
||||
return timeout.connect;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the socket timeout of this request
|
||||
* @returns The socket timeout value in milliseconds
|
||||
* @type Number
|
||||
*/
|
||||
this.getReadTimeout = function() {
|
||||
return timeout.socket;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the name of the remote function to call
|
||||
* @returns The name of the remote function
|
||||
* @type String
|
||||
*/
|
||||
this.getMethodName = function() {
|
||||
return methodName;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets both input and output encoding to the
|
||||
* specified encoding string
|
||||
* @param {String} enc The encoding to use for
|
||||
* both input and output. This must be a valid
|
||||
* java encoding string.
|
||||
*/
|
||||
this.setEncoding = function(enc) {
|
||||
inputEncoding = enc;
|
||||
outputEncoding = enc;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the input encoding to the specified encoding string
|
||||
* @param {String} enc The encoding to use for input. This must be a valid
|
||||
* java encoding string.
|
||||
*/
|
||||
this.setInputEncoding = function(enc) {
|
||||
inputEncoding = enc;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the output encoding to the specified encoding string
|
||||
* @param {String} enc The encoding to use for output. This must be a valid
|
||||
* java encoding string.
|
||||
*/
|
||||
this.setOutputEncoding = function(enc) {
|
||||
outputEncoding = enc;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the input encoding
|
||||
* @returns The input encoding used by this request
|
||||
* @type String
|
||||
*/
|
||||
this.getInputEncoding = function() {
|
||||
return inputEncoding;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the output encoding
|
||||
* @returns The output encoding used by this request
|
||||
* @type String
|
||||
*/
|
||||
this.getOutputEncoding = function() {
|
||||
return outputEncoding;
|
||||
};
|
||||
|
||||
/**
|
||||
* Enables or disables the debug mode. If enabled the xml source
|
||||
* of both request and response is included in the result properties
|
||||
* 'requestXml' and 'responseXml'
|
||||
* @param {Boolean} flag True or false.
|
||||
*/
|
||||
this.setDebug = function(flag) {
|
||||
debug = flag;
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if debug is enabled for this request, false otherwise
|
||||
* @returns True if debugging is enabled, false otherwise
|
||||
* @type Boolean
|
||||
*/
|
||||
this.debug = function() {
|
||||
return debug == true;
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
jala.XmlRpcRequest.prototype.toString = function() {
|
||||
return "[Jala XmlRpc Request]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Calling this method executes the remote method using
|
||||
* the arguments specified.
|
||||
* @returns The result of this XmlRpc request
|
||||
* @type Object
|
||||
*/
|
||||
jala.XmlRpcRequest.prototype.execute = function(/** [arg1][, arg2][, ...] */) {
|
||||
// if in debug mode, log the time the request took to event log
|
||||
if (app.__app__.debug() == true) {
|
||||
var start = new Date();
|
||||
}
|
||||
|
||||
var tz = java.util.TimeZone.getDefault();
|
||||
var reqProcessor = new Packages.org.apache.xmlrpc.XmlRpcClientRequestProcessor(tz);
|
||||
var resProcessor = new Packages.org.apache.xmlrpc.XmlRpcClientResponseProcessor(tz);
|
||||
// create the result object
|
||||
var result = {
|
||||
error: null,
|
||||
result: null,
|
||||
requestXml: null,
|
||||
responseXml: null
|
||||
};
|
||||
|
||||
// convert arguments into their appropriate java representations
|
||||
var params = new java.util.Vector();
|
||||
for (var i=0;i<arguments.length;i++) {
|
||||
params.add(jala.XmlRpcRequest.convertArgument(arguments[i]));
|
||||
}
|
||||
|
||||
var r = new Packages.org.apache.xmlrpc.XmlRpcRequest(this.getMethodName(), params);
|
||||
var requestBytes = reqProcessor.encodeRequestBytes(r, this.getOutputEncoding());
|
||||
if (this.debug() == true) {
|
||||
result.requestXml = String(new java.lang.String(requestBytes));
|
||||
}
|
||||
// open the connection
|
||||
var proxy = this.getProxy();
|
||||
var url = this.getUrl();
|
||||
var conn = proxy ? url.openConnection(proxy) : url.openConnection();
|
||||
conn.setAllowUserInteraction(false);
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setRequestProperty("User-Agent", "Jala XmlRpc Client");
|
||||
conn.setRequestProperty("Content-Type", "text/xml");
|
||||
conn.setRequestProperty("Content-Length", requestBytes.length);
|
||||
// set timeouts if defined and possible
|
||||
if (parseFloat(java.lang.System.getProperty("java.specification.version"), 10) >= 1.5) {
|
||||
conn.setConnectTimeout(this.getTimeout());
|
||||
conn.setReadTimeout(this.getReadTimeout());
|
||||
} else {
|
||||
app.logger.debug("WARNING: timeouts can only be using a Java runtime >= 1.5");
|
||||
}
|
||||
// set authentication credentials if defined
|
||||
if (this.getCredentials() != null) {
|
||||
conn.setRequestProperty("Authorization", "Basic " + this.getCredentials());
|
||||
}
|
||||
|
||||
try {
|
||||
conn.setDoOutput(true);
|
||||
var outStream = conn.getOutputStream();
|
||||
outStream["write(byte[])"](requestBytes);
|
||||
outStream.flush();
|
||||
outStream.close();
|
||||
|
||||
if (conn.getContentLength() > 0) {
|
||||
var inStream = conn.getInputStream();
|
||||
if (this.debug() == true) {
|
||||
inStream = new java.io.BufferedInputStream(conn.getInputStream());
|
||||
var outStream = new java.io.ByteArrayOutputStream();
|
||||
var buf = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
|
||||
var bytes;
|
||||
while ((bytes = inStream.read(buf)) > -1) {
|
||||
outStream.write(buf, 0, bytes);
|
||||
}
|
||||
result.responseXml = outStream.toString(this.getInputEncoding());
|
||||
inStream.close();
|
||||
// change the inStream and don't set the input encoding of
|
||||
// the response processor, since the conversion already happened above
|
||||
inStream = new java.io.ByteArrayInputStream(outStream.toByteArray());
|
||||
}
|
||||
resProcessor.setInputEncoding(this.getInputEncoding());
|
||||
var parsedResult = resProcessor.decodeResponse(inStream);
|
||||
if (parsedResult instanceof java.lang.Exception) {
|
||||
result.error = parsedResult;
|
||||
} else {
|
||||
result.result = jala.XmlRpcRequest.convertResult(parsedResult);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
result.error = "[Jala XmlRpc Request] Error executing " + this.getMethodName()
|
||||
+ " with arguments " + jala.XmlRpcRequest.argumentsToString(arguments)
|
||||
+ ", the error is: " + e.toString();
|
||||
}
|
||||
if (app.__app__.debug() == true) {
|
||||
app.logger.debug("[Jala XmlRpc Request] (" + ((new Date()) - start) + " ms): executed '"
|
||||
+ this.getMethodName() + "' with arguments: "
|
||||
+ jala.XmlRpcRequest.argumentsToString(arguments));
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper method for converting a Javascript object into
|
||||
* its appropriate Java object.
|
||||
* @param {Object} obj The Javascript object to convert
|
||||
* @returns The appropriate Java representation of the object
|
||||
* @type java.lang.Object
|
||||
*/
|
||||
jala.XmlRpcRequest.convertArgument = function(obj) {
|
||||
var result;
|
||||
if (obj instanceof Array) {
|
||||
// convert into Vector
|
||||
result = new java.util.Vector(obj.length);
|
||||
for (var i=0;i<obj.length;i++) {
|
||||
result.add(i, jala.XmlRpcRequest.convertArgument(obj[i]));
|
||||
}
|
||||
} else if (obj instanceof Date) {
|
||||
// convert into java.util.Date
|
||||
result = new java.util.Date(obj.getTime());
|
||||
} else if (typeof(obj) == "boolean" || obj instanceof Boolean) {
|
||||
result = obj;
|
||||
} else if (typeof(obj) == "string" || obj instanceof String) {
|
||||
result = obj;
|
||||
} else if (isNaN(obj) == false) {
|
||||
// convert into Integer or Double
|
||||
if (obj - obj.toFixed() > 0) {
|
||||
result = new java.lang.Double(obj);
|
||||
} else {
|
||||
result = new java.lang.Integer(obj);
|
||||
}
|
||||
} else if (obj instanceof Object) {
|
||||
// convert into Hashtable
|
||||
result = new java.util.Hashtable();
|
||||
for (var key in obj) {
|
||||
if (obj[key] != null) {
|
||||
result.put(key, jala.XmlRpcRequest.convertArgument(obj[key]));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = obj;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a Java object into its appropriate Javascript representation.
|
||||
* @param {java.lang.Object} obj The Java object to convert
|
||||
* @returns The appropriate Javascript representation of the Java object
|
||||
* @type Object
|
||||
*/
|
||||
jala.XmlRpcRequest.convertResult = function(obj) {
|
||||
var result;
|
||||
if (obj instanceof java.util.Vector) {
|
||||
// convert into Array
|
||||
result = [];
|
||||
var e = obj.elements();
|
||||
while (e.hasMoreElements()) {
|
||||
result.push(jala.XmlRpcRequest.convertResult(e.nextElement()));
|
||||
}
|
||||
} else if (obj instanceof java.util.Hashtable) {
|
||||
// convert into Object
|
||||
result = {};
|
||||
var e = obj.keys();
|
||||
var key;
|
||||
while (e.hasMoreElements()) {
|
||||
key = e.nextElement();
|
||||
result[key] = jala.XmlRpcRequest.convertResult(obj.get(key));
|
||||
}
|
||||
} else if (obj instanceof java.lang.String) {
|
||||
result = String(obj);
|
||||
} else if (obj instanceof java.lang.Number) {
|
||||
result = Number(obj);
|
||||
} else if (obj instanceof java.lang.Boolean) {
|
||||
result = Boolean(obj);
|
||||
} else if (obj instanceof java.lang.Date) {
|
||||
result = new Date(obj.getTime());
|
||||
} else {
|
||||
result = obj;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper method to format an arguments array into
|
||||
* a string useable for debugging output.
|
||||
* @param {Object} args An arguments array
|
||||
* @returns The arguments array formatted as string
|
||||
* @type String
|
||||
*/
|
||||
jala.XmlRpcRequest.argumentsToString = function(args) {
|
||||
var arr = [];
|
||||
for (var i=0;i<args.length;i++) {
|
||||
if (typeof(args[i]) == "string") {
|
||||
arr.push('"' + args[i] + '"');
|
||||
} else {
|
||||
arr.push(args[i]);
|
||||
}
|
||||
}
|
||||
return arr.join(", ");
|
||||
};
|
365
modules/jala/code/XmlWriter.js
Normal file
365
modules/jala/code/XmlWriter.js
Normal file
|
@ -0,0 +1,365 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Fields and methods of the jala.XmlWriter class.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Construct a new XML writer.
|
||||
* @class This class defines a generic interface to write
|
||||
* arbitrary and validating XML source code. This is done
|
||||
* by first applying data objects onto template objects,
|
||||
* both in a specified format. Then, the resulting object
|
||||
* tree is transformed into XML. Moreover, template objects
|
||||
* can be extended with other template objects to provide
|
||||
* full flexibility in inheriting subclasses.
|
||||
* @param {String} header An optional XML header.
|
||||
* @returns A new XML writer.
|
||||
* @constructor
|
||||
*/
|
||||
jala.XmlWriter = function(header) {
|
||||
var self = this;
|
||||
var XMLHEADER = header ||
|
||||
'<?xml version="1.0" encoding="iso-8859-15"?>';
|
||||
var LOCALE = java.util.Locale.ENGLISH;
|
||||
|
||||
var write = function(str) {
|
||||
return res.write(str);
|
||||
};
|
||||
|
||||
var writeln = function(str) {
|
||||
res.write(str);
|
||||
res.write("\n");
|
||||
return;
|
||||
};
|
||||
|
||||
var getString = function(data, format) {
|
||||
if (data == null)
|
||||
return;
|
||||
switch (data.constructor) {
|
||||
case String:
|
||||
return encodeXml(data);
|
||||
case Number:
|
||||
case Date:
|
||||
if (format && data.format)
|
||||
return encodeXml(data.format(format, LOCALE));
|
||||
else if (data.toUTCString)
|
||||
return encodeXml(data.toUTCString());
|
||||
else
|
||||
return encodeXml(data.toString());
|
||||
break;
|
||||
case Object:
|
||||
return null;
|
||||
}
|
||||
return encodeXml(data.toString());
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
var XmlElement = function(data) {
|
||||
if (!data)
|
||||
throw Error("Insufficient arguments to create XmlElement");
|
||||
|
||||
var children = {};
|
||||
var properties = [
|
||||
"name",
|
||||
"attributes",
|
||||
"type",
|
||||
"required",
|
||||
"format",
|
||||
"readonly"
|
||||
];
|
||||
|
||||
if (data.value) {
|
||||
if (data.value.constructor == Object) {
|
||||
this.value = [new XmlElement(data.value)];
|
||||
} else if (data.value.constructor == Array) {
|
||||
this.value = [];
|
||||
for (var i in data.value) {
|
||||
this.value[i] = new XmlElement(data.value[i]);
|
||||
}
|
||||
} else
|
||||
throw Error("Cannot handle unknown type of template value");
|
||||
}
|
||||
|
||||
for (var i in properties) {
|
||||
var key = properties[i];
|
||||
this[key] = data[key] || null;
|
||||
}
|
||||
|
||||
if (this.attributes) {
|
||||
this.attributes = self.clone(this.attributes);
|
||||
if (this.attributes.constructor == Object)
|
||||
this.attributes = [this.attributes];
|
||||
} else {
|
||||
this.attributes = [];
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
XmlElement.toString = function() {
|
||||
return "[XmlElement constructor]";
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
XmlElement.prototype.setValue = function(element) {
|
||||
if (element.constructor != this.constructor)
|
||||
throw Error("Invalid type for XmlElement addition");
|
||||
if (!this.value)
|
||||
this.value = [];
|
||||
else {
|
||||
var pos = this.contains(element);
|
||||
if (pos > -1)
|
||||
this.value.splice(pos, 1);
|
||||
}
|
||||
this.addValue(element);
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
XmlElement.prototype.addValue = function(element) {
|
||||
if (element.constructor != this.constructor)
|
||||
throw Error("Invalid type for XmlElement addition");
|
||||
if (!this.value)
|
||||
this.value = [];
|
||||
this.value.push(element);
|
||||
return this;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
XmlElement.prototype.contains = function(element) {
|
||||
if (!this.value || !element)
|
||||
return -1;
|
||||
for (var i in this.value) {
|
||||
if (this.value[i].name == element.name)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
XmlElement.prototype.populate = function(data) {
|
||||
if (this.attributes) {
|
||||
var value;
|
||||
for (var i in this.attributes) {
|
||||
var attr = this.attributes[i];
|
||||
if (!attr.name)
|
||||
throw Error("Cannot populate unnamed attribute entry");
|
||||
if (data && data.attributes)
|
||||
value = data.attributes[attr.name];
|
||||
if (data && (data.value || data.attributes) && !value && attr.required) {
|
||||
throw Error('Missing required ' + (attr.type || Object).name + ' attribute "' +
|
||||
attr.name + '" in element <' + this.name + '> (' + value + ")");
|
||||
}
|
||||
if (value && attr.type && attr.type != value.constructor) {
|
||||
throw Error('Type mismatch in attribute "' +
|
||||
this.name + ":" + attr.name + '"');
|
||||
}
|
||||
if (value) {
|
||||
app.debug("populating attribute " + attr.name +
|
||||
" with " + value.constructor.name + ": " + value.toSource());
|
||||
}
|
||||
if (!attr.readonly) {
|
||||
attr.value = getString(value, attr.format) || attr.value ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (data && data.value) // && data.value.constructor == Object)
|
||||
data = data.value;
|
||||
|
||||
if (this.value && data) {
|
||||
for (var i in this.value) {
|
||||
var element = this.value[i];
|
||||
element.populate(data[element.name]);
|
||||
}
|
||||
} else {
|
||||
if (!data && this.required)
|
||||
throw Error('Missing required element "' + this.name + '"');
|
||||
if (data && this.type && this.type != data.constructor) {
|
||||
throw Error('Type mismatch in element "' + this.name + '"');
|
||||
}
|
||||
if (data) {
|
||||
app.debug("populating element <" + this.name + "> with " +
|
||||
(this.type || Object).name + ": " + data.toSource());
|
||||
}
|
||||
if (!this.readonly)
|
||||
this.value = getString(data, this.format) || this.value;
|
||||
}
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
XmlElement.prototype.write = function(path) {
|
||||
if (!path)
|
||||
path = "";
|
||||
|
||||
if (!this.value && !this.attributes)
|
||||
return;
|
||||
|
||||
var attrBuffer = new java.lang.StringBuffer();
|
||||
if (this.attributes) {
|
||||
for (var a in this.attributes) {
|
||||
var attr = this.attributes[a];
|
||||
if (attr.value) {
|
||||
attrBuffer.append(" " + attr.name + '="');
|
||||
attrBuffer.append(attr.value);
|
||||
attrBuffer.append('"');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var attrSize = attrBuffer.length();
|
||||
if (!this.value && attrSize < 1)
|
||||
return;
|
||||
|
||||
write("<" + this.name);
|
||||
if (attrSize > 0) {
|
||||
display = true;
|
||||
write(attrBuffer.toString());
|
||||
}
|
||||
if (this.value) {
|
||||
write(">");
|
||||
if (this.value && this.value.constructor == Array) {
|
||||
for (var i in this.value)
|
||||
this.value[i].write(path+"/"+this.name);
|
||||
} else
|
||||
write(this.value);
|
||||
write("</" + this.name + ">\n");
|
||||
} else
|
||||
write("/>\n");
|
||||
return;
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
XmlElement.prototype.toString = function() {
|
||||
return "[XmlElement: " + this.toSource() + "]";
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a newly created XML element.
|
||||
* @param {Object} data The XML data as object tree.
|
||||
* @returns The resulting XML element.
|
||||
* @type jala.XmlWriter.XmlElement
|
||||
*/
|
||||
this.createElement = function(data) {
|
||||
return new XmlElement(data);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the root XML element of this writer.
|
||||
* @returns The root XML element.
|
||||
* @type jala.XmlWriter.XmlElement
|
||||
*/
|
||||
this.getRoot = function() {
|
||||
return new XmlElement({});
|
||||
};
|
||||
|
||||
/**
|
||||
* Extend a template object.
|
||||
* @param {Object} template The template object.
|
||||
* @param {Object} ext The extension object.
|
||||
* @returns The XML writer.
|
||||
* @type jala.XmlWriter
|
||||
*/
|
||||
this.extend = function(template, ext) {
|
||||
if (ext.constructor == Object)
|
||||
ext = [ext];
|
||||
if (ext.constructor == Array) {
|
||||
for (var i in ext)
|
||||
template.value.push(ext[i]);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add a namespace to this writer.
|
||||
* @param {String} name The name of the namespace.
|
||||
* @param {String} url The URL string of the namespace.
|
||||
* @returns The XML root element.
|
||||
* @type jala.XmlWriter.XmlElement
|
||||
*/
|
||||
this.addNamespace = function(name, url) {
|
||||
var ref = this.getRoot();
|
||||
ref.attributes.push({
|
||||
name: "xmlns:" + name,
|
||||
value: url
|
||||
});
|
||||
return ref;
|
||||
};
|
||||
|
||||
/**
|
||||
* Write the XML to the response buffer.
|
||||
*/
|
||||
this.write = function() {
|
||||
res.contentType = "text/xml";
|
||||
writeln(XMLHEADER);
|
||||
this.getRoot().write();
|
||||
return;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the XML output as string.
|
||||
* @returns The XML output.
|
||||
* @type String
|
||||
*/
|
||||
this.toString = function() {
|
||||
res.push();
|
||||
this.write();
|
||||
return res.pop();
|
||||
};
|
||||
|
||||
/**
|
||||
* Clone this XML writer.
|
||||
* @param {Object} The clone templare.
|
||||
* @returns The cloned XML writer.
|
||||
* @type jala.XmlWriter
|
||||
*/
|
||||
this.clone = function(obj) {
|
||||
if (!obj || typeof obj != "object")
|
||||
return obj;
|
||||
var copy = new obj.constructor;
|
||||
for (var i in obj) {
|
||||
if (obj[i].constructor == Object ||
|
||||
obj[i].constructor == Array)
|
||||
copy[i]= this.clone(obj[i]);
|
||||
else
|
||||
copy[i] = obj[i];
|
||||
}
|
||||
return copy;
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
|
75
modules/jala/code/all.js
Normal file
75
modules/jala/code/all.js
Normal file
|
@ -0,0 +1,75 @@
|
|||
//
|
||||
// Jala Project [http://opensvn.csie.org/traccgi/jala]
|
||||
//
|
||||
// Copyright 2004 ORF Online und Teletext GmbH
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the ``License'');
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an ``AS IS'' BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// $Revision$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $HeadURL$
|
||||
//
|
||||
|
||||
|
||||
/**
|
||||
* @fileoverview Wrapper for automatic inclusion of all Jala modules.
|
||||
*/
|
||||
|
||||
|
||||
// Define the global namespace for Jala modules
|
||||
if (!global.jala) {
|
||||
/** @namespace jala */
|
||||
global.jala = {};
|
||||
}
|
||||
|
||||
|
||||
(function() {
|
||||
var packages = [
|
||||
"AsyncRequest",
|
||||
"BitTorrent",
|
||||
"Date",
|
||||
"DnsClient",
|
||||
"Captcha",
|
||||
"Form",
|
||||
"History",
|
||||
"HtmlDocument",
|
||||
"HopObject",
|
||||
"I18n",
|
||||
"ImageFilter",
|
||||
"IndexManager",
|
||||
"ListRenderer",
|
||||
"Mp3",
|
||||
"PodcastWriter",
|
||||
"RemoteContent",
|
||||
"Rss20Writer",
|
||||
"Utilities",
|
||||
"XmlRpcRequest",
|
||||
"XmlWriter"
|
||||
];
|
||||
var jalaDir = getProperty("jala.dir", "modules/jala");
|
||||
for (var i in packages) {
|
||||
app.addRepository(jalaDir + "/code/" + packages[i] + ".js");
|
||||
}
|
||||
return;
|
||||
})();
|
||||
|
||||
|
||||
/**
|
||||
* Get a string representation of the Jala library.
|
||||
* @returns [Jala JavaScript Application Library]
|
||||
* @type String
|
||||
*/
|
||||
jala.toString = function() {
|
||||
return "[Jala JavaScript Application Library]";
|
||||
};
|
692
modules/jala/docs/Global.html
Normal file
692
modules/jala/docs/Global.html
Normal file
|
@ -0,0 +1,692 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Global
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="Global";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<B>PREV CLASS</B><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="helma.Http.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="Global.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class Global</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>Global</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>Global</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!isArray">isArray</A></B>(<Object> val)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the value passed as argument is an array.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!isBoolean">isBoolean</A></B>(<Object> val)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the value passed as argument is either a boolean
|
||||
literal or an instance of Boolean.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!isDate">isDate</A></B>(<Object> val)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the value passed as argument is either a Javascript date
|
||||
or an instance of java.util.Date.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!isFunction">isFunction</A></B>(<Object> val)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the value passed as argument is a function.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!isNull">isNull</A></B>(<Object> val)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the value passed as argument is null.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!isNumber">isNumber</A></B>(<Object> val)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the value passed as argument is either a number,
|
||||
an instance of Number or of java.lang.Number.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!isObject">isObject</A></B>(<Object> val)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the value passed as argument is either a Javascript
|
||||
object or an instance of java.lang.Object.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!isString">isString</A></B>(<Object> val)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the value passed as argument is either a string literal,
|
||||
an instance of String or of java.lang.String.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!isUndefined">isUndefined</A></B>(<Object> val)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the value passed as argument is undefined.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="!s!isArray"><!-- --></A>
|
||||
<H3>isArray</H3>
|
||||
<PRE><static> Boolean <B>isArray</B>(<Object> val)</PRE>
|
||||
|
||||
<UL>Returns true if the value passed as argument is an array.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>val</CODE> - The value to test
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the value is an array, false otherwise
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!isBoolean"><!-- --></A>
|
||||
<H3>isBoolean</H3>
|
||||
<PRE><static> Boolean <B>isBoolean</B>(<Object> val)</PRE>
|
||||
|
||||
<UL>Returns true if the value passed as argument is either a boolean
|
||||
literal or an instance of Boolean.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>val</CODE> - The value to test
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the value is a boolean, false otherwise
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!isDate"><!-- --></A>
|
||||
<H3>isDate</H3>
|
||||
<PRE><static> Boolean <B>isDate</B>(<Object> val)</PRE>
|
||||
|
||||
<UL>Returns true if the value passed as argument is either a Javascript date
|
||||
or an instance of java.util.Date.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>val</CODE> - The value to test
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the value is a date, false otherwise
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!isFunction"><!-- --></A>
|
||||
<H3>isFunction</H3>
|
||||
<PRE><static> Boolean <B>isFunction</B>(<Object> val)</PRE>
|
||||
|
||||
<UL>Returns true if the value passed as argument is a function.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>val</CODE> - The value to test
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the argument is a function, false otherwise
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!isNull"><!-- --></A>
|
||||
<H3>isNull</H3>
|
||||
<PRE><static> Boolean <B>isNull</B>(<Object> val)</PRE>
|
||||
|
||||
<UL>Returns true if the value passed as argument is null.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>val</CODE> - The value to test
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the value is null, false otherwise
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!isNumber"><!-- --></A>
|
||||
<H3>isNumber</H3>
|
||||
<PRE><static> Boolean <B>isNumber</B>(<Object> val)</PRE>
|
||||
|
||||
<UL>Returns true if the value passed as argument is either a number,
|
||||
an instance of Number or of java.lang.Number.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>val</CODE> - The value to test
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the value is a number, false otherwise
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!isObject"><!-- --></A>
|
||||
<H3>isObject</H3>
|
||||
<PRE><static> Boolean <B>isObject</B>(<Object> val)</PRE>
|
||||
|
||||
<UL>Returns true if the value passed as argument is either a Javascript
|
||||
object or an instance of java.lang.Object.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>val</CODE> - The value to test
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the value is an object, false otherwise
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!isString"><!-- --></A>
|
||||
<H3>isString</H3>
|
||||
<PRE><static> Boolean <B>isString</B>(<Object> val)</PRE>
|
||||
|
||||
<UL>Returns true if the value passed as argument is either a string literal,
|
||||
an instance of String or of java.lang.String.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>val</CODE> - The value to test
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the value is a string, false otherwise
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!isUndefined"><!-- --></A>
|
||||
<H3>isUndefined</H3>
|
||||
<PRE><static> Boolean <B>isUndefined</B>(<Object> val)</PRE>
|
||||
|
||||
<UL>Returns true if the value passed as argument is undefined.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>val</CODE> - The value to test
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the value is undefined, false otherwise
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<B>PREV CLASS</B><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="helma.Http.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="Global.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
581
modules/jala/docs/HopObject.html
Normal file
581
modules/jala/docs/HopObject.html
Normal file
|
@ -0,0 +1,581 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
HopObject
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="HopObject";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="helma.Http.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="HopObject.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class HopObject</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>HopObject</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>HopObject</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getAccessName">getAccessName</A></B>(<Object> obj, <Number> maxLength)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Constructs a name from an object which
|
||||
is unique in the underlying HopObject collection.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#isClean">isClean</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the internal state of this HopObject is CLEAN.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#isDeleted">isDeleted</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the internal state of this HopObject is DELETED.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#isInvalid">isInvalid</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the internal state of this HopObject is INVALID.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#isModified">isModified</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the internal state of this HopObject is MODIFIED.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#isNew">isNew</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the internal state of this HopObject is NEW.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#isTransient">isTransient</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the internal state of this HopObject is TRANSIENT.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#isVirtual">isVirtual</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the internal state of this HopObject is VIRTUAL.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="getAccessName"><!-- --></A>
|
||||
<H3>getAccessName</H3>
|
||||
<PRE>String <B>getAccessName</B>(<Object> obj, <Number> maxLength)</PRE>
|
||||
|
||||
<UL>Constructs a name from an object which
|
||||
is unique in the underlying HopObject collection.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>obj</CODE> - The object representing or containing the alias name. Possible object types include: <ul> <li>File</li> <li>helma.File</li> <li>java.io.File</li> <li>String</li> <li>java.lang.String</li> <li>Packages.helma.util.MimePart</li> </ul>
|
||||
</UL>
|
||||
|
||||
<UL><CODE>maxLength</CODE> - The maximum length of the alias
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The resulting alias
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="isClean"><!-- --></A>
|
||||
<H3>isClean</H3>
|
||||
<PRE>Boolean <B>isClean</B>()</PRE>
|
||||
|
||||
<UL>Returns true if the internal state of this HopObject is CLEAN.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if this HopObject is marked as <em>clean</em>, false otherwise.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="isDeleted"><!-- --></A>
|
||||
<H3>isDeleted</H3>
|
||||
<PRE>Boolean <B>isDeleted</B>()</PRE>
|
||||
|
||||
<UL>Returns true if the internal state of this HopObject is DELETED.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if this HopObject is marked as <em>deleted</em>, false otherwise.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="isInvalid"><!-- --></A>
|
||||
<H3>isInvalid</H3>
|
||||
<PRE>Boolean <B>isInvalid</B>()</PRE>
|
||||
|
||||
<UL>Returns true if the internal state of this HopObject is INVALID.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if this HopObject is marked as <em>invalid</em>, false otherwise.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="isModified"><!-- --></A>
|
||||
<H3>isModified</H3>
|
||||
<PRE>Boolean <B>isModified</B>()</PRE>
|
||||
|
||||
<UL>Returns true if the internal state of this HopObject is MODIFIED.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if this HopObject is marked as <em>modified</em>, false otherwise.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="isNew"><!-- --></A>
|
||||
<H3>isNew</H3>
|
||||
<PRE>Boolean <B>isNew</B>()</PRE>
|
||||
|
||||
<UL>Returns true if the internal state of this HopObject is NEW.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if this HopObject is marked as <em>new</em>, false otherwise.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="isTransient"><!-- --></A>
|
||||
<H3>isTransient</H3>
|
||||
<PRE>Boolean <B>isTransient</B>()</PRE>
|
||||
|
||||
<UL>Returns true if the internal state of this HopObject is TRANSIENT.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if this HopObject is marked as <em>transient</em>, false otherwise.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="isVirtual"><!-- --></A>
|
||||
<H3>isVirtual</H3>
|
||||
<PRE>Boolean <B>isVirtual</B>()</PRE>
|
||||
|
||||
<UL>Returns true if the internal state of this HopObject is VIRTUAL.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if this HopObject is marked as <em>virtual</em>, false otherwise.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="helma.Http.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="HopObject.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
323
modules/jala/docs/allclasses-frame.html
Normal file
323
modules/jala/docs/allclasses-frame.html
Normal file
|
@ -0,0 +1,323 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
All Classes
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title=" All Classes";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<H3 class="FrameHeadingFont"><B></B></H3>
|
||||
<FONT size="+1" CLASS="FrameHeadingFont">
|
||||
<B><a href="overview-summary.html" target="classFrame">All Classes</a></B></FONT>
|
||||
<BR>
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%">
|
||||
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="Global.html" TARGET="classFrame">Global</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="HopObject.html" TARGET="classFrame">HopObject</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.html" TARGET="classFrame">jala</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.AsyncRequest.html" TARGET="classFrame">jala.AsyncRequest</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.BitTorrent.html" TARGET="classFrame">jala.BitTorrent</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Captcha.html" TARGET="classFrame">jala.Captcha</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Date.html" TARGET="classFrame">jala.Date</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Date.Calendar.html" TARGET="classFrame">jala.Date.Calendar</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Date.Calendar.Renderer.html" TARGET="classFrame">jala.Date.Calendar.Renderer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.db.html" TARGET="classFrame">jala.db</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.db.FileDatabase.html" TARGET="classFrame">jala.db.FileDatabase</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.db.RamDatabase.html" TARGET="classFrame">jala.db.RamDatabase</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.db.Server.html" TARGET="classFrame">jala.db.Server</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.DnsClient.html" TARGET="classFrame">jala.DnsClient</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.DnsClient.Record.html" TARGET="classFrame">jala.DnsClient.Record</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.html" TARGET="classFrame">jala.Form</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.html" TARGET="classFrame">jala.Form.Component</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Button.html" TARGET="classFrame">jala.Form.Component.Button</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Checkbox.html" TARGET="classFrame">jala.Form.Component.Checkbox</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Date.html" TARGET="classFrame">jala.Form.Component.Date</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Fieldset.html" TARGET="classFrame">jala.Form.Component.Fieldset</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.File.html" TARGET="classFrame">jala.Form.Component.File</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Hidden.html" TARGET="classFrame">jala.Form.Component.Hidden</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Image.html" TARGET="classFrame">jala.Form.Component.Image</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Input.html" TARGET="classFrame">jala.Form.Component.Input</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Password.html" TARGET="classFrame">jala.Form.Component.Password</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Radio.html" TARGET="classFrame">jala.Form.Component.Radio</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Select.html" TARGET="classFrame">jala.Form.Component.Select</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Skin.html" TARGET="classFrame">jala.Form.Component.Skin</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Submit.html" TARGET="classFrame">jala.Form.Component.Submit</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Textarea.html" TARGET="classFrame">jala.Form.Component.Textarea</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Tracker.html" TARGET="classFrame">jala.Form.Tracker</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.History.html" TARGET="classFrame">jala.History</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.HtmlDocument.html" TARGET="classFrame">jala.HtmlDocument</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.I18n.html" TARGET="classFrame">jala.I18n</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.ImageFilter.html" TARGET="classFrame">jala.ImageFilter</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.IndexManager.html" TARGET="classFrame">jala.IndexManager</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.IndexManager.Job.html" TARGET="classFrame">jala.IndexManager.Job</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.ListRenderer.html" TARGET="classFrame">jala.ListRenderer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.ListRenderer.ArrayList.html" TARGET="classFrame">jala.ListRenderer.ArrayList</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Mp3.html" TARGET="classFrame">jala.Mp3</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Mp3.Id3v1.html" TARGET="classFrame">jala.Mp3.Id3v1</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Mp3.Id3v2.html" TARGET="classFrame">jala.Mp3.Id3v2</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.PodcastWriter.html" TARGET="classFrame">jala.PodcastWriter</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.RemoteContent.html" TARGET="classFrame">jala.RemoteContent</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Rss20Writer.html" TARGET="classFrame">jala.Rss20Writer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Utilities.html" TARGET="classFrame">jala.Utilities</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.XmlRpcRequest.html" TARGET="classFrame">jala.XmlRpcRequest</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.XmlWriter.html" TARGET="classFrame">jala.XmlWriter</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
322
modules/jala/docs/allclasses-noframe.html
Normal file
322
modules/jala/docs/allclasses-noframe.html
Normal file
|
@ -0,0 +1,322 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Jala 1.3 All Classes
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="Jala 1.3 All Classes";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<H3 CLASS="FrameHeadingFont">Jala 1.3</H3>
|
||||
<FONT size="+1" CLASS="FrameHeadingFont">
|
||||
<B><a href="overview-summary.html">All Classes</a></B></FONT>
|
||||
<BR>
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%">
|
||||
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="Global.html" >Global</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="HopObject.html" >HopObject</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.html" >jala</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.AsyncRequest.html" >jala.AsyncRequest</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.BitTorrent.html" >jala.BitTorrent</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Captcha.html" >jala.Captcha</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Date.html" >jala.Date</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Date.Calendar.html" >jala.Date.Calendar</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Date.Calendar.Renderer.html" >jala.Date.Calendar.Renderer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.db.html" >jala.db</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.db.FileDatabase.html" >jala.db.FileDatabase</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.db.RamDatabase.html" >jala.db.RamDatabase</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.db.Server.html" >jala.db.Server</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.DnsClient.html" >jala.DnsClient</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.DnsClient.Record.html" >jala.DnsClient.Record</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.html" >jala.Form</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.html" >jala.Form.Component</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Button.html" >jala.Form.Component.Button</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Checkbox.html" >jala.Form.Component.Checkbox</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Date.html" >jala.Form.Component.Date</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Fieldset.html" >jala.Form.Component.Fieldset</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.File.html" >jala.Form.Component.File</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Hidden.html" >jala.Form.Component.Hidden</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Image.html" >jala.Form.Component.Image</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Input.html" >jala.Form.Component.Input</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Password.html" >jala.Form.Component.Password</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Radio.html" >jala.Form.Component.Radio</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Select.html" >jala.Form.Component.Select</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Skin.html" >jala.Form.Component.Skin</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Submit.html" >jala.Form.Component.Submit</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Component.Textarea.html" >jala.Form.Component.Textarea</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Form.Tracker.html" >jala.Form.Tracker</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.History.html" >jala.History</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.HtmlDocument.html" >jala.HtmlDocument</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.I18n.html" >jala.I18n</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.ImageFilter.html" >jala.ImageFilter</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.IndexManager.html" >jala.IndexManager</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.IndexManager.Job.html" >jala.IndexManager.Job</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.ListRenderer.html" >jala.ListRenderer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.ListRenderer.ArrayList.html" >jala.ListRenderer.ArrayList</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Mp3.html" >jala.Mp3</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Mp3.Id3v1.html" >jala.Mp3.Id3v1</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Mp3.Id3v2.html" >jala.Mp3.Id3v2</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.PodcastWriter.html" >jala.PodcastWriter</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.RemoteContent.html" >jala.RemoteContent</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Rss20Writer.html" >jala.Rss20Writer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.Utilities.html" >jala.Utilities</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.XmlRpcRequest.html" >jala.XmlRpcRequest</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="jala.XmlWriter.html" >jala.XmlWriter</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
331
modules/jala/docs/constant-values.html
Normal file
331
modules/jala/docs/constant-values.html
Normal file
|
@ -0,0 +1,331 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Jala 1.3 Constant Values
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title=" Constant Values";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<CENTER> <H1>Constant Field Values</H1> </CENTER>
|
||||
<HR>
|
||||
<UL>
|
||||
|
||||
<LI><A HREF="#jala.Form">jala.Form</A></LI>
|
||||
|
||||
<LI><A HREF="#jala.IndexManager">jala.IndexManager</A></LI>
|
||||
|
||||
<LI><A HREF="#jala.IndexManager.Job">jala.IndexManager.Job</A></LI>
|
||||
|
||||
<LI><A HREF="#jala.PodcastWriter">jala.PodcastWriter</A></LI>
|
||||
|
||||
<LI><A HREF="#jala.RemoteContent">jala.RemoteContent</A></LI>
|
||||
|
||||
<LI><A HREF="#jala.Utilities">jala.Utilities</A></LI>
|
||||
|
||||
</UL>
|
||||
|
||||
<HR>
|
||||
|
||||
|
||||
<A NAME="jala.Form"></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD colspan="2">
|
||||
<B><A HREF="jala.Form.html">jala.Form</A></B>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Form.html#MINLENGTH">MINLENGTH</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"minlength"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Form.html#MAXLENGTH">MAXLENGTH</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"maxlength"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Form.html#REQUIRE">REQUIRE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"require"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Form.html#CHECKOPTIONS">CHECKOPTIONS</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"checkoptions"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Form.html#CONTENTTYPE">CONTENTTYPE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"contenttype"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Form.html#MAXWIDTH">MAXWIDTH</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"maxwidth"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Form.html#MINWIDTH">MINWIDTH</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"minwidth"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Form.html#MAXHEIGHT">MAXHEIGHT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"maxheight"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Form.html#MINHEIGHT">MINHEIGHT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"minheight"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
<P>
|
||||
|
||||
<P>
|
||||
|
||||
<A NAME="jala.IndexManager"></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD colspan="2">
|
||||
<B><A HREF="jala.IndexManager.html">jala.IndexManager</A></B>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.IndexManager.html#MAXTRIES">MAXTRIES</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>10</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.IndexManager.html#NORMAL">NORMAL</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.IndexManager.html#REBUILDING">REBUILDING</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
<P>
|
||||
|
||||
<P>
|
||||
|
||||
<A NAME="jala.IndexManager.Job"></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD colspan="2">
|
||||
<B><A HREF="jala.IndexManager.Job.html">jala.IndexManager.Job</A></B>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.IndexManager.Job.html#ADD">ADD</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"add"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.IndexManager.Job.html#REMOVE">REMOVE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"remove"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.IndexManager.Job.html#OPTIMIZE">OPTIMIZE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>"optimize"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
<P>
|
||||
|
||||
<P>
|
||||
|
||||
<A NAME="jala.PodcastWriter"></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD colspan="2">
|
||||
<B><A HREF="jala.PodcastWriter.html">jala.PodcastWriter</A></B>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.PodcastWriter.html#XMLHEADER">XMLHEADER</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>'<?xml version="1.0" encoding="UTF-8"?>'</CODE></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
<P>
|
||||
|
||||
<P>
|
||||
|
||||
<A NAME="jala.RemoteContent"></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD colspan="2">
|
||||
<B><A HREF="jala.RemoteContent.html">jala.RemoteContent</A></B>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.RemoteContent.html#HTTP">HTTP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.RemoteContent.html#XMLRPC">XMLRPC</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.RemoteContent.html#SUFFIX">SUFFIX</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>".cache"</CODE></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
<P>
|
||||
|
||||
<P>
|
||||
|
||||
<A NAME="jala.Utilities"></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD colspan="2">
|
||||
<B><A HREF="jala.Utilities.html">jala.Utilities</A></B>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Utilities.html#VALUE_ADDED">VALUE_ADDED</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><CODE><A HREF="jala.Utilities.html#VALUE_MODIFIED">VALUE_MODIFIED</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
<P>
|
||||
|
||||
<P>
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
160
modules/jala/docs/help-doc.html
Normal file
160
modules/jala/docs/help-doc.html
Normal file
|
@ -0,0 +1,160 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Jala 1.3 API Help
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title=" API Help";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>
|
||||
How This API Document Is Organized</H1>
|
||||
</CENTER>
|
||||
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.<H3>
|
||||
Class</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each class has its own separate page. Each of these pages has three sections consisting of a class description, summary tables, and detailed member descriptions:<UL>
|
||||
<LI>Class inheritance diagram<LI>Direct Subclasses<LI>Class declaration<LI>Class description
|
||||
<P>
|
||||
<LI>Field Summary<LI>Constructor Summary<LI>Method Summary
|
||||
<P>
|
||||
<LI>Field Detail<LI>Constructor Detail<LI>Method Detail</UL>
|
||||
Each summary entry contains the first sentence from the detailed description for that item. </BLOCKQUOTE>
|
||||
<!--H3>
|
||||
Tree (Class Hierarchy)</H3>
|
||||
<BLOCKQUOTE>
|
||||
There is a <A HREF="overview-tree.html">Class Hierarchy</A> page for all classes. The hierarchy page contains a list of classes. The classes are organized by inheritance structure starting with <code>Object</code>.<UL>
|
||||
</BLOCKQUOTE-->
|
||||
<!-- H3>
|
||||
Deprecated API</H3>
|
||||
<BLOCKQUOTE>
|
||||
The <A HREF="deprecated-list.html">Deprecated API</A> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</BLOCKQUOTE-->
|
||||
<H3>
|
||||
Index</H3>
|
||||
<BLOCKQUOTE>
|
||||
The <A HREF="index-all.html">Index</A> contains an alphabetic list of all classes, constructors, methods, and fields.</BLOCKQUOTE>
|
||||
<H3>
|
||||
Prev/Next</H3>
|
||||
These links take you to the next or previous class, interface, package, or related page.<H3>
|
||||
Frames/No Frames</H3>
|
||||
These links show and hide the HTML frames. All pages are available with or without frames.
|
||||
<P>
|
||||
<FONT SIZE="-1">
|
||||
<EM>
|
||||
This help file applies to API documentation generated using the standard doclet.</EM>
|
||||
</FONT>
|
||||
<BR>
|
||||
<HR>
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">File</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
3562
modules/jala/docs/index-all.html
Normal file
3562
modules/jala/docs/index-all.html
Normal file
File diff suppressed because it is too large
Load diff
27
modules/jala/docs/index.html
Normal file
27
modules/jala/docs/index.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Generated Javascript Documentation
|
||||
</TITLE>
|
||||
</HEAD>
|
||||
<FRAMESET cols="20%,80%">
|
||||
|
||||
<FRAMESET rows="40%,50%">
|
||||
<FRAME src="overview-frame.html" name="overviewFrame">
|
||||
|
||||
<FRAME src="allclasses-frame.html" name="packageFrame">
|
||||
|
||||
</FRAMESET>
|
||||
|
||||
<FRAME src="overview-summary.html" name="classFrame">
|
||||
</FRAMESET>
|
||||
<NOFRAMES>
|
||||
<H2>
|
||||
Frame Alert</H2>
|
||||
|
||||
<P>
|
||||
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
|
||||
<BR>
|
||||
Link to <A HREF="allclasses-frame.html">Non-frame version.</A></NOFRAMES>
|
||||
</HTML>
|
510
modules/jala/docs/jala.AsyncRequest.html
Normal file
510
modules/jala/docs/jala.AsyncRequest.html
Normal file
|
@ -0,0 +1,510 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.AsyncRequest
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.AsyncRequest";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-AsyncRequest.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.BitTorrent.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.AsyncRequest.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.AsyncRequest</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>jala.AsyncRequest</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.AsyncRequest</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>This class is used to create requests of type "INTERNAL"
|
||||
(like cron-jobs) that are processed in a separate thread and
|
||||
therefor asynchronous.
|
||||
<BR/><B>Deprecated</B> <I>Use the <a href='http://helma.zumbrunn.net/reference/core/app.html#invokeAsync'>app.invokeAsync</a> method instead (built-in into Helma as of version 1.6)</I><BR/><BR/><I>Defined in <a href='overview-summary-AsyncRequest.js.html'>AsyncRequest.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.AsyncRequest.html#jala.AsyncRequest()">jala.AsyncRequest</A>
|
||||
</B>
|
||||
(<Object> obj, <String> funcName, <Array> args)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Creates a new AsyncRequest instance.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#evaluate">evaluate</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Starts this asynchronous request.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#isAlive">isAlive</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns true if the underlying thread is alive
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#run">run</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Starts this asynchronous request.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setDelay">setDelay</A></B>(<Number> millis)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Defines the delay to wait before evaluating this asynchronous request.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setTimeout">setTimeout</A></B>(<Number> seconds)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Sets the timeout of this asynchronous request.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.AsyncRequest()"><!-- --></A><H3>
|
||||
jala.AsyncRequest</H3>
|
||||
<PRE><B>jala.AsyncRequest</B>(<Object> obj, <String> funcName, <Array> args)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Creates a new AsyncRequest instance.
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>obj</CODE> - Object in whose context the method should be called
|
||||
</UL>
|
||||
|
||||
<UL><CODE>funcName</CODE> - Name of the function to call
|
||||
</UL>
|
||||
|
||||
<UL><CODE>args</CODE> - Array containing the arguments that should be passed to the function (optional). This option is <em>deprecated</em>, instead pass the arguments directly to the <a href="#run">run()</a> method.
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A new instance of AsyncRequest
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<UL>
|
||||
<B>Deprecated</B> <I>Use the <a href='http://helma.zumbrunn.net/reference/core/app.html#invokeAsync'>app.invokeAsync</a> method instead (built-in into Helma as of version 1.6)</I><BR/><BR/>
|
||||
</UL>
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="evaluate"><!-- --></A>
|
||||
<H3>evaluate</H3>
|
||||
<PRE>void <B>evaluate</B>()</PRE>
|
||||
|
||||
<UL>Starts this asynchronous request.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>Deprecated</B> <I>Use <a href="#run">run()</a> instead </I><BR/><BR/>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="isAlive"><!-- --></A>
|
||||
<H3>isAlive</H3>
|
||||
<PRE>Boolean <B>isAlive</B>()</PRE>
|
||||
|
||||
<UL>Returns true if the underlying thread is alive</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the underlying thread is alive, false otherwise.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="run"><!-- --></A>
|
||||
<H3>run</H3>
|
||||
<PRE>void <B>run</B>()</PRE>
|
||||
|
||||
<UL>Starts this asynchronous request. Any arguments passed to
|
||||
this method will be passed to the method executed by
|
||||
this AsyncRequest instance.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setDelay"><!-- --></A>
|
||||
<H3>setDelay</H3>
|
||||
<PRE>void <B>setDelay</B>(<Number> millis)</PRE>
|
||||
|
||||
<UL>Defines the delay to wait before evaluating this asynchronous request.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>millis</CODE> - Milliseconds to wait
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setTimeout"><!-- --></A>
|
||||
<H3>setTimeout</H3>
|
||||
<PRE>void <B>setTimeout</B>(<Number> seconds)</PRE>
|
||||
|
||||
<UL>Sets the timeout of this asynchronous request.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>seconds</CODE> - Thread-timeout.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-AsyncRequest.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.BitTorrent.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.AsyncRequest.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
879
modules/jala/docs/jala.BitTorrent.html
Normal file
879
modules/jala/docs/jala.BitTorrent.html
Normal file
|
@ -0,0 +1,879 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.BitTorrent
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.BitTorrent";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-BitTorrent.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.AsyncRequest.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Captcha.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.BitTorrent.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.BitTorrent</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>jala.BitTorrent</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.BitTorrent</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>This class provides methods to create a BitTorrent
|
||||
metadata file from any desired file.
|
||||
<BR/><I>Defined in <a href='overview-summary-BitTorrent.js.html'>BitTorrent.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.BitTorrent.html#jala.BitTorrent()">jala.BitTorrent</A>
|
||||
</B>
|
||||
(<String> filePath, <String> trackerUrl)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Constructs a new BitTorrent file.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Object</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#get">get</A></B>(<String> name)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Get a torrent property.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Date</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getCreationDate">getCreationDate</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Get the creation date of the torrent.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Number</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getPieceLength">getPieceLength</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Get the piece length of the torrent.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> helma.File</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getSourceFile">getSourceFile</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the underlying source file.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> helma.File</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getTorrentFile">getTorrentFile</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the underlying torrent file.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Array</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#keys">keys</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Get all available property names.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#save">save</A></B>(<String> filename)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Saves the torrent as file.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#set">set</A></B>(<String> name, <Object> value)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Set a torrent property.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setCreationDate">setCreationDate</A></B>(<Date> date)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Set the creation date of the torrent.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setPieceLength">setPieceLength</A></B>(<Number> length)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Set the piece length of the torrent.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#toString">toString</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Get a string representation of the torrent.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> Object</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!bdecode">bdecode</A></B>(<String> code)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
The bdecode method.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE><static> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#!s!bencode">bencode</A></B>(<Object> obj)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
The bencode method.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.BitTorrent()"><!-- --></A><H3>
|
||||
jala.BitTorrent</H3>
|
||||
<PRE><B>jala.BitTorrent</B>(<String> filePath, <String> trackerUrl)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Constructs a new BitTorrent file.
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>filePath</CODE> - The path to the original file.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>trackerUrl</CODE> - The URL string of the tracker.
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A new BitTorrent file.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="get"><!-- --></A>
|
||||
<H3>get</H3>
|
||||
<PRE>Object <B>get</B>(<String> name)</PRE>
|
||||
|
||||
<UL>Get a torrent property.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>name</CODE> - The name of the property.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The value of the property.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getCreationDate"><!-- --></A>
|
||||
<H3>getCreationDate</H3>
|
||||
<PRE>Date <B>getCreationDate</B>()</PRE>
|
||||
|
||||
<UL>Get the creation date of the torrent.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The torrent's creation date.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getPieceLength"><!-- --></A>
|
||||
<H3>getPieceLength</H3>
|
||||
<PRE>Number <B>getPieceLength</B>()</PRE>
|
||||
|
||||
<UL>Get the piece length of the torrent.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The torrent's piece length.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getSourceFile"><!-- --></A>
|
||||
<H3>getSourceFile</H3>
|
||||
<PRE>helma.File <B>getSourceFile</B>()</PRE>
|
||||
|
||||
<UL>Returns the underlying source file.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The source file.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getTorrentFile"><!-- --></A>
|
||||
<H3>getTorrentFile</H3>
|
||||
<PRE>helma.File <B>getTorrentFile</B>()</PRE>
|
||||
|
||||
<UL>Returns the underlying torrent file.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The torrent file.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="keys"><!-- --></A>
|
||||
<H3>keys</H3>
|
||||
<PRE>Array <B>keys</B>()</PRE>
|
||||
|
||||
<UL>Get all available property names.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The list of property names.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="save"><!-- --></A>
|
||||
<H3>save</H3>
|
||||
<PRE>void <B>save</B>(<String> filename)</PRE>
|
||||
|
||||
<UL>Saves the torrent as file.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>filename</CODE> - An optional name for the torrent file. If no name is given it will be composed from name of source file as defined in the torrent plus the ending ".torrent".
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="set"><!-- --></A>
|
||||
<H3>set</H3>
|
||||
<PRE>void <B>set</B>(<String> name, <Object> value)</PRE>
|
||||
|
||||
<UL>Set a torrent property.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>name</CODE> - The name of the property.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>value</CODE> - The property's value.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setCreationDate"><!-- --></A>
|
||||
<H3>setCreationDate</H3>
|
||||
<PRE>void <B>setCreationDate</B>(<Date> date)</PRE>
|
||||
|
||||
<UL>Set the creation date of the torrent.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>date</CODE> - The desired creation date.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setPieceLength"><!-- --></A>
|
||||
<H3>setPieceLength</H3>
|
||||
<PRE>void <B>setPieceLength</B>(<Number> length)</PRE>
|
||||
|
||||
<UL>Set the piece length of the torrent.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>length</CODE> - The desired piece length.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="toString"><!-- --></A>
|
||||
<H3>toString</H3>
|
||||
<PRE>String <B>toString</B>()</PRE>
|
||||
|
||||
<UL>Get a string representation of the torrent.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The torrent as string.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!bdecode"><!-- --></A>
|
||||
<H3>bdecode</H3>
|
||||
<PRE><static> Object <B>bdecode</B>(<String> code)</PRE>
|
||||
|
||||
<UL>The bdecode method. Turns an encoded string into
|
||||
a corresponding JavaScript object structure.
|
||||
FIXME: Handle with caution...</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>code</CODE> - The encoded string.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The decoded JavaScript structure.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!bencode"><!-- --></A>
|
||||
<H3>bencode</H3>
|
||||
<PRE><static> String <B>bencode</B>(<Object> obj)</PRE>
|
||||
|
||||
<UL>The bencode method. Turns an arbitrary JavaScript
|
||||
object structure into a corresponding encoded
|
||||
string.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>obj</CODE> - The target JavaScript object.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The encoded string.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-BitTorrent.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.AsyncRequest.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Captcha.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.BitTorrent.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
461
modules/jala/docs/jala.Captcha.html
Normal file
461
modules/jala/docs/jala.Captcha.html
Normal file
|
@ -0,0 +1,461 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.Captcha
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.Captcha";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Captcha.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.BitTorrent.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Date.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Captcha.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.Captcha</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>jala.Captcha</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.Captcha</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>Wrapper class for the
|
||||
<a href='http://jcaptcha.sourceforge.net/'>JCaptcha library</a>.
|
||||
A captcha (an acronym for "completely automated public
|
||||
Turing test to tell computers and humans apart") is a
|
||||
type of challenge-response test used in computing to
|
||||
determine whether or not the user is human.
|
||||
<BR/><I>Defined in <a href='overview-summary-Captcha.js.html'>Captcha.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.Captcha.html#jala.Captcha()">jala.Captcha</A>
|
||||
</B>
|
||||
()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Construct a new captcha.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> com.octo.captcha.Captcha</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getCaptcha">getCaptcha</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Get a new captcha object.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderImage">renderImage</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Render a new captcha image.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#toString">toString</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Get a string representation of the captcha object.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Boolean</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#validate">validate</A></B>(<String> input)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Validate a user's input with the prompted captcha.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.Captcha()"><!-- --></A><H3>
|
||||
jala.Captcha</H3>
|
||||
<PRE><B>jala.Captcha</B>()</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Construct a new captcha.
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A new captcha.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="getCaptcha"><!-- --></A>
|
||||
<H3>getCaptcha</H3>
|
||||
<PRE>com.octo.captcha.Captcha <B>getCaptcha</B>()</PRE>
|
||||
|
||||
<UL>Get a new captcha object.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A new captcha object.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="renderImage"><!-- --></A>
|
||||
<H3>renderImage</H3>
|
||||
<PRE>void <B>renderImage</B>()</PRE>
|
||||
|
||||
<UL>Render a new captcha image.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="toString"><!-- --></A>
|
||||
<H3>toString</H3>
|
||||
<PRE>String <B>toString</B>()</PRE>
|
||||
|
||||
<UL>Get a string representation of the captcha object.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A string representation of the captcha object.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="validate"><!-- --></A>
|
||||
<H3>validate</H3>
|
||||
<PRE>Boolean <B>validate</B>(<String> input)</PRE>
|
||||
|
||||
<UL>Validate a user's input with the prompted captcha.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>input</CODE> - The user's input.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
True if the user's input matches the captcha.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Captcha.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.BitTorrent.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Date.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Captcha.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
580
modules/jala/docs/jala.Date.Calendar.Renderer.html
Normal file
580
modules/jala/docs/jala.Date.Calendar.Renderer.html
Normal file
|
@ -0,0 +1,580 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.Date.Calendar.Renderer
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.Date.Calendar.Renderer";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Date.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Date.Calendar.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.db.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Date.Calendar.Renderer.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.Date.Calendar.Renderer</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>jala.Date.Calendar.Renderer</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.Date.Calendar.Renderer</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>A default renderer to use in conjunction with jala.Date.Calendar
|
||||
<BR/><I>Defined in <a href='overview-summary-Date.js.html'>Date.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
<A NAME="field_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Field Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
<!-- This is one instance field summary -->
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> <a href="jala.Date.Calendar.html">jala.Date.Calendar</a></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#calendar">calendar</A></B></CODE>
|
||||
<BR>
|
||||
The calendar utilizing this renderer instance</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> helma.Html</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#html">html</A></B></CODE>
|
||||
<BR>
|
||||
An instance of helma.Html used for rendering the calendar</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.Date.Calendar.Renderer.html#jala.Date.Calendar.Renderer()">jala.Date.Calendar.Renderer</A>
|
||||
</B>
|
||||
(<<a href="jala.Date.Calendar.html">jala.Date.Calendar</a>> calendar)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns a new instance of the default calendar renderer.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderCalendar">renderCalendar</A></B>(<Date> date, <String> body, <Date> prevMonth, <Date> nextMonth)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders the calendar directly to response.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderDay">renderDay</A></B>(<Date> date, <Boolean> isExisting, <Boolean> isSelected)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders a single day within the calendar directly to response.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderDayHeader">renderDayHeader</A></B>(<String> text)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders a single cell in the calendar day header row directly to response.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderPrevNextLink">renderPrevNextLink</A></B>(<Date> date)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders a link to the previous or next month's calendar directly to response.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderRow">renderRow</A></B>(<String> row)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders a single calendar row directly to response.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
<A NAME="field_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<A NAME="calendar"><!-- --></A>
|
||||
<H3>calendar</H3>
|
||||
<PRE><a href="jala.Date.Calendar.html">jala.Date.Calendar</a> <B>calendar</B></PRE>
|
||||
<UL>
|
||||
The calendar utilizing this renderer instance
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="html"><!-- --></A>
|
||||
<H3>html</H3>
|
||||
<PRE>helma.Html <B>html</B></PRE>
|
||||
<UL>
|
||||
An instance of helma.Html used for rendering the calendar
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.Date.Calendar.Renderer()"><!-- --></A><H3>
|
||||
jala.Date.Calendar.Renderer</H3>
|
||||
<PRE><B>jala.Date.Calendar.Renderer</B>(<<a href="jala.Date.Calendar.html">jala.Date.Calendar</a>> calendar)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Returns a new instance of the default calendar renderer.
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>calendar</CODE> - The calendar utilizing this renderer
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A newly created instance of jala.Date.Calendar.Renderer
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="renderCalendar"><!-- --></A>
|
||||
<H3>renderCalendar</H3>
|
||||
<PRE>void <B>renderCalendar</B>(<Date> date, <String> body, <Date> prevMonth, <Date> nextMonth)</PRE>
|
||||
|
||||
<UL>Renders the calendar directly to response.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>date</CODE> - A date object representing this calendar's month and year. Please mind that the day will be set to the <em>last</em> date in this month.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>body</CODE> - The rendered calendar weeks including the day header (basically the whole kernel of the table).
|
||||
</UL>
|
||||
|
||||
<UL><CODE>prevMonth</CODE> - A date object set to the last available date of the previous month. This can be used to render a navigation link to the previous month.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>nextMonth</CODE> - A date object set to the first available date of the next month. This can be used to render a navigation link to the next month.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="renderDay"><!-- --></A>
|
||||
<H3>renderDay</H3>
|
||||
<PRE>void <B>renderDay</B>(<Date> date, <Boolean> isExisting, <Boolean> isSelected)</PRE>
|
||||
|
||||
<UL>Renders a single day within the calendar directly to response.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>date</CODE> - A date instance representing the day within the calendar.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>isExisting</CODE> - True if there is a child object in the calendar's collection to which the date cell should link to
|
||||
</UL>
|
||||
|
||||
<UL><CODE>isSelected</CODE> - True if this calendar day should be rendered as selected day.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="renderDayHeader"><!-- --></A>
|
||||
<H3>renderDayHeader</H3>
|
||||
<PRE>void <B>renderDayHeader</B>(<String> text)</PRE>
|
||||
|
||||
<UL>Renders a single cell in the calendar day header row directly to response.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>text</CODE> - The text to display in the header field.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="renderPrevNextLink"><!-- --></A>
|
||||
<H3>renderPrevNextLink</H3>
|
||||
<PRE>void <B>renderPrevNextLink</B>(<Date> date)</PRE>
|
||||
|
||||
<UL>Renders a link to the previous or next month's calendar directly to response.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>date</CODE> - A date object set to the previous or next available month. This can be null in case there is no previous or next month.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="renderRow"><!-- --></A>
|
||||
<H3>renderRow</H3>
|
||||
<PRE>void <B>renderRow</B>(<String> row)</PRE>
|
||||
|
||||
<UL>Renders a single calendar row directly to response.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>row</CODE> - The body of the calendar row.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Date.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Date.Calendar.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.db.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Date.Calendar.Renderer.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
911
modules/jala/docs/jala.Date.Calendar.html
Normal file
911
modules/jala/docs/jala.Date.Calendar.html
Normal file
|
@ -0,0 +1,911 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.Date.Calendar
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.Date.Calendar";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Date.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Date.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Date.Calendar.Renderer.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Date.Calendar.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.Date.Calendar</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>jala.Date.Calendar</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.Date.Calendar</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>This class represents a calendar based based on a grouped
|
||||
collection of HopObjects. It provides several methods for rendering
|
||||
the calendar plus defining locale and timezone settings.
|
||||
<BR/><I>Defined in <a href='overview-summary-Date.js.html'>Date.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<A NAME="inner_classes"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Nested Class Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static class></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="jala.Date.Calendar.Renderer.html">jala.Date.Calendar.Renderer</A></B></CODE></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.Date.Calendar.html#jala.Date.Calendar()">jala.Date.Calendar</A>
|
||||
</B>
|
||||
(<<a href="HopObject.html">HopObject</a>> collection)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Creates a new instance of jala.Data.Calendar
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getAccessNameFormat">getAccessNameFormat</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the format of the access name used by this calendar to access
|
||||
child group objects of the collection this calendar is operating on.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getCalendar">getCalendar</A></B>(today)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns a rendered calendar
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> <a href="HopObject.html">HopObject</a></CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getCollection">getCollection</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the collection this calendar object works on
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getHrefFormat">getHrefFormat</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the date formatting pattern used to render hrefs.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> java.util.Locale</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getLocale">getLocale</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the locale used within this calendar instance.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Object</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getRenderer">getRenderer</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the renderer used by this calendar.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> java.util.Locale</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getTimeZone">getTimeZone</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the locale used within this calendar instance.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#render">render</A></B>(today)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders the calendar using either a custom renderer defined
|
||||
using <a href="#setRenderer">setRenderer()</a> or the default one.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setAccessNameFormat">setAccessNameFormat</A></B>(<String> fmt)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Sets the format of the group name to use when trying to access
|
||||
child objects of the collection this calendar is operating on.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setHrefFormat">setHrefFormat</A></B>(<String> fmt)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Sets the format of the hrefs to render by this calendar
|
||||
to the format pattern passed as argument.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setLocale">setLocale</A></B>(<java.util.Locale> loc)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Sets the locale to use within this calendar object
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setRenderer">setRenderer</A></B>(<Object> r)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Sets the renderer to use.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#setTimeZone">setTimeZone</A></B>(tz)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Sets the locale to use within this calendar object
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.Date.Calendar()"><!-- --></A><H3>
|
||||
jala.Date.Calendar</H3>
|
||||
<PRE><B>jala.Date.Calendar</B>(<<a href="HopObject.html">HopObject</a>> collection)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Creates a new instance of jala.Data.Calendar
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>collection</CODE> - A grouped HopObject collection to work on
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A newly created jala.Date.Calendar instance
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="getAccessNameFormat"><!-- --></A>
|
||||
<H3>getAccessNameFormat</H3>
|
||||
<PRE>String <B>getAccessNameFormat</B>()</PRE>
|
||||
|
||||
<UL>Returns the format of the access name used by this calendar to access
|
||||
child group objects of the collection this calendar is operating on.
|
||||
The default format is "yyyyMMdd".</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The date formatting pattern used to access child objects
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#setAccessNameFormat">setAccessNameFormat()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getCalendar"><!-- --></A>
|
||||
<H3>getCalendar</H3>
|
||||
<PRE>String <B>getCalendar</B>(today)</PRE>
|
||||
|
||||
<UL>Returns a rendered calendar</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#renderCalendar">renderCalendar</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getCollection"><!-- --></A>
|
||||
<H3>getCollection</H3>
|
||||
<PRE><a href="HopObject.html">HopObject</a> <B>getCollection</B>()</PRE>
|
||||
|
||||
<UL>Returns the collection this calendar object works on</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The HopObject collection of this calendar
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getHrefFormat"><!-- --></A>
|
||||
<H3>getHrefFormat</H3>
|
||||
<PRE>String <B>getHrefFormat</B>()</PRE>
|
||||
|
||||
<UL>Returns the date formatting pattern used to render hrefs. The default
|
||||
format is "yyyyMMdd".</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The date formatting pattern
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#setHrefFormat">setHrefFormat()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getLocale"><!-- --></A>
|
||||
<H3>getLocale</H3>
|
||||
<PRE>java.util.Locale <B>getLocale</B>()</PRE>
|
||||
|
||||
<UL>Returns the locale used within this calendar instance. By default
|
||||
the locale used by this calendar is the default locale of the
|
||||
Java Virtual Machine running Helma.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The locale of this calendar
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#setLocale">setLocale()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getRenderer"><!-- --></A>
|
||||
<H3>getRenderer</H3>
|
||||
<PRE>Object <B>getRenderer</B>()</PRE>
|
||||
|
||||
<UL>Returns the renderer used by this calendar.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The calendar renderer
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#setRenderer">setRenderer()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="getTimeZone"><!-- --></A>
|
||||
<H3>getTimeZone</H3>
|
||||
<PRE>java.util.Locale <B>getTimeZone</B>()</PRE>
|
||||
|
||||
<UL>Returns the locale used within this calendar instance. By default
|
||||
the timezone used by this calendar is the default timezone
|
||||
of the Java Virtual Machine running Helma.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The locale of this calendar
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#setTimeZone">setTimeZone()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="render"><!-- --></A>
|
||||
<H3>render</H3>
|
||||
<PRE>void <B>render</B>(today)</PRE>
|
||||
|
||||
<UL>Renders the calendar using either a custom renderer defined
|
||||
using <a href="#setRenderer">setRenderer()</a> or the default one.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#setRenderer">setRenderer()</a><BR/>- <a href="jala.Date.Calendar.Renderer.html#">jala.Date.Calendar.Renderer</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setAccessNameFormat"><!-- --></A>
|
||||
<H3>setAccessNameFormat</H3>
|
||||
<PRE>void <B>setAccessNameFormat</B>(<String> fmt)</PRE>
|
||||
|
||||
<UL>Sets the format of the group name to use when trying to access
|
||||
child objects of the collection this calendar is operating on.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>fmt</CODE> - The date format pattern to use for accessing child objects
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#getAccessNameFormat">getAccessNameFormat()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setHrefFormat"><!-- --></A>
|
||||
<H3>setHrefFormat</H3>
|
||||
<PRE>void <B>setHrefFormat</B>(<String> fmt)</PRE>
|
||||
|
||||
<UL>Sets the format of the hrefs to render by this calendar
|
||||
to the format pattern passed as argument.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>fmt</CODE> - The date format pattern to use for rendering the href
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#getHrefFormat">getHrefFormat()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setLocale"><!-- --></A>
|
||||
<H3>setLocale</H3>
|
||||
<PRE>void <B>setLocale</B>(<java.util.Locale> loc)</PRE>
|
||||
|
||||
<UL>Sets the locale to use within this calendar object</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>loc</CODE> - The locale to use
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#getLocale">getLocale()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setRenderer"><!-- --></A>
|
||||
<H3>setRenderer</H3>
|
||||
<PRE>void <B>setRenderer</B>(<Object> r)</PRE>
|
||||
|
||||
<UL>Sets the renderer to use.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>r</CODE> - The renderer to use
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#getRenderer">getRenderer()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="setTimeZone"><!-- --></A>
|
||||
<H3>setTimeZone</H3>
|
||||
<PRE>void <B>setTimeZone</B>(tz)</PRE>
|
||||
|
||||
<UL>Sets the locale to use within this calendar object</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>loc</CODE> - The locale to use
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#getTimeZone">getTimeZone()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Date.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Date.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Date.Calendar.Renderer.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Date.Calendar.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
389
modules/jala/docs/jala.Date.html
Normal file
389
modules/jala/docs/jala.Date.html
Normal file
|
@ -0,0 +1,389 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.Date
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.Date";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Date.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Captcha.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Date.Calendar.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Date.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.Date</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>jala.Date</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.Date</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>This class provides various convenience
|
||||
methods for rendering purposes.
|
||||
<BR/><I>Defined in <a href='overview-summary-Date.js.html'>Date.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<A NAME="inner_classes"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Nested Class Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static class></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="jala.Date.Calendar.html">jala.Date.Calendar</A></B></CODE></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.Date.html#jala.Date()">jala.Date</A>
|
||||
</B>
|
||||
()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Constructs a new Renderings object.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderEditor">renderEditor</A></B>(<String> prefix, <Date> date, <Object> fmt)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders a timestamp as set of DropDown boxes, following the
|
||||
format passed as argument.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderEditorAsString">renderEditorAsString</A></B>(prefix, date, pattern)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns a timestamp as set of dropdown-boxes
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.Date()"><!-- --></A><H3>
|
||||
jala.Date</H3>
|
||||
<PRE><B>jala.Date</B>()</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Constructs a new Renderings object.
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="renderEditor"><!-- --></A>
|
||||
<H3>renderEditor</H3>
|
||||
<PRE>void <B>renderEditor</B>(<String> prefix, <Date> date, <Object> fmt)</PRE>
|
||||
|
||||
<UL>Renders a timestamp as set of DropDown boxes, following the
|
||||
format passed as argument. Every <select>
|
||||
item is prefixed with a string so that it can be retrieved
|
||||
easily from the values of a submitted POST request.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>prefix</CODE> - The prefix to use for all dropdown boxes, eg. "postdate"
|
||||
</UL>
|
||||
|
||||
<UL><CODE>date</CODE> - A Date object to use as preselection (optional)
|
||||
</UL>
|
||||
|
||||
<UL><CODE>fmt</CODE> - Array containing one parameter object for every single select box that should be rendered, with the following properties set: <ul> <li>pattern - The date format pattern that should be rendered. Valid patterns are: "dd", "MM", "yyyy", "HH", "ss".</li> <li>firstOption - The string to use as first option, eg.: "choose a day"</li> </ul>
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="renderEditorAsString"><!-- --></A>
|
||||
<H3>renderEditorAsString</H3>
|
||||
<PRE>String <B>renderEditorAsString</B>(prefix, date, pattern)</PRE>
|
||||
|
||||
<UL>Returns a timestamp as set of dropdown-boxes</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<UL>
|
||||
<B>See:</B><UL>- <a href="#renderEditor">renderEditor()</a></UL>
|
||||
</UL>
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Date.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Captcha.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Date.Calendar.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Date.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
484
modules/jala/docs/jala.DnsClient.Record.html
Normal file
484
modules/jala/docs/jala.DnsClient.Record.html
Normal file
|
@ -0,0 +1,484 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.DnsClient.Record
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.DnsClient.Record";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-DnsClient.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.DnsClient.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.DnsClient.Record.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.DnsClient.Record</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>jala.DnsClient.Record</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.DnsClient.Record</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>Instances of this class wrap record data as received
|
||||
from the nameserver.
|
||||
<BR/><I>Defined in <a href='overview-summary-DnsClient.js.html'>DnsClient.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
<A NAME="field_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Field Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
<!-- This is one instance field summary -->
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#cname">cname</A></B></CODE>
|
||||
<BR>
|
||||
The CNAME of this record.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#email">email</A></B></CODE>
|
||||
<BR>
|
||||
The email address responsible for a name server.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#host">host</A></B></CODE>
|
||||
<BR>
|
||||
The name of the host.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#ipAddress">ipAddress</A></B></CODE>
|
||||
<BR>
|
||||
The IP address of the host.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#mx">mx</A></B></CODE>
|
||||
<BR>
|
||||
The name of the mail exchanging server.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#text">text</A></B></CODE>
|
||||
<BR>
|
||||
Descriptive text as received from the nameserver.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> Number</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#type">type</A></B></CODE>
|
||||
<BR>
|
||||
The type of the nameserver record represented by this Answer instance.</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.DnsClient.Record.html#jala.DnsClient.Record()">jala.DnsClient.Record</A>
|
||||
</B>
|
||||
(<org.wonderly.net.dns.RR> data)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Constructs a new instance of jala.DnsClient.Record.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> org.wonderly.net.dns.RR</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#getData">getData</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Returns the wrapped nameserver record data
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
<A NAME="field_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<A NAME="cname"><!-- --></A>
|
||||
<H3>cname</H3>
|
||||
<PRE>String <B>cname</B></PRE>
|
||||
<UL>
|
||||
The CNAME of this record. This will only be set for records
|
||||
of type CNAME
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="email"><!-- --></A>
|
||||
<H3>email</H3>
|
||||
<PRE>String <B>email</B></PRE>
|
||||
<UL>
|
||||
The email address responsible for a name server. This property
|
||||
will only be set for records of type SOA
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="host"><!-- --></A>
|
||||
<H3>host</H3>
|
||||
<PRE>String <B>host</B></PRE>
|
||||
<UL>
|
||||
The name of the host. This will only be set for records
|
||||
of type A, AAAA and NS.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="ipAddress"><!-- --></A>
|
||||
<H3>ipAddress</H3>
|
||||
<PRE>String <B>ipAddress</B></PRE>
|
||||
<UL>
|
||||
The IP address of the host. This will only be set for records
|
||||
of type A and AAAA
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="mx"><!-- --></A>
|
||||
<H3>mx</H3>
|
||||
<PRE>String <B>mx</B></PRE>
|
||||
<UL>
|
||||
The name of the mail exchanging server. This is only set for
|
||||
records of type MX
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="text"><!-- --></A>
|
||||
<H3>text</H3>
|
||||
<PRE>String <B>text</B></PRE>
|
||||
<UL>
|
||||
Descriptive text as received from the nameserver. This is only
|
||||
set for records of type TXT
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="type"><!-- --></A>
|
||||
<H3>type</H3>
|
||||
<PRE>Number <B>type</B></PRE>
|
||||
<UL>
|
||||
The type of the nameserver record represented by this Answer instance.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.DnsClient.Record()"><!-- --></A><H3>
|
||||
jala.DnsClient.Record</H3>
|
||||
<PRE><B>jala.DnsClient.Record</B>(<org.wonderly.net.dns.RR> data)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Constructs a new instance of jala.DnsClient.Record.
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>data</CODE> - The data as received from the nameserver
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A newly constructed Record instance
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="getData"><!-- --></A>
|
||||
<H3>getData</H3>
|
||||
<PRE>org.wonderly.net.dns.RR <B>getData</B>()</PRE>
|
||||
|
||||
<UL>Returns the wrapped nameserver record data</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The wrapped data
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-DnsClient.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.DnsClient.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.DnsClient.Record.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
591
modules/jala/docs/jala.DnsClient.html
Normal file
591
modules/jala/docs/jala.DnsClient.html
Normal file
|
@ -0,0 +1,591 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.DnsClient
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.DnsClient";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-DnsClient.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.db.Server.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.DnsClient.Record.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.DnsClient.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.DnsClient</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>jala.DnsClient</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.DnsClient</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>This is a wrapper around the Dns Client by wonderly.org
|
||||
providing methods for querying Dns servers. For more information
|
||||
about the Java DNS client visit
|
||||
<a href="https://javadns.dev.java.net/">https://javadns.dev.java.net/</a>.
|
||||
Please mind that the nameserver specified must accept queries on port
|
||||
53 TCP (the Java DNS client used doesn't support UDP nameserver queries),
|
||||
and that reverse lookups are not supported.
|
||||
<BR/><I>Defined in <a href='overview-summary-DnsClient.js.html'>DnsClient.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<A NAME="inner_classes"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Nested Class Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static class></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="jala.DnsClient.Record.html">jala.DnsClient.Record</A></B></CODE></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
<A NAME="field_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Field Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
<!-- This is one instance field summary -->
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> String</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#nameServer">nameServer</A></B></CODE>
|
||||
<BR>
|
||||
Contains the IP Adress/FQDN of the name server to query.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static> <final> Number</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#!s!TYPE_A">TYPE_A</A></B></CODE>
|
||||
<BR>
|
||||
The "A" record/query type.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static> <final> Number</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#!s!TYPE_CNAME">TYPE_CNAME</A></B></CODE>
|
||||
<BR>
|
||||
The "CNAME" record/query type.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static> <final> Number</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#!s!TYPE_MX">TYPE_MX</A></B></CODE>
|
||||
<BR>
|
||||
The "MX" record/query type.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static> <final> Number</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#!s!TYPE_NS">TYPE_NS</A></B></CODE>
|
||||
<BR>
|
||||
The "NS" record/query type.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static> <final> Number</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#!s!TYPE_PTR">TYPE_PTR</A></B></CODE>
|
||||
<BR>
|
||||
The "PTR" record/query type.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static> <final> Number</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#!s!TYPE_SOA">TYPE_SOA</A></B></CODE>
|
||||
<BR>
|
||||
The "SOA" record/query type.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static> <final> Number</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#!s!TYPE_TXT">TYPE_TXT</A></B></CODE>
|
||||
<BR>
|
||||
The "TXT" record/query type.</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE><static> <final> Number</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="#!s!TYPE_WKS">TYPE_WKS</A></B></CODE>
|
||||
<BR>
|
||||
The "WKS" record/query type.</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.DnsClient.html#jala.DnsClient()">jala.DnsClient</A>
|
||||
</B>
|
||||
(<String> nameServer)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Constructs a new DnsClient object.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> org.wonderly.net.dns.RR</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#query">query</A></B>(<String> dName, <Number> queryType)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Queries the nameserver for a specific domain
|
||||
and the given type of record.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> org.wonderly.net.dns.RR</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#queryMailHost">queryMailHost</A></B>(<String> dName)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Convenience method to query for the MX-records
|
||||
of the domain passed as argument.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
<A NAME="field_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<A NAME="nameServer"><!-- --></A>
|
||||
<H3>nameServer</H3>
|
||||
<PRE>String <B>nameServer</B></PRE>
|
||||
<UL>
|
||||
Contains the IP Adress/FQDN of the name server to query.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!TYPE_A"><!-- --></A>
|
||||
<H3>TYPE_A</H3>
|
||||
<PRE><static> <final> Number <B>TYPE_A</B></PRE>
|
||||
<UL>
|
||||
The "A" record/query type.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!TYPE_CNAME"><!-- --></A>
|
||||
<H3>TYPE_CNAME</H3>
|
||||
<PRE><static> <final> Number <B>TYPE_CNAME</B></PRE>
|
||||
<UL>
|
||||
The "CNAME" record/query type.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!TYPE_MX"><!-- --></A>
|
||||
<H3>TYPE_MX</H3>
|
||||
<PRE><static> <final> Number <B>TYPE_MX</B></PRE>
|
||||
<UL>
|
||||
The "MX" record/query type.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!TYPE_NS"><!-- --></A>
|
||||
<H3>TYPE_NS</H3>
|
||||
<PRE><static> <final> Number <B>TYPE_NS</B></PRE>
|
||||
<UL>
|
||||
The "NS" record/query type.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!TYPE_PTR"><!-- --></A>
|
||||
<H3>TYPE_PTR</H3>
|
||||
<PRE><static> <final> Number <B>TYPE_PTR</B></PRE>
|
||||
<UL>
|
||||
The "PTR" record/query type.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!TYPE_SOA"><!-- --></A>
|
||||
<H3>TYPE_SOA</H3>
|
||||
<PRE><static> <final> Number <B>TYPE_SOA</B></PRE>
|
||||
<UL>
|
||||
The "SOA" record/query type.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!TYPE_TXT"><!-- --></A>
|
||||
<H3>TYPE_TXT</H3>
|
||||
<PRE><static> <final> Number <B>TYPE_TXT</B></PRE>
|
||||
<UL>
|
||||
The "TXT" record/query type.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
<A NAME="!s!TYPE_WKS"><!-- --></A>
|
||||
<H3>TYPE_WKS</H3>
|
||||
<PRE><static> <final> Number <B>TYPE_WKS</B></PRE>
|
||||
<UL>
|
||||
The "WKS" record/query type.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.DnsClient()"><!-- --></A><H3>
|
||||
jala.DnsClient</H3>
|
||||
<PRE><B>jala.DnsClient</B>(<String> nameServer)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Constructs a new DnsClient object.
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>nameServer</CODE> - IP-Address or FQDN of nameserver to query
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="query"><!-- --></A>
|
||||
<H3>query</H3>
|
||||
<PRE>org.wonderly.net.dns.RR <B>query</B>(<String> dName, <Number> queryType)</PRE>
|
||||
|
||||
<UL>Queries the nameserver for a specific domain
|
||||
and the given type of record.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>dName</CODE> - The domain name to query for
|
||||
</UL>
|
||||
|
||||
<UL><CODE>queryType</CODE> - The type of records to retrieve
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The records retrieved from the nameserver
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="queryMailHost"><!-- --></A>
|
||||
<H3>queryMailHost</H3>
|
||||
<PRE>org.wonderly.net.dns.RR <B>queryMailHost</B>(<String> dName)</PRE>
|
||||
|
||||
<UL>Convenience method to query for the MX-records
|
||||
of the domain passed as argument.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>dName</CODE> - The domain name to query for
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
The records retrieved from the nameserver
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-DnsClient.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.db.Server.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.DnsClient.Record.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.DnsClient.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
411
modules/jala/docs/jala.Form.Component.Button.html
Normal file
411
modules/jala/docs/jala.Form.Component.Button.html
Normal file
|
@ -0,0 +1,411 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.Form.Component.Button
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.Form.Component.Button";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Form.Component.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.Component.Checkbox.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Form.Component.Button.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.Form.Component.Button</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<a href='jala.Form.Component.Input.html'>jala.Form.Component.Input</a>
|
||||
|
|
||||
+--<b>jala.Form.Component.Button</b>
|
||||
</PRE>
|
||||
|
||||
<DL>
|
||||
<DT>
|
||||
<B>Direct Known Subclasses:</B>
|
||||
<DD>
|
||||
<a href="jala.Form.Component.Submit.html">jala.Form.Component.Submit</a>
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.Form.Component.Button</B>
|
||||
|
||||
<DT>extends <a href='jala.Form.Component.Input.html'>jala.Form.Component.Input</a>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>Subclass of jala.Form.Component.Input which renders a button.
|
||||
<BR/><I>Defined in <a href='overview-summary-Form.js.html'>Form.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.Form.Component.Button.html#jala.Form.Component.Button()">jala.Form.Component.Button</A>
|
||||
</B>
|
||||
(<String> name)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Creates a new Button component instance
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#render">render</A></B>(<Object> attr, <Object> value, <Object> reqData)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders a button to the response.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Object</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderControls">renderControls</A></B>(attr, value)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Creates a new attribute object for this button.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD><B>Methods inherited from class <a href="jala.Form.Component.Input.html">jala.Form.Component.Input</a></B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>
|
||||
<!-- Inherited methods -->
|
||||
<a href="jala.Form.Component.Input.html#validate">validate</a>, <a href="jala.Form.Component.Input.html#save">save</a>, <a href="jala.Form.Component.Input.html#getValue">getValue</a>, <a href="jala.Form.Component.Input.html#setValue">setValue</a>, <a href="jala.Form.Component.Input.html#renderError">renderError</a>, <a href="jala.Form.Component.Input.html#renderLabel">renderLabel</a>, <a href="jala.Form.Component.Input.html#renderHelp">renderHelp</a>, <a href="jala.Form.Component.Input.html#render_macro">render_macro</a>, <a href="jala.Form.Component.Input.html#controls_macro">controls_macro</a>, <a href="jala.Form.Component.Input.html#error_macro">error_macro</a>, <a href="jala.Form.Component.Input.html#label_macro">label_macro</a>, <a href="jala.Form.Component.Input.html#help_macro">help_macro</a>, <a href="jala.Form.Component.Input.html#id_macro">id_macro</a>, <a href="jala.Form.Component.Input.html#name_macro">name_macro</a>, <a href="jala.Form.Component.Input.html#type_macro">type_macro</a>, <a href="jala.Form.Component.Input.html#class_macro">class_macro</a>, <a href="jala.Form.Component.Input.html#getControlAttributes">getControlAttributes</a>, <a href="jala.Form.Component.Input.html#checkLength">checkLength</a>, <a href="jala.Form.Component.Input.html#checkRequirements">checkRequirements</a>, <a href="jala.Form.Component.Input.html#parseValue">parseValue</a>
|
||||
</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.Form.Component.Button()"><!-- --></A><H3>
|
||||
jala.Form.Component.Button</H3>
|
||||
<PRE><B>jala.Form.Component.Button</B>(<String> name)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Creates a new Button component instance
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>name</CODE> - Name of the component, used as name of the html controls.
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A newly created Button component
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="render"><!-- --></A>
|
||||
<H3>render</H3>
|
||||
<PRE>void <B>render</B>(<Object> attr, <Object> value, <Object> reqData)</PRE>
|
||||
|
||||
<UL>Renders a button to the response.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>attr</CODE> - Basic attributes for this element.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>value</CODE> - Value to be used for rendering this element.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>reqData</CODE> - Request data for the whole form. This argument is passed only if the form is re-rendered after an error occured.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="renderControls"><!-- --></A>
|
||||
<H3>renderControls</H3>
|
||||
<PRE>Object <B>renderControls</B>(attr, value)</PRE>
|
||||
|
||||
<UL>Creates a new attribute object for this button.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
Object with all attributes set for this button.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Form.Component.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.Component.Checkbox.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Form.Component.Button.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
460
modules/jala/docs/jala.Form.Component.Checkbox.html
Normal file
460
modules/jala/docs/jala.Form.Component.Checkbox.html
Normal file
|
@ -0,0 +1,460 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.Form.Component.Checkbox
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.Form.Component.Checkbox";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Form.Component.Button.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.Component.Date.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Form.Component.Checkbox.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.Form.Component.Checkbox</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<a href='jala.Form.Component.Input.html'>jala.Form.Component.Input</a>
|
||||
|
|
||||
+--<b>jala.Form.Component.Checkbox</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.Form.Component.Checkbox</B>
|
||||
|
||||
<DT>extends <a href='jala.Form.Component.Input.html'>jala.Form.Component.Input</a>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>Subclass of jala.Form.Component.Input which renders and validates a
|
||||
checkbox.
|
||||
<BR/><I>Defined in <a href='overview-summary-Form.js.html'>Form.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.Form.Component.Checkbox.html#jala.Form.Component.Checkbox()">jala.Form.Component.Checkbox</A>
|
||||
</B>
|
||||
(<String> name)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Creates a new Checkbox component instance
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#checkRequirements">checkRequirements</A></B>(<Object> reqData)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Validates user input from checkbox.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Number</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#parseValue">parseValue</A></B>(<Object> reqData)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Parses the string input from the form.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderControls">renderControls</A></B>(<Object> attr, <Object> value, reqData)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders an checkbox to the response.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD><B>Methods inherited from class <a href="jala.Form.Component.Input.html">jala.Form.Component.Input</a></B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>
|
||||
<!-- Inherited methods -->
|
||||
<a href="jala.Form.Component.Input.html#validate">validate</a>, <a href="jala.Form.Component.Input.html#save">save</a>, <a href="jala.Form.Component.Input.html#getValue">getValue</a>, <a href="jala.Form.Component.Input.html#setValue">setValue</a>, <a href="jala.Form.Component.Input.html#render">render</a>, <a href="jala.Form.Component.Input.html#renderError">renderError</a>, <a href="jala.Form.Component.Input.html#renderLabel">renderLabel</a>, <a href="jala.Form.Component.Input.html#renderHelp">renderHelp</a>, <a href="jala.Form.Component.Input.html#render_macro">render_macro</a>, <a href="jala.Form.Component.Input.html#controls_macro">controls_macro</a>, <a href="jala.Form.Component.Input.html#error_macro">error_macro</a>, <a href="jala.Form.Component.Input.html#label_macro">label_macro</a>, <a href="jala.Form.Component.Input.html#help_macro">help_macro</a>, <a href="jala.Form.Component.Input.html#id_macro">id_macro</a>, <a href="jala.Form.Component.Input.html#name_macro">name_macro</a>, <a href="jala.Form.Component.Input.html#type_macro">type_macro</a>, <a href="jala.Form.Component.Input.html#class_macro">class_macro</a>, <a href="jala.Form.Component.Input.html#getControlAttributes">getControlAttributes</a>, <a href="jala.Form.Component.Input.html#checkLength">checkLength</a>
|
||||
</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.Form.Component.Checkbox()"><!-- --></A><H3>
|
||||
jala.Form.Component.Checkbox</H3>
|
||||
<PRE><B>jala.Form.Component.Checkbox</B>(<String> name)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Creates a new Checkbox component instance
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>name</CODE> - Name of the component, used as name of the html controls.
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A newly created Checkbox component instance
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="checkRequirements"><!-- --></A>
|
||||
<H3>checkRequirements</H3>
|
||||
<PRE>String <B>checkRequirements</B>(<Object> reqData)</PRE>
|
||||
|
||||
<UL>Validates user input from checkbox.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>reqData</CODE> - request data
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
null if everything is ok or string containing error message
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="parseValue"><!-- --></A>
|
||||
<H3>parseValue</H3>
|
||||
<PRE>Number <B>parseValue</B>(<Object> reqData)</PRE>
|
||||
|
||||
<UL>Parses the string input from the form. For a checked box, the value is 1,
|
||||
for an unchecked box the value is 0.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>reqData</CODE> - request data
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
parsed value
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="renderControls"><!-- --></A>
|
||||
<H3>renderControls</H3>
|
||||
<PRE>void <B>renderControls</B>(<Object> attr, <Object> value, reqData)</PRE>
|
||||
|
||||
<UL>Renders an checkbox to the response.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>attr</CODE> - Basic attributes for this element.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>value</CODE> - Value to be used for rendering this element.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Form.Component.Button.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.Component.Date.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Form.Component.Checkbox.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
463
modules/jala/docs/jala.Form.Component.Date.html
Normal file
463
modules/jala/docs/jala.Form.Component.Date.html
Normal file
|
@ -0,0 +1,463 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.Form.Component.Date
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.Form.Component.Date";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Form.Component.Checkbox.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.Component.Fieldset.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Form.Component.Date.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.Form.Component.Date</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<a href='jala.Form.Component.Input.html'>jala.Form.Component.Input</a>
|
||||
|
|
||||
+--<b>jala.Form.Component.Date</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.Form.Component.Date</B>
|
||||
|
||||
<DT>extends <a href='jala.Form.Component.Input.html'>jala.Form.Component.Input</a>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>Subclass of jala.Form.Component.Input which renders and validates a
|
||||
date editor.
|
||||
<BR/><I>Defined in <a href='overview-summary-Form.js.html'>Form.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.Form.Component.Date.html#jala.Form.Component.Date()">jala.Form.Component.Date</A>
|
||||
</B>
|
||||
(<String> name)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Constructs a new Date component instance
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> String</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#checkRequirements">checkRequirements</A></B>(<Object> reqData)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Validates user input from a date editor.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> Date</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#parseValue">parseValue</A></B>(<Object> reqData)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Parses the string input from the form and converts it to a date object.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#renderControls">renderControls</A></B>(<Object> attr, <Object> value, <Object> reqData)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders a textarea tag to the response.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TD><B>Methods inherited from class <a href="jala.Form.Component.Input.html">jala.Form.Component.Input</a></B></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>
|
||||
<!-- Inherited methods -->
|
||||
<a href="jala.Form.Component.Input.html#validate">validate</a>, <a href="jala.Form.Component.Input.html#save">save</a>, <a href="jala.Form.Component.Input.html#getValue">getValue</a>, <a href="jala.Form.Component.Input.html#setValue">setValue</a>, <a href="jala.Form.Component.Input.html#render">render</a>, <a href="jala.Form.Component.Input.html#renderError">renderError</a>, <a href="jala.Form.Component.Input.html#renderLabel">renderLabel</a>, <a href="jala.Form.Component.Input.html#renderHelp">renderHelp</a>, <a href="jala.Form.Component.Input.html#render_macro">render_macro</a>, <a href="jala.Form.Component.Input.html#controls_macro">controls_macro</a>, <a href="jala.Form.Component.Input.html#error_macro">error_macro</a>, <a href="jala.Form.Component.Input.html#label_macro">label_macro</a>, <a href="jala.Form.Component.Input.html#help_macro">help_macro</a>, <a href="jala.Form.Component.Input.html#id_macro">id_macro</a>, <a href="jala.Form.Component.Input.html#name_macro">name_macro</a>, <a href="jala.Form.Component.Input.html#type_macro">type_macro</a>, <a href="jala.Form.Component.Input.html#class_macro">class_macro</a>, <a href="jala.Form.Component.Input.html#getControlAttributes">getControlAttributes</a>, <a href="jala.Form.Component.Input.html#checkLength">checkLength</a>
|
||||
</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.Form.Component.Date()"><!-- --></A><H3>
|
||||
jala.Form.Component.Date</H3>
|
||||
<PRE><B>jala.Form.Component.Date</B>(<String> name)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Constructs a new Date component instance
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>name</CODE> - Name of the component, used as name of the html controls.
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A newly created Date component
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="checkRequirements"><!-- --></A>
|
||||
<H3>checkRequirements</H3>
|
||||
<PRE>String <B>checkRequirements</B>(<Object> reqData)</PRE>
|
||||
|
||||
<UL>Validates user input from a date editor.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>reqData</CODE> - request data
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
null if everything is ok or string containing error message
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="parseValue"><!-- --></A>
|
||||
<H3>parseValue</H3>
|
||||
<PRE>Date <B>parseValue</B>(<Object> reqData)</PRE>
|
||||
|
||||
<UL>Parses the string input from the form and converts it to a date object.
|
||||
Throws an error if the string cannot be parsed.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>reqData</CODE> - request data
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
parsed date value
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="renderControls"><!-- --></A>
|
||||
<H3>renderControls</H3>
|
||||
<PRE>void <B>renderControls</B>(<Object> attr, <Object> value, <Object> reqData)</PRE>
|
||||
|
||||
<UL>Renders a textarea tag to the response.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>attr</CODE> - Basic attributes for this element.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>value</CODE> - Value to be used for rendering this element.
|
||||
</UL>
|
||||
|
||||
<UL><CODE>reqData</CODE> - Request data for the whole form. This argument is passed only if the form is re-rendered after an error occured.
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Form.Component.Checkbox.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.Component.Fieldset.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Form.Component.Date.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
419
modules/jala/docs/jala.Form.Component.Fieldset.html
Normal file
419
modules/jala/docs/jala.Form.Component.Fieldset.html
Normal file
|
@ -0,0 +1,419 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
jala.Form.Component.Fieldset
|
||||
</TITLE>
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
</HEAD>
|
||||
<SCRIPT>
|
||||
function asd()
|
||||
{
|
||||
parent.document.title="jala.Form.Component.Fieldset";
|
||||
}
|
||||
</SCRIPT>
|
||||
<BODY BGCOLOR="white" onload="asd();">
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Form.Component.Date.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.Component.File.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Form.Component.Fieldset.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
<HR>
|
||||
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>Class jala.Form.Component.Fieldset</H2>
|
||||
<PRE>Object
|
||||
|
|
||||
+--<b>jala.Form.Component.Fieldset</b>
|
||||
</PRE>
|
||||
|
||||
|
||||
<HR>
|
||||
<DL>
|
||||
<!-- Class definition -->
|
||||
<DT>class
|
||||
<B>jala.Form.Component.Fieldset</B>
|
||||
|
||||
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<BR/>Instances of this class represent a form fieldset containing
|
||||
numerous form components
|
||||
<BR/><I>Defined in <a href='overview-summary-Form.js.html'>Form.js</a></I><BR/><BR/>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
<!-- ======== END NESTED CLASS SUMMARY ======== -->
|
||||
|
||||
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========== END FIELD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="jala.Form.Component.Fieldset.html#jala.Form.Component.Fieldset()">jala.Form.Component.Fieldset</A>
|
||||
</B>
|
||||
(<String> name)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Constructs a new Fieldset instance
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
|
||||
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=2><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TD>
|
||||
</TR>
|
||||
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#render">render</A></B>()
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Renders all components within the fieldset.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#save">save</A></B>(<<a href="jala.Form.Tracker.html">jala.Form.Tracker</a>> tracker, <Object> destObj)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Saves all components within the fieldset.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%">
|
||||
<FONT SIZE="-1">
|
||||
<CODE> void</CODE>
|
||||
</FONT>
|
||||
</TD>
|
||||
<TD>
|
||||
<CODE>
|
||||
<B>
|
||||
<A HREF="#validate">validate</A></B>(<<a href="jala.Form.Tracker.html">jala.Form.Tracker</a>> tracker)
|
||||
</CODE>
|
||||
<BR>
|
||||
|
||||
Validates all components within the fieldset.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
<!-- ========== END METHOD SUMMARY =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL START =========== -->
|
||||
|
||||
|
||||
<!-- ============ FIELD DETAIL END =========== -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1>
|
||||
<FONT SIZE="+2"><B>Constructor Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="jala.Form.Component.Fieldset()"><!-- --></A><H3>
|
||||
jala.Form.Component.Fieldset</H3>
|
||||
<PRE><B>jala.Form.Component.Fieldset</B>(<String> name)</PRE>
|
||||
|
||||
|
||||
<UL>
|
||||
Constructs a new Fieldset instance
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>name</CODE> - The name of the fieldset
|
||||
</UL>
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
|
||||
<!-- Constructor return value(s) -->
|
||||
|
||||
<UL>
|
||||
<B>Returns:</B>
|
||||
<UL>
|
||||
A newly created Fieldset instance
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<!-- End constructor return value(s) -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<HR/>
|
||||
<!-- END ADDITIONAL ATTRIBUTES -->
|
||||
|
||||
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL START ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TD COLSPAN=1><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- One single method detail entry -->
|
||||
|
||||
<A NAME="render"><!-- --></A>
|
||||
<H3>render</H3>
|
||||
<PRE>void <B>render</B>()</PRE>
|
||||
|
||||
<UL>Renders all components within the fieldset.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="save"><!-- --></A>
|
||||
<H3>save</H3>
|
||||
<PRE>void <B>save</B>(<<a href="jala.Form.Tracker.html">jala.Form.Tracker</a>> tracker, <Object> destObj)</PRE>
|
||||
|
||||
<UL>Saves all components within the fieldset.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>tracker</CODE> -
|
||||
</UL>
|
||||
|
||||
<UL><CODE>destObj</CODE> -
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
<A NAME="validate"><!-- --></A>
|
||||
<H3>validate</H3>
|
||||
<PRE>void <B>validate</B>(<<a href="jala.Form.Tracker.html">jala.Form.Tracker</a>> tracker)</PRE>
|
||||
|
||||
<UL>Validates all components within the fieldset.</UL>
|
||||
|
||||
|
||||
<!-- METHOD PARAMETERS START -->
|
||||
|
||||
<UL>
|
||||
<B>Parameters:</B>
|
||||
|
||||
<UL><CODE>tracker</CODE> -
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- METHOD PARAMETERS END -->
|
||||
|
||||
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES START -->
|
||||
|
||||
<!-- ADDITIONAL ATTRIBUTES END -->
|
||||
<HR>
|
||||
|
||||
|
||||
|
||||
<!-- ============ METHOD DETAIL END ========== -->
|
||||
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
|
||||
<!-- ========== START OF NAVBAR ========== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-summary-Form.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A> </TD>
|
||||
<!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"--> <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!-- </TD-->
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<B>Jala 1.3</B>
|
||||
</EM>
|
||||
</TD
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="jala.Form.Component.Date.html"><B>PREV CLASS</B></A><!--
|
||||
NEXT CLASS
|
||||
-->
|
||||
<A HREF="jala.Form.Component.File.html"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>
|
||||
<A HREF="jala.Form.Component.Fieldset.html" TARGET="_top"><B>NO FRAMES</B></A>
|
||||
|
||||
<SCRIPT>
|
||||
<!--
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!-- =========== END OF NAVBAR =========== -->
|
||||
|
||||
<HR>
|
||||
<FONT SIZE="-1">
|
||||
|
||||
</FONT>
|
||||
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Jan 8 15:45:31 2008</div>
|
||||
</BODY>
|
||||
</HTML>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue