Compare commits
153 commits
v20200614
...
v20240530🐜
Author | SHA1 | Date | |
---|---|---|---|
57642f6f10 | |||
dd0bdc62ec | |||
|
656a023b27 | ||
7c52b6ba46 | |||
47f7b19fe9 | |||
ebf9b22f55 | |||
399f81c1dc | |||
d02dd85a45 | |||
0bfa585cb9 | |||
8ffb7b0b08 | |||
a68c478dd5 | |||
77ea53d949 | |||
2ff75f7879 | |||
052bfc0db1 | |||
63c5aec4df | |||
cfbfea51d7 | |||
bca560e577 | |||
7f8c776c57 | |||
7fa9b805d6 | |||
|
2ecd5b4e36 | ||
d23268095a | |||
daf8da61b1 | |||
db4dfd0ba7 | |||
f0ac6cdb5f | |||
d7f9882596 | |||
d6b7c97518 | |||
|
b984877877 | ||
1a1b676604 | |||
46dd4a2c31 | |||
|
ee2384f35a | ||
d25b8d207e | |||
f4cd065c59 | |||
4b7f3b216d | |||
23f09d2d4f | |||
|
b6ed068e26 | ||
e96c224abc | |||
|
519adc3d37 | ||
|
7d57badb94 | ||
|
b0e319f3dd | ||
b8abe5a355 | |||
7fa3f48cff | |||
d64ca1c7a8 | |||
eae2848e9e | |||
581b17bc72 | |||
ab116b2af9 | |||
d7ab9ff461 | |||
|
fd15c4703f | ||
5e1435433a | |||
958a3c1cfc | |||
5a4ad8eeda | |||
54b9002bf4 | |||
2e45fa4b6a | |||
0fec3244e3 | |||
|
aafd5f8a4c | ||
752e4a0df7 | |||
bf29398ade | |||
|
7555411cdc | ||
2f34fb5e05 | |||
6eb1feb5cd | |||
6eaf097aef | |||
|
48ddd69f19 | ||
|
0223cb4ffe | ||
|
1fa13b9fef | ||
3ccf0af87b | |||
0774054470 | |||
e6a893a52e | |||
|
50ef602d42 | ||
2cff9188cb | |||
1540c5d24f | |||
|
db966fb4e8 | ||
b04b1cf4bf | |||
d2e09554cd | |||
647ca18d7b | |||
a580f08c17 | |||
94d6b2d1a1 | |||
d80ad0bf33 | |||
|
dbb0b6bcfd | ||
|
d419342ee9 | ||
a7ee467cdc | |||
b812b33213 | |||
0e8f04c0f5 | |||
d601ec689d | |||
6d5288f94b | |||
7eae3ba273 | |||
796a6e7337 | |||
|
4ca91f5b2e | ||
|
fb4b11a426 | ||
|
7fbad44166 | ||
e61b654238 | |||
a19eb278c7 | |||
6701ac8095 | |||
1b4624d437 | |||
5bd6e521ce | |||
|
090afa9656 | ||
|
6c61b9a02b | ||
58d893f044 | |||
ec67204d51 | |||
a692d7718c | |||
08a5233bc6 | |||
6a3a90c4f4 | |||
5fe68aef81 | |||
db2ebbed9c | |||
9a0cf1a22d | |||
|
276290add0 | ||
832a9069f1 | |||
f78e37905c | |||
|
4bee79eca7 | ||
411b9198e4 | |||
|
524578e8de | ||
4fc158d6eb | |||
5a3514440c | |||
84f4a5f396 | |||
85e8088e40 | |||
e0e78b1349 | |||
9d5a504702 | |||
8eb3c53818 | |||
9b63e208d9 | |||
d3c325cef4 | |||
e54b36bb2a | |||
34b3a5d578 | |||
|
6ed340675a | ||
|
7f23ded63d | ||
e8d9f05b72 | |||
a7fece6218 | |||
ed5aac7f66 | |||
9e2bf074b7 | |||
aea04da690 | |||
2f8160526c | |||
ac02b90699 | |||
8b990e29ca | |||
926f62ec57 | |||
47abd0e404 | |||
ae2c1c6221 | |||
|
b5c6afda24 | ||
|
b7a8e68537 | ||
|
425e3671ba | ||
7a5e470821 | |||
b31b0dc2a5 | |||
|
4b9b78bb0f | ||
7e39892c4a | |||
|
62291171e3 | ||
97db46a66c | |||
8305d30bad | |||
|
f1fa050ea5 | ||
|
e82aa34967 | ||
|
65381e7638 | ||
|
21739a54d8 | ||
|
d1fb7d312e | ||
|
81f5e3cd8e | ||
|
75f0245817 | ||
|
021a24a100 | ||
|
390231e8dd | ||
|
b0ff574e95 |
63 changed files with 1086 additions and 590 deletions
45
.github/workflows/release.yml
vendored
Normal file
45
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
LC_TIME: en_US.UTF-8
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew assembleDist
|
||||
|
||||
- name: Create release
|
||||
run: |
|
||||
gh release create "$GITHUB_REF_NAME" \
|
||||
--repo "$GITHUB_REPOSITORY" \
|
||||
--title "$(date +'%d %b %Y')" \
|
||||
--generate-notes
|
||||
|
||||
- name: Upload assets
|
||||
run: |
|
||||
gh release upload "$GITHUB_REF_NAME" \
|
||||
build/distributions/helma-*.* \
|
||||
--clobber
|
50
.github/workflows/staging.yml
vendored
Normal file
50
.github/workflows/staging.yml
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
name: Staging
|
||||
|
||||
on:
|
||||
workflow_dispatch
|
||||
|
||||
env:
|
||||
SSH_AUTH_SOCK: /tmp/ssh-agent.sock
|
||||
|
||||
jobs:
|
||||
install:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
environment:
|
||||
name: staging
|
||||
url: https://antville-test.click
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew installDist
|
||||
|
||||
- name: Set up SSH agent
|
||||
run: |
|
||||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
||||
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
|
||||
mkdir -p ~/.ssh
|
||||
echo '${{ vars.SSH_CONFIG }}' > ~/.ssh/config
|
||||
echo '${{ vars.KNOWN_HOSTS }}' > ~/.ssh/known_hosts
|
||||
|
||||
- name: Publish to staging server
|
||||
run: |
|
||||
rsync build/install/helma/ antville.dev:/ \
|
||||
--verbose --archive --delete --compress \
|
||||
--filter '+ launcher.jar' \
|
||||
--filter '+ lib' \
|
||||
--filter '+ *.jar' \
|
||||
--filter '- *' \
|
||||
|
||||
- name: Restart Helma
|
||||
run: ssh antville.dev restart
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
.gradle
|
||||
.idea
|
||||
.settings
|
||||
build
|
||||
|
||||
|
|
1
.java-version
Normal file
1
.java-version
Normal file
|
@ -0,0 +1 @@
|
|||
11.0
|
5
.vscode/extensions.json
vendored
Normal file
5
.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"vscjava.vscode-java-pack"
|
||||
]
|
||||
}
|
84
.vscode/launch.json
vendored
Normal file
84
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Current File",
|
||||
"request": "launch",
|
||||
"mainClass": "${file}"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "ImageInfo",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.image.ImageInfo",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CommandlineRunner",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.main.CommandlineRunner",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Server",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.main.Server",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "XmlConverter",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.objectmodel.dom.XmlConverter",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Crypt",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.util.Crypt",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "HtmlEncoder",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.util.HtmlEncoder",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Logo",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.util.Logo",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "MarkdownProcessor",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.util.MarkdownProcessor",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Commandline",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.main.launcher.Commandline",
|
||||
"projectName": "launcher"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Main",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.main.launcher.Main",
|
||||
"projectName": "launcher"
|
||||
}
|
||||
]
|
||||
}
|
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"files.watcherExclude": {
|
||||
"apps/": true
|
||||
},
|
||||
"java.configuration.updateBuildConfiguration": "automatic"
|
||||
}
|
17
README.md
17
README.md
|
@ -2,7 +2,7 @@
|
|||
|
||||
## TL;DR
|
||||
|
||||
- Make sure you have Java 1.6 or higher installed
|
||||
- Make sure you have Java 17 or higher installed
|
||||
- Download and unpack the [latest release](https://github.com/antville/helma/releases)
|
||||
- Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform
|
||||
- Direct your web browser to <http://localhost:8080>
|
||||
|
@ -21,9 +21,9 @@ Although Helma became a Grande Dame of server-side JavaScript already decades ag
|
|||
|
||||
## System Requirements
|
||||
|
||||
You need a Java virtual machine 1.6 or higher to run Helma.
|
||||
You need a Java virtual machine version 17 or higher to run Helma.
|
||||
|
||||
Please consult the documentation of your platform how to obtain and install Java.
|
||||
Please consult the documentation of your platform on 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.
|
||||
|
||||
|
@ -31,7 +31,12 @@ Helma is built with [Gradle](https://gradle.org), the build task depends on the
|
|||
|
||||
## 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`.
|
||||
### Additional Prerequisites
|
||||
|
||||
* [Rsync](https://rsync.samba.org) version ≥ 3.1.0
|
||||
* [Node.js](https://nodejs.org) LTS version
|
||||
|
||||
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 `yes` or `no`.
|
||||
|
||||
> ⚠️
|
||||
> 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.
|
||||
|
@ -40,7 +45,7 @@ Clone this repository to your machine and start the build process with `./gradle
|
|||
|
||||
After all files are put into place 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` environment variable 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.
|
||||
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, or through the web interface using the management application that is part of Helma.
|
||||
|
||||
If all goes well you should be able to connect your browser to <http://localhost:8080> – port 8080 on the local machine, that is.
|
||||
|
||||
|
@ -55,7 +60,7 @@ Finally, Helma can be plugged into Servlet containers using Servlet classes that
|
|||
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.
|
||||
> Unfortunately, the Helma website disappeard in the meantime. However, with some archaeological 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/)
|
||||
|
|
127
build.gradle
127
build.gradle
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id 'application'
|
||||
id 'com.github.jk1.dependency-license-report' version '1.13'
|
||||
id 'com.github.jk1.dependency-license-report' version '2.7'
|
||||
}
|
||||
|
||||
import org.apache.tools.ant.filters.FixCrLfFilter
|
||||
|
@ -18,8 +18,12 @@ allprojects {
|
|||
apply plugin: 'java'
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_6
|
||||
targetCompatibility = JavaVersion.VERSION_1_6
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,6 +32,16 @@ version = new Date().format("yyyyMMdd")
|
|||
tasks.build.dependsOn javadoc, 'jsdoc', 'generateLicenseReport'
|
||||
tasks.compileJava.dependsOn 'processSource'
|
||||
|
||||
// Disable DocLint for now
|
||||
// See <https://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html>
|
||||
if (JavaVersion.current().isJava8Compatible()) {
|
||||
allprojects {
|
||||
tasks.withType(Javadoc) {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
|
@ -37,11 +51,6 @@ sourceSets {
|
|||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
configurations {
|
||||
// Wrapping implementation because it does not allow access to its files
|
||||
// (i.e. cannot be resolved)
|
||||
|
@ -49,19 +58,19 @@ configurations {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'com.sun.activation:javax.activation:1.2.0'
|
||||
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.google.code.gson:gson:2.11.0'
|
||||
implementation 'commons-codec:commons-codec:1.17.0'
|
||||
implementation 'commons-fileupload:commons-fileupload:1.5'
|
||||
implementation 'commons-logging:commons-logging:1.3.2'
|
||||
implementation 'commons-net:commons-net:3.10.0'
|
||||
implementation 'com.sun.mail:javax.mail: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 'org.eclipse.jetty:jetty-servlet:9.4.54.v20240208'
|
||||
implementation 'org.eclipse.jetty:jetty-xml:9.4.54.v20240208'
|
||||
implementation 'org.mozilla:rhino:1.7.13'
|
||||
implementation 'org.sejda.imageio:webp-imageio:0.1.6'
|
||||
implementation 'xerces:xercesImpl:2.12.2'
|
||||
implementation 'xmlrpc:xmlrpc:2.0.1'
|
||||
}
|
||||
|
||||
|
@ -69,11 +78,10 @@ def rhinoJar = configurations.library.files.find { jar ->
|
|||
jar.name.startsWith('rhino')
|
||||
}
|
||||
|
||||
|
||||
startScripts {
|
||||
applicationName = 'helma'
|
||||
classpath = files('../launcher.jar')
|
||||
mainClassName = 'helma.main.launcher.Main'
|
||||
mainClass = 'helma.main.launcher.Main'
|
||||
|
||||
defaultJvmOpts = [jettyLogLevel, suppressMacosDockIcon]
|
||||
|
||||
|
@ -95,29 +103,33 @@ distributions {
|
|||
}
|
||||
}
|
||||
|
||||
applicationDistribution.from(projectDir) {
|
||||
include 'modules/**'
|
||||
include 'LICENSE.md'
|
||||
include 'README.md'
|
||||
include 'start.*'
|
||||
}
|
||||
application {
|
||||
applicationDistribution.from(projectDir) {
|
||||
include 'modules/**'
|
||||
include 'LICENSE.md'
|
||||
include 'README.md'
|
||||
include 'start.*'
|
||||
}
|
||||
|
||||
applicationDistribution.from(javadoc.destinationDir) {
|
||||
include '**'
|
||||
into 'docs/javadoc'
|
||||
}
|
||||
applicationDistribution.from(javadoc.destinationDir) {
|
||||
include '**'
|
||||
into 'docs/javadoc'
|
||||
}
|
||||
|
||||
applicationDistribution.from("${project.buildDir}/docs/jsdoc") {
|
||||
include '**'
|
||||
into 'docs/jsdoc'
|
||||
}
|
||||
applicationDistribution.from("${project.buildDir}/docs/jsdoc") {
|
||||
include '**'
|
||||
into 'docs/jsdoc'
|
||||
}
|
||||
|
||||
applicationDistribution.from("${project.buildDir}/reports/dependency-license") {
|
||||
include '**'
|
||||
into 'licenses'
|
||||
applicationDistribution.from("${project.buildDir}/reports/dependency-license") {
|
||||
include '**'
|
||||
into 'licenses'
|
||||
}
|
||||
}
|
||||
|
||||
distTar {
|
||||
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
|
||||
|
||||
compression = Compression.GZIP
|
||||
|
||||
filesMatching(textFiles) {
|
||||
|
@ -126,6 +138,8 @@ distTar {
|
|||
}
|
||||
|
||||
distZip {
|
||||
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
|
||||
|
||||
filesMatching(textFiles) {
|
||||
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("crlf"))
|
||||
}
|
||||
|
@ -133,7 +147,10 @@ distZip {
|
|||
|
||||
installDist {
|
||||
dependsOn build
|
||||
finalizedBy 'update'
|
||||
|
||||
if (!System.getenv('CI')) {
|
||||
finalizedBy 'update'
|
||||
}
|
||||
}
|
||||
|
||||
run {
|
||||
|
@ -166,11 +183,11 @@ task processSource(type: Sync) {
|
|||
}
|
||||
|
||||
task update {
|
||||
def rsyncArgs = ['-a', '--info=progress2', '--exclude', 'backups']
|
||||
def rsyncArgs = ['--archive', '--filter', '- backups']
|
||||
|
||||
def confirm = {
|
||||
ant.input(message: 'Update this installation?', validargs: 'y,n', addproperty: 'continue')
|
||||
return ant.continue == 'y'
|
||||
ant.input(message: 'Update this installation?', validargs: 'yes,no', addproperty: 'continue')
|
||||
return ant.continue == 'yes'
|
||||
}
|
||||
|
||||
onlyIf { confirm() }
|
||||
|
@ -181,20 +198,29 @@ task update {
|
|||
mkdir backupDir
|
||||
|
||||
exec {
|
||||
// Using rsync instead of a CopyTask because the latter chokes on multi-byte characters
|
||||
// Create a backup with 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
|
||||
}
|
||||
|
||||
print "Created backup of ${projectDir} in ${backupDir}"
|
||||
}
|
||||
|
||||
doLast {
|
||||
exec {
|
||||
// Using rsync instead of installDist task because it does not overwrite the project directory
|
||||
// Using rsync to selectively update the repo directory
|
||||
executable 'rsync'
|
||||
args '--delete'
|
||||
args rsyncArgs
|
||||
args '--exclude', 'bin'
|
||||
args '--filter', '+ bin/***'
|
||||
args '--filter', '+ docs/***'
|
||||
args '--filter', '+ extras/***'
|
||||
args '--filter', '+ launcher.jar'
|
||||
args '--filter', '+ lib'
|
||||
args '--filter', '+ *.jar'
|
||||
args '--filter', '- *'
|
||||
args "${installDist.destinationDir}/", projectDir
|
||||
}
|
||||
}
|
||||
|
@ -212,11 +238,6 @@ task jsdoc(type: Exec) {
|
|||
|
||||
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 xgettext(type: JavaExec) {
|
||||
|
@ -224,7 +245,7 @@ task xgettext(type: JavaExec) {
|
|||
group 'i18n'
|
||||
|
||||
classpath = files('launcher.jar')
|
||||
main = 'helma.main.launcher.Commandline'
|
||||
mainClass = 'helma.main.launcher.Commandline'
|
||||
|
||||
// TODO: Decouple from Antville app
|
||||
args = [
|
||||
|
@ -241,7 +262,7 @@ task po2js(type: JavaExec) {
|
|||
group 'i18n'
|
||||
|
||||
classpath = files(rhinoJar)
|
||||
main = 'org.mozilla.javascript.tools.shell.Main'
|
||||
mainClass = 'org.mozilla.javascript.tools.shell.Main'
|
||||
|
||||
// TODO: Decouple from Antville app
|
||||
args = [
|
||||
|
@ -256,7 +277,7 @@ task rhinoShell(type: JavaExec) {
|
|||
group 'Application'
|
||||
|
||||
classpath = files(rhinoJar)
|
||||
main = 'org.mozilla.javascript.tools.shell.Main'
|
||||
mainClass = 'org.mozilla.javascript.tools.shell.Main'
|
||||
|
||||
standardInput = System.in
|
||||
}
|
||||
|
@ -268,6 +289,6 @@ task commandLine(type: JavaExec) {
|
|||
group 'Application'
|
||||
|
||||
classpath = files('launcher.jar')
|
||||
main = 'helma.main.launcher.Commandline'
|
||||
mainClass = 'helma.main.launcher.Commandline'
|
||||
args '-h', projectDir, function
|
||||
}
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
6
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,7 @@
|
|||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
309
gradlew
vendored
309
gradlew
vendored
|
@ -1,78 +1,127 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# https://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.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# 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
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
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=""
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# 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
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | 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"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
@ -81,92 +130,120 @@ 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.
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
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
|
||||
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" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
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, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# 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"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
# 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")"
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
76
gradlew.bat
vendored
76
gradlew.bat
vendored
|
@ -1,4 +1,20 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
|
@ -9,25 +25,29 @@
|
|||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@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=
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@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
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
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.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
|
@ -35,48 +55,36 @@ goto fail
|
|||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
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.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
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%
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 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
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
|
16
modules/helma/Chart.js
vendored
16
modules/helma/Chart.js
vendored
|
@ -18,12 +18,12 @@
|
|||
/**
|
||||
* @fileoverview Fields and methods of the helma.Chart prototype
|
||||
* <br /><br />
|
||||
* To use this optional module, its repository needs to be added to the
|
||||
* To use this optional module, its repository needs to be added to the
|
||||
* application, for example by calling app.addRepository('modules/helma/Chart.js')
|
||||
*/
|
||||
|
||||
// take care of any dependencies
|
||||
app.addRepository('modules/helma/jxl.jar');
|
||||
app.addRepository('modules/helma/jxl-2.5.7.jar');
|
||||
|
||||
/**
|
||||
* Define the global namespace if not existing
|
||||
|
@ -55,12 +55,12 @@ helma.Chart = function(fpath, prefix, sheetName) {
|
|||
|
||||
var workbook, file;
|
||||
try {
|
||||
file = new java.io.File(fpath);
|
||||
file = new java.io.File(fpath);
|
||||
workbook = JXLPKG.getWorkbook(file);
|
||||
} catch (e) {
|
||||
if (e instanceof TypeError == false)
|
||||
throw(e);
|
||||
throw("helma.Chart needs " + JXLPKGNAME +
|
||||
throw("helma.Chart needs " + JXLPKGNAME +
|
||||
" in lib/ext or application directory " +
|
||||
"[" + JXLPKGURL + "]");
|
||||
}
|
||||
|
@ -98,9 +98,9 @@ helma.Chart = function(fpath, prefix, sheetName) {
|
|||
* Renders the Excel spreadsheet as XHTML table.
|
||||
*/
|
||||
this.render = function() {
|
||||
res.write('<table border="0" cellspacing="1" class="' +
|
||||
res.write('<table border="0" cellspacing="1" class="' +
|
||||
prefix + 'table">\n');
|
||||
|
||||
|
||||
var rowBuf = [];
|
||||
var rows = sheet.getRows();
|
||||
var max = 0;
|
||||
|
@ -110,7 +110,7 @@ helma.Chart = function(fpath, prefix, sheetName) {
|
|||
max = row.length;
|
||||
rowBuf.push(row);
|
||||
}
|
||||
|
||||
|
||||
for (var i in rowBuf) {
|
||||
res.write('<tr class="' + prefix + 'row">\n');
|
||||
for (var n=0; n<max; n+=1) {
|
||||
|
@ -145,7 +145,7 @@ helma.Chart = function(fpath, prefix, sheetName) {
|
|||
}
|
||||
res.write('</tr>\n');
|
||||
}
|
||||
|
||||
|
||||
res.write('</table>\n');
|
||||
workbook.close();
|
||||
};
|
||||
|
|
|
@ -62,16 +62,17 @@ helma.Http = function() {
|
|||
|
||||
var responseHandler = function(connection, result) {
|
||||
var input;
|
||||
var stream;
|
||||
try {
|
||||
if (method !== 'DELETE') {
|
||||
var stream = connection.getInputStream();
|
||||
if (connection.getContentEncoding() === 'gzip') {
|
||||
stream = new java.util.zip.GZIPInputStream(stream);
|
||||
}
|
||||
input = new java.io.BufferedInputStream(stream);
|
||||
}
|
||||
stream = connection.getInputStream();
|
||||
} catch (error) {
|
||||
input = new java.io.BufferedInputStream(connection.getErrorStream());
|
||||
stream = connection.getErrorStream();
|
||||
}
|
||||
if (stream) {
|
||||
if (connection.getContentEncoding() === 'gzip') {
|
||||
stream = new java.util.zip.GZIPInputStream(stream);
|
||||
}
|
||||
input = new java.io.BufferedInputStream(stream);
|
||||
}
|
||||
if (input) {
|
||||
var body = new java.io.ByteArrayOutputStream();
|
||||
|
@ -90,8 +91,7 @@ helma.Http = function() {
|
|||
} catch (error) {
|
||||
// safe to ignore
|
||||
}
|
||||
if (binaryMode && (result.code >= 200 && result.code < 300)) {
|
||||
// only honor binaryMode if the request succeeded
|
||||
if (binaryMode) {
|
||||
result.content = body.toByteArray();
|
||||
} else {
|
||||
result.content = result.charset ?
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
/**
|
||||
* @fileoverview Fields and methods of the helma.Search class
|
||||
* <br /><br />
|
||||
* To use this optional module, its repository needs to be added to the
|
||||
* To use this optional module, its repository needs to be added to the
|
||||
* application, for example by calling app.addRepository('modules/helma/Search.js')
|
||||
*/
|
||||
|
||||
// take care of any dependencies
|
||||
app.addRepository('modules/helma/lucene-core.jar');
|
||||
app.addRepository('modules/helma/lucene-analyzers.jar');
|
||||
app.addRepository('modules/helma/lucene-core-2.2.0.jar');
|
||||
app.addRepository('modules/helma/lucene-analyzers-2.2.0.jar');
|
||||
|
||||
|
||||
if (!global.helma) {
|
||||
|
@ -47,7 +47,7 @@ if (!global.helma) {
|
|||
* creating a fulltext search index based on Apache Lucene.
|
||||
* @returns A newly created instance of this prototype.
|
||||
* @constructor
|
||||
* @author Robert Gaggl <robert@nomatic.org>
|
||||
* @author Robert Gaggl <robert@nomatic.org>
|
||||
*/
|
||||
helma.Search = function() {
|
||||
try {
|
||||
|
@ -309,7 +309,7 @@ helma.Search.Index = function(directory, analyzer) {
|
|||
this.getAnalyzer = function() {
|
||||
return analyzer;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns a searcher for querying this index.
|
||||
* @returns A searcher useable for querying the index.
|
||||
|
@ -318,7 +318,7 @@ helma.Search.Index = function(directory, analyzer) {
|
|||
this.getSearcher = function() {
|
||||
return new helma.Search.Searcher(this);
|
||||
};
|
||||
|
||||
|
||||
/** @ignore */
|
||||
this.toString = function() {
|
||||
return ("[Lucene Index " + directory + "]");
|
||||
|
@ -773,7 +773,7 @@ helma.Search.HitCollection = function(hits) {
|
|||
this.length = function() {
|
||||
return this.size();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Executes a provided function once per hit.
|
||||
* @param {Function} fun Function to execute for each element
|
||||
|
@ -793,7 +793,7 @@ helma.Search.HitCollection = function(hits) {
|
|||
}
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
@ -1308,7 +1308,7 @@ helma.Search.Document.Field = function(name, value, options) {
|
|||
var store = pkg.Store.YES;
|
||||
var index = pkg.Index.TOKENIZED;
|
||||
var termVector = pkg.TermVector.NO;
|
||||
|
||||
|
||||
var opt;
|
||||
if (options != null) {
|
||||
if (options.store != null) {
|
||||
|
|
|
@ -18,20 +18,20 @@
|
|||
/**
|
||||
* @fileoverview Fields and methods of the helma.Ssh class.
|
||||
* <br /><br />
|
||||
* To use this optional module, its repository needs to be added to the
|
||||
* To use this optional module, its repository needs to be added to the
|
||||
* application, for example by calling app.addRepository('modules/helma/Ssh.js')
|
||||
*/
|
||||
|
||||
// take care of any dependencies
|
||||
app.addRepository('modules/helma/File.js');
|
||||
app.addRepository('modules/helma/ganymed-ssh2.jar');
|
||||
app.addRepository('modules/helma/ganymed-ssh2-build208.jar');
|
||||
|
||||
// define the helma namespace, if not existing
|
||||
if (!global.helma) {
|
||||
global.helma = {};
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Creates a new instance of helma.Ssh
|
||||
* @class This class provides methods for connecting to a remote
|
||||
* server via secure shell (ssh) and copying files from/to a remote
|
||||
|
@ -43,7 +43,7 @@ if (!global.helma) {
|
|||
* file. This argument is optional.
|
||||
* @constructor
|
||||
* @returns A newly created instance of helma.Ssh
|
||||
* @author Robert Gaggl <robert@nomatic.org>
|
||||
* @author Robert Gaggl <robert@nomatic.org>
|
||||
*/
|
||||
helma.Ssh = function(server, hosts) {
|
||||
var SSHPKG = Packages.ch.ethz.ssh2;
|
||||
|
@ -61,11 +61,11 @@ helma.Ssh = function(server, hosts) {
|
|||
} catch (e) {
|
||||
if (e instanceof TypeError == false)
|
||||
throw(e);
|
||||
throw("helma.Ssh needs " + SSHPKGNAME +
|
||||
throw("helma.Ssh needs " + SSHPKGNAME +
|
||||
" in lib/ext or application directory " +
|
||||
"[" + SSHPKGURL + "]");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A simple verifier for verifying host keys
|
||||
* @private
|
||||
|
@ -96,7 +96,7 @@ helma.Ssh = function(server, hosts) {
|
|||
return;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Converts the argument into an instance of java.io.File
|
||||
* @param {helma.File|java.io.File|String} file Either a file
|
||||
|
@ -131,7 +131,7 @@ helma.Ssh = function(server, hosts) {
|
|||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Private helper method for debugging output using app.logger
|
||||
* @param {String} methodName The name of the method
|
||||
|
@ -175,7 +175,7 @@ helma.Ssh = function(server, hosts) {
|
|||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Connects to a remote host using plain username/password authentication.
|
||||
* @param {String} username The username
|
||||
|
@ -217,7 +217,7 @@ helma.Ssh = function(server, hosts) {
|
|||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Disconnects this client from the remote server.
|
||||
*/
|
||||
|
@ -325,7 +325,7 @@ helma.Ssh = function(server, hosts) {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Toggles paranoid mode. If set to true this client tries to
|
||||
* verify the host key against the its list of known hosts
|
||||
|
@ -346,7 +346,7 @@ helma.Ssh = function(server, hosts) {
|
|||
this.isParanoid = function() {
|
||||
return paranoid;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* main constructor body
|
||||
*/
|
||||
|
|
18
modules/helma/build.gradle
Normal file
18
modules/helma/build.gradle
Normal file
|
@ -0,0 +1,18 @@
|
|||
dependencies {
|
||||
runtimeOnly 'ch.ethz.ganymed:ganymed-ssh2:build209'
|
||||
runtimeOnly 'net.sourceforge.jexcelapi:jxl:2.5.7'
|
||||
runtimeOnly 'org.apache.lucene:lucene-analyzers:2.2.0'
|
||||
runtimeOnly 'org.apache.lucene:lucene-core:2.2.0'
|
||||
}
|
||||
|
||||
jar.enabled = false
|
||||
compileJava.enabled = false
|
||||
compileTestJava.enabled = false
|
||||
processResources.enabled = false
|
||||
processTestResources.enabled = false
|
||||
test.enabled = false
|
||||
|
||||
task deps(type: Copy) {
|
||||
from sourceSets.main.runtimeClasspath
|
||||
into '.'
|
||||
}
|
BIN
modules/helma/jxl-2.5.7.jar
Normal file
BIN
modules/helma/jxl-2.5.7.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
21
modules/jala/build.gradle
Normal file
21
modules/jala/build.gradle
Normal file
|
@ -0,0 +1,21 @@
|
|||
dependencies {
|
||||
runtimeOnly 'dom4j:dom4j:1.1.3'
|
||||
runtimeOnly 'jaxen:jaxen:1.1-beta-8'
|
||||
runtimeOnly 'net.sf.javamusictag:jid3lib:0.5.4'
|
||||
|
||||
// FIXME: Did not find these two or appropriate replacements for them
|
||||
//runtime 'id3:de.ueberdosis.mp3info:1.6.0d9'
|
||||
//runtime 'javadns:org.wonderly:?'
|
||||
}
|
||||
|
||||
jar.enabled = false
|
||||
compileJava.enabled = false
|
||||
compileTestJava.enabled = false
|
||||
processResources.enabled = false
|
||||
processTestResources.enabled = false
|
||||
test.enabled = false
|
||||
|
||||
task deps(type: Copy) {
|
||||
from sourceSets.main.runtimeClasspath
|
||||
into 'lib'
|
||||
}
|
|
@ -518,7 +518,7 @@ jala.db.DataType = function(type, typeName, params) {
|
|||
this.getParams = function() {
|
||||
return params;
|
||||
};
|
||||
|
||||
|
||||
/** @ignore */
|
||||
this.toString = function() {
|
||||
return "[DataType " +
|
||||
|
@ -597,7 +597,7 @@ jala.db.RamDatabase = function(name, username, password) {
|
|||
this.getUsername = function() {
|
||||
return username || "sa";
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns the password of this database
|
||||
* @returns The password of this database
|
||||
|
@ -841,7 +841,7 @@ jala.db.RamDatabase.prototype.copyTables = function(database, tables) {
|
|||
tables = jala.db.metadata.getTableNames(dbMetadata);
|
||||
}
|
||||
|
||||
for each (var tableName in tables) {
|
||||
for (let tableName of tables) {
|
||||
// drop the table if it exists
|
||||
if (this.tableExists(tableName)) {
|
||||
this.dropTable(tableName);
|
||||
|
@ -1011,7 +1011,7 @@ jala.db.FileDatabase = function(name, directory, username, password) {
|
|||
this.getUsername = function() {
|
||||
return username || "sa";
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns the password of this database
|
||||
* @returns The password of this database
|
||||
|
|
Binary file not shown.
16
modules/jala/util/HopKit/build.gradle
Normal file
16
modules/jala/util/HopKit/build.gradle
Normal file
|
@ -0,0 +1,16 @@
|
|||
dependencies {
|
||||
// FIXME: Seems to be not used, anymore…?
|
||||
runtimeOnly 'bsf:bsf:2.4.0'
|
||||
}
|
||||
|
||||
jar.enabled = false
|
||||
compileJava.enabled = false
|
||||
compileTestJava.enabled = false
|
||||
processResources.enabled = false
|
||||
processTestResources.enabled = false
|
||||
test.enabled = false
|
||||
|
||||
task deps(type: Copy) {
|
||||
from sourceSets.main.runtimeClasspath
|
||||
into 'lib'
|
||||
}
|
BIN
modules/jala/util/HopKit/lib/bsf-2.4.0.jar
Normal file
BIN
modules/jala/util/HopKit/lib/bsf-2.4.0.jar
Normal file
Binary file not shown.
Binary file not shown.
|
@ -330,7 +330,7 @@ MessageParser.prototype.parseSkinFile = function(file, encoding) {
|
|||
var processMacros = function(macros) {
|
||||
var re = gettext_macro.REGEX;
|
||||
var id, pluralId, name, args, param, key, msg;
|
||||
for each (var macro in macros) {
|
||||
for (let macro of macros) {
|
||||
id = pluralId = null;
|
||||
name = macro.getName();
|
||||
param = macro.getNamedParams();
|
||||
|
@ -374,7 +374,7 @@ MessageParser.prototype.parseSkinFile = function(file, encoding) {
|
|||
if (skin.hasMainskin()) {
|
||||
processMacros(skin.getMacros());
|
||||
}
|
||||
for each (var name in skin.getSubskinNames()) {
|
||||
for (let name of skin.getSubskinNames()) {
|
||||
var subskin = skin.getSubskin(name);
|
||||
processMacros(subskin.getMacros());
|
||||
}
|
||||
|
|
16
modules/jala/util/Test/build.gradle
Normal file
16
modules/jala/util/Test/build.gradle
Normal file
|
@ -0,0 +1,16 @@
|
|||
dependencies {
|
||||
runtimeOnly 'org.subethamail:subethasmtp-smtp:1.2'
|
||||
runtimeOnly 'org.subethamail:subethasmtp-wiser:1.2'
|
||||
}
|
||||
|
||||
jar.enabled = false
|
||||
compileJava.enabled = false
|
||||
compileTestJava.enabled = false
|
||||
processResources.enabled = false
|
||||
processTestResources.enabled = false
|
||||
test.enabled = false
|
||||
|
||||
task deps(type: Copy) {
|
||||
from sourceSets.main.runtimeClasspath
|
||||
into 'code'
|
||||
}
|
|
@ -41,7 +41,7 @@ app.addRepository("modules/helma/Http.js");
|
|||
/**
|
||||
* Jala dependencies
|
||||
*/
|
||||
app.addRepository(getProperty("jala.dir", "modules/jala") +
|
||||
app.addRepository(getProperty("jala.dir", "modules/jala") +
|
||||
"/code/Database.js");
|
||||
|
||||
/**
|
||||
|
@ -573,11 +573,11 @@ jala.Test.prototype.executeTest = function(testFile) {
|
|||
} finally {
|
||||
// exit the js context created above
|
||||
cx.exit();
|
||||
// FIXME (sim) don't polute global in the first place or
|
||||
// FIXME (sim) don't polute global in the first place or
|
||||
// get a fresh global for each testrun
|
||||
global.testFunctionIdents.forEach(function(funcName) {
|
||||
// NOTE won't work on var-defined props
|
||||
// delete global[funcName]]
|
||||
// delete global[funcName]]
|
||||
global[funcName] = "ignoreMe";
|
||||
}, this);
|
||||
global["setup"] = "ignoreMe";
|
||||
|
@ -861,7 +861,7 @@ jala.Test.prototype.assertEqualFile = function assertEqualFile(val, file) {
|
|||
// the last linefeed in a file too
|
||||
var str = value1.replace(/\r?\n$/g, "");
|
||||
equals = str === file.readAll();
|
||||
}
|
||||
}
|
||||
if (!equals) {
|
||||
throw new jala.Test.TestException(comment,
|
||||
"Expected " + jala.Test.valueToString(value1) +
|
||||
|
@ -1155,7 +1155,7 @@ jala.Test.HttpClient = function() {
|
|||
this.getClient = function() {
|
||||
return client;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Sets the cookie to use for subsequent requests using this client
|
||||
* @param {Array} arr The cookie object as received from helma.Http.getUrl
|
||||
|
@ -1336,7 +1336,7 @@ jala.Test.DatabaseMgr.prototype.startDatabase = function(dbSourceName, copyTable
|
|||
// collect the table names of all relational prototypes
|
||||
tables = [];
|
||||
var protos = app.getPrototypes();
|
||||
for each (var proto in protos) {
|
||||
for (let proto of protos) {
|
||||
var dbMap = proto.getDbMapping();
|
||||
if (dbMap.isRelational()) {
|
||||
tables.push(dbMap.getTableName());
|
||||
|
@ -1401,7 +1401,7 @@ jala.Test.DatabaseMgr.prototype.stopAll = function() {
|
|||
*/
|
||||
jala.Test.SmtpServer = function(port) {
|
||||
var server = null;
|
||||
|
||||
|
||||
var oldSmtpServer = null;
|
||||
|
||||
/**
|
||||
|
|
Binary file not shown.
Binary file not shown.
BIN
modules/jala/util/Test/code/subethasmtp-wiser-1.2.jar
Normal file
BIN
modules/jala/util/Test/code/subethasmtp-wiser-1.2.jar
Normal file
Binary file not shown.
50
renovate.json
Normal file
50
renovate.json
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
|
||||
"extends": [
|
||||
"config:recommended",
|
||||
"mergeConfidence:all-badges",
|
||||
"npm:unpublishSafe",
|
||||
":disableRateLimiting",
|
||||
":pinVersions",
|
||||
":semanticCommitsDisabled"
|
||||
],
|
||||
|
||||
"osvVulnerabilityAlerts": true,
|
||||
|
||||
"vulnerabilityAlerts": {
|
||||
"labels": ["security", "urgent"],
|
||||
"automerge": true
|
||||
},
|
||||
|
||||
"labels": ["dependency"],
|
||||
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Label Helma core packages",
|
||||
"matchFiles": ["build.gradle"],
|
||||
"addLabels": ["core"]
|
||||
},
|
||||
{
|
||||
"description": "Label major version bumps",
|
||||
"matchUpdateTypes": ["major"],
|
||||
"addLabels": ["major"]
|
||||
},
|
||||
{
|
||||
"description": "Label packages required at runtime",
|
||||
"matchDepTypes": ["dependencies"],
|
||||
"addLabels": ["runtime"]
|
||||
},
|
||||
{
|
||||
"description": "Group Jetty packages",
|
||||
"matchPackagePrefixes": ["org.eclipse.jetty"],
|
||||
"groupName": "Jetty packages"
|
||||
},
|
||||
{
|
||||
"description": "Group Lucene packages",
|
||||
"matchPackagePrefixes": ["org.apache.lucene"],
|
||||
"groupName": "Lucene packages"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -7,3 +7,12 @@ org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.git/**')
|
|||
org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.gitignore')
|
||||
|
||||
include 'launcher'
|
||||
include 'modules'
|
||||
include 'jala'
|
||||
include 'hopKit'
|
||||
include 'test'
|
||||
|
||||
project(':modules').projectDir = file('modules/helma')
|
||||
project(':jala').projectDir = file('modules/jala')
|
||||
project(':hopKit').projectDir = file('modules/jala/util/HopKit')
|
||||
project(':test').projectDir = file('modules/jala/util/Test')
|
||||
|
|
|
@ -149,7 +149,7 @@ function testOrder(org, pos) {
|
|||
|
||||
function cleanup() {
|
||||
var persons = root.persons.list();
|
||||
for each (var person in persons) {
|
||||
for (let person of persons) {
|
||||
person.remove();
|
||||
}
|
||||
ikea.remove();
|
||||
|
|
2
src/dist/apps/test/tests/HopObjectGeneric.js
vendored
2
src/dist/apps/test/tests/HopObjectGeneric.js
vendored
|
@ -86,7 +86,7 @@ function testAdd() {
|
|||
|
||||
function cleanup() {
|
||||
var persons = org.generic.list();
|
||||
for each (var person in persons) {
|
||||
for (let person of persons) {
|
||||
person.remove();
|
||||
}
|
||||
org.remove();
|
||||
|
|
8
src/dist/apps/test/tests/HopObjectGroupBy.js
vendored
8
src/dist/apps/test/tests/HopObjectGroupBy.js
vendored
|
@ -68,7 +68,7 @@ function testGroupByAddRemoveNoCommit() {
|
|||
// FIXME HELMABUG: country is still accessible at this point
|
||||
// similar to http://helma.org/bugs/show_bug.cgi?id=551
|
||||
assertNull(root.organisationsByCountry.get(org.country));
|
||||
|
||||
|
||||
assertEqual(countryCount, root.organisationsByCountry.count());
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ function testGroupTransient() {
|
|||
assertNotNull(country);
|
||||
assertEqual(country._prototype, "Country");
|
||||
assertEqual(country.groupname, org.country);
|
||||
|
||||
|
||||
// These don't work as org uses the parent from type.properties
|
||||
// which is root.organisations. Not sure if this is a bug or not.
|
||||
// assertEqual(country, org._parent);
|
||||
|
@ -143,7 +143,7 @@ function testGroupTransient() {
|
|||
|
||||
function cleanup() {
|
||||
var orgs = root.organisations.list();
|
||||
for each (var org in orgs) {
|
||||
for (let org of orgs) {
|
||||
org.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
25
src/dist/extras/helma.service
vendored
Normal file
25
src/dist/extras/helma.service
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
[Unit]
|
||||
Description = Helma Object Publisher
|
||||
After = syslog.target network.target
|
||||
StartLimitIntervalSec = 0
|
||||
|
||||
[Service]
|
||||
Type = simple
|
||||
Restart = always
|
||||
RestartSec = 1
|
||||
SuccessExitStatus = 143
|
||||
User = helma
|
||||
WorkingDirectory = /home/helma
|
||||
|
||||
ExecStart = /usr/bin/java -server \
|
||||
-Dfile.encoding=utf8 \
|
||||
-Djava.awt.headless=true \
|
||||
-Xms1024m -Xmx2048m \
|
||||
-jar launcher.jar \
|
||||
-w 8080 -x 8081
|
||||
|
||||
ExecReload = touch apps.properties && touch server.properties
|
||||
ExecStop = /bin/kill -15 $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
66
src/dist/extras/upstart/helma
vendored
66
src/dist/extras/upstart/helma
vendored
|
@ -6,56 +6,67 @@
|
|||
# andreas bolka, 2003-11-30
|
||||
#
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: helma
|
||||
# Required-Start: postgresql apache2
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-STop: 0 1 6
|
||||
# Short-Description: Helma Application Server
|
||||
### END INIT INFO
|
||||
|
||||
HELMA_CONFIG=/etc/helma.conf
|
||||
|
||||
###
|
||||
|
||||
# Check for existence of needed config file and source it
|
||||
if [ -r $HELMA_CONFIG ]; then
|
||||
source $HELMA_CONFIG
|
||||
source $HELMA_CONFIG
|
||||
else
|
||||
echo "Can't read config file $HELMA_CONFIG"
|
||||
exit 6
|
||||
echo "Can't read config file $HELMA_CONFIG"
|
||||
exit 6
|
||||
fi
|
||||
|
||||
# Check for missing files and directories
|
||||
|
||||
if [ ! -x $JAVA_BIN ]; then
|
||||
echo "Config error: JAVA_BIN $JAVA_BIN not found or not executable"
|
||||
exit 5
|
||||
fi
|
||||
if [ ! -r $HELMA_INSTALL/launcher.jar ]; then
|
||||
echo "Config error: $HELMA_INSTALL/launcher.jar not found or not readable"
|
||||
exit 5
|
||||
fi
|
||||
if [ ! -d $HELMA_HOME ]; then
|
||||
echo "Config error: HELMA_HOME $HELMA_HOME not found"
|
||||
exit 5
|
||||
echo "Config error: JAVA_BIN $JAVA_BIN not found or not executable"
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# local settins
|
||||
RUN_CMD="sudo -u $HELMA_USER $JAVA_BIN"
|
||||
RUN_ARGS="$JAVA_OPTS -jar $HELMA_INSTALL/launcher.jar -h $HELMA_HOME $HELMA_ARGS"
|
||||
if [ ! -r $HELMA_INSTALL/launcher.jar ]; then
|
||||
echo "Config error: $HELMA_INSTALL/launcher.jar not found or not readable"
|
||||
exit 5
|
||||
fi
|
||||
|
||||
if [ ! -d $HELMA_HOME ]; then
|
||||
echo "Config error: HELMA_HOME $HELMA_HOME not found"
|
||||
exit 5
|
||||
fi
|
||||
|
||||
RUN_CMD="su - $HELMA_USER"
|
||||
RUN_ARGS="-c $JAVA_BIN $JAVA_OPTS -jar $HELMA_INSTALL/launcher.jar -h $HELMA_HOME $HELMA_ARGS"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start)
|
||||
echo -n "Starting $HELMA_SERVICE: "
|
||||
|
||||
if [ -f $HELMA_PID ]; then
|
||||
echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) already running"
|
||||
exit 1
|
||||
echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) already running"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $HELMA_HOME
|
||||
nohup $RUN_CMD $RUN_ARGS > $HELMA_LOG 2>&1 &
|
||||
nohup $RUN_CMD "$RUN_ARGS" > $HELMA_LOG 2>&1 &
|
||||
echo $! > $HELMA_PID
|
||||
echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) started."
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop)
|
||||
echo -n "Shutting down $HELMA_SERVICE: "
|
||||
if [ ! -f $HELMA_PID ]; then
|
||||
echo "$HELMA_SERVICE not running"
|
||||
exit 1
|
||||
echo "$HELMA_SERVICE not running"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PID=`cat $HELMA_PID 2>/dev/null`
|
||||
|
@ -65,20 +76,21 @@ stop)
|
|||
echo "stopped."
|
||||
;;
|
||||
|
||||
restart)
|
||||
restart)
|
||||
$0 stop && $0 start
|
||||
;;
|
||||
|
||||
reload)
|
||||
reload)
|
||||
echo -n "Reloading $HELMA_SERVICE: $HELMA_SERVICE"
|
||||
touch $HELMA_HOME/server.properties
|
||||
touch $HELMA_HOME/apps.properties
|
||||
echo "."
|
||||
;;
|
||||
|
||||
*)
|
||||
*)
|
||||
echo "Usage: /etc/init.d/helma start|stop|restart|reload"
|
||||
exit 1
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
|
92
src/dist/extras/upstart/helma.conf
vendored
92
src/dist/extras/upstart/helma.conf
vendored
|
@ -1,72 +1,44 @@
|
|||
##############################################################
|
||||
###
|
||||
### Helma object publisher config file
|
||||
### Author: Hannes Wallnoefer, <hannes@helma.at>
|
||||
### Author: Andreas Bolka
|
||||
###
|
||||
### This file should be placed in /etc/helma.conf.
|
||||
### It is read by the Helma service control script,
|
||||
### usually /etc/init.d/helma.
|
||||
###
|
||||
##############################################################
|
||||
#
|
||||
# Helma Object Publisher configuration file
|
||||
#
|
||||
# Authors:
|
||||
# Hannes Wallnoefer <hannes@helma.at>,
|
||||
# Andreas Bolka
|
||||
#
|
||||
# This file should be placed in /etc/helma.conf.
|
||||
# It is read by the Helma service control script,
|
||||
# usually /etc/init.d/helma.
|
||||
#
|
||||
|
||||
##############################################################
|
||||
### The name of this Helma server/service and the
|
||||
### pid file to be used
|
||||
#############################################################
|
||||
# Full path to Java executable
|
||||
JAVA_HOME=/usr/lib/jvm/default-java
|
||||
JAVA_BIN=$JAVA_HOME/bin/java
|
||||
|
||||
# Options passed to the Java runtime
|
||||
JAVA_OPTS="-server -Djava.awt.headless=true -Dfile.encoding=utf-8 -Djsse.enableSNIExtension=false"
|
||||
|
||||
# The name of this Helma server/service and the pid file to be used
|
||||
HELMA_SERVICE=helma
|
||||
HELMA_PID=/var/run/helma.pid
|
||||
|
||||
# Helma install directory. This is where we look for the Helma jar files
|
||||
# (launcher.jar, lib/* and lib/ext/*)
|
||||
HELMA_INSTALL=/home/helma
|
||||
|
||||
##############################################################
|
||||
### Full path to Java executable
|
||||
##############################################################
|
||||
JAVA_HOME=/usr/lib/j2sdk1.5-sun
|
||||
JAVA_BIN=$JAVA_HOME/bin/java
|
||||
|
||||
|
||||
##############################################################
|
||||
### Options passed to the Java runtime
|
||||
##############################################################
|
||||
JAVA_OPTS="-Djava.awt.headless=true"
|
||||
|
||||
|
||||
##############################################################
|
||||
### Helma install directory. This is where we look for
|
||||
### the Helma jar files (launcher.jar, lib/* and lib/ext/*)
|
||||
##############################################################
|
||||
HELMA_INSTALL=/usr/local/helma/helma-1.6.x
|
||||
|
||||
|
||||
##############################################################
|
||||
### Helma home directory, in case it is different from the
|
||||
### Helma install dir. This is where Helma will look for
|
||||
### properties files and applications.
|
||||
##############################################################
|
||||
# Helma home directory, in case it is different from the Helma install dir.
|
||||
# This is where Helma will look for properties files and applications.
|
||||
HELMA_HOME=$HELMA_INSTALL
|
||||
|
||||
|
||||
##############################################################
|
||||
### The user Helma should be running as
|
||||
##############################################################
|
||||
# The user Helma should be running as
|
||||
HELMA_USER=helma
|
||||
|
||||
|
||||
##############################################################
|
||||
### File to which standard and error output from Helma
|
||||
### is redirected
|
||||
##############################################################
|
||||
# File to which standard and error output from Helma is redirected
|
||||
HELMA_LOG=$HELMA_HOME/log/helma-out.log
|
||||
|
||||
|
||||
##############################################################
|
||||
### Helma options. Possible options are:
|
||||
###
|
||||
### -f file Specify server.properties file
|
||||
### -p port Specify RMI port number
|
||||
### -w port Specify port number for embedded Web server
|
||||
### -x port Specify XML-RPC port number
|
||||
### -jk port Specify AJP13 port number
|
||||
###
|
||||
##############################################################
|
||||
# Helma options. Possible options are:
|
||||
# -f file - Location of server.properties file
|
||||
# -p port - RMI port
|
||||
# -w port - Web server port
|
||||
# -x port - XML-RPC port
|
||||
# -jk port - AJP13 port
|
||||
HELMA_ARGS="-w 8080"
|
||||
|
|
|
@ -24,15 +24,13 @@ import javax.servlet.http.Cookie;
|
|||
* of an HTTP cookie.
|
||||
*/
|
||||
public final class CookieTrans implements Serializable {
|
||||
private static final long serialVersionUID = 1811202114296536258L;
|
||||
|
||||
String name;
|
||||
String value;
|
||||
String path;
|
||||
String domain;
|
||||
int days = -1;
|
||||
boolean secure;
|
||||
boolean httpOnly;
|
||||
private String name;
|
||||
private String value;
|
||||
private String path;
|
||||
private String domain;
|
||||
private boolean isHttpOnly = true;
|
||||
private boolean isSecure = false;
|
||||
private int days = -1;
|
||||
|
||||
CookieTrans(String name, String value) {
|
||||
this.name = name;
|
||||
|
@ -55,9 +53,15 @@ public final class CookieTrans implements Serializable {
|
|||
this.domain = domain;
|
||||
}
|
||||
|
||||
void setHttpOnly(boolean isHttpOnly) {
|
||||
this.isHttpOnly = isHttpOnly;
|
||||
}
|
||||
|
||||
void setSecure(boolean isSecure) {
|
||||
this.isSecure = isSecure;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return ...
|
||||
*/
|
||||
public String getName() {
|
||||
|
@ -65,8 +69,6 @@ public final class CookieTrans implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return ...
|
||||
*/
|
||||
public String getValue() {
|
||||
|
@ -74,8 +76,6 @@ public final class CookieTrans implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return ...
|
||||
*/
|
||||
public int getDays() {
|
||||
|
@ -83,8 +83,6 @@ public final class CookieTrans implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return ...
|
||||
*/
|
||||
public String getPath() {
|
||||
|
@ -92,28 +90,24 @@ public final class CookieTrans implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return ...
|
||||
*/
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public boolean isSecure() {
|
||||
return secure;
|
||||
/**
|
||||
* @return ...
|
||||
*/
|
||||
public boolean getHttpOnly() {
|
||||
return isHttpOnly;
|
||||
}
|
||||
|
||||
void isSecure(boolean secure) {
|
||||
this.secure = secure;
|
||||
}
|
||||
|
||||
public boolean isHttpOnly() {
|
||||
return httpOnly;
|
||||
}
|
||||
|
||||
void isHttpOnly(boolean httpOnly) {
|
||||
this.httpOnly = httpOnly;
|
||||
/**
|
||||
* @return ...
|
||||
*/
|
||||
public boolean getSecure() {
|
||||
return isSecure;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -147,8 +141,8 @@ public final class CookieTrans implements Serializable {
|
|||
c.setDomain(defaultDomain);
|
||||
}
|
||||
|
||||
c.setHttpOnly(httpOnly);
|
||||
c.setSecure(secure);
|
||||
c.setHttpOnly(isHttpOnly);
|
||||
c.setSecure(isSecure);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ public class ResponseBean implements Serializable {
|
|||
* @param value the cookie value
|
||||
*/
|
||||
public void setCookie(String key, String value) {
|
||||
res.setCookie(key, value, -1, null, null);
|
||||
res.setCookie(key, value, -1, null, null, true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -156,7 +156,7 @@ public class ResponseBean implements Serializable {
|
|||
* @param days number of days the cookie should be stored
|
||||
*/
|
||||
public void setCookie(String key, String value, int days) {
|
||||
res.setCookie(key, value, days, null, null);
|
||||
res.setCookie(key, value, days, null, null, true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -171,7 +171,42 @@ public class ResponseBean implements Serializable {
|
|||
* @param path the URL path to apply the cookie to
|
||||
*/
|
||||
public void setCookie(String key, String value, int days, String path) {
|
||||
res.setCookie(key, value, days, path, null);
|
||||
res.setCookie(key, value, days, path, null, true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a HTTP cookie with the name and value that is only applied to
|
||||
* the URLs matching the given path and is stored by the
|
||||
* HTTP client for the given number of days. A days value of 0 means the
|
||||
* cookie should be immediately discarded.
|
||||
*
|
||||
* @param key the cookie name
|
||||
* @param value the cookie value
|
||||
* @param days number of days the cookie should be stored
|
||||
* @param path the URL path to apply the cookie to
|
||||
* @param domain domain
|
||||
* @param isHttpOnly marks the cookie as HttpOnly
|
||||
*/
|
||||
public void setCookie(String key, String value, int days, String path, String domain, boolean isHttpOnly) {
|
||||
res.setCookie(key, value, days, path, domain, isHttpOnly, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a HTTP cookie with the name and value that is only applied to
|
||||
* the URLs matching the given path and is stored by the
|
||||
* HTTP client for the given number of days. A days value of 0 means the
|
||||
* cookie should be immediately discarded.
|
||||
*
|
||||
* @param key the cookie name
|
||||
* @param value the cookie value
|
||||
* @param days number of days the cookie should be stored
|
||||
* @param path the URL path to apply the cookie to
|
||||
* @param domain domain
|
||||
* @param isHttpOnly marks the cookie as HttpOnly
|
||||
* @param isSecure limits the cookie to secure protocols
|
||||
*/
|
||||
public void setCookie(String key, String value, int days, String path, String domain, boolean isHttpOnly, boolean isSecure) {
|
||||
res.setCookie(key, value, days, path, domain, isHttpOnly, isSecure);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -187,7 +222,7 @@ public class ResponseBean implements Serializable {
|
|||
* @param domain domain
|
||||
*/
|
||||
public void setCookie(String key, String value, int days, String path, String domain) {
|
||||
res.setCookie(key, value, days, path, domain);
|
||||
res.setCookie(key, value, days, path, domain, true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -197,7 +232,7 @@ public class ResponseBean implements Serializable {
|
|||
* @param key the name of the cookie to be discarded
|
||||
*/
|
||||
public void unsetCookie(String key) {
|
||||
res.setCookie(key, "", 0, null, null);
|
||||
res.setCookie(key, "", 0, null, null, true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -245,9 +280,9 @@ public class ResponseBean implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* add an HTML formatted debug message to the end of the page.
|
||||
* add HTML formatted debug messages to the end of the page.
|
||||
*
|
||||
* @param message the message
|
||||
* @param messages the list of messages
|
||||
*/
|
||||
public void debug(String... messages) {
|
||||
if (messages == null) {
|
||||
|
|
|
@ -384,7 +384,7 @@ public final class ResponseTrans extends Writer implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Replace special characters with entities, including <, > and ", thus allowing
|
||||
* Replace special characters with entities, including {@code <}, {@code >} and {@code "}, thus allowing
|
||||
* no HTML tags.
|
||||
*/
|
||||
public synchronized void encode(Object what) {
|
||||
|
@ -415,7 +415,7 @@ public final class ResponseTrans extends Writer implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Replace special characters with entities, including <, > and ", thus allowing
|
||||
* Replace special characters with entities, including {@code <}, {@code >} and {@code "}, thus allowing
|
||||
* no HTML tags.
|
||||
*/
|
||||
public synchronized void encodeXml(Object what) {
|
||||
|
@ -974,8 +974,10 @@ public final class ResponseTrans extends Writer implements Serializable {
|
|||
* @param days the cookie's lifespan in days
|
||||
* @param path the URL path to apply the cookie to
|
||||
* @param domain the domain to apply the cookie to
|
||||
* @param isHttpOnly marks the cookie as HttpOnly
|
||||
* @param isSecure limits the cookie for use with secure protocols
|
||||
*/
|
||||
public void setCookie(String key, String value, int days, String path, String domain) {
|
||||
public void setCookie(String key, String value, int days, String path, String domain, boolean isHttpOnly, boolean isSecure) {
|
||||
CookieTrans c = null;
|
||||
|
||||
if (cookies == null) {
|
||||
|
@ -1001,11 +1003,11 @@ public final class ResponseTrans extends Writer implements Serializable {
|
|||
c.setDomain(domain);
|
||||
|
||||
if (!"false".equalsIgnoreCase(app.getProperty("cookies.httpOnly"))) {
|
||||
c.isHttpOnly(true);
|
||||
c.setHttpOnly(true);
|
||||
}
|
||||
|
||||
if ("true".equalsIgnoreCase(app.getProperty("cookies.secure"))) {
|
||||
c.isSecure(true);
|
||||
c.setSecure(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ public final class TypeManager {
|
|||
protected synchronized void checkRepository(Repository repository, boolean update) throws IOException {
|
||||
Repository[] list = repository.getRepositories();
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
|
||||
|
||||
// ignore dir name found - compare to shortname (= Prototype name)
|
||||
if (ignoreDirs.contains(list[i].getShortName())) {
|
||||
// jump this repository
|
||||
|
@ -140,7 +140,7 @@ public final class TypeManager {
|
|||
}
|
||||
|
||||
if (list[i].isScriptRoot()) {
|
||||
// this is an embedded top-level script repository
|
||||
// this is an embedded top-level script repository
|
||||
if (app.addRepository(list[i], list[i].getParentRepository())) {
|
||||
// repository is new, check it
|
||||
checkRepository(list[i], update);
|
||||
|
@ -153,7 +153,7 @@ public final class TypeManager {
|
|||
// if prototype doesn't exist, create it
|
||||
if (proto == null) {
|
||||
// create new prototype if type name is valid
|
||||
if (isValidTypeName(name))
|
||||
if (isValidTypeName(name))
|
||||
createPrototype(name, list[i], null);
|
||||
} else {
|
||||
proto.addRepository(list[i], update);
|
||||
|
@ -192,7 +192,7 @@ public final class TypeManager {
|
|||
long lastScan = lastRepoScan.containsKey(repository) ?
|
||||
((Long) lastRepoScan.get(repository)).longValue() : 0;
|
||||
if (repository.lastModified() != lastScan) {
|
||||
lastRepoScan.put(repository, new Long(repository.lastModified()));
|
||||
lastRepoScan.put(repository, Long.valueOf(repository.lastModified()));
|
||||
checkRepository(repository, false);
|
||||
}
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ public final class TypeManager {
|
|||
|
||||
if (debug) {
|
||||
System.err.println("CHECK: " + proto.getName() + " in " + Thread.currentThread());
|
||||
}
|
||||
}
|
||||
|
||||
// update prototype's type mapping
|
||||
DbMapping dbmap = proto.getDbMapping();
|
||||
|
|
|
@ -16,21 +16,21 @@
|
|||
|
||||
/*
|
||||
* A few explanations:
|
||||
*
|
||||
*
|
||||
* - this.image is either an AWT Image or a BufferedImage.
|
||||
* It depends on the ImageGenerator in what form the Image initially is.
|
||||
* (the ImageIO implementation only uses BufferedImages for example.)
|
||||
*
|
||||
* As soon as some action that needs the graphics object is performed and the
|
||||
*
|
||||
* As soon as some action that needs the graphics object is performed and the
|
||||
* image is still in AWT format, it is converted to a BufferedImage
|
||||
*
|
||||
*
|
||||
* Any internal function that performs graphical actions needs to call
|
||||
* getGraphics, never rely on this.graphics being set correctly!
|
||||
*
|
||||
*
|
||||
* - ImageWrapper objects are created and safed by the ImageGenerator class
|
||||
* all different implementations of Imaging functionallity are implemented
|
||||
* as a ImageGenerator extending class.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
package helma.image;
|
||||
|
@ -52,7 +52,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Creates a new ImageWrapper object.
|
||||
*
|
||||
*
|
||||
* @param image ...
|
||||
* @param width ...
|
||||
* @param height ...
|
||||
|
@ -66,7 +66,7 @@ public class ImageWrapper {
|
|||
// graphics are turned off by default. getGraphics activates it if necessary.
|
||||
this.graphics = null;
|
||||
}
|
||||
|
||||
|
||||
public ImageWrapper(Image image, ImageGenerator generator) {
|
||||
this(image, image.getWidth(null), image.getHeight(null), generator);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public class ImageWrapper {
|
|||
* not. By using getBufferedImage, images are only converted to a
|
||||
* getBufferedImage when this is actually needed, which is better than
|
||||
* storing images as BufferedImage in general.
|
||||
*
|
||||
*
|
||||
* @return the Image object as a BufferedImage
|
||||
*/
|
||||
public BufferedImage getBufferedImage() {
|
||||
|
@ -94,9 +94,9 @@ public class ImageWrapper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the Graphics object to directly paint to this Image. Converts the
|
||||
* Returns the Graphics object to directly paint to this Image. Converts the
|
||||
* internal image to a BufferedImage if necessary.
|
||||
*
|
||||
*
|
||||
* @return the Graphics object for drawing into this image
|
||||
*/
|
||||
public Graphics2D getGraphics() {
|
||||
|
@ -107,7 +107,7 @@ public class ImageWrapper {
|
|||
}
|
||||
return graphics;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the internal image and clears the stored graphics object.
|
||||
* Any code that is changing the internal image should do it through this function
|
||||
|
@ -129,7 +129,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Creates and returns a copy of this image.
|
||||
*
|
||||
*
|
||||
* @return a clone of this image.
|
||||
*/
|
||||
public Object clone() {
|
||||
|
@ -141,7 +141,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Returns the Image object represented by this ImageWrapper.
|
||||
*
|
||||
*
|
||||
* @return the image object
|
||||
*/
|
||||
public Image getImage() {
|
||||
|
@ -150,7 +150,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Returns the ImageProducer of the wrapped image
|
||||
*
|
||||
*
|
||||
* @return the images's ImageProducer
|
||||
*/
|
||||
public ImageProducer getSource() {
|
||||
|
@ -180,7 +180,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Sets the color used to write/paint to this image.
|
||||
*
|
||||
*
|
||||
* @param red ...
|
||||
* @param green ...
|
||||
* @param blue ...
|
||||
|
@ -191,7 +191,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Sets the color used to write/paint to this image.
|
||||
*
|
||||
*
|
||||
* @param color ...
|
||||
*/
|
||||
public void setColor(int color) {
|
||||
|
@ -200,7 +200,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Sets the color used to write/paint to this image.
|
||||
*
|
||||
*
|
||||
* @param color ...
|
||||
*/
|
||||
public void setColor(Color color) {
|
||||
|
@ -209,7 +209,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Sets the color used to write/paint to this image.
|
||||
*
|
||||
*
|
||||
* @param color ...
|
||||
*/
|
||||
public void setColor(String color) {
|
||||
|
@ -217,7 +217,7 @@ public class ImageWrapper {
|
|||
}
|
||||
/**
|
||||
* Draws a string to this image at the given coordinates.
|
||||
*
|
||||
*
|
||||
* @param str ...
|
||||
* @param x ...
|
||||
* @param y ...
|
||||
|
@ -228,7 +228,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Draws a line to this image from x1/y1 to x2/y2.
|
||||
*
|
||||
*
|
||||
* @param x1 ...
|
||||
* @param y1 ...
|
||||
* @param x2 ...
|
||||
|
@ -240,7 +240,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Draws a rectangle to this image.
|
||||
*
|
||||
*
|
||||
* @param x ...
|
||||
* @param y ...
|
||||
* @param w ...
|
||||
|
@ -252,12 +252,12 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Draws another image to this image.
|
||||
*
|
||||
*
|
||||
* @param filename ...
|
||||
* @param x ...
|
||||
* @param y ...
|
||||
*/
|
||||
public void drawImage(String filename, int x, int y)
|
||||
public void drawImage(String filename, int x, int y)
|
||||
throws IOException {
|
||||
Image img = generator.read(filename);
|
||||
if (img != null)
|
||||
|
@ -266,30 +266,30 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Draws another image to this image.
|
||||
*
|
||||
*
|
||||
* @param image ...
|
||||
* @param x ...
|
||||
* @param y ...
|
||||
*/
|
||||
public void drawImage(ImageWrapper image, int x, int y)
|
||||
public void drawImage(ImageWrapper image, int x, int y)
|
||||
throws IOException {
|
||||
getGraphics().drawImage(image.getImage(), x, y, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws another image to this image.
|
||||
*
|
||||
*
|
||||
* @param image ...
|
||||
* @param at ...
|
||||
*/
|
||||
public void drawImage(ImageWrapper image, AffineTransform at)
|
||||
public void drawImage(ImageWrapper image, AffineTransform at)
|
||||
throws IOException {
|
||||
getGraphics().drawImage(image.getImage(), at, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a filled rectangle to this image.
|
||||
*
|
||||
*
|
||||
* @param x ...
|
||||
* @param y ...
|
||||
* @param w ...
|
||||
|
@ -301,7 +301,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Returns the width of this image.
|
||||
*
|
||||
*
|
||||
* @return the width of this image
|
||||
*/
|
||||
public int getWidth() {
|
||||
|
@ -310,7 +310,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Returns the height of this image.
|
||||
*
|
||||
*
|
||||
* @return the height of this image
|
||||
*/
|
||||
public int getHeight() {
|
||||
|
@ -319,7 +319,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Crops the image.
|
||||
*
|
||||
*
|
||||
* @param x ...
|
||||
* @param y ...
|
||||
* @param w ...
|
||||
|
@ -340,21 +340,21 @@ public class ImageWrapper {
|
|||
setImage(buffered);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Trims the image.
|
||||
*
|
||||
*
|
||||
* @param x the x-coordinate of the pixel specifying the background color
|
||||
* @param y the y-coordinate of the pixel specifying the background color
|
||||
*/
|
||||
|
||||
|
||||
public void trim(int x, int y) {
|
||||
trim(x, y, true, true, true, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims the image.
|
||||
*
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @param trimLeft
|
||||
|
@ -369,7 +369,7 @@ public class ImageWrapper {
|
|||
|
||||
// create a BufferedImage of only 1 pixel height for fetching the rows of the image in the correct format (ARGB)
|
||||
// This speeds up things by more than factor 2, compared to the standard BufferedImage.getRGB solution,
|
||||
// which is supposed to be fast too. This is probably the case because drawing to BufferedImages uses
|
||||
// which is supposed to be fast too. This is probably the case because drawing to BufferedImages uses
|
||||
// very optimized code which may even be hardware accelerated.
|
||||
if (trimTop || trimBottom) {
|
||||
BufferedImage row = new BufferedImage(width, 1, BufferedImage.TYPE_INT_ARGB);
|
||||
|
@ -445,7 +445,7 @@ public class ImageWrapper {
|
|||
}
|
||||
crop(left, top, right - left + 1, bottom - top + 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Resizes the image using the Graphics2D approach
|
||||
*/
|
||||
|
@ -453,12 +453,12 @@ public class ImageWrapper {
|
|||
BufferedImage buffered = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics2D g2d = buffered.createGraphics();
|
||||
|
||||
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
|
||||
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
|
||||
smooth ? RenderingHints.VALUE_INTERPOLATION_BICUBIC :
|
||||
RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR
|
||||
);
|
||||
|
||||
g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
|
||||
g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
|
||||
smooth ? RenderingHints.VALUE_RENDER_QUALITY :
|
||||
RenderingHints.VALUE_RENDER_SPEED
|
||||
);
|
||||
|
@ -474,7 +474,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Resizes the image
|
||||
*
|
||||
*
|
||||
* @param w ...
|
||||
* @param h ...
|
||||
*/
|
||||
|
@ -494,7 +494,7 @@ public class ImageWrapper {
|
|||
// Image scaled = ImageWaiter.waitForImage(image.getScaledInstance(w, h, Image.SCALE_AREA_AVERAGING));
|
||||
// if (scaled == null)
|
||||
// throw new RuntimeException("Image cannot be resized.");
|
||||
|
||||
|
||||
// This version is up to 4 times faster than getScaledInstance:
|
||||
ImageFilterOp filter = new ImageFilterOp(new AreaAveragingScaleFilter(w, h));
|
||||
setImage(filter.filter(getBufferedImage(), null));
|
||||
|
@ -503,7 +503,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Resize the image, using a fast and cheap algorithm
|
||||
*
|
||||
*
|
||||
* @param w ...
|
||||
* @param h ...
|
||||
*/
|
||||
|
@ -513,8 +513,8 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Reduces the colors used in the image. Necessary before saving as GIF.
|
||||
*
|
||||
* @param colors colors the number of colors to use, usually <= 256.
|
||||
*
|
||||
* @param colors colors the number of colors to use, usually {@literal <}= 256.
|
||||
*/
|
||||
public void reduceColors(int colors) {
|
||||
reduceColors(colors, false);
|
||||
|
@ -522,8 +522,8 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Reduces the colors used in the image. Necessary before saving as GIF.
|
||||
*
|
||||
* @param colors colors the number of colors to use, usually <= 256.
|
||||
*
|
||||
* @param colors colors the number of colors to use, usually {@literal <}= 256.
|
||||
* @param dither ...
|
||||
*/
|
||||
public void reduceColors(int colors, boolean dither) {
|
||||
|
@ -533,8 +533,8 @@ public class ImageWrapper {
|
|||
/**
|
||||
* Reduce the colors used in this image. Useful and necessary before saving
|
||||
* the image as GIF file.
|
||||
*
|
||||
* @param colors the number of colors to use, usually <= 256.
|
||||
*
|
||||
* @param colors the number of colors to use, usually {@literal <}= 256.
|
||||
* @param dither ...
|
||||
* @param alphaToBitmask ...
|
||||
*/
|
||||
|
@ -546,7 +546,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Save the image. Image format is deduced from filename.
|
||||
*
|
||||
*
|
||||
* @param filename ...
|
||||
* @throws IOException
|
||||
*/
|
||||
|
@ -557,7 +557,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Saves the image. Image format is deduced from filename.
|
||||
*
|
||||
*
|
||||
* @param filename ...
|
||||
* @param quality ...
|
||||
* @throws IOException
|
||||
|
@ -569,7 +569,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Saves the image. Image format is deduced from filename.
|
||||
*
|
||||
*
|
||||
* @param filename ...
|
||||
* @param quality ...
|
||||
* @param alpha ...
|
||||
|
@ -579,10 +579,10 @@ public class ImageWrapper {
|
|||
throws IOException {
|
||||
generator.write(this, checkFilename(filename), quality, alpha);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves the image. Image format is deduced from mimeType.
|
||||
*
|
||||
*
|
||||
* @param out ...
|
||||
* @param mimeType ...
|
||||
* @throws IOException
|
||||
|
@ -591,10 +591,10 @@ public class ImageWrapper {
|
|||
throws IOException {
|
||||
generator.write(this, out, mimeType, -1f, false); // -1 means default quality
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves the image. Image format is deduced from mimeType.
|
||||
*
|
||||
*
|
||||
* @param out ...
|
||||
* @param mimeType ...
|
||||
* @param quality ...
|
||||
|
@ -607,7 +607,7 @@ public class ImageWrapper {
|
|||
|
||||
/**
|
||||
* Saves the image. Image format is deduced from mimeType.
|
||||
*
|
||||
*
|
||||
* @param out ...
|
||||
* @param mimeType ...
|
||||
* @param quality ...
|
||||
|
@ -618,7 +618,7 @@ public class ImageWrapper {
|
|||
throws IOException {
|
||||
generator.write(this, out, mimeType, quality, alpha);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the palette index of the transparent color for Images with an
|
||||
* IndexColorModel. This can be used together with
|
||||
|
@ -648,7 +648,7 @@ public class ImageWrapper {
|
|||
/**
|
||||
* Returns the pixel at x, y. If the image is indexed, it returns the
|
||||
* palette index, otherwise the rgb code of the color is returned.
|
||||
*
|
||||
*
|
||||
* @param x the x coordinate of the pixel
|
||||
* @param y the y coordinate of the pixel
|
||||
* @return the pixel at x, y
|
||||
|
@ -676,4 +676,4 @@ public class ImageWrapper {
|
|||
}
|
||||
return file.getPath();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -473,10 +473,10 @@ public class ApplicationManager implements XmlRpcHandler {
|
|||
}
|
||||
|
||||
// bind to Jetty HTTP server
|
||||
if (ApplicationManager.this.jetty != null) {
|
||||
if(ApplicationManager.this.context == null) {
|
||||
ApplicationManager.this.context = new ContextHandlerCollection();
|
||||
ApplicationManager.this.jetty.getHttpServer().setHandler(ApplicationManager.this.context);
|
||||
if (jetty != null) {
|
||||
if (context == null) {
|
||||
context = new ContextHandlerCollection();
|
||||
jetty.getHttpServer().setHandler(context);
|
||||
}
|
||||
|
||||
// if there is a static direcory specified, mount it
|
||||
|
@ -501,9 +501,8 @@ public class ApplicationManager implements XmlRpcHandler {
|
|||
Class servletClass = servletClassName == null ?
|
||||
EmbeddedServletClient.class : Class.forName(servletClassName);
|
||||
ServletHolder holder = new ServletHolder(servletClass);
|
||||
appContext.addServlet(holder, "/*"); //$NON-NLS-1$
|
||||
|
||||
holder.setInitParameter("application", appName); //$NON-NLS-1$
|
||||
holder.setInitParameter("application", appName);
|
||||
appContext.addServlet(holder, "/*");
|
||||
|
||||
if (this.cookieDomain != null) {
|
||||
holder.setInitParameter("cookieDomain", this.cookieDomain); //$NON-NLS-1$
|
||||
|
@ -529,9 +528,9 @@ public class ApplicationManager implements XmlRpcHandler {
|
|||
holder.setInitParameter("debug", this.debug); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
if (this.protectedStaticDir != null) {
|
||||
File protectedContent = getAbsoluteFile(this.protectedStaticDir);
|
||||
this.appContext.setResourceBase(protectedContent.getPath());
|
||||
if (protectedStaticDir != null) {
|
||||
File protectedContent = getAbsoluteFile(protectedStaticDir);
|
||||
appContext.setResourceBase(protectedContent.getPath());
|
||||
getLogger().info("Serving protected static from " +
|
||||
protectedContent.getPath());
|
||||
}
|
||||
|
|
|
@ -76,13 +76,13 @@ public final class TransientProperty implements IProperty, Serializable {
|
|||
return svalue;
|
||||
|
||||
case BOOLEAN:
|
||||
return new Boolean(bvalue);
|
||||
return Boolean.valueOf(bvalue);
|
||||
|
||||
case INTEGER:
|
||||
return new Long(lvalue);
|
||||
return Long.valueOf(lvalue);
|
||||
|
||||
case FLOAT:
|
||||
return new Double(dvalue);
|
||||
return Double.valueOf(dvalue);
|
||||
|
||||
case DATE:
|
||||
return new Date(lvalue);
|
||||
|
|
|
@ -93,7 +93,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
|
|||
break;
|
||||
|
||||
case INTEGER:
|
||||
value = new Long(in.readLong());
|
||||
value = Long.valueOf(in.readLong());
|
||||
|
||||
break;
|
||||
|
||||
|
@ -103,7 +103,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
|
|||
break;
|
||||
|
||||
case FLOAT:
|
||||
value = new Double(in.readDouble());
|
||||
value = Double.valueOf(in.readDouble());
|
||||
|
||||
break;
|
||||
|
||||
|
@ -231,7 +231,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
|
|||
*/
|
||||
public void setIntegerValue(long l) {
|
||||
type = INTEGER;
|
||||
value = new Long(l);
|
||||
value = Long.valueOf(l);
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
|
|||
*/
|
||||
public void setFloatValue(double d) {
|
||||
type = FLOAT;
|
||||
value = new Double(d);
|
||||
value = Double.valueOf(d);
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
|
@ -544,4 +544,4 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
|
|||
Property p = (Property) obj;
|
||||
return value == null ? p.value == null : value.equals(p.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ public class Transactor {
|
|||
public void registerConnection(DbSource src, Connection con) {
|
||||
sqlConnections.put(src, con);
|
||||
// we assume a freshly created connection is ok.
|
||||
testedConnections.put(src, new Long(System.currentTimeMillis()));
|
||||
testedConnections.put(src, Long.valueOf(System.currentTimeMillis()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -262,7 +262,7 @@ public class Transactor {
|
|||
stmt.execute("SELECT 1");
|
||||
}
|
||||
stmt.close();
|
||||
testedConnections.put(src, new Long(now));
|
||||
testedConnections.put(src, Long.valueOf(now));
|
||||
} catch (SQLException sx) {
|
||||
try {
|
||||
con.close();
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.util.Date;
|
|||
import java.util.Hashtable;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public final class XmlDatabaseReader extends DefaultHandler implements XmlConstants {
|
||||
static SAXParserFactory factory = SAXParserFactory.newInstance();
|
||||
|
@ -225,9 +225,9 @@ public final class XmlDatabaseReader extends DefaultHandler implements XmlConsta
|
|||
prop.setStringValue(charValue);
|
||||
}
|
||||
} else if ("float".equals(elementType)) {
|
||||
prop.setFloatValue((new Double(charValue)).doubleValue());
|
||||
prop.setFloatValue((Double.valueOf(charValue)).doubleValue());
|
||||
} else if ("integer".equals(elementType)) {
|
||||
prop.setIntegerValue((new Long(charValue)).longValue());
|
||||
prop.setIntegerValue((Long.valueOf(charValue)).longValue());
|
||||
} else {
|
||||
prop.setStringValue(charValue);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.HashMap;
|
|||
import java.util.Stack;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public final class XmlReader extends DefaultHandler implements XmlConstants {
|
||||
static SAXParserFactory factory = SAXParserFactory.newInstance();
|
||||
|
@ -213,9 +213,9 @@ public final class XmlReader extends DefaultHandler implements XmlConstants {
|
|||
if (propName == null) {
|
||||
propName = qName;
|
||||
}
|
||||
|
||||
|
||||
if ("hop:parent".equals(qName)) {
|
||||
// FIXME: we ought to set parent here, but we're
|
||||
// FIXME: we ought to set parent here, but we're
|
||||
// dealing with INodes, which don't have a setParent().
|
||||
} else {
|
||||
currentNode.setNode(propName, n);
|
||||
|
@ -299,9 +299,9 @@ public final class XmlReader extends DefaultHandler implements XmlConstants {
|
|||
currentNode.setString(elementName, charValue);
|
||||
}
|
||||
} else if ("float".equals(elementType)) {
|
||||
currentNode.setFloat(elementName, (new Double(charValue)).doubleValue());
|
||||
currentNode.setFloat(elementName, (Double.valueOf(charValue)).doubleValue());
|
||||
} else if ("integer".equals(elementType)) {
|
||||
currentNode.setInteger(elementName, (new Long(charValue)).longValue());
|
||||
currentNode.setInteger(elementName, (Long.valueOf(charValue)).longValue());
|
||||
} else {
|
||||
currentNode.setString(elementName, charValue);
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ public class HopObject extends ScriptableObject implements Wrapper, PropertyReco
|
|||
INode node = getNode();
|
||||
|
||||
if (skin != null) {
|
||||
skin.render(engine.reval, node,
|
||||
skin.render(engine.reval, node,
|
||||
(paramobj == Undefined.instance) ? null : paramobj);
|
||||
}
|
||||
|
||||
|
@ -711,7 +711,7 @@ public class HopObject extends ScriptableObject implements Wrapper, PropertyReco
|
|||
public int jsFunction_contains(Object obj) {
|
||||
return jsFunction_indexOf(obj);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set a property in this HopObject
|
||||
*
|
||||
|
@ -879,7 +879,7 @@ public class HopObject extends ScriptableObject implements Wrapper, PropertyReco
|
|||
if (d == null) {
|
||||
return null;
|
||||
} else {
|
||||
Object[] args = { new Long(d.getTime()) };
|
||||
Object[] args = { Long.valueOf(d.getTime()) };
|
||||
try {
|
||||
return cx.newObject(core.global, "Date", args);
|
||||
} catch (JavaScriptException nafx) {
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
/*
|
||||
* The contents of this file are subject to the terms
|
||||
* of the Common Development and Distribution License
|
||||
* The contents of this file are subject to the terms
|
||||
* of the Common Development and Distribution License
|
||||
* (the License). You may not use this file except in
|
||||
* compliance with the License.
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
*
|
||||
* You can obtain a copy of the license at
|
||||
* https://glassfish.dev.java.net/public/CDDLv1.0.html or
|
||||
* glassfish/bootstrap/legal/CDDLv1.0.txt.
|
||||
* See the License for the specific language governing
|
||||
* See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL
|
||||
* Header Notice in each file and include the License file
|
||||
* at glassfish/bootstrap/legal/CDDLv1.0.txt.
|
||||
* If applicable, add the following below the CDDL Header,
|
||||
*
|
||||
* When distributing Covered Code, include this CDDL
|
||||
* Header Notice in each file and include the License file
|
||||
* at glassfish/bootstrap/legal/CDDLv1.0.txt.
|
||||
* If applicable, add the following below the CDDL Header,
|
||||
* with the fields enclosed by brackets [] replaced by
|
||||
* you own identifying information:
|
||||
* you own identifying information:
|
||||
* "Portions Copyrighted [year] [name of copyright owner]"
|
||||
*
|
||||
*
|
||||
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
package helma.scripting.rhino;
|
||||
|
||||
import org.mozilla.javascript.*;
|
||||
|
@ -71,7 +71,7 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
private JSAdapter(Scriptable obj) {
|
||||
setAdaptee(obj);
|
||||
}
|
||||
|
||||
|
||||
// initializer to setup JSAdapter prototype in the given scope
|
||||
public static void init(Context cx, Scriptable scope, boolean sealed)
|
||||
throws RhinoException {
|
||||
|
@ -82,11 +82,11 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
ScriptableObject.defineProperty(scope, "JSAdapter", obj,
|
||||
ScriptableObject.DONTENUM);
|
||||
}
|
||||
|
||||
|
||||
public String getClassName() {
|
||||
return "JSAdapter";
|
||||
}
|
||||
|
||||
|
||||
public Object get(String name, Scriptable start) {
|
||||
Function func = getAdapteeFunction(GET_PROP);
|
||||
if (func != null) {
|
||||
|
@ -96,17 +96,17 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
return start.get(name, start);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Object get(int index, Scriptable start) {
|
||||
Function func = getAdapteeFunction(GET_PROP);
|
||||
if (func != null) {
|
||||
return call(func, new Object[] { new Integer(index) });
|
||||
return call(func, new Object[] { Integer.valueOf(index) });
|
||||
} else {
|
||||
start = getAdaptee();
|
||||
return start.get(index, start);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean has(String name, Scriptable start) {
|
||||
Function func = getAdapteeFunction(HAS_PROP);
|
||||
if (func != null) {
|
||||
|
@ -117,18 +117,18 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
return start.has(name, start);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean has(int index, Scriptable start) {
|
||||
Function func = getAdapteeFunction(HAS_PROP);
|
||||
if (func != null) {
|
||||
Object res = call(func, new Object[] { new Integer(index) });
|
||||
Object res = call(func, new Object[] { Integer.valueOf(index) });
|
||||
return Context.toBoolean(res);
|
||||
} else {
|
||||
start = getAdaptee();
|
||||
return start.has(index, start);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void put(String name, Scriptable start, Object value) {
|
||||
if (start == this) {
|
||||
Function func = getAdapteeFunction(PUT_PROP);
|
||||
|
@ -142,12 +142,12 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
start.put(name, start, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void put(int index, Scriptable start, Object value) {
|
||||
if (start == this) {
|
||||
Function func = getAdapteeFunction(PUT_PROP);
|
||||
if( func != null) {
|
||||
call(func, new Object[] { new Integer(index), value });
|
||||
call(func, new Object[] { Integer.valueOf(index), value });
|
||||
} else {
|
||||
start = getAdaptee();
|
||||
start.put(index, start, value);
|
||||
|
@ -156,7 +156,7 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
start.put(index, start, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void delete(String name) {
|
||||
Function func = getAdapteeFunction(DEL_PROP);
|
||||
if (func != null) {
|
||||
|
@ -165,32 +165,32 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
getAdaptee().delete(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void delete(int index) {
|
||||
Function func = getAdapteeFunction(DEL_PROP);
|
||||
if (func != null) {
|
||||
call(func, new Object[] { new Integer(index) });
|
||||
call(func, new Object[] { Integer.valueOf(index) });
|
||||
} else {
|
||||
getAdaptee().delete(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Scriptable getPrototype() {
|
||||
return prototype;
|
||||
}
|
||||
|
||||
|
||||
public void setPrototype(Scriptable prototype) {
|
||||
this.prototype = prototype;
|
||||
}
|
||||
|
||||
|
||||
public Scriptable getParentScope() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
|
||||
public void setParentScope(Scriptable parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
|
||||
public Object[] getIds() {
|
||||
Function func = getAdapteeFunction(GET_PROPIDS);
|
||||
if (func != null) {
|
||||
|
@ -226,7 +226,7 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
return getAdaptee().getIds();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean hasInstance(Scriptable scriptable) {
|
||||
if (scriptable instanceof JSAdapter) {
|
||||
return true;
|
||||
|
@ -239,11 +239,11 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Object getDefaultValue(Class hint) {
|
||||
return ScriptableObject.getDefaultValue(this, hint);
|
||||
}
|
||||
|
||||
|
||||
public Object call(Context cx, Scriptable scope, Scriptable thisObj,
|
||||
Object[] args)
|
||||
throws RhinoException {
|
||||
|
@ -258,7 +258,7 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Scriptable construct(Context cx, Scriptable scope, Object[] args)
|
||||
throws RhinoException {
|
||||
if (isPrototype) {
|
||||
|
@ -279,38 +279,38 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Scriptable getAdaptee() {
|
||||
return adaptee;
|
||||
}
|
||||
|
||||
|
||||
public void setAdaptee(Scriptable adaptee) {
|
||||
if (adaptee == null) {
|
||||
throw new NullPointerException("adaptee can not be null");
|
||||
}
|
||||
this.adaptee = adaptee;
|
||||
}
|
||||
|
||||
|
||||
//-- internals only below this point
|
||||
|
||||
|
||||
// map a property id. Property id can only be an Integer or String
|
||||
private Object mapToId(Object tmp) {
|
||||
if (tmp instanceof Double) {
|
||||
return new Integer(((Double)tmp).intValue());
|
||||
return Integer.valueOf(((Double)tmp).intValue());
|
||||
} else {
|
||||
return Context.toString(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static Scriptable getFunctionPrototype(Scriptable scope) {
|
||||
return ScriptableObject.getFunctionPrototype(scope);
|
||||
}
|
||||
|
||||
|
||||
private Function getAdapteeFunction(String name) {
|
||||
Object o = ScriptableObject.getProperty(getAdaptee(), name);
|
||||
return (o instanceof Function)? (Function)o : null;
|
||||
}
|
||||
|
||||
|
||||
private Object call(Function func, Object[] args) {
|
||||
Context cx = Context.getCurrentContext();
|
||||
Scriptable thisObj = getAdaptee();
|
||||
|
@ -321,12 +321,12 @@ public final class JSAdapter implements Scriptable, Function {
|
|||
throw Context.reportRuntimeError(re.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private Scriptable prototype;
|
||||
private Scriptable parent;
|
||||
private Scriptable adaptee;
|
||||
private boolean isPrototype;
|
||||
|
||||
|
||||
// names of adaptee JavaScript functions
|
||||
private static final String GET_PROP = "__get__";
|
||||
private static final String HAS_PROP = "__has__";
|
||||
|
|
|
@ -106,7 +106,7 @@ public class PathWrapper extends ScriptableObject {
|
|||
Object[] ids = new Object[path.size()];
|
||||
|
||||
for (int i=0; i<ids.length; i++) {
|
||||
ids[i] = new Integer(i);
|
||||
ids[i] = Integer.valueOf(i);
|
||||
}
|
||||
|
||||
return ids;
|
||||
|
|
|
@ -93,8 +93,8 @@ public final class RhinoCore implements ScopeProvider {
|
|||
// optimization level for rhino engine, ranges from -1 to 9
|
||||
int optLevel = 0;
|
||||
|
||||
// language version - default to JS 1.8
|
||||
int languageVersion = 180;
|
||||
// language version - default to ES6
|
||||
int languageVersion = 200;
|
||||
|
||||
// debugger/tracer flags
|
||||
boolean hasDebugger = false;
|
||||
|
@ -569,7 +569,7 @@ public final class RhinoCore implements ScopeProvider {
|
|||
return arg;
|
||||
if (arg instanceof Date) {
|
||||
Date d = (Date) arg;
|
||||
Object[] args = { new Long(d.getTime()) };
|
||||
Object[] args = { Long.valueOf(d.getTime()) };
|
||||
return Context.getCurrentContext().newObject(global, "Date", args);
|
||||
}
|
||||
return Context.toObject(arg, global);
|
||||
|
@ -618,9 +618,9 @@ public final class RhinoCore implements ScopeProvider {
|
|||
} else if (arg instanceof Number) {
|
||||
Number n = (Number) arg;
|
||||
if (arg instanceof Float || arg instanceof Long) {
|
||||
return new Double(n.doubleValue());
|
||||
return Double.valueOf(n.doubleValue());
|
||||
} else if (!(arg instanceof Double)) {
|
||||
return new Integer(n.intValue());
|
||||
return Integer.valueOf(n.intValue());
|
||||
}
|
||||
} else if (arg instanceof INode) {
|
||||
// interpret HopObject as object/dict
|
||||
|
@ -1146,7 +1146,7 @@ public final class RhinoCore implements ScopeProvider {
|
|||
|
||||
// Convert java.util.Date objects to JavaScript Dates
|
||||
if (obj instanceof Date) {
|
||||
Object[] args = { new Long(((Date) obj).getTime()) };
|
||||
Object[] args = { Long.valueOf(((Date) obj).getTime()) };
|
||||
try {
|
||||
return cx.newObject(global, "Date", args);
|
||||
} catch (JavaScriptException nafx) {
|
||||
|
|
|
@ -106,7 +106,7 @@ public class Profiler implements Debugger {
|
|||
Scriptable thisObj, Object[] args) {
|
||||
|
||||
long time = System.nanoTime();
|
||||
timer.push(new Long(time));
|
||||
timer.push(Long.valueOf(time));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -216,6 +216,23 @@ public class DatabaseObject {
|
|||
}
|
||||
}
|
||||
|
||||
public RowSet executePreparedRetrieval(PreparedStatement statement) {
|
||||
ResultSet resultSet = null;
|
||||
|
||||
try {
|
||||
resultSet = statement.executeQuery();
|
||||
return new RowSet(statement.toString(), this, statement, resultSet);
|
||||
} catch (SQLException e) {
|
||||
lastError = e;
|
||||
try {
|
||||
if (statement != null) statement.close();
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
statement = null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public int executeCommand(String sql) {
|
||||
int count = 0;
|
||||
|
||||
|
@ -439,7 +456,7 @@ public class DatabaseObject {
|
|||
|
||||
// First return system or or prototype properties
|
||||
if (propertyName.equals("length")) {
|
||||
return new Integer(colNames.size());
|
||||
return Integer.valueOf(colNames.size());
|
||||
} else {
|
||||
if (resultSet == null) {
|
||||
lastError = new SQLException("Attempt to access a released result set");
|
||||
|
@ -498,12 +515,12 @@ public class DatabaseObject {
|
|||
case Types.BIGINT:
|
||||
case Types.SMALLINT:
|
||||
case Types.INTEGER:
|
||||
return new Long(resultSet.getLong(index));
|
||||
return Long.valueOf(resultSet.getLong(index));
|
||||
|
||||
case Types.REAL:
|
||||
case Types.FLOAT:
|
||||
case Types.DOUBLE:
|
||||
return new Double(resultSet.getDouble(index));
|
||||
return Double.valueOf(resultSet.getDouble(index));
|
||||
|
||||
case Types.DECIMAL:
|
||||
case Types.NUMERIC:
|
||||
|
@ -513,9 +530,9 @@ public class DatabaseObject {
|
|||
}
|
||||
|
||||
if (num.scale() > 0) {
|
||||
return new Double(num.doubleValue());
|
||||
return Double.valueOf(num.doubleValue());
|
||||
} else {
|
||||
return new Long(num.longValue());
|
||||
return Long.valueOf(num.longValue());
|
||||
}
|
||||
|
||||
case Types.VARBINARY:
|
||||
|
|
|
@ -554,8 +554,13 @@ public abstract class AbstractServletClient extends HttpServlet {
|
|||
// If protected session cookies are enabled we also force a new session
|
||||
// if the existing session id doesn't match the client's ip address
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
addIPAddress(buffer, request.getRemoteAddr());
|
||||
addIPAddress(buffer, request.getHeader("X-Forwarded-For"));
|
||||
String ip = request.getHeader("X-Forwarded-For");
|
||||
if (ip != null && ip.length() != 0) {
|
||||
addIPAddress(buffer, ip);
|
||||
} else {
|
||||
addIPAddress(buffer, request.getRemoteAddr());
|
||||
}
|
||||
// Not sure, if this line can be removed
|
||||
addIPAddress(buffer, request.getHeader("Client-ip"));
|
||||
if (reqtrans.getSession() == null || !reqtrans.getSession().startsWith(buffer.toString())) {
|
||||
createSession(response, buffer.toString(), reqtrans, domain);
|
||||
|
@ -748,7 +753,7 @@ public abstract class AbstractServletClient extends HttpServlet {
|
|||
* <strong>IMPLEMENTATION NOTE</strong>: URL decoding is performed
|
||||
* individually on the parsed name and value elements, rather than on
|
||||
* the entire query string ahead of time, to properly deal with the case
|
||||
* where the name or value includes an encoded "=" or "&" character
|
||||
* where the name or value includes an encoded {@code =} or {@code &} character
|
||||
* that would otherwise be interpreted as a delimiter.
|
||||
*
|
||||
* NOTE: byte array data is modified by this method. Caller beware.
|
||||
|
|
|
@ -10,39 +10,39 @@ package helma.util;
|
|||
/**
|
||||
* The Protomatter Software License, Version 1.0
|
||||
* derived from The Apache Software License, Version 1.1
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1998-2002 Nate Sammons. 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. The end-user documentation included with the redistribution,
|
||||
* if any, must include the following acknowledgment:
|
||||
* "This product includes software developed for the
|
||||
* Protomatter Software Project
|
||||
* (http://protomatter.sourceforge.net/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
*
|
||||
* 4. The names "Protomatter" and "Protomatter Software Project" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact support@protomatter.com.
|
||||
*
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Protomatter",
|
||||
* nor may "Protomatter" appear in their name, without prior written
|
||||
* permission of the Protomatter Software Project
|
||||
* (support@protomatter.com).
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -103,7 +103,7 @@ public class CronJob {
|
|||
* cron.name1.minute = minute-list
|
||||
*
|
||||
* cron.name1.timeout = timeout-value
|
||||
*
|
||||
*
|
||||
* </pre></blockquote><p>
|
||||
*
|
||||
* And delivers corresponding <tt>CronJob</tt> objects in a collection.
|
||||
|
@ -450,27 +450,27 @@ public class CronJob {
|
|||
cal.setTime(date);
|
||||
|
||||
// try and short-circuit as fast as possible.
|
||||
Integer theYear = new Integer(cal.get(Calendar.YEAR));
|
||||
Integer theYear = Integer.valueOf(cal.get(Calendar.YEAR));
|
||||
if (!year.contains(ALL_VALUE) && !year.contains(theYear))
|
||||
return false;
|
||||
|
||||
Integer theMonth = new Integer(cal.get(Calendar.MONTH));
|
||||
Integer theMonth = Integer.valueOf(cal.get(Calendar.MONTH));
|
||||
if (!month.contains(ALL_VALUE) && !month.contains(theMonth))
|
||||
return false;
|
||||
|
||||
Integer theDay = new Integer(cal.get(Calendar.DAY_OF_MONTH));
|
||||
Integer theDay = Integer.valueOf(cal.get(Calendar.DAY_OF_MONTH));
|
||||
if (!day.contains(ALL_VALUE) && !day.contains(theDay))
|
||||
return false;
|
||||
|
||||
Integer theWeekDay = new Integer(cal.get(Calendar.DAY_OF_WEEK));
|
||||
Integer theWeekDay = Integer.valueOf(cal.get(Calendar.DAY_OF_WEEK));
|
||||
if (!weekday.contains(ALL_VALUE) && !weekday.contains(theWeekDay))
|
||||
return false;
|
||||
|
||||
Integer theHour = new Integer(cal.get(Calendar.HOUR_OF_DAY));
|
||||
Integer theHour = Integer.valueOf(cal.get(Calendar.HOUR_OF_DAY));
|
||||
if (!hour.contains(ALL_VALUE) && !hour.contains(theHour))
|
||||
return false;
|
||||
|
||||
Integer theMinute = new Integer(cal.get(Calendar.MINUTE));
|
||||
Integer theMinute = Integer.valueOf(cal.get(Calendar.MINUTE));
|
||||
if (!minute.contains(ALL_VALUE) && !minute.contains(theMinute))
|
||||
return false;
|
||||
|
||||
|
@ -484,7 +484,7 @@ public class CronJob {
|
|||
public void addYear(int year)
|
||||
{
|
||||
this.year.remove(ALL_VALUE);
|
||||
this.year.add(new Integer(year));
|
||||
this.year.add(Integer.valueOf(year));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -492,7 +492,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeYear(int year)
|
||||
{
|
||||
this.year.remove(new Integer(year));
|
||||
this.year.remove(Integer.valueOf(year));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -520,7 +520,7 @@ public class CronJob {
|
|||
public void addMonth(int month)
|
||||
{
|
||||
this.month.remove(ALL_VALUE);
|
||||
this.month.add(new Integer(month));
|
||||
this.month.add(Integer.valueOf(month));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -530,7 +530,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeMonth(int month)
|
||||
{
|
||||
this.month.remove(new Integer(month));
|
||||
this.month.remove(Integer.valueOf(month));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -556,7 +556,7 @@ public class CronJob {
|
|||
public void addDay(int day)
|
||||
{
|
||||
this.day.remove(ALL_VALUE);
|
||||
this.day.add(new Integer(day));
|
||||
this.day.add(Integer.valueOf(day));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -564,7 +564,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeDay(int day)
|
||||
{
|
||||
this.day.remove(new Integer(day));
|
||||
this.day.remove(Integer.valueOf(day));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -592,7 +592,7 @@ public class CronJob {
|
|||
public void addWeekday(int weekday)
|
||||
{
|
||||
this.weekday.remove(ALL_VALUE);
|
||||
this.weekday.add(new Integer(weekday));
|
||||
this.weekday.add(Integer.valueOf(weekday));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -602,7 +602,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeWeekday(int weekday)
|
||||
{
|
||||
this.weekday.remove(new Integer(weekday));
|
||||
this.weekday.remove(Integer.valueOf(weekday));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -628,7 +628,7 @@ public class CronJob {
|
|||
public void addHour(int hour)
|
||||
{
|
||||
this.hour.remove(ALL_VALUE);
|
||||
this.hour.add(new Integer(hour));
|
||||
this.hour.add(Integer.valueOf(hour));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -636,7 +636,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeHour(int hour)
|
||||
{
|
||||
this.hour.remove(new Integer(hour));
|
||||
this.hour.remove(Integer.valueOf(hour));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -662,7 +662,7 @@ public class CronJob {
|
|||
public void addMinute(int minute)
|
||||
{
|
||||
this.minute.remove(ALL_VALUE);
|
||||
this.minute.add(new Integer(minute));
|
||||
this.minute.add(Integer.valueOf(minute));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -670,7 +670,7 @@ public class CronJob {
|
|||
*/
|
||||
public void removeMinute(int minute)
|
||||
{
|
||||
this.minute.remove(new Integer(minute));
|
||||
this.minute.remove(Integer.valueOf(minute));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -127,7 +127,7 @@ public final class HtmlEncoder {
|
|||
/**
|
||||
* Do "smart" encodging on a string. This means that valid HTML entities and tags,
|
||||
* Helma macros and HTML comments are passed through unescaped, while
|
||||
* other occurrences of '<', '>' and '&' are encoded to HTML entities.
|
||||
* other occurrences of {@code <}, {@code >} and {@code &} are encoded to HTML entities.
|
||||
*/
|
||||
public final static String encode(String str) {
|
||||
if (str == null) {
|
||||
|
@ -151,7 +151,7 @@ public final class HtmlEncoder {
|
|||
/**
|
||||
* Do "smart" encodging on a string. This means that valid HTML entities and tags,
|
||||
* Helma macros and HTML comments are passed through unescaped, while
|
||||
* other occurrences of '<', '>' and '&' are encoded to HTML entities.
|
||||
* other occurrences of {@code <}, {@code >} and {@code &} are encoded to HTML entities.
|
||||
*/
|
||||
public final static void encode(String str, StringBuffer ret) {
|
||||
encode(str, ret, false, null);
|
||||
|
@ -160,7 +160,7 @@ public final class HtmlEncoder {
|
|||
/**
|
||||
* Do "smart" encodging on a string. This means that valid HTML entities and tags,
|
||||
* Helma macros and HTML comments are passed through unescaped, while
|
||||
* other occurrences of '<', '>' and '&' are encoded to HTML entities.
|
||||
* other occurrences of {@code <}, {@code >} and {@code &} are encoded to HTML entities.
|
||||
*
|
||||
* @param str the string to encode
|
||||
* @param ret the string buffer to encode to
|
||||
|
|
Loading…
Add table
Reference in a new issue