Compare commits

...

328 commits

Author SHA1 Message Date
38181e8e00
Update repo URL 2025-03-01 19:32:20 +01:00
8adbd23569
Bump year of copyright notice 2025-03-01 19:32:06 +01:00
e3a7732837
Escape HTML elements in commit messages 2025-03-01 19:21:42 +01:00
d9d3c9b863
Add release notes generated with git-cliff
All checks were successful
Release / release (push) Successful in 31s
2025-03-01 16:57:02 +01:00
808bc48ab9
Run the build workflow when itself has changed
All checks were successful
Build / build (push) Successful in 23s
2025-02-28 22:15:00 +01:00
6ebdd6aa31
Leave aside compiling for different Java versions for now 2025-02-28 22:15:00 +01:00
2ff29317e5
Gradle is installed on the runner 2025-02-28 22:09:55 +01:00
84333d05cd
Use fully qualified URL for setup-java action 2025-02-28 22:04:48 +01:00
3a8997ca5c
Initial commit
Some checks failed
Build / build (11) (push) Failing after 0s
Build / build (17) (push) Failing after 0s
Build / build (21) (push) Failing after 0s
2025-02-28 21:58:08 +01:00
8212600d40
Add deploy script usable with rsync and a restricted SSH key 2025-02-28 21:43:19 +01:00
1bb5a093da
Re-enable creating the release at Github after install of gh client
All checks were successful
Release / build (push) Successful in 26s
2025-02-15 19:49:13 +01:00
2c6dd96cd7
Merge branch 'main' into renovate/commons-codec-commons-codec-1.x 2025-02-15 18:39:26 +01:00
6f6ea55b7b Update dependency com.google.code.gson:gson to v2.12.1 2025-02-15 17:36:51 +00:00
b1a14ad87b Update dependency commons-logging:commons-logging to v1.3.5 2025-02-15 17:36:40 +00:00
d1ead6e081 Update Jetty packages to v9.4.57.v20241219 2025-02-15 17:36:29 +00:00
94557dd28e Update dependency gradle to v8.12.1 2025-02-15 17:35:46 +00:00
5bfcd0b6ea
Distinguish the (currently bogus) GitHub release workflows by name
All checks were successful
Release / build (push) Successful in 26s
2025-02-15 16:43:05 +01:00
70337bda40
Add a custom name for the release workflow 2025-02-15 16:43:05 +01:00
ff4b4b0f07
Set the release title to today’s date as formatted string 2025-02-15 16:43:05 +01:00
156db3ee98
Try Forgejo action to create a release 2025-02-15 15:25:36 +01:00
45adacd5cd
Use name and URL of actual production environment 2025-02-15 15:25:13 +01:00
dd9e473310
Fix botched test of required Java version 2025-02-09 13:23:21 +01:00
e2e67cf2cc Update dependency commons-codec:commons-codec to v1.18.0 2025-01-27 18:13:44 +00:00
f7add5ec47
Looks like setting the LOG_LEVEL variable in the env section does not work
Setting it before the npx command does
2025-01-03 16:20:01 +01:00
0fc7d91348
Always save the Renovate log 2025-01-03 16:16:27 +01:00
1341c241bd
Replace Renovate autodiscovery with explicitly setting the repository 2025-01-03 16:16:27 +01:00
6d355fc5bd
Allow manual trigger of Renovate workflow 2025-01-03 15:55:49 +01:00
d18513fb76
Downgrade upload-artifact action again
v4 causes an error
2025-01-03 15:55:09 +01:00
d10f8d6d90
Replace elaborate checks for Java version with single one for Java 11 2025-01-03 15:54:42 +01:00
66fa98353e
Add the actual version string to helma.main.Server again 2025-01-03 15:54:42 +01:00
c2b37a8243
Update workflows for Forgejo runner 2025-01-03 13:35:33 +01:00
0c9b00dbb1 Merge pull request 'Update actions/upload-artifact action to v4' (#122) from renovate/major-github-artifact-actions into helma-🐜
Reviewed-on: #122
2025-01-03 12:01:15 +00:00
c1e9371f6b Update .github/workflows/renovate.yml 2025-01-03 11:59:50 +00:00
3284a1ca19 Update actions/upload-artifact action to v4 2025-01-03 11:57:30 +00:00
cbb6599ce0 Add Renovate workflow 2025-01-03 11:46:46 +00:00
49c1be97bb
Merge pull request #75 from antville/renovate/org.mozilla-rhino-1.x
Update dependency org.mozilla:rhino to v1.8.0
2025-01-03 11:08:53 +01:00
31bdcc6c27
Merge remote-tracking branch 'origin/renovate/org.mozilla-rhino-1.x' into renovate/org.mozilla-rhino-1.x 2025-01-03 11:01:24 +01:00
bdd4f7e280
Merge remote-tracking branch 'origin/helma-🐜' into helma-🐜 2025-01-03 10:49:14 +01:00
154a4a916a
Merge pull request #117 from antville/renovate/gradle-8.x
Update dependency gradle to v8.12
2025-01-03 10:44:22 +01:00
renovate[bot]
28887aaccd
Update dependency org.mozilla:rhino to v1.8.0 2025-01-03 09:32:00 +00:00
a00e2f730a
Merge pull request #118 from antville/renovate/jetty-packages
Update Jetty packages to v9.4.56.v20240826
2025-01-03 10:31:18 +01:00
9c2c603d4a
Merge pull request #110 from antville/renovate/com.github.jk1.dependency-license-report-2.x
Update plugin com.github.jk1.dependency-license-report to v2.9
2025-01-03 10:24:46 +01:00
b0260259ea
Merge pull request #111 from antville/renovate/commons-net-commons-net-3.x
Update dependency commons-net:commons-net to v3.11.1
2025-01-03 10:18:45 +01:00
renovate[bot]
d3098c892f
Update dependency commons-net:commons-net to v3.11.1 2025-01-03 09:12:13 +00:00
a5fa58dc3d
Merge pull request #119 from antville/renovate/commons-logging-commons-logging-1.x
Update dependency commons-logging:commons-logging to v1.3.4
2025-01-03 10:11:30 +01:00
20ea2a8fb9
Merge pull request #120 from antville/renovate/commons-codec-commons-codec-1.x
Update dependency commons-codec:commons-codec to v1.17.1
2025-01-03 10:09:28 +01:00
de34e49fc0
Merge pull request #121 from antville/renovate/gradle-actions-4.x
Update gradle/actions action to v4
2025-01-03 10:03:26 +01:00
f7fe09a294
Switch to rhino-all.jar, Helma needs the full Rhino experience 2025-01-03 09:53:53 +01:00
renovate[bot]
4ebbcb01ae
Update dependency org.mozilla:rhino to v1.8.0 2025-01-03 08:07:29 +00:00
renovate[bot]
e93c501149
Update dependency gradle to v8.12 2024-12-20 17:56:06 +00:00
renovate[bot]
3809198380
Update Jetty packages to v9.4.56.v20240826 2024-09-03 19:04:35 +00:00
renovate[bot]
65ac2df0ba
Update dependency commons-logging:commons-logging to v1.3.4 2024-08-19 14:24:50 +00:00
renovate[bot]
12e7f298ad
Update plugin com.github.jk1.dependency-license-report to v2.9 2024-08-15 18:27:04 +00:00
3365a2ef58
Fix ExecReload setting in service configuration 2024-08-08 23:00:08 +02:00
44f2375749
Update URL of stage environment 2024-08-08 19:35:22 +02:00
renovate[bot]
a975930192
Update gradle/actions action to v4 2024-08-03 22:55:47 +00:00
renovate[bot]
a54b27c4aa
Update dependency commons-codec:commons-codec to v1.17.1 2024-07-16 02:34:32 +00:00
608fd695c4
Switch to tasks.register() to define custom tasks 2024-06-15 23:08:45 +02:00
87675fd6cd
Fix deprecation warning for Java plugin conventions 2024-06-15 23:01:45 +02:00
efb7ad89b3
Add static fields for build date and commit hash 2024-06-15 22:43:26 +02:00
5de4616df0
Use main website as environment 2024-06-15 21:37:17 +02:00
bd70d2fb62
Disable automatic deployment 2024-06-15 21:37:17 +02:00
0f8bace3dd
Keep the lib/ext directory around 2024-06-15 21:37:17 +02:00
c1ad40ef72
Remove over-complicated launch and tasks configuration in favor of Gradle plugin
Starting run/debug tasks with the plugin works out of the box;
one just has to avoid the default “Run and Debug” button.
2024-06-15 21:37:17 +02:00
6b694a83ed
Add setup for Gradle debugging in VS Codium 2024-06-15 21:37:16 +02:00
79b7e8092b
Decouple update task from install
Now that Gradle runs Helma with the configured dependencies, updating the installation directory has become less crucial
2024-06-15 21:37:16 +02:00
196794cd93
Reorder the tasks 2024-06-15 21:37:16 +02:00
ed56cf72f7
Slightly modify the version string (still a date representation) 2024-06-15 21:37:16 +02:00
3a9c14898b
Update run configuration to always use the correct dependencies 2024-06-15 21:37:16 +02:00
82c32bb448
Slightly modify the format of the build date 2024-06-15 21:37:16 +02:00
def303c069
Define Java versions in a more general way 2024-06-15 12:19:28 +02:00
64bcb63e4a
Merge pull request #116 from antville/revert-112-renovate/gradle-8.x
Revert "Update dependency gradle to v8.8"
2024-06-14 23:01:39 +02:00
55dbc0359c
Revert "Update dependency gradle to v8.8" 2024-06-14 23:00:48 +02:00
f2feef4332
Use generic name for the staging server 2024-06-01 22:28:24 +02:00
14ccdf0691
Add deployment workflow 2024-06-01 20:54:35 +02:00
4ae840d3c9
Add reusable workflow for setting up SSH agent 2024-06-01 20:21:36 +02:00
132f8f4d7d
Revert "Bump minimum Java version to 17 (LTS)"
This reverts commit ebf9b22f55.
2024-06-01 18:56:08 +02:00
048cdc39f5
Merge pull request #112 from antville/renovate/gradle-8.x
Update dependency gradle to v8.8
2024-06-01 15:52:15 +02:00
renovate[bot]
6d7774fd2e
Update dependency gradle to v8.8 2024-05-31 23:22:22 +00:00
0e8ce1d7a7
Slightly reconfigure, reword and format workflow config 2024-05-31 13:14:34 +02:00
57642f6f10
Use today’s date as release title 2024-05-30 20:25:44 +02:00
dd0bdc62ec
Fix setup of GitHub token 2024-05-30 20:22:14 +02:00
renovate[bot]
656a023b27
Update dependency com.google.code.gson:gson to v2.11.0 2024-05-30 20:22:13 +02:00
7c52b6ba46
Add release action 2024-05-30 20:22:13 +02:00
47f7b19fe9
Merge remote-tracking branch 'origin/helma-🐜' into helma-🐜 2024-05-30 18:48:34 +02:00
ebf9b22f55
Bump minimum Java version to 17 (LTS) 2024-05-25 19:34:10 +02:00
399f81c1dc
Merge pull request #107 from antville/resolve-java-warnings
Resolve java warnings
2024-05-25 18:52:37 +02:00
d02dd85a45
Merge pull request #108 from antville/fix-javadoc-warnings
Fix JavaDoc warnings
2024-05-25 18:52:36 +02:00
0bfa585cb9
Replace new Boolean() with Boolean.valueOf()
Signed-off-by: Tobi Schäfer <interface@p3k.org>
2024-05-25 18:52:35 +02:00
8ffb7b0b08
Replace new Integer() with Integer.valueOf()
Signed-off-by: Tobi Schäfer <interface@p3k.org>
2024-05-25 18:52:34 +02:00
a68c478dd5
Replace new Double() with Double.valueOf()
Signed-off-by: Tobi Schäfer <interface@p3k.org>
2024-05-25 18:52:34 +02:00
77ea53d949
Fix JavaDoc warnings 2024-05-25 18:52:33 +02:00
2ff75f7879
Replace new Long() with Long.valueOf()
Signed-off-by: Tobi Schäfer <interface@p3k.org>
2024-05-25 18:52:33 +02:00
052bfc0db1
Update README.md
Minor edits
2024-05-25 18:52:32 +02:00
63c5aec4df
Add tasks to set up SSH agent and publish installation 2024-05-25 18:50:11 +02:00
cfbfea51d7
Create staging.yml 2024-05-25 18:50:10 +02:00
bca560e577
Do not run the update task in CI context 2024-05-25 18:50:09 +02:00
7f8c776c57
Upgrade the project dir only selectively on install 2024-05-25 18:50:08 +02:00
7fa9b805d6
Update renovate.json
Group Lucene packages
2024-05-25 18:50:08 +02:00
renovate[bot]
2ecd5b4e36
Update dependency gradle to v8.7 2024-05-25 18:50:07 +02:00
d23268095a
Gradle has an issue with the date-based version string 2024-05-25 18:50:06 +02:00
daf8da61b1 Add tasks to set up SSH agent and publish installation 2024-05-19 01:22:13 +02:00
db4dfd0ba7 Create staging.yml 2024-05-18 23:31:25 +02:00
f0ac6cdb5f Do not run the update task in CI context 2024-05-18 23:31:25 +02:00
d7f9882596 Upgrade the project dir only selectively on install 2024-05-18 23:11:45 +02:00
d6b7c97518 Update renovate.json
Group Lucene packages
2024-05-18 23:11:45 +02:00
renovate[bot]
b984877877 Update dependency gradle to v8.7 2024-05-18 23:11:45 +02:00
1a1b676604 Gradle has an issue with the date-based version string 2024-05-18 17:34:32 +02:00
46dd4a2c31
Merge pull request #102 from antville/renovate/jetty-packages
Update Jetty packages to v9.4.54.v20240208
2024-05-18 17:29:47 +02:00
renovate[bot]
ee2384f35a
Update Jetty packages to v9.4.54.v20240208 2024-05-18 15:19:19 +00:00
d25b8d207e
Update renovate.json
Group Jetty packages
2024-05-18 17:18:31 +02:00
f4cd065c59
Merge pull request #95 from antville/renovate/commons-codec-commons-codec-1.x
Update dependency commons-codec:commons-codec to v1.17.0
2024-05-18 17:12:42 +02:00
4b7f3b216d
Merge pull request #99 from antville/renovate/com.github.jk1.dependency-license-report-2.x
Update plugin com.github.jk1.dependency-license-report to v2.7
2024-05-18 17:07:36 +02:00
23f09d2d4f
Merge pull request #100 from antville/renovate/commons-logging-commons-logging-1.x
Update dependency commons-logging:commons-logging to v1.3.2
2024-05-18 17:01:09 +02:00
renovate[bot]
b6ed068e26
Update plugin com.github.jk1.dependency-license-report to v2.7 2024-05-18 14:51:24 +00:00
e96c224abc
Merge pull request #101 from antville/renovate/maven-dom4j-dom4j-vulnerability
Update dependency dom4j:dom4j to v20040902 [SECURITY]
2024-05-18 16:51:23 +02:00
renovate[bot]
519adc3d37
Update dependency commons-codec:commons-codec to v1.17.0 2024-05-18 14:49:57 +00:00
renovate[bot]
7d57badb94
Update dependency commons-logging:commons-logging to v1.3.2 2024-05-18 14:49:48 +00:00
renovate[bot]
b0e319f3dd
Update dependency dom4j:dom4j to v20040902 [SECURITY] 2024-05-18 14:49:45 +00:00
b8abe5a355
Fix Gradle task dependencies 2024-05-18 16:47:39 +02:00
7fa3f48cff
Pin dependency to version number 2024-05-18 16:47:38 +02:00
d64ca1c7a8
Do not exclude apps directory in Codium 2024-05-18 16:47:37 +02:00
eae2848e9e
Update Codium extensions for Java support 2024-05-18 16:47:36 +02:00
581b17bc72
Update renovate.json 2024-03-24 14:05:18 +01:00
ab116b2af9
Update renovate.json 2024-03-24 14:01:21 +01:00
d7ab9ff461
Update renovate.json 2024-03-24 13:45:44 +01:00
renovate[bot]
fd15c4703f
Update dependency dom4j:dom4j to v20040902 [SECURITY] (#96)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-19 22:17:28 +00:00
5e1435433a
Add vulnerability alerts 2024-02-10 22:51:46 +01:00
958a3c1cfc Merge remote-tracking branch 'origin/helma-🐜' into helma-🐜 2024-01-07 00:19:24 +01:00
5a4ad8eeda JSDoc issue seems to be fixed 2024-01-07 00:16:06 +01:00
54b9002bf4
Merge pull request #91 from antville/renovate/gradle-8.x
Update dependency gradle to v8.5
2024-01-06 21:33:57 +01:00
2e45fa4b6a
Merge pull request #89 from antville/renovate/org.eclipse.jetty-jetty-servlet-9.x
Update dependency org.eclipse.jetty:jetty-servlet to v9.4.53.v20231009
2024-01-06 21:19:48 +01:00
0fec3244e3
Merge pull request #76 from antville/renovate/commons-codec-commons-codec-1.x
Update dependency commons-codec:commons-codec to v1.16.0
2024-01-06 21:19:07 +01:00
renovate[bot]
aafd5f8a4c
Update dependency org.eclipse.jetty:jetty-servlet to v9.4.53.v20231009 2024-01-06 20:16:57 +00:00
752e4a0df7
Merge pull request #90 from antville/renovate/org.eclipse.jetty-jetty-xml-9.x
Update dependency org.eclipse.jetty:jetty-xml to v9.4.53.v20231009
2024-01-06 21:16:34 +01:00
bf29398ade
Merge pull request #92 from antville/renovate/commons-net-commons-net-3.x
Update dependency commons-net:commons-net to v3.10.0
2024-01-06 21:16:21 +01:00
renovate[bot]
7555411cdc
Update dependency commons-net:commons-net to v3.10.0 2024-01-06 20:16:12 +00:00
2f34fb5e05
Merge pull request #93 from antville/renovate/commons-logging-commons-logging-1.x
Update dependency commons-logging:commons-logging to v1.3.0
2024-01-06 21:15:55 +01:00
6eb1feb5cd
Update helma.service 2024-01-05 21:52:35 +01:00
6eaf097aef Add support for images in webp format 2023-12-30 15:11:41 +01:00
renovate[bot]
48ddd69f19
Update dependency commons-logging:commons-logging to v1.3.0 2023-12-01 05:25:09 +00:00
renovate[bot]
0223cb4ffe
Update dependency gradle to v8.5 2023-11-30 05:38:49 +00:00
renovate[bot]
1fa13b9fef
Update dependency org.eclipse.jetty:jetty-xml to v9.4.53.v20231009 2023-10-10 04:56:08 +00:00
3ccf0af87b
Update renovate.json 2023-08-28 21:10:36 +02:00
0774054470
Update renovate.json 2023-08-28 20:59:58 +02:00
e6a893a52e Remove Dependabot configuration 2023-08-28 19:46:09 +02:00
renovate[bot]
50ef602d42
fix(deps): update dependency commons-codec:commons-codec to v1.16.0 2023-08-27 11:13:38 +00:00
2cff9188cb
Replace Dependabot with Renovate 2023-08-27 13:12:53 +02:00
1540c5d24f
Merge pull request #74 from antville/renovate/configure
Configure Renovate
2023-08-27 12:53:35 +02:00
renovate[bot]
db966fb4e8
Add renovate.json 2023-08-27 10:50:25 +00:00
b04b1cf4bf
Merge pull request #68 from antville/rewrite-for-each-with-for-of
Rewrite `for…each` with `for…of`
2023-08-27 12:13:56 +02:00
d2e09554cd
Merge pull request #73 from antville/jetty-xml-9.4.51-upgrade
Upgrade Jetty XML package to version 9.4.51
2023-08-27 12:11:24 +02:00
647ca18d7b Upgrade Jetty XML package to same version as Jetty servlet 2023-08-27 12:10:26 +02:00
a580f08c17 Upgrade Gradle to latest version 2023-08-27 12:06:10 +02:00
94d6b2d1a1
Merge pull request #71 from antville/dependabot/gradle/com.github.jk1.dependency-license-report-2.5
build(deps): bump com.github.jk1.dependency-license-report from 2.2 to 2.5
2023-08-27 11:36:50 +02:00
d80ad0bf33
Merge pull request #70 from antville/dependabot/gradle/commons-net-commons-net-3.9.0
build(deps): bump commons-net:commons-net from 3.8.0 to 3.9.0
2023-08-27 11:36:42 +02:00
dependabot[bot]
dbb0b6bcfd
build(deps): bump com.github.jk1.dependency-license-report
Bumps com.github.jk1.dependency-license-report from 2.2 to 2.5.

---
updated-dependencies:
- dependency-name: com.github.jk1.dependency-license-report
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-27 09:29:35 +00:00
dependabot[bot]
d419342ee9
build(deps): bump commons-net:commons-net from 3.8.0 to 3.9.0
Bumps commons-net:commons-net from 3.8.0 to 3.9.0.

---
updated-dependencies:
- dependency-name: commons-net:commons-net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-27 09:29:34 +00:00
a7ee467cdc
Group Jetty packages in Dependabot PRs 2023-08-27 11:29:05 +02:00
b812b33213 Merge branch 'helma-🐜' into rewrite-for-each-with-for-of 2023-08-26 23:26:09 +02:00
0e8f04c0f5 Replace for..each loops with for..of 2023-08-26 22:32:44 +02:00
d601ec689d
Merge pull request #65 from antville/dependabot/gradle/org.eclipse.jetty-jetty-servlet-9.4.51.v20230217
build(deps): bump org.eclipse.jetty:jetty-servlet from 9.4.50.v20221201 to 9.4.51.v20230217
2023-08-26 21:44:38 +02:00
6d5288f94b
Merge pull request #64 from antville/dependabot/gradle/com.google.code.gson-gson-2.10.1
build(deps): bump com.google.code.gson:gson from 2.8.9 to 2.10.1
2023-08-26 21:40:37 +02:00
7eae3ba273
Merge pull request #66 from antville/dependabot/gradle/commons-fileupload-commons-fileupload-1.5
build(deps): bump commons-fileupload:commons-fileupload from 1.4 to 1.5
2023-08-26 21:38:29 +02:00
796a6e7337 Enable ES6 features in Rhino 2023-08-26 21:29:54 +02:00
dependabot[bot]
4ca91f5b2e
build(deps): bump commons-fileupload:commons-fileupload from 1.4 to 1.5
Bumps commons-fileupload:commons-fileupload from 1.4 to 1.5.

---
updated-dependencies:
- dependency-name: commons-fileupload:commons-fileupload
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 09:57:57 +00:00
dependabot[bot]
fb4b11a426
build(deps): bump org.eclipse.jetty:jetty-servlet
Bumps [org.eclipse.jetty:jetty-servlet](https://github.com/eclipse/jetty.project) from 9.4.50.v20221201 to 9.4.51.v20230217.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.50.v20221201...jetty-9.4.51.v20230217)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-servlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 09:57:54 +00:00
dependabot[bot]
7fbad44166
build(deps): bump com.google.code.gson:gson from 2.8.9 to 2.10.1
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.8.9 to 2.10.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.9...gson-parent-2.10.1)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 09:57:44 +00:00
e61b654238 Reduce rsync arguments to become more compatible 2023-05-21 12:26:38 +02:00
a19eb278c7 Disable DocLint for now
Too strict, causing too many errors
2023-05-21 12:26:37 +02:00
6701ac8095
Merge pull request #41 from antville/dependabot/gradle/xerces-xercesImpl-2.12.2
build(deps): bump xercesImpl from 2.12.1 to 2.12.2
2023-05-19 15:35:13 +02:00
1b4624d437
Merge pull request #62 from antville/dependabot/gradle/com.github.jk1.dependency-license-report-2.2
build(deps): bump com.github.jk1.dependency-license-report from 2.0 to 2.2
2023-05-19 15:31:58 +02:00
5bd6e521ce
Merge pull request #52 from antville/dependabot/gradle/org.eclipse.jetty-jetty-servlet-9.4.50.v20221201
build(deps): bump jetty-servlet from 9.4.27.v20200227 to 9.4.50.v20221201
2023-05-19 15:29:31 +02:00
dependabot[bot]
090afa9656
build(deps): bump xercesImpl from 2.12.1 to 2.12.2
Bumps xercesImpl from 2.12.1 to 2.12.2.

---
updated-dependencies:
- dependency-name: xerces:xercesImpl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 12:51:02 +00:00
dependabot[bot]
6c61b9a02b
build(deps): bump com.github.jk1.dependency-license-report
Bumps com.github.jk1.dependency-license-report from 2.0 to 2.2.

---
updated-dependencies:
- dependency-name: com.github.jk1.dependency-license-report
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 12:50:52 +00:00
58d893f044
Create helma.service
Add SystemD unit file with reasonable settings

See <https://www.baeldung.com/linux/run-java-application-as-service>
2023-05-07 01:29:35 +02:00
ec67204d51
Merge pull request #61 from antville/add-development.prerequisites
Add development prerequisites
2023-03-09 14:20:53 +01:00
a692d7718c
Add development prerequisites
Fixes #56.
Fixes #58 .
2023-03-09 14:08:42 +01:00
08a5233bc6
Merge pull request #60 from antville/59-add-support-for-jenv
Add support for jEnv
2023-03-07 00:10:47 +01:00
6a3a90c4f4 Add .java-version file 2023-03-06 23:08:46 +00:00
5fe68aef81 Add VS Code settings 2023-03-05 15:54:15 +01:00
db2ebbed9c
Merge pull request #55 from antville/54-add-support-for-prepared-sql-statements-to-databaseobject
Add DatabaseObject.executePreparedRetrieval() method
2023-03-05 13:10:25 +01:00
9a0cf1a22d Add DatabaseObject.executePreparedRetrieval() method 2023-03-05 13:00:13 +01:00
dependabot[bot]
276290add0
build(deps): bump jetty-servlet
Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 9.4.27.v20200227 to 9.4.50.v20221201.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.27.v20200227...jetty-9.4.50.v20221201)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-servlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 09:04:43 +00:00
832a9069f1
Merge pull request #35 from antville/dependabot/gradle/com.google.code.gson-gson-2.8.9
build(deps): bump gson from 2.8.6 to 2.8.9
2021-12-11 18:05:51 +01:00
f78e37905c
Merge pull request #32 from antville/dependabot/gradle/com.github.jk1.dependency-license-report-2.0
build(deps): bump com.github.jk1.dependency-license-report from 1.16 to 2.0
2021-12-11 17:57:39 +01:00
dependabot[bot]
4bee79eca7
build(deps): bump gson from 2.8.6 to 2.8.9
Bumps [gson](https://github.com/google/gson) from 2.8.6 to 2.8.9.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.6...gson-parent-2.8.9)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 09:08:02 +00:00
411b9198e4 Change creation of HopSession cookie value
Only include one of either, IP forwarded by proxy or remote address
2021-09-05 14:55:42 +02:00
dependabot[bot]
524578e8de
build(deps): bump com.github.jk1.dependency-license-report
Bumps com.github.jk1.dependency-license-report from 1.16 to 2.0.

---
updated-dependencies:
- dependency-name: com.github.jk1.dependency-license-report
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 09:17:24 +00:00
4fc158d6eb Also decompress error stream if required 2021-05-24 12:29:43 +02:00
5a3514440c
Merge pull request #9 from antville/dependabot/gradle/org.mozilla-rhino-1.7.13
build(deps): bump rhino from 1.7.12 to 1.7.13
2021-05-16 13:25:38 +02:00
84f4a5f396 Merge branch 'helma-🐜' into dependabot/gradle/org.mozilla-rhino-1.7.13 2021-05-16 13:16:19 +02:00
85e8088e40 Clean up upstart files 2021-04-18 19:50:07 +02:00
e0e78b1349 Bump Gradle version 2021-04-18 19:45:34 +02:00
9d5a504702
Merge pull request #10 from antville/dependabot/gradle/commons-codec-commons-codec-1.15
build(deps): bump commons-codec from 1.14 to 1.15
2021-04-05 17:34:36 +02:00
8eb3c53818
Minor fix 2021-04-05 12:21:03 +02:00
9b63e208d9
Add myself as default assignee 2021-04-05 12:05:09 +02:00
d3c325cef4 Add Java dependency for Test app to Gradle
Version 1.2 of subethasmtp is the closest available version (1.2.1)

⚠️ Modules were not tested after upgrade
2021-04-05 11:55:20 +02:00
e54b36bb2a Add Java dependency for HopKit to Gradle
Version 2.4.0 of Bean Scripting Framework is the closest available version (Oct 2006)

⚠️ Modules were not tested after upgrade
2021-04-05 11:41:19 +02:00
34b3a5d578 Add comment to unresolved deps 2021-04-05 11:25:48 +02:00
dependabot[bot]
6ed340675a
build(deps): bump commons-codec from 1.14 to 1.15
Bumps [commons-codec](https://github.com/apache/commons-codec) from 1.14 to 1.15.
- [Release notes](https://github.com/apache/commons-codec/releases)
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/commons-codec-1.14...rel/commons-codec-1.15)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 09:24:36 +00:00
dependabot[bot]
7f23ded63d
build(deps): bump rhino from 1.7.12 to 1.7.13
Bumps [rhino](https://github.com/mozilla/rhino) from 1.7.12 to 1.7.13.
- [Release notes](https://github.com/mozilla/rhino/releases)
- [Changelog](https://github.com/mozilla/rhino/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/mozilla/rhino/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 09:24:32 +00:00
e8d9f05b72 Add Java dependency for MP3 module to Gradle
Version 0.5.4 of jid3lib should be the correct version

⚠️ Modules were not tested after upgrade
2021-04-05 11:22:09 +02:00
a7fece6218 Add Java dependency for HtmlDocument module to Gradle
Version 1.1-beta-8 of Jaxen should be the correct version

⚠️ Modules were not tested after upgrade
2021-04-05 11:16:42 +02:00
ed5aac7f66 Add Java dependency for HtmlDocument module to Gradle
Version 1.6.1 of Dom4J should be the correct version

⚠️ Modules were not tested after upgrade
2021-04-05 11:03:44 +02:00
9e2bf074b7 Add Java dependency for search module to Gradle
Version 2.2.0 of Lucene should be the correct version

⚠️ Modules were not tested after upgrade
2021-04-05 10:55:52 +02:00
aea04da690 Add Java dependency for charts module to Gradle
Version 2.5.7 of JXL is closest available version (2.4.3)

⚠️ Modules were not tested after upgrade
2021-04-05 10:49:51 +02:00
2f8160526c Add Java dependency for SSH module to Gradle
Build 208 of ganymed-ssh2 is closest available version (Aug 2005)

⚠️ Modules were not tested after upgrade
2021-04-05 10:49:12 +02:00
ac02b90699 Make Git ignore .idea dir 2021-04-05 10:46:45 +02:00
8b990e29ca
Merge pull request #8 from antville/dependabot/gradle/commons-net-commons-net-3.8.0
build(deps): bump commons-net from 3.6 to 3.8.0
2021-04-04 21:01:29 +02:00
926f62ec57
Merge pull request #5 from antville/dependabot/gradle/xerces-xercesImpl-2.12.1
build(deps): bump xercesImpl from 2.12.0 to 2.12.1
2021-04-04 21:00:41 +02:00
47abd0e404
Merge pull request #7 from antville/dependabot/gradle/com.github.jk1.dependency-license-report-1.16
build(deps): bump com.github.jk1.dependency-license-report from 1.13 to 1.16
2021-04-04 21:00:24 +02:00
ae2c1c6221
Bump Java version according to config 2021-04-04 20:56:21 +02:00
dependabot[bot]
b5c6afda24
build(deps): bump commons-net from 3.6 to 3.8.0
Bumps commons-net from 3.6 to 3.8.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-04 18:28:10 +00:00
dependabot[bot]
b7a8e68537
build(deps): bump com.github.jk1.dependency-license-report
Bumps com.github.jk1.dependency-license-report from 1.13 to 1.16.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-04 18:28:08 +00:00
dependabot[bot]
425e3671ba
build(deps): bump xercesImpl from 2.12.0 to 2.12.1
Bumps xercesImpl from 2.12.0 to 2.12.1.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-04 18:28:03 +00:00
7a5e470821
Update dependabot.yml 2021-04-04 20:27:40 +02:00
b31b0dc2a5
Create dependabot.yml 2021-04-04 20:26:17 +02:00
Robert Gaggl
4b9b78bb0f Cherry-pick 390231e8dd 2021-03-06 19:11:48 +01:00
7e39892c4a Require Java 11 2021-03-06 19:01:35 +01:00
Robert Gaggl
62291171e3 res.setCookie() now accepts boolean httponly and secure flags
httponly defaults to true, secure to false
2021-03-06 18:52:18 +01:00
97db46a66c Merge remote-tracking branch 'helma-org/master' into helma-🐜 2021-03-06 18:46:29 +01:00
8305d30bad
fix: typo 2020-06-14 11:46:05 +02:00
db18a003fe chg: updated changelog 2020-05-17 22:17:39 +02:00
2ba24ccea8 chg: gitignore licenses dir 2020-05-17 22:17:29 +02:00
244b92d750 add: xgettext and po2js tasks 2020-05-17 21:36:41 +02:00
b91ee88304 add: some colors to log output 2020-05-15 21:58:10 +02:00
dfe9c5d1a3 fix: reference to up-to-date java mail library 2020-04-12 20:19:04 +02:00
8edc9db372 fix: java.net.URLConnection not following redirects from http to https 2020-04-12 19:08:02 +02:00
df3af8fab1 add: support for gzip encoded http response 2020-04-10 20:25:05 +02:00
a5bc33db70 fix: remaining references to obsolete sun.misc.Base64Encoder 2020-04-10 20:24:33 +02:00
523d806b56 fix: return an empty string if markup is null or undefined 2020-04-05 21:33:07 +02:00
c984d3c4a2 fix: exception when trying to copy helma.xsl 2020-04-05 21:32:12 +02:00
657f66c0ce chg: merged parser code modified in antville app back into hopkit 2020-04-03 14:15:00 +02:00
0bf39c8f4b add: missing licenses for jars in helma modules 2020-03-29 12:50:32 +02:00
2721db44ae chg: replaced static licenses with automatically generated ones using gradle task 2020-03-29 12:45:47 +02:00
ae50bc562e del: obsolete entity table and test method 2020-03-27 21:13:11 +01:00
75f609d095 fix: updated list of tags according to MDN 2020-03-27 21:08:51 +01:00
9950f4df46 del: outdated list of and check for “all” tags 2020-03-27 20:10:11 +01:00
5a958b2980 fix: regression from foolishly replacing a nullstring with space 2020-03-21 20:41:28 +01:00
06eefa8e86
fix: add newline after emoji 2020-03-21 20:22:53 +01:00
d6fd0ba6f7
fix: ugly warning symbol 2020-03-21 20:22:08 +01:00
75bda31376 add: change log 2020-03-21 20:20:02 +01:00
9265d322a0 chg: slightly edited wording 2020-03-21 20:19:27 +01:00
540d0eb0fc fix: concat res.write() arguments with spaces 2020-03-21 20:05:12 +01:00
dd53c6f365 fix: undesired newlines between multiple arguments in res.writeln() 2020-03-21 19:23:18 +01:00
Daniel Ruthardt
4d92cec456 Resolves issue #115. 2020-03-21 15:53:06 +01:00
91d052af48 chg: slightly edited 2020-03-21 15:47:19 +01:00
768b7b5ed3 Merge branch 'helma-js' into helma-🐜 2020-03-21 15:46:12 +01:00
0c1f1d0beb fix: some syntax errors with the help of eslint 2020-03-21 15:35:25 +01:00
060f6461cb fix: undefined variable error 2020-03-21 14:56:45 +01:00
23fdb31348 add: support for importing code using require() method (commonjs) 2020-03-21 14:40:26 +01:00
Daniel Ruthardt
db8d239c32 Minor code simplification. 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
9960e1c919 Removed obsolete class. 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
541286dc59 Fixed issue (persistent sessions did not work anymore).
Persistent sessions did not work anymore, because the Application
(which became part of the information to be serialized at some point in
time) was not serializable.
2020-03-21 14:40:00 +01:00
Daniel Ruthardt
e0f590da98 Added missing @Deprecated annotations. (cherry picking from commit be90106b8430386d93ecba7afcd465c09e2b0125) 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
37307708fd Removed standalone MD5Encoder implementation and replaced usage of it with Apache Commons Codec. 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
5abe737912 Added syncrhonization to methods who's overridden parent methods have synchronization as well. (cherry picking from commit 36d2021fe7178d6686b5843c6f57bbf41bfd30c2) 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
468a89bd05 Fixed version requirement / version check mismatch.
Although requiring a higher version of Java, this was not yet checked
correctly in the code.
2020-03-21 14:40:00 +01:00
Daniel Ruthardt
7f3bb3a85b Added generated serial version identifiers. (cherry picking from commit abbe243d4af0636541defcc75f74400dffefc00a) 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
1acd176aa5 Fixed deprecation issues. (cherry picking from commit b50bfdfd00b380061c6baa3dab1d7d5c89e616a3) 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
7cafee58c4 Added check to make sure that all code resources are returned at any point in time (i.e. even in application startup phase, when prototype has maybe never been updated before). (cherry picking from commit 5880fc27d323b82f508e5b5234999ebbd9bbb4ad) 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
eda05c731a Resolves issue #40.
http://github.com/helma-next/helma-next/issues#issue/40
2020-03-21 14:40:00 +01:00
0929cd1e57 Removed standalone Base64 implementation and replaced usage of it with Apache Commons Codec's Base64 implementation. 2020-03-21 14:40:00 +01:00
39f565252f chg: further replaced helma’s md5 implementation with apache commons codec 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
be233eba03 Replaced Helma MD5 implementation with Apache Commons Codec. 2020-03-21 14:40:00 +01:00
f6656f7b4d chg: refactored and simplified Array.intersection() method 2020-03-21 14:40:00 +01:00
0b938bf808 chg: refactored and simplified Array.union() method 2020-03-21 14:40:00 +01:00
aa2a236d91 chg: removed code from Array.contains() method and assigned it to Array.includes() 2020-03-21 14:40:00 +01:00
90e91ee9f7 chg: simplified code 2020-03-21 14:40:00 +01:00
a0f5729e58 chg: refactored String.pad() method with builtin methods 2020-03-21 14:40:00 +01:00
708c02f670 chg: String.endsWith() method is already provided by Rhino 2020-03-21 14:40:00 +01:00
9f49ad80b9 chg: String.startsWith() method is already provided by Rhino 2020-03-21 14:40:00 +01:00
2a4ae9adcf chg: String.trim() method is already provided by Rhino 2020-03-21 14:40:00 +01:00
265cf566b7 chg: String.repeat() method is already provided by Rhino 2020-03-21 14:40:00 +01:00
Daniel Ruthardt
9f213ab7b9 Moved import-style modules back into repository-style modules. 2020-03-21 14:40:00 +01:00
8e973d1a1a fix: removed / replaced orphaned helma links 2020-03-21 14:40:00 +01:00
cdc522b22e add: group and description to custom tasks 2020-03-21 14:40:00 +01:00
c2fcc1867a chg: cast each array element to string 2020-03-21 14:40:00 +01:00
Jürg Lehni
47fecff5b4 Fix sendForward() to define Content-Range header, as required by HTML5 audio and video tags. 2020-03-21 14:40:00 +01:00
Jürg Lehni
63b4ec8512 Escape backslash (\) in SQL Strings as they can break queries unescaped. 2020-03-21 14:40:00 +01:00
8433ed4f8c chg: bumped version of commons codec jar 2020-03-21 14:40:00 +01:00
2fe0041d2d chg: bumped jetty version 2020-03-21 14:40:00 +01:00
2f27921403 add: jvm arg to prevent dock icon on macos 2020-03-21 14:40:00 +01:00
cb57b90c62 fix: line endings in archive files (zip: crlf; tar: lf) 2020-03-21 14:40:00 +01:00
88b48b46ce add: parameter for running commandline task 2020-03-21 14:39:59 +01:00
c673e8e3f2 chg: name of rhino shell task 2020-03-21 14:39:59 +01:00
d985d1be0c fix: missing jsdoc files 2020-03-21 14:39:59 +01:00
bd552751f5 chg: moved launcher source files into subproject 2020-03-21 14:39:59 +01:00
f29781e150 del: code in comments 2020-03-21 14:39:59 +01:00
9cb7d08581 fix: readmes 2020-03-21 14:39:59 +01:00
cfb31beeec chg: updated readme 2020-03-21 14:39:59 +01:00
39af201e78 del: self-made start scripts (generated by gradle now) 2020-03-21 14:39:59 +01:00
2da9bcf00b fix: error when running start scripts 2020-03-21 14:39:59 +01:00
56e9f6793b chg: moved http and xmlrpc port settings into server.properties 2020-03-21 14:39:59 +01:00
5cbeb9f01d chg: replaced ant with gradle 2020-03-21 14:39:59 +01:00
cee0be52e0 chg: set source and target of java versions to 6 2020-03-21 14:39:59 +01:00
7d6fb8f903 chg: upgrade dependencies 2020-03-21 14:39:59 +01:00
36b5ae6279 chg: get rid of main task 2020-03-21 14:39:59 +01:00
Daniel Ruthardt
f7e52dbad5 Don't assume a specific system class loader.
The issue was encountered using Oracle JDK9 on Debian stretch arm64.
2020-03-21 14:39:59 +01:00
dbbaa0fb1a fix: use file-based stream 2020-03-21 14:39:59 +01:00
74640c222a fix: exception when trying to close undefined stream in finally block 2020-03-21 14:39:59 +01:00
c07e4a9d7f chg: upgraded rhino to version 1.7.9 2020-03-21 14:39:58 +01:00
8d62f24bee chg: sorted lines 2020-03-21 14:39:58 +01:00
825ccb6463 chg: upgraded commons net lib 2020-03-21 14:39:57 +01:00
e88c4f5d8f chg: upgraded commons net lib 2020-03-21 14:39:12 +01:00
5902bf9d7f chg: upgraded jetty to version 9.4.3.v20170317
cherry-picked from 390231e8dd
2020-03-21 14:36:36 +01:00
6571f4ff1b wip: removing ajp support 2020-03-21 14:36:36 +01:00
03e2718ff5 fix: null pointer exception
if argument is null in res.debug() / write() / writeln()
2020-03-21 14:36:36 +01:00
00762cf495 del: inline css styles from helma debug lines 2020-03-21 14:36:36 +01:00
6e5d2061fa chg: allow variable amount of arguments in response methods 2020-03-21 14:36:36 +01:00
c399fd27e4 fix: build instructions using gradlew 2020-03-21 14:36:36 +01:00
677cedd0eb add: .gradle dir to .gitignore 2020-03-21 14:36:36 +01:00
Simon Oberhammer
f1fa050ea5 bump version 1.7.4 2018-02-13 15:14:22 +01:00
Simon Oberhammer
e82aa34967 package modules too 2018-02-13 15:14:07 +01:00
Simon Oberhammer
65381e7638 use java8 as target; source could stay 1.5 but i'm bumping this too now 2018-02-13 14:44:56 +01:00
Simon Oberhammer
21739a54d8 update readme (first time after 9 years. yey\!) 2018-02-13 14:44:28 +01:00
Simon Oberhammer
d1fb7d312e neither jsdocs nor javadocs did build and the tools seem to be gone for a long time so drop those tasks from ant file; also removed welcome app from demo since this app no longer exists 2018-02-13 14:35:10 +01:00
Robert Gaggl
81f5e3cd8e res.setCookie() now accepts boolean httponly and secure flags
httponly defaults to true, secure to false
2017-03-27 15:50:01 +02:00
Robert Gaggl
75f0245817 removed activation.jar, this is part of j2se since version 6 2017-03-27 14:45:33 +02:00
Robert Gaggl
021a24a100 updated commons libs:
- codec to 1.10
- fileupload to 1.3.2
- io to 2.5
- logging to 1.2
- net to 3.6
2017-03-27 14:39:34 +02:00
Robert Gaggl
390231e8dd updated to jetty 9.4.3.v20170317 2017-03-27 14:17:46 +02:00
c085492c27 chg: refactored global encodeForm() method to JS 2017-03-19 17:50:18 +01:00
98a8cdbc53 fix: default value for encodeNewline 2017-03-19 17:47:59 +01:00
863c622631 chg: refactored global encodeXml() method to JS 2017-03-19 17:38:12 +01:00
12f9e1b1e3 chg: refactored global encode() method to JS 2017-03-19 17:13:20 +01:00
655f965084 chg: refactored global strippedTags() method to JS 2017-03-19 17:11:37 +01:00
Robert Gaggl
b0ff574e95 updated rhino to 1.7.7.1 and jdk8 2016-12-05 13:47:42 +01:00
148 changed files with 3197 additions and 3805 deletions

15
.eslintrc Normal file
View file

@ -0,0 +1,15 @@
{
"extends": "eslint:recommended",
"env": {
"es6": true,
"commonjs": true
},
"globals": {
"app": "readonly",
"HopObject": "readonly",
"java": "readonly",
"Packages": "readonly",
"req": "readonly",
"res": "readonly"
}
}

42
.github/actions/ssh/action.yml vendored Normal file
View file

@ -0,0 +1,42 @@
name: SSH setup
description: Set up the SSH agent
inputs:
config:
description: The SSH configuration
required: true
key:
description: The private SSH key
required: true
known-hosts:
description: The list of known hosts
required: true
runs:
using: composite
steps:
- name: Configure SSH
shell: sh
env:
CONFIG: ${{ inputs.config }}
KNOWN_HOSTS: ${{ inputs.known-hosts }}
run: |
mkdir -p ~/.ssh
echo "${CONFIG}" > ~/.ssh/config
echo "${KNOWN_HOSTS}" > ~/.ssh/known_hosts
- name: Start SSH agent
shell: bash
env:
SOCKET: /tmp/ssh-agent.sock
run: |
echo "SSH_AUTH_SOCK=${SOCKET}" >> $GITHUB_ENV
ssh-agent -a ${SOCKET} > /dev/null
- name: Add SSH key
shell: bash
env:
KEY: ${{ inputs.key }}
run: |
ssh-add - <<< "${KEY}"

22
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,22 @@
name: Build
on:
push:
paths:
- .github/workflows/build.yml
- build.gradle
- settings.gradle
- src/**
- launcher/build.gradle
- launcher/src/**
workflow_dispatch:
jobs:
build:
runs-on: antville
steps:
- uses: actions/checkout@v4
- name: Compile with Gradle
run: ./gradlew :compileJava

15
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,15 @@
name: Deploy (Production)
on: workflow_dispatch
jobs:
deploy:
runs-on: antville
environment:
name: antville.org
url: https://antville.org
steps:
- name: Copy files to production server
run: ssh staging-server deploy-helma

59
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,59 @@
name: Release
on:
workflow_dispatch:
push:
tags: '2*'
permissions:
contents: write
jobs:
release:
runs-on: antville
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
LC_TIME: en_US.UTF-8
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create release notes
id: create_release_notes
run: |
release_notes=$(npx git-cliff@latest --latest)
# Write the release notes as a heredoc to the workflow output
# ⚠️ No white space around `<<` is crucial!
echo "release_notes<<.eot0x03" >> $GITHUB_OUTPUT
echo "$release_notes" >> $GITHUB_OUTPUT
echo ".eot0x03" >> $GITHUB_OUTPUT
- name: Build with Gradle
run: ./gradlew assembleDist
- name: Create release
uses: actions/forgejo-release@v2
with:
direction: upload
url: https://code.host.antville.org
token: ${{ github.token }}
title: Helma ${{ github.ref_name }}
release-dir: build/distributions
release-notes: ${{ steps.create_release_notes.outputs.release_notes }}
verbose: true
- name: Create release at GitHub
run: |
gh release create "$GITHUB_REF_NAME" \
--repo "$GITHUB_REPOSITORY" \
--title "Helma ${{ github.ref_name }}" \
--notes "${{ steps.create_release_notes.outputs.release_notes }}"
- name: Upload release assets to GitHub
run: |
gh release upload "$GITHUB_REF_NAME" build/distributions/helma-*.* \
--repo "$GITHUB_REPOSITORY" \
--clobber

44
.github/workflows/renovate.yml vendored Normal file
View file

@ -0,0 +1,44 @@
name: Run Renovate
on:
schedule:
- cron: "13 * * * *"
workflow_dispatch:
jobs:
renovate:
runs-on: antville
steps:
- uses: actions/checkout@v4
- name: Run Renovate
# See <https://docs.renovatebot.com/troubleshooting/#log-debug-levels>
# debug | info | warn | error | fatal
run: LOG_LEVEL=info npx renovate
env:
# Renovate is using this token to retrieve release notes
GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }}
# Autodiscover is better suited for an extra repo running Renovate on all desired repos
#RENOVATE_AUTODISCOVER: 'true'
RENOVATE_CONFIG_FILE: renovate.json
RENOVATE_ENDPOINT: ${{ github.api_url }}
RENOVATE_GIT_AUTHOR: Renovate Bot <mail+renovate@antville.org>
#RENOVATE_GIT_IGNORED_AUTHORS:
# - 29139614+renovate[bot]@users.noreply.github.com
RENOVATE_IGNORE_PR_AUTHOR: 'true'
RENOVATE_LOG_FILE: renovate-log.ndjson
RENOVATE_LOG_FILE_LEVEL: debug
RENOVATE_PLATFORM: gitea
RENOVATE_REPOSITORIES: ${{ github.repository }}
RENOVATE_REPOSITORY_CACHE: 'enabled'
# github.token is not working here, it lacks some permissions required by Renovate
RENOVATE_TOKEN: ${{ secrets.renovate_token }}
- name: Save log file
# FIXME: v4 of this action causes an error on Forgejo (“You must configure a GitHub token”)
uses: actions/upload-artifact@v3
if: always()
with:
name: renovate-log.ndjson
path: renovate-log.ndjson

32
.github/workflows/stage.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Deploy (Staging)
on: workflow_dispatch
jobs:
stage:
runs-on: antville
environment:
name: stage
url: ${{ vars.stage_url }}
steps:
- uses: actions/checkout@v4
- name: Build with Gradle
run: ./gradlew installDist
- name: Publish to staging server
run: |
rsync ./build/install/helma/ staging-server:./ \
--verbose --archive --delete --compress \
--filter '+ /bin' \
--filter '+ /extras' \
--filter '+ /launcher.jar' \
--filter '- /lib/ext' \
--filter '+ /lib' \
--filter '+ /modules' \
--filter '- /*'
- name: Restart Helma
run: ssh staging-server restart

2
.gitignore vendored
View file

@ -1,4 +1,5 @@
.gradle
.idea
.settings
build
@ -9,6 +10,7 @@ build
/docs
/extras
/lib
/licenses
/log
/static

1
.java-version Normal file
View file

@ -0,0 +1 @@
11.0

6
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,6 @@
{
"recommendations": [
"vscjava.vscode-java-pack",
"vscjava.vscode-gradle"
]
}

6
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,6 @@
{
"files.watcherExclude": {
"apps/": true
},
"java.configuration.updateBuildConfiguration": "automatic"
}

31
CHANGES.md Normal file
View file

@ -0,0 +1,31 @@
# Change Log
## May 17, 2020
* Added support for colored log output
* Added xgettext and po2js tasks (only running with Antville right now)
## April 13, 2020
* Added support for gzip compressed response in helma.Http
* Fixed helma.Http.getURL() not following redirects if protocol changes (e.g. http → https)
* Fixed references to obsolete Base64 encoder in modules
* Updated JavaMail library to implementation package
## March 21, 2020
* Completely rewrote build system with Gradle
* Separated launcher from main source as Gradle subproject
* Launcher now includes all JARs found in `lib`
* Upgraded Rhino to version 1.7.12
* Upgraded Jetty to version 9.x
* Fixed compatibility issues with Java 11
* Removed support for Apache JServ Protocol (AJP)
* Added support for CommonJS require() method
* Allow variable arguments in res.write() and res.writeln()
* Replaced Helmas MD5 and Base64 methods with equivalent methods from Apache Commons
* Refactored String methods from Java to JavaScript: encode(), encodeForm(), encodeXml(), stripTags()
* Replaced custom String methods with Rhinos built-in ones: endsWith(), repeat(), startsWith(), trim()
* Refactored custom String.pad() method with built-in methods
* Redefined custom Array.contains() method with built-in Array.includes()
* Refactored custom Array methods with built-in methods: intersection(), union()

View file

@ -1,6 +1,6 @@
# License
Copyright (c) 1999-2008 Helma Project. All rights reserved.
Copyright (c) 1999-2025 Helma Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions

View file

@ -2,7 +2,8 @@
## TL;DR
- Make sure you have Java 1.6 or higher installed
- Make sure you have Java 11 or higher installed
- Download and unpack the [latest release](https://code.host.antville.org/antville/helma/releases)
- Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform
- Direct your web browser to <http://localhost:8080>
@ -20,27 +21,37 @@ 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 11 or higher to run Helma.
Please consult the documentation of your platform how to obtain and install Java.
You also can directly download a [Java runtime or development kit](https://www.oracle.com/java/technologies/javase-downloads.html#javasejdk) from Oracle.
Helma is built with [Gradle](https://gradle.org).
Helma is built with [Gradle](https://gradle.org), the build task depends on the binaries [rsync](https://rsync.samba.org) and [npx](https://www.npmjs.com/package/npx) being installed on your system.
## 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
> ⚠️ 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.
* [Node.js](https://nodejs.org) LTS version
* [Rsync](https://rsync.samba.org) version ≥ 3.1.0
After compilation start Helma by invoking `./bin/helma.bat` or `./bin/helma`, depending on whether you are on Windows or Linux / Unix / OS X, respectively. If the `java` command is not found, try setting the `JAVA_HOME` variable in the start script to the location of your Java installation.
Clone this repository to your machine and run Helma with `./gradlew run`.
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.
To update the installation from a build, run `./gradlew update` and enter `yes` at the prompt.
After startup you should be able to connect your browser to <http://localhost:8080> port 8080 on the local machine, that is.
> ⚠️
> 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.
>
> Alternatively, you could move or copy the desired files manually from the installation directory `build/install/helma`.
Helma comes with a version of [Jetty](http://eclipse.org/jetty/), a lightweight yet industrial strenth web server.
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, 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.
Helma comes with a version of [Jetty](http://eclipse.org/jetty/), a lightweight yet industrial strength web server.
While Jetty works well for development and in fact deploying real web sites, you might want to run Helma with the web server you are already using. This is most easily done by proxying Helma. Please consult the documentation of your web server how to achieve this.
@ -50,7 +61,8 @@ 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/)

View file

@ -1,3 +1,8 @@
plugins {
id 'application'
id 'com.github.jk1.dependency-license-report' version '2.9'
}
import org.apache.tools.ant.filters.FixCrLfFilter
def jettyLogLevel = '-Dorg.eclipse.jetty.LEVEL=WARN'
@ -12,19 +17,31 @@ def textFiles = ['**/*.hac', '**/.html', '**/*.js', '**/*.md', '**/*.properties'
allprojects {
apply plugin: 'java'
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
repositories {
mavenCentral()
}
}
apply plugin: 'application'
version = new Date().format("yy.M.d")
version = new Date().format("yyyyMMdd")
tasks.build.dependsOn javadoc, 'jsdoc'
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 {
@ -34,11 +51,6 @@ sourceSets {
}
}
repositories {
mavenCentral()
jcenter()
}
configurations {
// Wrapping implementation because it does not allow access to its files
// (i.e. cannot be resolved)
@ -46,25 +58,61 @@ configurations {
}
dependencies {
implementation 'commons-codec:commons-codec:1.14'
implementation 'commons-fileupload:commons-fileupload:1.4'
implementation 'commons-logging:commons-logging:1.2'
implementation 'commons-net:commons-net:3.6'
implementation 'com.sun.activation:javax.activation:1.2.0'
implementation 'javax.mail:javax.mail-api:1.6.2'
implementation 'com.google.code.gson:gson:2.12.1'
implementation 'commons-codec:commons-codec:1.18.0'
implementation 'commons-fileupload:commons-fileupload:1.5'
implementation 'commons-logging:commons-logging:1.3.5'
implementation 'commons-net:commons-net:3.11.1'
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.57.v20241219'
implementation 'org.eclipse.jetty:jetty-xml:9.4.57.v20241219'
implementation 'org.mozilla:rhino-all:1.8.0'
implementation 'org.sejda.imageio:webp-imageio:0.1.6'
implementation 'xerces:xercesImpl:2.12.2'
implementation 'xmlrpc:xmlrpc:2.0.1'
}
def rhinoJar = configurations.library.files.find { jar ->
jar.name.startsWith('rhino')
}
run {
jvmArgs jettyLogLevel, suppressMacosDockIcon
classpath += fileTree(dir: 'lib/ext', include: '*.jar')
}
application {
mainClass = 'helma.main.Server'
applicationDistribution.from(projectDir) {
include 'modules/**'
include 'LICENSE.md'
include 'README.md'
include 'start.*'
}
applicationDistribution.from(javadoc.destinationDir) {
include '**'
into 'docs/javadoc'
}
applicationDistribution.from("${project.buildDir}/docs/jsdoc") {
include '**'
into 'docs/jsdoc'
}
applicationDistribution.from("${project.buildDir}/reports/dependency-license") {
include '**'
into 'licenses'
}
}
startScripts {
applicationName = 'helma'
classpath = files('../launcher.jar')
mainClassName = 'helma.main.launcher.Main'
mainClass = 'helma.main.launcher.Main'
defaultJvmOpts = [jettyLogLevel, suppressMacosDockIcon]
@ -86,24 +134,9 @@ distributions {
}
}
applicationDistribution.from(projectDir) {
include 'modules/**'
include 'LICENSE.md'
include 'README.md'
include 'start.*'
}
applicationDistribution.from(javadoc.destinationDir) {
include '**'
into 'docs/javadoc'
}
applicationDistribution.from("${project.buildDir}/docs/jsdoc") {
include '**'
into 'docs/jsdoc'
}
distTar {
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
compression = Compression.GZIP
filesMatching(textFiles) {
@ -112,51 +145,45 @@ distTar {
}
distZip {
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
filesMatching(textFiles) {
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("crlf"))
}
}
installDist {
dependsOn javadoc, 'jsdoc'
finalizedBy 'update'
dependsOn build
}
run {
classpath = files('launcher.jar')
jvmArgs jettyLogLevel, suppressMacosDockIcon
}
task processSource(type: Sync) {
def date = new Date().format("MMMM dd, yyyy")
tasks.register('processSource', Sync) {
def gitOutput = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe'
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = gitOutput
errorOutput = new ByteArrayOutputStream()
ignoreExitValue = true
}
def description = date
def tag = gitOutput.toString().trim()
// TODO: Implement extended description in Java code
if (tag) description = "$tag; $description"
from 'src'
filter {
line -> line.replaceAll('__builddate__', date)
line -> line
.replaceAll('__builddate__', new Date().format("d MMM yyyy"))
.replaceAll('__commithash__', gitOutput.toString().trim())
.replaceAll('__version__', version)
} into "${project.buildDir}/src"
}
task update {
def rsyncArgs = ['-a', '--info=progress2', '--exclude', 'backups']
tasks.register('update') {
dependsOn installDist
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() }
@ -167,28 +194,37 @@ 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
}
}
}
task jsdoc(type: Exec) {
tasks.register('jsdoc', Exec) {
description 'Generates JSDoc API documentation for the included JavaScript modules.'
group 'Documentation'
description 'Generates JSDoc API documentation for the included JavaScript modules'
def sources = ['modules/core', 'modules/helma', 'modules/jala/code']
def destination = "${project.buildDir}/docs/jsdoc"
@ -198,34 +234,65 @@ 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 rhinoShell(type: JavaExec) {
group 'Application'
description 'Runs the interactive Rhino JavaScript shell'
tasks.register('xgettext', JavaExec) {
description 'Extracts translatable message strings from source code.'
group 'i18n'
def rhinoJar = configurations.library.files.find { jar ->
jar.name.startsWith('rhino')
}
classpath = files('launcher.jar')
mainClass = 'helma.main.launcher.Commandline'
// TODO: Decouple from Antville app
args = [
// Root.extractMessages is currently located in antville/code/Global/i18n.js
'antville.extractMessages',
'modules/jala/util/HopKit/scripts/MessageParser.js',
'code compat',
'apps/antville/i18n/antville.pot'
]
}
tasks.register('po2js', JavaExec) {
description 'Converts translated message strings from PO format to JavaScript.'
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 = [
'modules/jala/util/HopKit/scripts/PoParser.js',
'apps/antville/i18n',
'apps/antville/i18n'
]
}
tasks.register('rhinoShell', JavaExec) {
description 'Runs the interactive Rhino JavaScript shell.'
group 'Application'
classpath = files(rhinoJar)
mainClass = 'org.mozilla.javascript.tools.shell.Main'
standardInput = System.in
}
// Call this task with a function definition using the `-P` parameter, e.g.
// `./gradlew commandLine -Pfunction=manage.getAllApplications`
task commandLine(type: JavaExec) {
tasks.register('commandLine', JavaExec) {
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`.'
group 'Application'
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`'
classpath = files('launcher.jar')
main = 'helma.main.launcher.Commandline'
mainClass = 'helma.main.launcher.Commandline'
args '-h', projectDir, function
}
tasks.register('debug', JavaExec) {
group = 'application'
main = 'helma.main.Server'
classpath = sourceSets.main.runtimeClasspath
jvmArgs = ['-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005']
classpath += fileTree(dir: 'lib/ext', include: '*.jar')
}

52
cliff.toml Normal file
View file

@ -0,0 +1,52 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.
[changelog]
trim = true
header = "## Changes"
body = """
{% for group, commits in commits | filter(attribute="merge_commit") | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
* [<tt>{{ commit.id | split(pat="") | slice(end=11) | join() }}</tt>]\
(https://code.host.antville.org/antville/helma/commit/{{ commit.id }}) \
{% if commit.breaking %}**Breaking:** {% endif %}\
{{ commit.message | split(pat="\\n") | first | upper_first | escape }}\
{% endfor %}
{% endfor %}
**Full Changelog:** [{{ previous.version }} {{ version }}]\
(https://code.host.antville.org/antville/helma/compare/\
{{ previous.version | urlencode }}..{{ version | urlencode }})\n\n
"""
footer = """
Generated by [git-cliff](https://git-cliff.org/).
"""
[git]
conventional_commits = false
filter_commits = false
filter_unconventional = false
protect_breaking_commits = false
sort_commits = "newest"
split_commits = false
topo_order = false
commit_parsers = [
{ message = "^Apply \\d+ suggestion", skip = true },
{ message = "^Merge .*(branch|dependabot|dependency|renovate)", skip = true },
{ message = "^Lock file maintenance", skip = true },
{ message = "yarn\\.lock", skip = true },
{ message = "^[Ff]ix", group = "<!-- 0 --> 🐛 Bug Fixes" },
{ field = "author.name", pattern = "[Rr]enovate|[Dd]ependabot", group = "<!-- 3 --> 📦 Dependency Updates" },
{ message = "^Merge pull request", group = "<!-- 1 --> 🔀 Merges" },
{ message = ".*", group = "<!-- 2 --> Uncategorized" },
]

Binary file not shown.

View file

@ -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.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

311
gradlew vendored
View file

@ -1,78 +1,129 @@
#!/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.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
##
## 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/platforms/jvm/plugins-application/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 -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || 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 +132,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" "$@"

78
gradlew.bat vendored
View file

@ -1,4 +1,22 @@
@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
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@ -9,25 +27,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 +57,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

View file

@ -3,5 +3,3 @@ jar {
from 'src/main/java/helma/main/launcher/manifest.txt'
}
}
//startScripts.enabled = false

View file

@ -19,6 +19,7 @@ package helma.main.launcher;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
@ -135,10 +136,10 @@ public class Main {
* @throws MalformedURLException
*/
public static ClassLoader createClassLoader(String installDir)
throws MalformedURLException {
throws MalformedURLException, UnsupportedEncodingException {
// decode installDir in case it is URL-encoded
installDir = URLDecoder.decode(installDir);
installDir = URLDecoder.decode(installDir, System.getProperty("helma.urlEncoding", "UTF-8"));
// set up the class path
File libdir = new File(installDir, "lib");

0
lib/ext/.keep Normal file
View file

View file

@ -1,118 +0,0 @@
COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
1. Definitions.
1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications.
1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
1.4. Executable means the Covered Software in any form other than Source Code.
1.5. Initial Developer means the individual or entity that first makes Original Software available under this License.
1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
1.7. License means this document.
1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
1.9. Modifications means the Source Code and Executable form of any of the following:
A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
B. Any new file that contains any part of the Original Software or previous Modification; or
C. Any new file that is contributed or otherwise made available under the terms of this License.
1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License.
1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)‡the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)‡ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
2. License Grants.
2.1. The Initial Developer Grant.
Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
(c) The licenses granted in Sections‡2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
(d) Notwithstanding Section‡2.1(b) above, no patent license is granted: (1)‡for code that You delete from the Original Software, or (2)‡for infringements caused by: (i)‡the modification of the Original Software, or (ii)‡the combination of the Original Software with other software or devices.
2.2. Contributor Grant.
Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)‡Modifications made by that Contributor (or portions thereof); and (2)‡the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
(c) The licenses granted in Sections‡2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
(d) Notwithstanding Section‡2.2(b) above, no patent license is granted: (1)‡for any code that Contributor has deleted from the Contributor Version; (2)‡for infringements caused by: (i)‡third party modifications of Contributor Version, or (ii)‡the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)‡under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
3. Distribution Obligations.
3.1. Availability of Source Code.
Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
3.2. Modifications.
The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
3.3. Required Notices.
You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
3.4. Application of Additional Terms.
You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
3.5. Distribution of Executable Versions.
You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
3.6. Larger Works.
You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
4. Versions of the License.
4.1. New Versions.
Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
4.2. Effect of New Versions.
You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
4.3. Modified Versions.
When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)‡rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)‡otherwise make it clear that the license contains terms which differ from this License.
5. DISCLAIMER OF WARRANTY.
COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
6. TERMINATION.
6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections‡2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant.
6.3. In the event of termination under Sections‡6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
7. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
8. U.S. GOVERNMENT END USERS.
The Covered Software is a commercial item, as that term is defined in 48‡C.F.R.‡2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. ‡252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48‡C.F.R.‡12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
9. MISCELLANEOUS.
This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
10. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.

View file

@ -1,27 +0,0 @@
Copyright (c) 2009, incava.org
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 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.
* Neither the name of incava.org nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -1,159 +0,0 @@
<HTML>
<HEAD>
<TITLE>Jetty License</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FONT FACE=ARIAL,HELVETICA>
<CENTER><FONT SIZE=+3><B>Jetty License</B></FONT></CENTER>
<CENTER><FONT SIZE=-1><B>$Revision$</B></FONT></CENTER>
<B>Preamble:</B><p>
The intent of this document is to state the conditions under which the
Jetty Package may be copied, such that the Copyright Holder maintains some
semblance of control over the development of the package, while giving the
users of the package the right to use, distribute and make reasonable
modifications to the Package in accordance with the goals and ideals of
the Open Source concept as described at
<A HREF="http://www.opensource.org">http://www.opensource.org</A>.
<P>
It is the intent of this license to allow commercial usage of the Jetty
package, so long as the source code is distributed or suitable visible
credit given or other arrangements made with the copyright holders.
<P><B>Definitions:</B><P>
<UL>
<LI> "Jetty" refers to the collection of Java classes that are
distributed as a HTTP server with servlet capabilities and
associated utilities.<p>
<LI> "Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files
created through textual modification.<P>
<LI> "Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes
of the Copyright Holder.<P>
<LI> "Copyright Holder" is whoever is named in the copyright or
copyrights for the package. <BR>
Mort Bay Consulting Pty. Ltd. (Australia) is the "Copyright
Holder" for the Jetty package.<P>
<LI> "You" is you, if you're thinking about copying or distributing
this Package.<P>
<LI> "Reasonable copying fee" is whatever you can justify on the
basis of media cost, duplication charges, time of people involved,
and so on. (You will not be required to justify it to the
Copyright Holder, but only to the computing community at large
as a market that must bear the fee.)<P>
<LI> "Freely Available" means that no fee is charged for the item
itself, though there may be fees involved in handling the item.
It also means that recipients of the item may redistribute it
under the same conditions they received it.<P>
</UL>
0. The Jetty Package is Copyright (c) Mort Bay Consulting Pty. Ltd.
(Australia) and others. Individual files in this package may contain
additional copyright notices. The javax.servlet packages are copyright
Sun Microsystems Inc. <P>
1. The Standard Version of the Jetty package is
available from <A HREF=http://jetty.mortbay.org>http://jetty.mortbay.org</A>.<P>
2. You may make and distribute verbatim copies of the source form
of the Standard Version of this Package without restriction, provided that
you include this license and all of the original copyright notices
and associated disclaimers.<P>
3. You may make and distribute verbatim copies of the compiled form of the
Standard Version of this Package without restriction, provided that you
include this license.<P>
4. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.<P>
5. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:<P>
<BLOCKQUOTE>
a) Place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or
an equivalent medium, or placing the modifications on a major archive
site such as ftp.uu.net, or by allowing the Copyright Holder to include
your modifications in the Standard Version of the Package.<P>
b) Use the modified Package only within your corporation or organization.<P>
c) Rename any non-standard classes so the names do not conflict
with standard classes, which must also be provided, and provide
a separate manual page for each non-standard class that clearly
documents how it differs from the Standard Version.<P>
d) Make other arrangements with the Copyright Holder.<P>
</BLOCKQUOTE>
6. You may distribute modifications or subsets of this Package in source
code or compiled form, provided that you do at least ONE of the following:<P>
<BLOCKQUOTE>
a) Distribute this license and all original copyright messages, together
with instructions (in the about dialog, manual page or equivalent) on where
to get the complete Standard Version.<P>
b) Accompany the distribution with the machine-readable source of
the Package with your modifications. The modified package must include
this license and all of the original copyright notices and associated
disclaimers, together with instructions on where to get the complete
Standard Version.<P>
c) Make other arrangements with the Copyright Holder.<P>
</BLOCKQUOTE>
7. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this Package.
You may not charge a fee for this Package itself. However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software
distribution provided that you meet the other distribution requirements
of this license.<P>
8. Input to or the output produced from the programs of this Package
do not automatically fall under the copyright of this Package, but
belong to whomever generated them, and may be sold commercially, and
may be aggregated with this Package.<P>
9. Any program subroutines supplied by you and linked into this Package
shall not be considered part of this Package.<P>
10. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written
permission.<P>
11. This license may change with each release of a Standard Version of
the Package. You may choose to use the license associated with version
you are using or the license of the latest Standard Version.<P>
12. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.<P>
13. If any superior law implies a warranty, the sole remedy under such shall
be , at the Copyright Holders option either a) return of any price paid or
b) use or reasonable endeavours to repair or replace the software.<P>
14. This license shall be read under the laws of Australia. <P>
<center>The End</center>
<center><FONT size=-1>This license was derived from the <I>Artistic</I> license published
on <a href=http://www.opensource.org>http://www.opensource.com</a></font></center>
</FONT>

View file

@ -1,509 +0,0 @@
The following license terms apply to the Lucene wrapper by Robert
Gaggle, which is made available as helma.Search and is included in the
Helma default distribution package as part of modules/helmaLib.zip
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View file

@ -1,478 +0,0 @@
For a list of modification contained in the version of Rhino distributed
with Helma and for the corresponding patches and/or bugzilla entries,
see http://dev.helma.org/wiki/Rhino+Bugs+%26+Patches/
---------------
MOZILLA PUBLIC LICENSE
Version 1.1
---------------
1. Definitions.
1.0.1. "Commercial Use" means distribution or otherwise making the
Covered Code available to a third party.
1.1. "Contributor" means each entity that creates or contributes to
the creation of Modifications.
1.2. "Contributor Version" means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. "Covered Code" means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. "Electronic Distribution Mechanism" means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. "Executable" means Covered Code in any form other than Source
Code.
1.6. "Initial Developer" means the individual or entity identified
as the Initial Developer in the Source Code notice required by Exhibit
A.
1.7. "Larger Work" means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. "License" means this document.
1.8.1. "Licensable" means having the right to grant, to the maximum
extent possible, whether at the time of the initial grant or
subsequently acquired, any and all of the rights conveyed herein.
1.9. "Modifications" means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. "Original Code" means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this
License is not already Covered Code governed by this License.
1.10.1. "Patent Claims" means any patent claim(s), now owned or
hereafter acquired, including without limitation, method, process,
and apparatus claims, in any patent Licensable by grantor.
1.11. "Source Code" means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus
any associated interface definition files, scripts used to control
compilation and installation of an Executable, or source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. "You" (or "Your") means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this
License or a future version of this License issued under Section 6.1.
For legal entities, "You" includes any entity which controls, is
controlled by, or is under common control with You. For purposes of
this definition, "control" means (a) the power, direct or indirect,
to cause the direction or management of such entity, whether by
contract or otherwise, or (b) ownership of more than fifty percent
(50%) of the outstanding shares or beneficial ownership of such
entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) under intellectual property rights (other than patent or
trademark) Licensable by Initial Developer to use, reproduce,
modify, display, perform, sublicense and distribute the Original
Code (or portions thereof) with or without Modifications, and/or
as part of a Larger Work; and
(b) under Patents Claims infringed by the making, using or
selling of Original Code, to make, have made, use, practice,
sell, and offer for sale, and/or otherwise dispose of the
Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are
effective on the date Initial Developer first distributes
Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is
granted: 1) for code that You delete from the Original Code; 2)
separate from the Original Code; or 3) for infringements caused
by: i) the modification of the Original Code or ii) the
combination of the Original Code with other software or devices.
2.2. Contributor Grant.
Subject to third party intellectual property claims, each Contributor
hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or
trademark) Licensable by Contributor, to use, reproduce, modify,
display, perform, sublicense and distribute the Modifications
created by such Contributor (or portions thereof) either on an
unmodified basis, with other Modifications, as Covered Code
and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or
selling of Modifications made by that Contributor either alone
and/or in combination with its Contributor Version (or portions
of such combination), to make, use, sell, offer for sale, have
made, and/or otherwise dispose of: 1) Modifications made by that
Contributor (or portions thereof); and 2) the combination of
Modifications made by that Contributor with its Contributor
Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
effective on the date Contributor first makes Commercial Use of
the Covered Code.
(d) Notwithstanding Section 2.2(b) above, no patent license is
granted: 1) for any code that Contributor has deleted from the
Contributor Version; 2) separate from the Contributor Version;
3) for infringements caused by: i) third party modifications of
Contributor Version or ii) the combination of Modifications made
by that Contributor with other software (except as part of the
Contributor Version) or other devices; or 4) under Patent Claims
infringed by Covered Code in the absence of Modifications made by
that Contributor.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be
distributed only under the terms of this License or a future version
of this License released under Section 6.1, and You must include a
copy of this License with every copy of the Source Code You
distribute. You may not offer or impose any terms on any Source Code
version that alters or restricts the applicable version of this
License or the recipients' rights hereunder. However, You may include
an additional document offering the additional rights described in
Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which You contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that
the Modification is derived, directly or indirectly, from Original
Code provided by the Initial Developer and including the name of the
Initial Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If Contributor has knowledge that a license under a third party's
intellectual property rights is required to exercise the rights
granted by such Contributor under Sections 2.1 or 2.2,
Contributor must include a text file with the Source Code
distribution titled "LEGAL" which describes the claim and the
party making the claim in sufficient detail that a recipient will
know whom to contact. If Contributor obtains such knowledge after
the Modification is made available as described in Section 3.2,
Contributor shall promptly modify the LEGAL file in all copies
Contributor makes available thereafter and shall take other steps
(such as notifying appropriate mailing lists or newsgroups)
reasonably calculated to inform those who received the Covered
Code that new knowledge has been obtained.
(b) Contributor APIs.
If Contributor's Modifications include an application programming
interface and Contributor has knowledge of patent licenses which
are reasonably necessary to implement that API, Contributor must
also include this information in the LEGAL file.
(c) Representations.
Contributor represents that, except as disclosed pursuant to
Section 3.4(a) above, Contributor believes that Contributor's
Modifications are Contributor's original creation(s) and/or
Contributor has sufficient rights to grant the rights conveyed by
this License.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code. If it is not possible to put such notice in a particular Source
Code file due to its structure, then You must include such notice in a
location (such as a relevant directory) where a user would be likely
to look for such a notice. If You created one or more Modification(s)
You may add your name as a Contributor to the notice described in
Exhibit A. You must also duplicate this License in any documentation
for the Source Code where You describe recipients' rights or ownership
rights relating to Covered Code. You may choose to offer, and to
charge a fee for, warranty, support, indemnity or liability
obligations to one or more recipients of Covered Code. However, You
may do so only on Your own behalf, and not on behalf of the Initial
Developer or any Contributor. You must make it absolutely clear than
any such warranty, support, indemnity or liability obligation is
offered by You alone, and You hereby agree to indemnify the Initial
Developer and every Contributor for any liability incurred by the
Initial Developer or such Contributor as a result of warranty,
support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of
the Covered Code is available under the terms of this License,
including a description of how and where You have fulfilled the
obligations of Section 3.2. The notice must be conspicuously included
in any notice in an Executable version, related documentation or
collateral in which You describe recipients' rights relating to the
Covered Code. You may distribute the Executable version of Covered
Code or ownership rights under a license of Your choice, which may
contain terms different from this License, provided that You are in
compliance with the terms of this License and that the license for the
Executable version does not attempt to limit or alter the recipient's
rights in the Source Code version from the rights set forth in this
License. If You distribute the Executable version under a different
license You must make it absolutely clear that any terms which differ
from this License are offered by You alone, not by the Initial
Developer or any Contributor. You hereby agree to indemnify the
Initial Developer and every Contributor for any liability incurred by
the Initial Developer or such Contributor as a result of any such
terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description
must be included in the LEGAL file described in Section 3.4 and must
be included with all distributions of the Source Code. Except to the
extent prohibited by statute or regulation, such description must be
sufficiently detailed for a recipient of ordinary skill to be able to
understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation ("Netscape") may publish revised
and/or new versions of the License from time to time. Each version
will be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If You create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), You must (a) rename Your license so that
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
"MPL", "NPL" or any confusingly similar phrase do not appear in your
license (except to note that your license differs from this License)
and (b) otherwise make it clear that Your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial
Developer, Original Code or Contributor in the notice described in
Exhibit A shall not of themselves be deemed to be modifications of
this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1. This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
8.2. If You initiate litigation by asserting a patent infringement
claim (excluding declatory judgment actions) against Initial Developer
or a Contributor (the Initial Developer or Contributor against whom
You file such action is referred to as "Participant") alleging that:
(a) such Participant's Contributor Version directly or indirectly
infringes any patent, then any and all rights granted by such
Participant to You under Sections 2.1 and/or 2.2 of this License
shall, upon 60 days notice from Participant terminate prospectively,
unless if within 60 days after receipt of notice You either: (i)
agree in writing to pay Participant a mutually agreeable reasonable
royalty for Your past and future use of Modifications made by such
Participant, or (ii) withdraw Your litigation claim with respect to
the Contributor Version against such Participant. If within 60 days
of notice, a reasonable royalty and payment arrangement are not
mutually agreed upon in writing by the parties or the litigation claim
is not withdrawn, the rights granted by Participant to You under
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant's
Contributor Version, directly or indirectly infringes any patent, then
any rights granted to You by such Participant under Sections 2.1(b)
and 2.2(b) are revoked effective as of the date You first made, used,
sold, distributed, or had made, Modifications made by that
Participant.
8.3. If You assert a patent infringement claim against Participant
alleging that such Participant's Contributor Version directly or
indirectly infringes any patent where such claim is resolved (such as
by license or settlement) prior to the initiation of patent
infringement litigation, then the reasonable value of the licenses
granted by such Participant under Sections 2.1 or 2.2 shall be taken
into account in determining the amount or value of any payment or
license.
8.4. In the event of termination under Sections 8.1 or 8.2 above,
all end user license agreements (excluding distributors and resellers)
which have been validly granted by You or any distributor hereunder
prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a "commercial item," as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
software" and "commercial computer software documentation," as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if
any, provides otherwise), excluding its conflict-of-law provisions.
With respect to disputes in which at least one party is a citizen of,
or an entity chartered or registered to do business in the United
States of America, any litigation relating to this License shall be
subject to the jurisdiction of the Federal Courts of the Northern
District of California, with venue lying in Santa Clara County,
California, with the losing party responsible for costs, including
without limitation, court costs and reasonable attorneys' fees and
expenses. The application of the United Nations Convention on
Contracts for the International Sale of Goods is expressly excluded.
Any law or regulation which provides that the language of a contract
shall be construed against the drafter shall not apply to this
License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is
responsible for claims and damages arising, directly or indirectly,
out of its utilization of rights under this License and You agree to
work with Initial Developer and Contributors to distribute such
responsibility on an equitable basis. Nothing herein is intended or
shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
Developer permits you to utilize portions of the Covered Code under
Your choice of the NPL or the alternative licenses, if any, specified
by the Initial Developer in the file described in Exhibit A.
EXHIBIT A -Mozilla Public License.
``The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
The Original Code is ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the terms
of the _____ license (the "[___] License"), in which case the
provisions of [______] License are applicable instead of those
above. If you wish to allow use of your version of this file only
under the terms of the [____] License and not to allow others to use
your version of this file under the MPL, indicate your decision by
deleting the provisions above and replace them with the notice and
other provisions required by the [___] License. If you do not delete
the provisions above, a recipient may use your version of this file
under either the MPL or the [___] License."
[NOTE: The text of this Exhibit A may differ slightly from the text of
the notices in the Source Code files of the Original Code. You should
use the text of this Exhibit A rather than the text found in the
Original Code Source Code for Your Modifications.]

View file

@ -1,170 +0,0 @@
Sun Microsystems, Inc.
Binary Code License Agreement
READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSE TERMS
(COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA
PACKAGE. BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF
THIS AGREEMENT. IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE
YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE "ACCEPT" BUTTON AT THE END
OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN
THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, IF THE
SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE "DECLINE" BUTTON AT THE END
OF THIS AGREEMENT.
1. LICENSE TO USE. Sun grants you a non-exclusive and non-transferable
license for the internal use only of the accompanying software and
documentation and any error corrections provided by Sun (collectively
"Software"), by the number of users and the class of computer hardware for
which the corresponding fee has been paid.
2. RESTRICTIONS. Software is confidential and copyrighted. Title to
Software and all associated intellectual property rights is retained by Sun
and/or its licensors. Except as specifically authorized in any Supplemental
License Terms, you may not make copies of Software, other than a single copy
of Software for archival purposes. Unless enforcement is prohibited by
applicable law, you may not modify, decompile, or reverse engineer
Software. You acknowledge that Software is not designed, licensed or
intended for use in the design, construction, operation or maintenance of
any nuclear facility. Sun disclaims any express or implied warranty of
fitness for such uses. No right, title or interest in or to any trademark,
service mark, logo or trade name of Sun or its licensors is granted under
this Agreement.
3. LIMITED WARRANTY. Sun warrants to you that for a period of ninety (90)
days from the date of purchase, as evidenced by a copy of the receipt, the
media on which Software is furnished (if any) will be free of defects in
materials and workmanship under normal use. Except for the foregoing,
Software is provided "AS IS". Your exclusive remedy and Sun's entire
liability under this limited warranty will be at Sun's option to replace
Software media or refund the fee paid for Software.
4. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS AGREEMENT, ALL EXPRESS
OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS
ARE HELD TO BE LEGALLY INVALID.
5. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO
EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR
DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will Sun's
liability to you, whether in contract, tort (including negligence), or
otherwise, exceed the amount paid by you for Software under this Agreement.
The foregoing limitations will apply even if the above stated warranty fails
of its essential purpose.
6. Termination. This Agreement is effective until terminated. You may
terminate this Agreement at any time by destroying all copies of Software.
This Agreement will terminate immediately without notice from Sun if you
fail to comply with any provision of this Agreement. Upon Termination, you
must destroy all copies of Software.
7. Export Regulations. All Software and technical data delivered under this
Agreement are subject to US export control laws and may be subject to export
or import regulations in other countries. You agree to comply strictly with
all such laws and regulations and acknowledge that you have the
responsibility to obtain such licenses to export, re-export, or import as
may be required after delivery to you.
8. U.S. Government Restricted Rights. If Software is being acquired by or
on behalf of the U.S. Government or by a U.S. Government prime contractor or
subcontractor (at any tier), then the Government's rights in Software and
accompanying documentation will be only as set forth in this Agreement; this
is in accordance with 48 CFR 227.7201 through 227.7202-4 (for Department of
Defense (DOD) acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD
acquisitions).
9. Governing Law. Any action related to this Agreement will be governed by
California law and controlling U.S. federal law. No choice of law rules of
any jurisdiction will apply.
10. Severability. If any provision of this Agreement is held to be
unenforceable, this Agreement will remain in effect with the provision
omitted, unless omission would frustrate the intent of the parties, in which
case this Agreement will immediately terminate.
11. Integration. This Agreement is the entire agreement between you and
Sun relating to its subject matter. It supersedes all prior or
contemporaneous oral or written communications, proposals, representations
and warranties and prevails over any conflicting or additional terms of any
quote, order, acknowledgment, or other communication between the parties
relating to its subject matter during the term of this Agreement. No
modification of this Agreement will be binding, unless in writing and signed
by an authorized representative of each party.
JAVAMAIL, VERSION 1.2
SUPPLEMENTAL LICENSE TERMS
These supplemental license terms ("Supplemental Terms") add to or modify the
terms of the Binary Code License Agreement (collectively, the "Agreement").
Capitalized terms not defined in these Supplemental Terms shall have the
same meanings ascribed to them in the Agreement. These Supplemental Terms
shall supersede any inconsistent or conflicting terms in the Agreement, or
in any license contained within the Software.
1. Software Internal Use and Development License Grant. Subject to the
terms and conditions of this Agreement, including, but not limited to
Section 3 (Java(TM) Technology Restrictions) of these Supplemental Terms,
Sun grants you a non-exclusive, non-transferable, limited license to
reproduce internally and use internally the binary form of the Software,
complete and unmodified, for the sole purpose of designing, developing and
testing your Java applets and applications ("Programs").
2. License to Distribute Software. Subject to the terms and conditions of
this Agreement, including, but not limited to Section 3 (Java (TM)
Technology Restrictions) of these Supplemental Terms, Sun grants you a
non-exclusive, non-transferable, limited license to reproduce and distribute
the Software in binary code form only, provided that (i) you distribute the
Software complete and unmodified and only bundled as part of, and for the
sole purpose of running, your Java applets or applications ("Programs"),
(ii) the Programs add significant and primary functionality to the Software,
(iii) you do not distribute additional software intended to replace any
component(s) of the Software, (iv) you do not remove or alter any
proprietary legends or notices contained in the Software, (v) you only
distribute the Software subject to a license agreement that protects Sun's
interests consistent with the terms contained in this Agreement, and (vi)
you agree to defend and indemnify Sun and its licensors from and against any
damages, costs, liabilities, settlement amounts and/or expenses (including
attorneys' fees) incurred in connection with any claim, lawsuit or action by
any third party that arises or results from the use or distribution of any
and all Programs and/or Software.
3. Java Technology Restrictions. You may not modify the Java Platform
Interface ("JPI", identified as classes contained within the "java" package
or any subpackages of the "java" package), by creating additional classes
within the JPI or otherwise causing the addition to or modification of the
classes in the JPI. In the event that you create an additional class and
associated API(s) which (i) extends the functionality of the Java platform,
and (ii) is exposed to third party software developers for the purpose of
developing additional software which invokes such additional API, you must
promptly publish broadly an accurate specification for such API for free use
by all developers. You may not create, or authorize your licensees to
create additional classes, interfaces, or subpackages that are in any way
identified as "java", "javax", "sun" or similar convention as specified by
Sun in any naming convention designation.
4. Trademarks and Logos. You acknowledge and agree as between you and Sun
that Sun owns the SUN, SOLARIS, JAVA, JINI, FORTE, STAROFFICE, STARPORTAL
and iPLANET trademarks and all SUN, SOLARIS, JAVA, JINI, FORTE, STAROFFICE,
STARPORTAL and iPLANET-related trademarks, service marks, logos and other
brand designations ("Sun Marks"), and you agree to comply with the Sun
Trademark and Logo Usage Requirements currently located at
http://www.sun.com/policies/trademarks. Any use you make of the Sun Marks
inures to Sun's benefit.
5. Source Code. Software may contain source code that is provided solely for
reference purposes pursuant to the terms of this Agreement. Source code may
not be redistributed unless expressly provided for in this Agreement.
6. Termination for Infringement. Either party may terminate this Agreement
immediately should any Software become, or in either party's opinion be
likely to become, the subject of a claim of infringement of any intellectual
property right.
For inquiries please contact: Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California 94303

View file

@ -1,100 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>W3C IPR SOFTWARE NOTICE</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<h1>
W3C IPR SOFTWARE NOTICE
</h1>
<h3>
Copyright &copy; 2000 <loc href="http://www.w3.org/">World Wide Web
Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
National de Recherche en Informatique et en Automatique</loc>, <loc
href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
Reserved.
</h3>
<p>
The DOM bindings are published under the W3C Software Copyright Notice
and License. The software license requires "Notice of any changes or
modifications to the W3C files, including the date changes were made."
Consequently, modified versions of the DOM bindings must document that
they do not conform to the W3C standard; in the case of the IDL binding,
the pragma prefix can no longer be 'w3c.org'; in the case of the Java
binding, the package names can no longer be in the 'org.w3c' package.
</p>
<p>
<b>Note:</b> The original version of the W3C Software Copyright Notice
and License could be found at <a
href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
</p>
<h3>
Copyright &copy; 1994-2000 <a href="http://www.w3.org/">World Wide Web
Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
National de Recherche en Informatique et en Automatique</a>, <a
href="http://www.keio.ac.jp/">Keio University</a>). All Rights
Reserved. http://www.w3.org/Consortium/Legal/
</h3>
<p>
This W3C work (including software, documents, or other related items) is
being provided by the copyright holders under the following license. By
obtaining, using and/or copying this work, you (the licensee) agree that
you have read, understood, and will comply with the following terms and
conditions:
</p>
<p>
Permission to use, copy, and modify this software and its documentation,
with or without modification,&nbsp; for any purpose and without fee or
royalty is hereby granted, provided that you include the following on ALL
copies of the software and documentation or portions thereof, including
modifications, that you make:
</p>
<ol>
<li>
The full text of this NOTICE in a location viewable to users of the
redistributed or derivative work.
</li>
<li>
Any pre-existing intellectual property disclaimers, notices, or terms
and conditions. If none exist, a short notice of the following form
(hypertext is preferred, text is permitted) should be used within the
body of any redistributed or derivative code: "Copyright &copy;
[$date-of-software] <a href="http://www.w3.org/">World Wide Web
Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
National de Recherche en Informatique et en Automatique</a>, <a
href="http://www.keio.ac.jp/">Keio University</a>). All Rights
Reserved. http://www.w3.org/Consortium/Legal/"
</li>
<li>
Notice of any changes or modifications to the W3C files, including the
date changes were made. (We recommend you provide URIs to the location
from which the code is derived.)
</li>
</ol>
<p>
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
TRADEMARKS OR OTHER RIGHTS.
</p>
<p>
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
DOCUMENTATION.
</p>
<p>
The name and trademarks of copyright holders may NOT be used in
advertising or publicity pertaining to the software without specific,
written prior permission. Title to copyright in this software and any
associated documentation will at all times remain with copyright
holders.
</p>
</body>
</html>

View file

@ -28,9 +28,7 @@
* @param {Object} val the value to check
* @return {boolean} true if the value is contained
*/
Array.prototype.contains = function(val) {
return this.indexOf(val) > -1;
};
Array.prototype.contains = Array.prototype.includes
/**
* Retrieve the union set of a bunch of arrays
@ -40,18 +38,9 @@ Array.prototype.contains = function(val) {
* @return {Array} the union set
*/
Array.union = function() {
var result = [];
var map = {};
for (var i=0; i<arguments.length; i+=1) {
for (var n in arguments[i]) {
var item = arguments[i][n];
if (!map[item]) {
result.push(item);
map[item] = true;
}
}
}
return result;
return Array.from(arguments).reduce((result, array) => {
return result.concat(array.filter(element => !result.includes(element)));
}, []);
};
/**
@ -62,21 +51,9 @@ Array.union = function() {
* @return {Array} the intersection set
*/
Array.intersection = function() {
var all = Array.union.apply(this, arguments);
var result = [];
for (var n in all) {
var chksum = 0;
var item = all[n];
for (var i=0; i<arguments.length; i+=1) {
if (arguments[i].contains(item))
chksum += 1;
else
break;
}
if (chksum == arguments.length)
result.push(item);
}
return result;
return Array.from(arguments).reduce((result, array) => {
return result.filter(element => array.includes(element));
});
};
// prevent any newly added properties from being enumerated

View file

@ -180,7 +180,7 @@ Date.prototype.getExpiry = function(param) {
*/
Date.prototype.equals = function(date, extend) {
if (!extend)
var extend = Date.ONEDAY;
extend = Date.ONEDAY;
switch (extend) {
case Date.ONESECOND:
if (this.getSeconds() != date.getSeconds())

View file

@ -17,7 +17,7 @@
/**
* @fileoverview Adds useful global macros.
* <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/core/Global.js')
*/
@ -77,3 +77,180 @@ var skin_macro = function(param, name) {
return;
}
/**
* Encodes a string for HTML output and inserts linebreak tags.
*
* Performs the following string manipulations:
* All line breaks (i.e. line feeds) are replaced with <br/> tags.
* All special characters are being replaced with their equivalent HTML entity.
* Existing markup tags are being encoded.
*
* @param {string} text
* The string to encode for HTML output.
* @param {boolean} [encodeNewLine = true]
* If or if not to encode line breaks (i.e. line feeds).
* @return {string}
* The encoded string.
*/
function encode(text, encodeNewLine) {
text = String(text);
if (text === null || !text.length) return text;
var buffer = [];
if (typeof encodeNewLine === 'undefined') encodeNewLine = true;
for (var i = 0, len = text.length; i < len; i += 1) {
var char = text.charAt(i);
switch (char) {
case '<':
buffer.push('&lt;');
break;
case '>':
buffer.push('&gt;');
break;
case '&':
buffer.push('&amp;');
break;
case '"':
buffer.push('&quot;');
break;
case '\n':
if (encodeNewLine) {
buffer.push("<br/>");
}
buffer.push('\n');
break;
default:
buffer.push(char);
}
}
return buffer.join('');
}
/**
* Encodes a string for XML output.
*
* Performs the following string manipulations:
* All special characters are being replaced with their equivalent HTML entity.
* Existing tags, single and double quotes, as well as ampersands are being encoded.
* Some invalid XML characters below '0x20' are removed
*
* @param {string} text
* The string to encode for XML output.
* @return {string}
* The string encoded for XML output.
*/
function encodeXml(text) {
text = String(text);
if (text === null || !text.length) return text;
var buffer = [];
for (var i = 0, len = text.length; i < len; i += 1) {
var char = text.charAt(i);
switch (char) {
case '<':
buffer.push('&lt;');
break;
case '>':
buffer.push('&gt;');
break;
case '&':
buffer.push('&amp;');
break;
case '"':
buffer.push('&quot;');
break;
case '\'':
buffer.push('&#39;');
break;
default:
var charCode = text.charCodeAt(i);
if (charCode < 0x20) {
// sort out invalid XML characters below 0x20 - all but 0x9, 0xA and 0xD.
// The trick is an adaption of java.lang.Character.isSpace().
if (((((1 << 0x9) | (1 << 0xA) | (1 << 0xD)) >> charCode) & 1) !== 0) {
buffer.push(char);
}
} else {
buffer.push(char);
}
}
}
return buffer.join('');
}
/**
* Encodes a string for HTML output, leaving linebreaks untouched.
*
* Performs the following string manipulations:
* Unlike encode, leaves linebreaks untouched. This is what you usually want to do for encoding form content (esp.
* with text input values).
* All special characters (i.e. non ASCII) are being replaced with their equivalent HTML entity.
* Existing markup tags are being encoded.
*
* @param {string} text
* The string to format for HTML output.
* @return {string}
* The string formatted for HTML output.
*/
var encodeForm = function(text) {
text = String(text);
if (text === null || !text.length) return text;
return encode(text, false);
};
/**
* Removes any markup tags contained in the passed string, and returns the modified string.
*
* @param {string} markup
* The text that is to be stripped of tags.
* @return {string}
* The text with the tags stripped out.
*/
var stripTags = function (markup) {
if (!markup) return '';
var chars = String(markup).split('');
var charCounter = 0;
var inTag = false;
for (var i = 0, len = markup.length; i < len; i += 1) {
if (chars[i] === '<') inTag = true;
if (!inTag) {
if (i > charCounter) {
chars[charCounter] = chars[i];
}
charCounter += 1;
}
if (chars[i] === '>') {
inTag = false;
}
}
if (i > charCounter) {
chars.length = charCounter;
return chars.join('');
}
return markup;
};

View file

@ -21,6 +21,8 @@
* application, for example by calling app.addRepository('modules/core/Object.js')
*/
app.addRepository('modules/core/Global.js');
/**
* Copies the properties of this object into a clone.
* @external

View file

@ -42,6 +42,8 @@ String.URLPATTERN = /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\
* application, for example by calling app.addRepository('modules/core/String.js')
*/
app.addRepository('modules/core/Global.js');
/**
* checks if a date format pattern is correct
* @external
@ -392,54 +394,7 @@ String.prototype.unwrap = function(removeTags, replacement) {
* @return String md5 hash of the string
*/
String.prototype.md5 = function() {
return Packages.helma.util.MD5Encoder.encode(this);
};
/**
* function repeats a string the specified amount of times
* @external
* @memberof {String}
* @param Int amount of repetitions
* @return String resulting string
*/
String.prototype.repeat = function(multiplier) {
res.push();
for (var i=0; i<multiplier; i++)
res.write(this);
return res.pop();
};
/**
* function returns true if the string starts with
* the string passed as argument
* @external
* @memberof {String}
* @param String string pattern to search for
* @return Boolean true in case it matches the beginning
* of the string, false otherwise
*/
String.prototype.startsWith = function(str, offset) {
var javaObj = new java.lang.String(this);
if (offset != null)
return javaObj.startsWith(str, offset);
return javaObj.startsWith(str);
};
/**
* function returns true if the string ends with
* the string passed as argument
* @external
* @memberof {String}
* @param String string pattern to search for
* @return Boolean true in case it matches the end of
* the string, false otherwise
*/
String.prototype.endsWith = function(str) {
var javaObj = new java.lang.String(this);
return javaObj.endsWith(str);
return Packages.org.apache.commons.codec.digest.DigestUtils.md5Hex(this);
};
@ -455,28 +410,21 @@ String.prototype.endsWith = function(str) {
* String.BALANCE and String.RIGHT here as well.)
* @return String the resulting string
*/
String.prototype.pad = function(str, len, mode) {
if (str == null || len == null)
return this;
var diff = len - this.length;
if (diff == 0)
return this;
var left, right = 0;
if (mode == null || mode == String.RIGHT)
right = diff;
else if (mode == String.LEFT)
left = diff;
else if (mode == String.BALANCE) {
right = Math.round(diff / 2);
left = diff - right;
String.prototype.pad = function(str, length, mode) {
if (mode === null || mode === String.RIGHT) return this.padEnd(length, str);
if (mode === String.LEFT) return this.padStart(length, str);
if (mode === String.BALANCE && str && length) {
const pos = Math.ceil(this.length / 2);
const head = this.substr(0, pos);
const tail = this.substr(pos);
const additionalLength = (length - this.length) / 2;
const startLength = head.length + Math.floor(additionalLength);
const endLength = tail.length + Math.ceil(additionalLength);
return head.padStart(startLength, str) + tail.padEnd(endLength, str);
}
res.push();
for (var i=0; i<left; i++)
res.write(str);
res.write(this);
for (var i=0; i<right; i++)
res.write(str);
return res.pop();
return this;
};
@ -490,9 +438,7 @@ String.prototype.pad = function(str, len, mode) {
* @param Boolean
*/
String.prototype.contains = function(str, fromIndex) {
if (this.indexOf(str, fromIndex ? fromIndex : 0) > -1)
return true;
return false;
return this.indexOf(str, fromIndex || 0) > -1;
};
@ -558,17 +504,6 @@ String.prototype.diff = function(mod, separator) {
};
/**
* remove leading and trailing whitespace
* @external
* @memberof {String}
*/
String.prototype.trim = function () {
var s = new java.lang.String(this);
return String(s.trim());
};
/**
* returns true if the string looks like an e-mail
* @external
@ -601,8 +536,8 @@ String.prototype.count = function(str) {
* @memberof {String}
*/
String.prototype.enbase64 = function() {
var bytes = new java.lang.String(this) . getBytes();
return new Packages.sun.misc.BASE64Encoder().encode(bytes);
var bytes = java.lang.String(this).getBytes('utf-8');
return String(java.lang.String(Packages.org.apache.commons.codec.binary.Base64.encodeBase64(bytes), 'utf-8'));
};
@ -612,8 +547,8 @@ String.prototype.enbase64 = function() {
* @memberof {String}
*/
String.prototype.debase64 = function() {
var bytes = new Packages.sun.misc.BASE64Decoder().decodeBuffer(this);
return String(new java.lang.String(bytes));
var bytes = Packages.org.apache.commons.codec.binary.Base64.decodeBase64(this);
return String(java.lang.String(bytes, 'utf-8'));
};

View file

@ -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();
};

View file

@ -18,7 +18,7 @@
/**
* @fileoverview Fields and methods of the helma.Http 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/Http.js')
*/
@ -57,15 +57,22 @@ helma.Http = function() {
"socket": 0
};
var maxResponseSize = null;
var maxTries = 5;
var currentTries = 0;
var responseHandler = function(connection, result) {
var input;
var stream;
try {
if (method !== 'DELETE') {
input = new java.io.BufferedInputStream(connection.getInputStream());
}
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();
@ -82,10 +89,9 @@ helma.Http = function() {
try {
input.close();
} catch (error) {
// safe to ignore
// 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 ?
@ -159,8 +165,8 @@ helma.Http = function() {
* @param {String} password The password
*/
this.setCredentials = function(username, password) {
var str = new java.lang.String(username + ":" + password);
credentials = (new Packages.sun.misc.BASE64Encoder()).encode(str.getBytes());
var str = username + ":" + password;
credentials = str.enbase64();
return;
}
@ -170,7 +176,7 @@ helma.Http = function() {
* can be either a string or an object. In the latter case all properties
* and their values are concatenated into a single string.
* If a property is an array, then for each value the propertyname and value pair is added.
* If the name of an array property ends with "_array" then the _array part is removed.
* If the name of an array property ends with "_array" then the _array part is removed.
*/
this.setContent = function(stringOrObject) {
if (stringOrObject != null) {
@ -180,21 +186,21 @@ helma.Http = function() {
for (var key in stringOrObject) {
value = stringOrObject[key];
if (value instanceof Array) {
if (key.substring(key.length - 6) == "_array")
key = key.substring(0,key.length - 6);
if (key.substring(key.length - 6) == "_array")
key = key.substring(0,key.length - 6);
for (var i = 0; i < value.length; i++) {
res.write(encodeURIComponent(key));
res.write("=");
res.write(encodeURIComponent(value[i]));
res.write("&");
}
}
} else {
res.write(encodeURIComponent(key));
res.write("=");
res.write(encodeURIComponent(value));
res.write("&");
}
}
}
content = res.pop();
content = content.substring(0, content.length-1);
} else {
@ -205,7 +211,7 @@ helma.Http = function() {
}
return;
};
/**
* Sets the request method to use.
* @param {String} m The method to use (<code>GET</code>, <code>POST</code> ...)
@ -282,7 +288,7 @@ helma.Http = function() {
* Adds the cookies passed as argument to the list of cookies to send
* to the remote server.
* @param {Array} cookies An array containing objects with the properties
* "name" (the name of the cookie) and "value" (the value of the cookie) set.
* "name" (the name of the cookie) and "value" (the value of the cookie) set.
*/
this.setCookies = function(cookies) {
if (cookies != null) {
@ -484,7 +490,7 @@ helma.Http = function() {
} else if (!(url instanceof java.net.URL)) {
throw new Error("'" + url + "' is not a valid URL.");
}
var conn = proxy ? url.openConnection(proxy) : url.openConnection();
// Note: we must call setInstanceFollowRedirects() instead of
// static method setFollowRedirects(), as the latter will
@ -552,6 +558,14 @@ helma.Http = function() {
content: null,
}
// java.net.URLConnection does not follow redirects from http to https
// See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4620571
if (followRedirects && [301, 303].contains(result.code) && result.location) {
currentTries += 1;
if (currentTries >= maxTries) throw new Error('Too many redirects');
return this.getUrl(result.location, opt);
}
// parse all "Set-Cookie" header fields into an array of
// helma.Http.Cookie instances
var setCookies = conn.getHeaderFields().get("Set-Cookie");
@ -650,7 +664,7 @@ helma.Http.setProxy = function(proxyString) {
sys.put("http.prodyPort", "");
}
return;
};
@ -682,7 +696,7 @@ helma.Http.getProxy = function() {
* @type Boolean
*/
helma.Http.isAuthorized = function(name, pwd) {
if (!req.username || !req.password ||
if (!req.username || !req.password ||
req.username != name || req.password != pwd) {
res.reset();
res.status = 401;

View file

@ -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) {

View file

@ -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
*/

View 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
tasks.register('deps', Copy) {
from sourceSets.main.runtimeClasspath
into '.'
}

BIN
modules/helma/jxl-2.5.7.jar Normal file

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,86 @@
Copyright (c) 2006 - 2011 Christian Plattner. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
a.) Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
b.) 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.
c.) Neither the name of Christian Plattner nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
This software includes work that was released under the following license:
Copyright (c) 2005 - 2006 Swiss Federal Institute of Technology (ETH Zurich),
Department of Computer Science (http://www.inf.ethz.ch),
Christian Plattner. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
a.) Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
b.) 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.
c.) Neither the name of ETH Zurich nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The Java implementations of the AES, Blowfish and 3DES ciphers have been
taken (and slightly modified) from the cryptography package released by
"The Legion Of The Bouncy Castle".
Their license states the following:
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
(http://www.bouncycastle.org)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -0,0 +1,125 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does.
Copyright (C) yyyy name of author
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.

View file

@ -1,3 +1,4 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@ -199,4 +200,3 @@
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.

View file

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

21
modules/jala/build.gradle Normal file
View 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
tasks.register('deps', Copy) {
from sourceSets.main.runtimeClasspath
into 'lib'
}

View file

@ -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

View file

@ -123,11 +123,11 @@ jala.XmlRpcRequest = function(url, methodName) {
* @param {String} password The password
*/
this.setCredentials = function(username, password) {
var str = new java.lang.String(username + ":" + password);
credentials = (new Packages.sun.misc.BASE64Encoder()).encode(str.getBytes());
var str = username + ":" + password;
credentials = str.enbase64();
return;
};
/**
* Returns the credentials of this request
* @returns The base46 encoded credentials of this request

Binary file not shown.

View 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
tasks.register('deps', Copy) {
from sourceSets.main.runtimeClasspath
into 'lib'
}

Binary file not shown.

Binary file not shown.

View file

@ -1,29 +1,21 @@
//
// Jala Project [http://opensvn.csie.org/traccgi/jala]
//
// Copyright 2004 ORF Online und Teletext GmbH
// Copyright 2004 ORF Online und Teletext GmbH.
//
// Licensed under the Apache License, Version 2.0 (the ``License'');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ``AS IS'' BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// $Revision$
// $LastChangedBy$
// $LastChangedDate$
// $HeadURL$
//
/**
* @fileoverview
* @fileoverview
* MessageParser script that extracts all gettext message macros
* out of skin files and all calls of gettext functions
* (that is "gettext", "ngettext" and "_") out of function
@ -39,10 +31,10 @@
* @constructor
*/
var Message = function(id, pluralId) {
this.id = id && String(id);
this.pluralId = pluralId && String(pluralId);
this.locations = [];
return this;
this.id = id && String(id);
this.pluralId = pluralId && String(pluralId);
this.locations = [];
return this;
};
/**
@ -54,11 +46,11 @@ var Message = function(id, pluralId) {
* @type String
*/
Message.getKey = function(id, pluralId) {
if (id && pluralId) {
return id + pluralId;
} else {
return id;
}
if (id && pluralId) {
return id + pluralId;
} else {
return id;
}
};
/**
@ -71,28 +63,28 @@ Message.getKey = function(id, pluralId) {
* @type String
*/
Message.formatId = function(str, wrap) {
var escapeQuotes = function(s) {
return s.replace(/(^|[^\\])"/g, '$1\\"');
};
var escapeQuotes = function(s) {
return s.replace(/(^|[^\\])"/g, '$1\\"');
};
var len = 80;
var buf = new java.lang.StringBuffer();
if (wrap == true && str.length > len) {
buf.append('""\n');
var offset = 0;
while (offset < str.length) {
buf.append('"');
buf.append(escapeQuotes(str.substring(offset, offset += len)));
buf.append('"');
buf.append("\n");
}
return buf.toString();
} else {
var len = 80;
var buf = new java.lang.StringBuffer();
if (wrap == true && str.length > len) {
buf.append('""\n');
var offset = 0;
while (offset < str.length) {
buf.append('"');
buf.append(escapeQuotes(str));
buf.append('"\n');
}
return buf.toString();
buf.append(escapeQuotes(str.substring(offset, offset += len)));
buf.append('"');
buf.append("\n");
}
return buf.toString();
} else {
buf.append('"');
buf.append(escapeQuotes(str));
buf.append('"\n');
}
return buf.toString();
};
/**
@ -103,7 +95,10 @@ Message.formatId = function(str, wrap) {
* was found at
*/
Message.prototype.addLocation = function(filePath, lineNum) {
this.locations.push(filePath + ":" + lineNum);
const basePath = java.nio.file.Paths.get(java.io.File(app.dir).getCanonicalPath());
const locationPath = java.nio.file.Paths.get(filePath);
const relativePath = basePath.relativize(locationPath);
this.locations.push(relativePath + ":" + lineNum);
};
/**
@ -113,34 +108,34 @@ Message.prototype.addLocation = function(filePath, lineNum) {
* to write into
*/
Message.prototype.write = function(buf) {
for (var i=0;i<this.locations.length;i++) {
buf.append("#: ");
buf.append(this.locations[i]);
buf.append("\n");
}
if (this.id.indexOf("{") > -1
|| (this.pluralId != null && this.pluralId.indexOf("{") > -1)) {
buf.append("#, java-format\n");
}
buf.append('msgid ');
buf.append(Message.formatId(this.id));
if (this.pluralId != null) {
buf.append('msgid_plural ');
buf.append(Message.formatId(this.pluralId));
buf.append('msgstr[0] ""\nmsgstr[1] ""\n')
} else {
buf.append('msgstr ""\n')
}
buf.append("\n");
return;
for (var i=0;i<this.locations.length;i++) {
buf.append("#: ");
buf.append(this.locations[i]);
buf.append("\n");
}
if (this.id.indexOf("{") > -1
|| (this.pluralId != null && this.pluralId.indexOf("{") > -1)) {
buf.append("#, java-format\n");
}
buf.append('msgid ');
buf.append(Message.formatId(this.id));
if (this.pluralId != null) {
buf.append('msgid_plural ');
buf.append(Message.formatId(this.pluralId));
buf.append('msgstr[0] ""\nmsgstr[1] ""\n')
} else {
buf.append('msgstr ""\n')
}
buf.append("\n");
return;
};
/**
* @constructor
*/
var MessageParser = function() {
this.messages = {};
return this;
this.messages = {};
return this;
};
/**
@ -150,10 +145,11 @@ var MessageParser = function() {
* @type Object
*/
MessageParser.FUNCTION_NAMES = {
"_": true,
"gettext": true,
"ngettext": true,
"markgettext": true
"_": true,
"gettext": true,
"ngettext": true,
"markgettext": true,
"cgettext": true
};
/**
@ -197,7 +193,7 @@ MessageParser.REGEX_PARAM = /([\w]*)\s*=\s*["'](.*?)["']\s*(?=\w+=|$)/gm;
* @type Number
*/
MessageParser.getLineNum = function(str, idx) {
return str.substring(0, idx).split(/.*(?:\r\n|\n\r|\r|\n)/).length;
return str.substring(0, idx).split(/.*(?:\r\n|\n\r|\r|\n)/).length;
};
/**
@ -208,36 +204,36 @@ MessageParser.getLineNum = function(str, idx) {
* @param {String} encoding The encoding to use
*/
MessageParser.prototype.parse = function(file, encoding) {
if (file.isDirectory()) {
var list = file.list();
for (var i=0;i<list.length;i++) {
this.parse(new java.io.File(file, list[i]), encoding);
if (file.isDirectory()) {
var list = file.list();
for (var i=0;i<list.length;i++) {
this.parse(new java.io.File(file, list[i]), encoding);
}
} else {
var fName, dotIdx;
fName = file.getName();
if ((dotIdx = fName.lastIndexOf(".")) > -1) {
switch (String(fName.substring(dotIdx+1))) {
case "skin":
print("Parsing skin file " + file.getCanonicalPath() + "...");
this.parseSkinFile(file, encoding);
break;
case "hac":
case "js":
print("Parsing function file " + file.getCanonicalPath() + "...");
this.parseFunctionFile(file, encoding);
break;
default:
break;
}
} else {
var fName, dotIdx;
fName = file.getName();
if ((dotIdx = fName.lastIndexOf(".")) > -1) {
switch (String(fName.substring(dotIdx+1))) {
case "skin":
print("Parsing skin file " + file.getAbsolutePath() + "...");
this.parseSkinFile(file, encoding);
break;
case "hac":
case "js":
print("Parsing function file " + file.getAbsolutePath() + "...");
this.parseFunctionFile(file, encoding);
break;
default:
break;
}
}
}
return;
}
}
return;
};
/** @ignore */
MessageParser.prototype.toString = function() {
return "[Jala Message Parser]";
return "[Jala Message Parser]";
};
/**
@ -247,61 +243,65 @@ MessageParser.prototype.toString = function() {
* @param {String} encoding The encoding to use
*/
MessageParser.prototype.parseFunctionFile = function(file, encoding) {
var fis = new java.io.FileInputStream(file);
var isr = new java.io.InputStreamReader(fis, encoding || "UTF-8");
var reader = new java.io.BufferedReader(isr);
var tokenizer = new java.io.StreamTokenizer(reader);
var messages = [], stack = [];
var c;
while ((c = tokenizer.nextToken()) != java.io.StreamTokenizer.TT_EOF) {
switch (c) {
case java.io.StreamTokenizer.TT_WORD:
if (MessageParser.FUNCTION_NAMES[tokenizer.sval] == true) {
stack.push({name: tokenizer.sval, lineNr: tokenizer.lineno()});
} else if (stack.length > 0) {
// it's something else than a string argument inside a gettext method call
// so finalize the argument parsing here as we aren't interested in that
messages.push(stack.pop());
}
break;
case java.io.StreamTokenizer.TT_NUMBER:
break;
default:
if (stack.length > 0) {
if ("\u0028".charCodeAt(0) == c) {
// start of arguments (an opening bracket)
stack[stack.length-1].args = [];
} else if ("\u0029".charCodeAt(0) == c) {
// end of arguments (a closing bracket)
messages.push(stack.pop());
} else if ("\u0022".charCodeAt(0) == c || "\u0027".charCodeAt(0) == c) {
// a quoted string argument
stack[stack.length-1].args.push(tokenizer.sval);
}
}
break;
var fis = new java.io.FileInputStream(file);
var isr = new java.io.InputStreamReader(fis, encoding || "UTF-8");
var reader = new java.io.BufferedReader(isr);
var tokenizer = new java.io.StreamTokenizer(reader);
var messages = [], stack = [];
var c;
while ((c = tokenizer.nextToken()) != java.io.StreamTokenizer.TT_EOF) {
switch (c) {
case java.io.StreamTokenizer.TT_WORD:
if (MessageParser.FUNCTION_NAMES[tokenizer.sval] == true) {
stack.push({name: tokenizer.sval, lineNr: tokenizer.lineno()});
} else if (stack.length > 0) {
// it's something else than a string argument inside a gettext method call
// so finalize the argument parsing here as we aren't interested in that
messages.push(stack.pop());
}
break;
case java.io.StreamTokenizer.TT_NUMBER:
break;
default:
if (stack.length > 0) {
if ("\u0028".charCodeAt(0) == c) {
// start of arguments (an opening bracket)
stack[stack.length-1].args = [];
} else if ("\u0029".charCodeAt(0) == c) {
// end of arguments (a closing bracket)
messages.push(stack.pop());
} else if ("\u0022".charCodeAt(0) == c || "\u0027".charCodeAt(0) == c) {
// a quoted string argument
stack[stack.length-1].args.push(tokenizer.sval);
}
}
break;
}
}
if (messages.length > 0) {
var msgParam, key, msg;
for (var i=0;i<messages.length;i++) {
msgParam = messages[i];
if (msgParam.args && msgParam.args.length > 0) {
if (msgParam.name === "cgettext" || msgParam.name === "markgettext") {
msgParam.args[0] = cgettext.getKey(msgParam.args[0], msgParam.args[1]);
delete msgParam.args[1];
}
key = Message.getKey(msgParam.args[0]);
if (!(msg = this.messages[key])) {
this.messages[key] = msg = new Message(msgParam.args[0], msgParam.args[1]);
}
if (!msg.pluralId && msgParam.args.length > 1) {
msg.pluralId = msgParam.args[1];
}
msg.addLocation(file.getCanonicalPath(), msgParam.lineNr);
}
}
if (messages.length > 0) {
var msgParam, key, msg;
for (var i=0;i<messages.length;i++) {
msgParam = messages[i];
if (msgParam.args && msgParam.args.length > 0) {
key = Message.getKey(msgParam.args[0]);
if (!(msg = this.messages[key])) {
this.messages[key] = msg = new Message(msgParam.args[0], msgParam.args[1]);
}
if (!msg.pluralId && msgParam.args.length > 1) {
msg.pluralId = msgParam.args[1];
}
msg.addLocation(file.getAbsolutePath(), msgParam.lineNr);
}
}
}
fis.close();
isr.close();
reader.close();
return;
}
}
fis.close();
isr.close();
reader.close();
return;
};
/**
@ -313,78 +313,128 @@ MessageParser.prototype.parseFunctionFile = function(file, encoding) {
* @param {String} encoding The encoding to use
*/
MessageParser.prototype.parseSkinFile = function(file, encoding) {
var content = readFile(file.getAbsolutePath(), encoding || "UTF-8");
var macro, id, pluralId, params, key;
while (macro = MessageParser.REGEX_MACRO.exec(content)) {
while (params = MessageParser.REGEX_PARAM.exec(macro[3])) {
if (macro[2] == MessageParser.MACRO_NAME) {
if (params[1] == "text") {
id = params[2];
pluralId = null;
} else if (params[1] == "plural") {
pluralId = params[2];
}
} else {
if (params[1] == MessageParser.ATTRIBUTE_NAME) {
id = params[2];
pluralId = null;
} else if (params[1] == "plural") {
pluralId = params[2];
}
}
var self = this;
var source = readFile(file.getAbsolutePath(), encoding || "UTF-8");
var checkNestedMacros = function(iterator) {
var macros = [];
while (iterator.hasNext()) {
macro = iterator.next();
if (macro && macro.constructor !== String) {
macros.push(macro);
}
}
processMacros(macros);
}
var processMacros = function(macros) {
var re = gettext_macro.REGEX;
var id, pluralId, name, args, param, key, msg;
for (let macro of macros) {
id = pluralId = null;
name = macro.getName();
param = macro.getNamedParams();
if (param) {
checkNestedMacros(param.values().iterator());
if (name === MessageParser.MACRO_NAME) {
id = param.get("text");
pluralId = param.get("plural");
} else if (param.containsKey("message") === MessageParser.ATTRIBUTE_NAME) {
id = param.get("message");
pluralId = param.get("plural");
}
}
args = macro.getPositionalParams();
if (args) {
checkNestedMacros(args.iterator());
if (name === "gettext" || name === "markgettext") {
id = cgettext.getKey(args.get(0), param && param.get("context"));
} else if (name === "ngettext") {
id = args.get(0);
pluralId = args.get(1);
}
}
if (id != null) {
// create new Message instance or update the existing one
key = Message.getKey(id);
if (!(msg = this.messages[key])) {
this.messages[key] = msg = new Message(id, pluralId, file.getAbsolutePath());
}
msg.addLocation(file.getAbsolutePath(),
MessageParser.getLineNum(content, macro.index));
if (id.constructor !== String) {
continue;
}
// create new Message instance or update the existing one
id = id.replace(re, String.SPACE);
pluralId && (pluralId = pluralId.replace(re, String.SPACE));
key = Message.getKey(id);
if (!(msg = self.messages[key])) {
self.messages[key] = msg = new Message(id, pluralId, file.getCanonicalPath());
}
msg.addLocation(file.getCanonicalPath(), MessageParser.getLineNum(source, macro.start));
}
}
return;
};
}
}
var skin = createSkin(source);
if (skin.hasMainskin()) {
processMacros(skin.getMacros());
}
for (let name of skin.getSubskinNames()) {
var subskin = skin.getSubskin(name);
processMacros(subskin.getMacros());
}
return;
}
/**
* Prints a standard Header of a .po file
* FIXME: Allow custom header (template?)
* FIXME: why the hell is Plural-Forms ignored in poEdit?
* @see http://drupal.org/node/17564
*/
MessageParser.prototype.getPotString = function() {
var buf = new java.lang.StringBuffer();
buf.append('# SOME DESCRIPTIVE TITLE.\n');
buf.append('# Copyright (C) YEAR THE PACKAGE\'S COPYRIGHT HOLDER\n');
buf.append('# This file is distributed under the same license as the PACKAGE package.\n');
buf.append('# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n');
buf.append('#\n');
buf.append('#, fuzzy\n');
buf.append('msgid ""\n');
buf.append('msgstr ""\n');
buf.append('"Project-Id-Version: PACKAGE VERSION\\n"\n');
buf.append('"Report-Msgid-Bugs-To: \\n"\n');
var sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mmZ");
buf.append('"POT-Creation-Date: ' + sdf.format(new java.util.Date()) + '\\n"\n');
buf.append('"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"\n');
buf.append('"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n"\n');
buf.append('"Language-Team: LANGUAGE <LL@li.org>\\n"\n');
buf.append('"MIME-Version: 1.0\\n"\n');
buf.append('"Content-Type: text/plain; charset=utf-8\\n"\n');
buf.append('"Content-Transfer-Encoding: 8bit\\n"\n');
buf.append('"Plural-Forms: nplurals=2; plural=(n != 1);\\n"\n');
buf.append('\n');
var date = new Date;
var buf = new java.lang.StringBuffer();
buf.append('#\n');
buf.append('# The Antville Project\n');
buf.append('# http://code.google.com/p/antville\n');
buf.append('#\n');
buf.append('# Copyright 2001-' + date.getFullYear() + ' by the Workers of Antville.\n');
buf.append('#\n');
buf.append("# Licensed under the Apache License, Version 2.0 (the ``License''\n");
buf.append('# you may not use this file except in compliance with the License.\n');
buf.append('# You may obtain a copy of the License at\n');
buf.append('#\n');
buf.append('# http://www.apache.org/licenses/LICENSE-2.0\n');
buf.append('#\n');
buf.append('# Unless required by applicable law or agreed to in writing, software\n');
buf.append("# distributed under the License is distributed on an ``AS IS'' BASIS,\n");
buf.append('# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n');
buf.append('# See the License for the specific language governing permissions and\n');
buf.append('# limitations under the License.\n');
buf.append('#\n\n');
buf.append('#, fuzzy\n');
buf.append('msgid ""\n');
buf.append('msgstr ""\n');
buf.append('"Project-Id-Version: Antville-' + Root.VERSION + '\\n"\n');
buf.append('"Report-Msgid-Bugs-To: mail@antville.org\\n"\n');
var sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mmZ");
buf.append('"POT-Creation-Date: ' + sdf.format(new java.util.Date()) + '\\n"\n');
buf.append('"PO-Revision-Date: ' + sdf.format(new java.util.Date()) + '\\n"\n');
//buf.append('"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n"\n');
buf.append('"Language-Team: The Antville People <mail@antville.org>\\n"\n');
buf.append('"MIME-Version: 1.0\\n"\n');
buf.append('"Content-Type: text/plain; charset=utf-8\\n"\n');
buf.append('"Content-Transfer-Encoding: 8bit\\n"\n');
buf.append('"Plural-Forms: nplurals=2; plural=(n != 1);\\n"\n');
buf.append('\n');
// sort all messages by their singular key
var keys = [];
for (var i in this.messages) {
keys[keys.length] = this.messages[i].id;
}
keys.sort();
// add all the messages
for (var i=0;i<keys.length;i++) {
this.messages[keys[i]].write(buf);
}
return buf.toString();
// sort all messages by their singular key
var keys = [];
for (var i in this.messages) {
keys[keys.length] = this.messages[i].id;
}
keys.sort();
// add all the messages
for (var i=0;i<keys.length;i++) {
this.messages[keys[i]].write(buf);
}
return new java.lang.String(buf);
};
/**
@ -392,10 +442,10 @@ MessageParser.prototype.getPotString = function() {
* @param {java.io.File} file The file to write to
*/
MessageParser.prototype.writeToFile = function(file) {
var writer = new java.io.FileWriter(file);
writer.write(new java.lang.String(this.getPotString().getBytes("UTF-8")));
writer.close();
return;
var writer = new java.io.FileWriter(file);
writer.write(new java.lang.String(this.getPotString().getBytes("UTF-8")));
writer.close();
return;
};
/**
@ -405,24 +455,24 @@ var toParse = [];
var arg, outFile, file, fileEncoding;
for (var i=0;i<arguments.length;i++) {
arg = arguments[i];
if (arg.indexOf("-o") === 0 && i < arguments.length -1) {
outFile = new java.io.File(arguments[i += 1]);
} else if (arg.indexOf("-e") === 0 && i < arguments.length -1) {
fileEncoding = arguments[i += 1];
} else {
// add argument to list of files and directories to parse
toParse.push(new java.io.File(arg));
}
arg = arguments[i];
if (arg.indexOf("-o") === 0 && i < arguments.length -1) {
outFile = new java.io.File(arguments[i += 1]);
} else if (arg.indexOf("-e") === 0 && i < arguments.length -1) {
fileEncoding = arguments[i += 1];
} else {
// add argument to list of files and directories to parse
toParse.push(new java.io.File(arg));
}
}
// start parsing
var parser = new MessageParser();
for (var i=0;i<toParse.length;i++) {
parser.parse(toParse[i], fileEncoding);
parser.parse(toParse[i], fileEncoding);
}
if (outFile != null) {
parser.writeToFile(outFile);
parser.writeToFile(outFile);
} else {
print(parser.getPotString());
print(parser.getPotString());
}

View file

@ -1,34 +1,26 @@
//
// Jala Project [http://opensvn.csie.org/traccgi/jala]
//
// Copyright 2004 ORF Online und Teletext GmbH
// Copyright 2004 ORF Online und Teletext GmbH.
//
// Licensed under the Apache License, Version 2.0 (the ``License'');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ``AS IS'' BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// $Revision$
// $LastChangedBy$
// $LastChangedDate$
// $HeadURL$
//
/**
* @fileoverview
* @fileoverview
* A parser script that converts GNU Gettext .po files into plain JavaScript objects
* for use with jala.I18n. To run it either start the build script of HopKit
* or call it directly using the JavaScript shell of Rhino:
* <code>java -cp rhino.jar org.mozilla.javascript.tools.shell.Main PoParser.js <input> <output> [namespace]</code>
*
*
* The accepted arguments are:
* <ul>
* <li><code>input</code>: Either a single .po file or a directory containing multiple files</li>
@ -49,24 +41,24 @@
* @constructor
*/
var PoParser = function(namespace) {
/**
* An array containing the parsed messages
* @type Array
*/
this.messages = [];
/**
* An array containing the parsed messages
* @type Array
*/
this.messages = [];
/**
* The locale key string (eg. "de_AT") of the .po file
* @type String
*/
this.localeKey = null;
/**
* The locale key string (eg. "de_AT") of the .po file
* @type String
*/
this.localeKey = null;
/**
* The namespace (optional) where to store the generated messages
* @type String
*/
this.namespace = namespace;
return this;
/**
* The namespace (optional) where to store the generated messages
* @type String
*/
this.namespace = namespace;
return this;
};
/**
@ -108,7 +100,7 @@ PoParser.REGEX_MSGSTR = /^\s*msgstr(?:\[(\d)\])?\s+\"(.*)\"\s*$/;
PoParser.REGEX_DATA = /^\s*msg/;
PoParser.isData = function(str) {
return PoParser.REGEX_DATA.test(str);
return PoParser.REGEX_DATA.test(str);
};
/**
@ -118,21 +110,21 @@ PoParser.isData = function(str) {
* @type java.lang.String
*/
PoParser.readFile = function(file) {
var inStream = new java.io.InputStreamReader(new java.io.FileInputStream(file), "UTF-8");
var buffer = new java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 2048);
var read = 0;
var r = 0;
while ((r = inStream.read(buffer, read, buffer.length - read)) > -1) {
read += r;
if (read == buffer.length) {
// grow input buffer
var newBuffer = new java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, buffer.length * 2);
java.lang.System.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
buffer = newBuffer;
}
}
inStream.close();
return new java.lang.String(buffer, 0, read);
var inStream = new java.io.InputStreamReader(new java.io.FileInputStream(file), "UTF-8");
var buffer = new java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 2048);
var read = 0;
var r = 0;
while ((r = inStream.read(buffer, read, buffer.length - read)) > -1) {
read += r;
if (read == buffer.length) {
// grow input buffer
var newBuffer = new java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, buffer.length * 2);
java.lang.System.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
buffer = newBuffer;
}
}
inStream.close();
return new java.lang.String(buffer, 0, read);
}
/**
@ -141,63 +133,63 @@ PoParser.readFile = function(file) {
* @param {java.io.File} file The .po file to parse
*/
PoParser.prototype.parse = function(file) {
// parse the locale key out of the file name
var fileName = file.getName();
if (!(this.localeKey = fileName.substring(0, fileName.indexOf(".")))) {
throw "Invalid PO file name: " + fileName;
}
// parse the locale key out of the file name
var fileName = file.getName();
if (!(this.localeKey = fileName.substring(0, fileName.indexOf(".")))) {
throw "Invalid PO file name: " + fileName;
}
// read the PO file content and parse it into messages
var content = PoParser.readFile(file);
var start = new Date();
var lines = content.split(PoParser.REGEX_LINES);
var idx = -1;
var line = null;
var m, value, nr;
var msg;
// read the PO file content and parse it into messages
var content = PoParser.readFile(file);
var start = new Date();
var lines = content.split(PoParser.REGEX_LINES);
var idx = -1;
var line = null;
var m, value, nr;
var msg;
var hasMoreLines = function() {
return idx < lines.length - 1;
};
var hasMoreLines = function() {
return idx < lines.length - 1;
};
var nextLine = function() {
return (line = lines[idx += 1]) != null;
};
var nextLine = function() {
return (line = lines[idx += 1]) != null;
};
var getContinuation = function(str) {
var nLine;
while ((nLine = lines[idx + 1]) != null) {
if ((m = nLine.match(PoParser.REGEX_MSG_CONT)) != null) {
str += m[1];
nextLine();
} else {
break;
}
var getContinuation = function(str) {
var nLine;
while ((nLine = lines[idx + 1]) != null) {
if ((m = nLine.match(PoParser.REGEX_MSG_CONT)) != null) {
str += m[1];
nextLine();
} else {
break;
}
return str;
}
}
return str;
}
while (nextLine()) {
if ((m = line.match(PoParser.REGEX_MSGID)) != null) {
value = getContinuation(m[1]);
if (value) {
msg = this.messages[this.messages.length] = new Message(value);
}
} else if ((m = line.match(PoParser.REGEX_MSGID_PLURAL)) != null) {
value = getContinuation(m[1]);
if (value && msg != null) {
msg.pluralKey = value;
}
} else if ((m = line.match(PoParser.REGEX_MSGSTR)) != null) {
nr = m[1];
value = getContinuation(m[2]);
if (value && msg != null) {
nr = parseInt(nr, 10);
msg.translations[nr || 0] = value;
}
while (nextLine()) {
if ((m = line.match(PoParser.REGEX_MSGID)) != null) {
value = getContinuation(m[1]);
if (value) {
msg = this.messages[this.messages.length] = new Message(value);
}
}
return;
} else if ((m = line.match(PoParser.REGEX_MSGID_PLURAL)) != null) {
value = getContinuation(m[1]);
if (value && msg != null) {
msg.pluralKey = value;
}
} else if ((m = line.match(PoParser.REGEX_MSGSTR)) != null) {
nr = m[1];
value = getContinuation(m[2]);
if (value && msg != null) {
nr = parseInt(nr, 10);
msg.translations[nr || 0] = value;
}
}
}
return;
};
/**
@ -207,44 +199,44 @@ PoParser.prototype.parse = function(file) {
* file should be saved
*/
PoParser.prototype.writeToFile = function(output) {
var buf = new java.lang.StringBuffer();
// write header
buf.append('/**\n');
buf.append(' * Instantiate the messages namespace if it\'s not already existing\n');
buf.append(' */\n');
var buf = new java.lang.StringBuffer();
// write header
buf.append('/**\n');
buf.append(' * Instantiate the messages namespace if it\'s not already existing\n');
buf.append(' */\n');
var objPath = "";
if (this.namespace) {
objPath += this.namespace;
buf.append('if (!global.' + objPath + ') {\n');
buf.append(' global.' + objPath + ' = {};\n');
buf.append('}\n');
objPath += ".";
}
objPath += "messages";
buf.append('if (!global.' + objPath + ') {\n');
buf.append(' global.' + objPath + ' = {};\n');
buf.append('}\n\n');
if (this.namespace) {
objPath += this.namespace;
buf.append('if (!global.' + objPath + ') {\n');
buf.append(' global.' + objPath + ' = {};\n');
buf.append('}\n');
objPath += ".";
}
objPath += "messages";
buf.append('if (!global.' + objPath + ') {\n');
buf.append(' global.' + objPath + ' = {};\n');
buf.append('}\n\n');
buf.append('/**\n');
buf.append(' * Messages for locale "' + this.localeKey + '"\n');
buf.append(' */\n');
objPath += "." + this.localeKey;
buf.append('global.' + objPath + ' = {\n');
// write messages
for (var i=0;i<this.messages.length; i++) {
this.messages[i].write(buf);
}
// write footer
buf.append('};\n');
buf.append('/**\n');
buf.append(' * Messages for locale "' + this.localeKey + '"\n');
buf.append(' */\n');
var fname = objPath + "." + this.localeKey + ".js";
objPath += "['" + this.localeKey + "']";
buf.append('global.' + objPath + ' = {\n');
// write messages
for (var i=0;i<this.messages.length; i++) {
this.messages[i].write(buf);
}
// write footer
buf.append('};\n');
// write the message catalog into the outFile
var file = new java.io.File(output, objPath + ".js");
var writer = new java.io.FileWriter(file);
writer.write(buf.toString());
// writer.write(buf.toString().getBytes("UTF-8"));
writer.close();
print("generated messages file " + file.getAbsolutePath());
return;
// write the message catalog into the outFile
var file = new java.io.File(output, fname);
var writer = new java.io.FileWriter(file);
writer.write(new java.lang.String(buf.toString().getBytes("UTF-8")));
writer.close();
print("generated messages file " + file.getAbsolutePath());
return;
};
/**
@ -255,10 +247,10 @@ PoParser.prototype.writeToFile = function(output) {
* @constructor
*/
var Message = function(singularKey) {
this.singularKey = singularKey;
this.pluralKey = null;
this.translations = [];
return this;
this.singularKey = singularKey;
this.pluralKey = null;
this.translations = [];
return this;
}
/**
@ -267,37 +259,37 @@ var Message = function(singularKey) {
* string to
*/
Message.prototype.write = function(buf) {
var writeLine = function(key, value) {
buf.append(' "');
buf.append(key);
buf.append('": "');
if (value !== null && value !== undefined) {
buf.append(value);
}
buf.append('",\n');
};
var writeLine = function(key, value) {
buf.append(' "');
buf.append(key);
buf.append('": "');
if (value !== null && value !== undefined) {
buf.append(value);
}
buf.append('",\n');
};
if (this.singularKey != null) {
writeLine(this.singularKey, this.translations[0]);
if (this.pluralKey != null) {
writeLine(this.pluralKey, this.translations[1]);
}
}
return;
if (this.singularKey != null) {
writeLine(this.singularKey, this.translations[0]);
if (this.pluralKey != null) {
writeLine(this.pluralKey, this.translations[1]);
}
}
return;
}
/**
* Main script body
*/
if (arguments.length < 2) {
print("Usage:");
print("PoParser.js <input> <output> [namespace]");
print("<input>: Either a single .po file or a directory containing .po files");
print("<output>: The directory where the generated messages files should be stored");
print("[namespace]: An optional global namespace where the messages should be");
print(" stored (eg. a namespace like 'jala' will lead to messages");
print(" stored in global.jala.messages by their locale.");
quit();
print("Usage:");
print("PoParser.js <input> <output> [namespace]");
print("<input>: Either a single .po file or a directory containing .po files");
print("<output>: The directory where the generated messages files should be stored");
print("[namespace]: An optional global namespace where the messages should be");
print(" stored (eg. a namespace like 'jala' will lead to messages");
print(" stored in global.jala.messages by their locale.");
quit();
}
var input = new java.io.File(arguments[0]);
@ -306,31 +298,31 @@ var namespace = arguments[2];
// check if the output destination is a directory
if (output.isFile()) {
print("Invalid arguments: the output destination must be a directory.");
quit();
print("Invalid arguments: the output destination must be a directory.");
quit();
}
if (namespace && namespace.indexOf(".") != -1) {
print("Invalid arguments: Please don't specify complex object paths, as this");
print("would corrupt the messages file.");
quit();
print("Invalid arguments: Please don't specify complex object paths, as this");
print("would corrupt the messages file.");
quit();
}
// parse the PO file(s) and create the message catalog files
var parser;
if (input.isDirectory()) {
var files = input.listFiles();
var file;
for (var i=0;i<files.length;i++) {
file = files[i];
if (file.getName().endsWith(".po")) {
parser = new PoParser(namespace);
parser.parse(file);
parser.writeToFile(output);
}
}
var files = input.listFiles();
var file;
for (var i=0;i<files.length;i++) {
file = files[i];
if (file.getName().endsWith(".po")) {
parser = new PoParser(namespace);
parser.parse(file);
parser.writeToFile(output);
}
}
} else {
parser = new PoParser(namespace);
parser.parse(input);
parser.writeToFile(output);
parser = new PoParser(namespace);
parser.parse(input);
parser.writeToFile(output);
}

View 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
tasks.register('deps', Copy) {
from sourceSets.main.runtimeClasspath
into 'code'
}

View file

@ -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.

View file

@ -49,7 +49,7 @@ helma.auth = function(realm) {
var accessAllowed = true;
if (req.data.username && req.data.password) {
if (pw && hostIsAllowed()) {
if (pw == Packages.helma.util.MD5Encoder.encode(req.data.username + "-" + req.data.password)) {
if (pw == Packages.org.apache.commons.codec.digest.DigestUtils.md5Hex(req.data.username + "-" + req.data.password)) {
session.data[realm+'Authenticated'] = true;
res.redirect(res.data.href);
} else {
@ -61,7 +61,7 @@ helma.auth = function(realm) {
The adminAccess property is not set.<br />\
Before proceeding, add the following line to your app.properties or server.properties file:\
<br /><br />adminAccess='
+ Packages.helma.util.MD5Encoder.encode(req.data.username + "-" + req.data.password);
+ Packages.org.apache.commons.codec.digest.DigestUtils.md5Hex(req.data.username + "-" + req.data.password);
else param.message += 'The '+ realm +'AccessAllowed property does not match your host.<br />\
Before proceeding, remove this property from your app.properties or server.properties file \
or include your host as follows:<br /><br />'

50
renovate.json Normal file
View 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"
}
]
}

View file

@ -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')

View file

@ -46,7 +46,7 @@ function createAddressFilter() {
}
/**
/**
* updates the stats in app.data.stat every 5 minutes
*/
function appStat() {
@ -123,7 +123,7 @@ function checkAuth(appObj) {
if (uname == null || uname == "" || pwd == null || pwd == "")
return forceAuth();
var md5key = Packages.helma.util.MD5Encoder.encode(uname + "-" + pwd);
var md5key = Packages.org.apache.commons.codec.digest.DigestUtils.md5Hex(uname + "-" + pwd);
if (md5key == adminAccess)
return true;

View file

@ -75,7 +75,7 @@ function makekey_action() {
res.data.body = renderSkinAsString("pwdform", obj);
} else {
// render the md5-string:
obj.propsString = "adminAccess=" + Packages.helma.util.MD5Encoder.encode(req.data.username + "-" + req.data.password) + "<br>\n";
obj.propsString = "adminAccess=" + Packages.org.apache.commons.codec.digest.DigestUtils.md5Hex(req.data.username + "-" + req.data.password) + "<br>\n";
res.data.body = renderSkinAsString("pwdfeedback", obj);
}
@ -127,4 +127,4 @@ function mrtg_action() {
} else {
res.write("0\n0\n0\n0\n");
}
}
}

View file

@ -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();

View file

@ -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();

View file

@ -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();
}
}
}

60
src/dist/extras/deploy.sh vendored Normal file
View file

@ -0,0 +1,60 @@
#!/bin/sh
# Use this script as forced command of an authorized SSH key:
# command="/home/helma/extras/deploy.sh" ssh-ed25519 AAAAC3NzaC…
# Define HELMA_HOST and ANTVILLE_HOST in this file
# shellcheck source=/dev/null
. "$HOME"/deploy.env
case "$SSH_ORIGINAL_COMMAND" in
ping)
echo pong
;;
deploy-helma)
rsync ./ "$HELMA_HOST":./ \
--archive --compress --delete --verbose \
--filter '+ /bin' \
--filter '+ /extras' \
--filter '+ /launcher.jar' \
--filter '- /lib/ext' \
--filter '+ /lib' \
--filter '+ /modules' \
--filter '- /*'
printf 'Restarting Helma on HELMA_host… '
ssh "$HELMA_HOST" sudo /bin/systemctl restart helma
;;
deploy-antville)
rsync ./apps/antville/ "$ANTVILLE_HOST":./apps/antville/ \
--archive --compress --delete --verbose \
--filter '+ /claustra' \
--filter '+ /code' \
--filter '+ /compat' \
--filter '+ /i18n' \
--filter '+ /lib' \
--filter '- /*'
rsync ./apps/antville/static/helma/ "$ANTVILLE_HOST":./apps/antville/static/helma/ \
--archive --compress --verbose \
--filter '+ /fonts' \
--filter '+ /formica.html' \
--filter '+ /img' \
--filter '+ /scripts' \
--filter '+ /styles' \
--filter '- /*'
printf 'Restarting Helma on ANTVILLE_host… '
ssh "$ANTVILLE_HOST" sudo /bin/systemctl restart helma
;;
restart)
printf 'Restarting Helma… '
sudo /bin/systemctl restart helma
printf '%s\n' 'done.'
;;
*)
# Allow any rsync command but restrict it to the installation directory
rrsync -wo /home/helma
;;
esac

25
src/dist/extras/helma.service vendored Normal file
View 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 = /bin/sh -c 'touch apps.properties && touch server.properties'
ExecStop = /bin/kill -15 $MAINPID
[Install]
WantedBy = multi-user.target

View file

@ -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

View file

@ -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"

View file

@ -20,6 +20,8 @@ package helma.extensions;
*
*/
public class ConfigurationException extends RuntimeException {
private static final long serialVersionUID = 6428439427909728917L;
/**
* Creates a new ConfigurationException object.
*

View file

@ -24,4 +24,6 @@ package helma.framework;
*/
public class AbortException extends Error {
private static final long serialVersionUID = -7536693051844908815L;
}

View file

@ -22,6 +22,8 @@ package helma.framework;
* application
*/
public class ApplicationStoppedException extends RuntimeException {
private static final long serialVersionUID = 7125229844095452333L;
/**
* Creates a new ApplicationStoppedException object.
*/

View file

@ -24,13 +24,13 @@ import javax.servlet.http.Cookie;
* of an HTTP cookie.
*/
public final class CookieTrans implements Serializable {
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;
@ -53,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() {
@ -63,8 +69,6 @@ public final class CookieTrans implements Serializable {
}
/**
*
*
* @return ...
*/
public String getValue() {
@ -72,8 +76,6 @@ public final class CookieTrans implements Serializable {
}
/**
*
*
* @return ...
*/
public int getDays() {
@ -81,8 +83,6 @@ public final class CookieTrans implements Serializable {
}
/**
*
*
* @return ...
*/
public String getPath() {
@ -90,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;
}
/**
@ -145,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;
}

View file

@ -22,6 +22,8 @@ package helma.framework;
* wrong in evaluation of requests.
*/
public class FrameworkException extends RuntimeException {
private static final long serialVersionUID = -8477797850472128617L;
/**
* Creates a new FrameworkException object.
*

View file

@ -22,6 +22,8 @@ package helma.framework;
* wrong in evaluation of requests.
*/
public class NotFoundException extends RuntimeException {
private static final long serialVersionUID = -715022974097617658L;
/**
* Creates a new NotFoundException object.
*

View file

@ -24,6 +24,8 @@ package helma.framework;
* java.lang.ThreadDeath).
*/
public class RedirectException extends Error {
private static final long serialVersionUID = 2362170037476457592L;
String url;
/**

View file

@ -24,6 +24,8 @@ import java.util.Map;
*
*/
public class RequestBean implements Serializable {
private static final long serialVersionUID = -6826881712426326687L;
RequestTrans req;
/**

View file

@ -16,13 +16,15 @@
package helma.framework;
import helma.util.Base64;
import helma.util.SystemMap;
import helma.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Cookie;
import org.apache.commons.codec.binary.Base64;
import java.io.*;
import java.util.*;
import java.util.regex.Pattern;
@ -67,7 +69,7 @@ public class RequestTrans implements Serializable {
private ParamComboMap params;
private ParameterMap queryParams, postParams, cookies;
// the HTTP request method
private String method;
@ -601,11 +603,11 @@ public class RequestTrans implements Serializable {
StringTokenizer tok;
if (auth.startsWith("Basic ")) {
tok = new StringTokenizer(new String(Base64.decode((auth.substring(6)).toCharArray())),
":");
if (auth.startsWith("Basic ")) { //$NON-NLS-1$
tok = new StringTokenizer(new String(Base64.decodeBase64(auth.substring(6))),
":"); //$NON-NLS-1$
} else {
tok = new StringTokenizer(new String(Base64.decode(auth.toCharArray())), ":");
tok = new StringTokenizer(new String(Base64.decodeBase64(auth)), ":"); //$NON-NLS-1$
}
try {
@ -632,6 +634,8 @@ public class RequestTrans implements Serializable {
class ParameterMap extends SystemMap {
private static final long serialVersionUID = 7632860503639617076L;
public ParameterMap() {
super();
}
@ -708,6 +712,8 @@ public class RequestTrans implements Serializable {
class DataComboMap extends SystemMap {
private static final long serialVersionUID = 5737810055554406299L;
public Object get(Object key) {
Object value = super.get(key);
if (value != null)
@ -743,6 +749,8 @@ public class RequestTrans implements Serializable {
}
class ParamComboMap extends SystemMap {
private static final long serialVersionUID = -9177176570950359431L;
public Object get(Object key) {
Object value;
if (postParams != null && (value = postParams.get(key)) != null)

View file

@ -30,6 +30,8 @@ import java.util.Map;
*
*/
public class ResponseBean implements Serializable {
private static final long serialVersionUID = -6807623667477109800L;
ResponseTrans res;
/**
@ -141,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);
}
/**
@ -154,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);
}
/**
@ -169,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);
}
/**
@ -185,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);
}
/**
@ -195,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);
}
/**
@ -220,8 +257,10 @@ public class ResponseBean implements Serializable {
if (str == null) return;
for (String s : str) {
res.writeln(s + "");
res.write(s + "");
}
res.writeln();
}
/**
@ -241,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) {
@ -584,6 +623,7 @@ public class ResponseBean implements Serializable {
* Old version for push() kept for compatibility
* @deprecated
*/
@Deprecated
public void pushStringBuffer() {
res.pushBuffer(null);
}
@ -593,6 +633,7 @@ public class ResponseBean implements Serializable {
* @deprecated
* @return ...
*/
@Deprecated
public String popStringBuffer() {
return res.popString();
}

View file

@ -26,6 +26,7 @@ import java.io.*;
import java.security.*;
import java.util.*;
import org.apache.commons.codec.binary.Base64;
import org.apache.xmlrpc.XmlRpcResponseProcessor;
/**
@ -383,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) {
@ -414,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) {
@ -712,8 +713,8 @@ public final class ResponseTrans extends Writer implements Serializable {
digest = MessageDigest.getInstance("MD5");
// if (contentType != null)
// digest.update (contentType.getBytes());
byte[] b = digest.digest(response);
etag = "\"" + new String(helma.util.Base64.encode(b)) + "\"";
byte[] b = this.digest.digest(this.response);
this.etag = "\"" + new String(Base64.encodeBase64(b)) + "\""; //$NON-NLS-1$ //$NON-NLS-2$
// only set response to 304 not modified if no cookies were set
if (reqtrans.hasETag(etag) && countCookies() == 0) {
response = new byte[0];
@ -864,7 +865,7 @@ public final class ResponseTrans extends Writer implements Serializable {
if (what == null) {
digest.update(new byte[0]);
} else if (what instanceof Date) {
digest.update(MD5Encoder.toBytes(((Date) what).getTime()));
digest.update(Long.toBinaryString(((Date) what).getTime()).getBytes());
} else if (what instanceof byte[]) {
digest.update((byte[]) what);
} else {
@ -888,9 +889,9 @@ public final class ResponseTrans extends Writer implements Serializable {
// add the application checksum as dependency to make ETag
// generation sensitive to changes in the app
byte[] b = digest.digest(MD5Encoder.toBytes(app.getChecksum()));
byte[] b = digest.digest(Long.toBinaryString((this.app.getChecksum())).getBytes());
setETag(new String(helma.util.Base64.encode(b)));
setETag(new String(Base64.encodeBase64(b)));
}
/**
@ -973,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) {
@ -1000,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);
}
}

View file

@ -22,6 +22,8 @@ package helma.framework;
* not be serviced within the timeout period specified for an application.
*/
public class TimeoutException extends RuntimeException {
private static final long serialVersionUID = 3853135482278393735L;
/**
* Creates a new TimeoutException object.
*/

View file

@ -20,6 +20,8 @@ import java.io.Serializable;
public class UploadStatus implements Serializable {
private static final long serialVersionUID = 8335579045959177198L;
long current = 0;
long total = 0;
int itemsRead = 0;

View file

@ -38,6 +38,8 @@ import org.apache.commons.logging.LogFactory;
* application specific functionality.
*/
public class ApplicationBean implements Serializable {
private static final long serialVersionUID = -5053315391709405106L;
transient Application app;
WrappedMap properties = null;

View file

@ -415,6 +415,11 @@ public final class Prototype {
* @return an iterator of this prototype's code resources
*/
public synchronized Iterator getCodeResources() {
// if code has never been updated, do so now before returning an empty or incomplete list
if (lastCodeUpdate == 0) {
checkForUpdates();
}
// we copy over to a new list, because the underlying set may grow
// during compilation through use of app.addRepository()
return new ArrayList(code).iterator();
@ -487,6 +492,8 @@ public final class Prototype {
* A Map that dynamically expands to all skins in this prototype.
*/
class SkinMap extends HashMap {
private static final long serialVersionUID = -8855785541204100909L;
volatile long lastSkinmapLoad = -1;
Object[] skinpath;

View file

@ -142,6 +142,7 @@ public class RequestPath {
* @return the index of the element, or -1 if it isn't contained
* @deprecated use {@link #indexOf(Object)} instead.
*/
@Deprecated
public int contains(Object obj) {
return objects.indexOf(obj);
}

View file

@ -27,6 +27,8 @@ import java.util.Date;
* exposes it to the scripting framework.
*/
public class SessionBean implements Serializable {
private static final long serialVersionUID = 7500231949937123265L;
// the wrapped session object
Session session;

View file

@ -1190,6 +1190,8 @@ public final class Skin {
* Exception type for unhandled, forbidden or failed macros
*/
class MacroException extends Exception {
private static final long serialVersionUID = 396025641010781784L;
MacroException(String message) {
super(message);
}

View file

@ -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();

View file

@ -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();
}
}
}

View file

@ -7,31 +7,30 @@
* http://adele.helma.org/download/helma/license.txt
*
* Copyright 1998-2003 Helma Software. All Rights Reserved.
*
* $RCSfile$
* $Author$
* $Revision$
* $Date$
*/
package helma.main;
import helma.framework.core.*;
import helma.framework.repository.Repository;
import helma.framework.repository.FileRepository;
import helma.util.StringUtils;
import org.apache.xmlrpc.XmlRpcHandler;
import java.io.File;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
import org.apache.commons.logging.Log;
import org.apache.xmlrpc.XmlRpcHandler;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.ResourceHandler;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import java.io.*;
import java.util.*;
import helma.util.ResourceProperties;
import helma.framework.core.Application;
import helma.framework.repository.FileRepository;
import helma.framework.repository.Repository;
import helma.servlet.EmbeddedServletClient;
import helma.util.ResourceProperties;
import helma.util.StringUtils;
/**
* This class is responsible for starting and stopping Helma applications.
@ -55,11 +54,11 @@ public class ApplicationManager implements XmlRpcHandler {
public ApplicationManager(ResourceProperties props, Server server) {
this.props = props;
this.server = server;
descriptors = new Hashtable();
applications = new Hashtable();
xmlrpcHandlers = new Hashtable();
lastModified = 0;
jetty = server.jetty;
this.descriptors = new Hashtable();
this.applications = new Hashtable();
this.xmlrpcHandlers = new Hashtable();
this.lastModified = 0;
this.jetty = server.jetty;
}
/**
@ -67,13 +66,13 @@ public class ApplicationManager implements XmlRpcHandler {
* to create and start new applications.
*/
protected void checkForChanges() {
if (props.lastModified() > lastModified && server.getApplicationsOption() == null) {
if (this.props.lastModified() > this.lastModified && this.server.getApplicationsOption() == null) {
try {
for (Enumeration e = props.keys(); e.hasMoreElements();) {
for (Enumeration e = this.props.keys(); e.hasMoreElements();) {
String appName = (String) e.nextElement();
if ((appName.indexOf(".") == -1) &&
(applications.get(appName) == null)) {
if ((appName.indexOf(".") == -1) && //$NON-NLS-1$
(this.applications.get(appName) == null)) {
AppDescriptor appDesc = new AppDescriptor(appName);
appDesc.start();
appDesc.bind();
@ -81,27 +80,27 @@ public class ApplicationManager implements XmlRpcHandler {
}
// then stop deleted ones
for (Enumeration e = descriptors.elements(); e.hasMoreElements();) {
for (Enumeration e = this.descriptors.elements(); e.hasMoreElements();) {
AppDescriptor appDesc = (AppDescriptor) e.nextElement();
// check if application has been removed and should be stopped
if (!props.containsKey(appDesc.appName)) {
if (!this.props.containsKey(appDesc.appName)) {
appDesc.stop();
} else if (server.jetty != null) {
} else if (this.server.jetty != null) {
// If application continues to run, remount
// as the mounting options may have changed.
AppDescriptor ndesc = new AppDescriptor(appDesc.appName);
ndesc.app = appDesc.app;
appDesc.unbind();
ndesc.bind();
descriptors.put(ndesc.appName, ndesc);
this.descriptors.put(ndesc.appName, ndesc);
}
}
} catch (Exception mx) {
getLogger().error("Error checking applications", mx);
}
lastModified = System.currentTimeMillis();
this.lastModified = System.currentTimeMillis();
}
}
@ -118,7 +117,7 @@ public class ApplicationManager implements XmlRpcHandler {
* Bind an application by name
*/
public void register(String appName) {
AppDescriptor desc = (AppDescriptor) descriptors.get(appName);
AppDescriptor desc = (AppDescriptor) this.descriptors.get(appName);
if (desc != null) {
desc.bind();
}
@ -128,7 +127,7 @@ public class ApplicationManager implements XmlRpcHandler {
* Stop an application by name
*/
public void stop(String appName) {
AppDescriptor desc = (AppDescriptor) descriptors.get(appName);
AppDescriptor desc = (AppDescriptor) this.descriptors.get(appName);
if (desc != null) {
desc.stop();
}
@ -140,18 +139,18 @@ public class ApplicationManager implements XmlRpcHandler {
*/
public void startAll() {
try {
String[] apps = server.getApplicationsOption();
String[] apps = this.server.getApplicationsOption();
if (apps != null) {
for (int i = 0; i < apps.length; i++) {
AppDescriptor desc = new AppDescriptor(apps[i]);
desc.start();
}
} else {
for (Enumeration e = props.keys(); e.hasMoreElements();) {
for (Enumeration e = this.props.keys(); e.hasMoreElements();) {
String appName = (String) e.nextElement();
if (appName.indexOf(".") == -1) {
String appValue = props.getProperty(appName);
if (appName.indexOf(".") == -1) { //$NON-NLS-1$
String appValue = this.props.getProperty(appName);
if (appValue != null && appValue.length() > 0) {
appName = appValue;
@ -163,12 +162,12 @@ public class ApplicationManager implements XmlRpcHandler {
}
}
for (Enumeration e = descriptors.elements(); e.hasMoreElements();) {
for (Enumeration e = this.descriptors.elements(); e.hasMoreElements();) {
AppDescriptor appDesc = (AppDescriptor) e.nextElement();
appDesc.bind();
}
lastModified = System.currentTimeMillis();
this.lastModified = System.currentTimeMillis();
} catch (Exception mx) {
getLogger().error("Error starting applications", mx);
mx.printStackTrace();
@ -179,7 +178,7 @@ public class ApplicationManager implements XmlRpcHandler {
* Stop all running applications.
*/
public void stopAll() {
for (Enumeration en = descriptors.elements(); en.hasMoreElements();) {
for (Enumeration en = this.descriptors.elements(); en.hasMoreElements();) {
try {
AppDescriptor appDesc = (AppDescriptor) en.nextElement();
@ -194,14 +193,14 @@ public class ApplicationManager implements XmlRpcHandler {
* Get an array containing all currently running applications.
*/
public Object[] getApplications() {
return applications.values().toArray();
return this.applications.values().toArray();
}
/**
* Get an application by name.
*/
public Application getApplication(String name) {
return (Application) applications.get(name);
return (Application) this.applications.get(name);
}
/**
@ -209,7 +208,7 @@ public class ApplicationManager implements XmlRpcHandler {
*/
public Object execute(String method, Vector params)
throws Exception {
int dot = method.indexOf(".");
int dot = method.indexOf("."); //$NON-NLS-1$
if (dot == -1) {
throw new Exception("Method name \"" + method +
@ -222,10 +221,10 @@ public class ApplicationManager implements XmlRpcHandler {
String handler = method.substring(0, dot);
String method2 = method.substring(dot + 1);
Application app = (Application) xmlrpcHandlers.get(handler);
Application app = (Application) this.xmlrpcHandlers.get(handler);
if (app == null) {
app = (Application) xmlrpcHandlers.get("*");
app = (Application) this.xmlrpcHandlers.get("*"); //$NON-NLS-1$
// use the original method name, the handler is resolved within the app.
method2 = method;
}
@ -240,33 +239,32 @@ public class ApplicationManager implements XmlRpcHandler {
private String getMountpoint(String mountpoint) {
mountpoint = mountpoint.trim();
if ("".equals(mountpoint)) {
return "/";
} else if (!mountpoint.startsWith("/")) {
return "/" + mountpoint;
if ("".equals(mountpoint)) { //$NON-NLS-1$
return "/"; //$NON-NLS-1$
} else if (!mountpoint.startsWith("/")) { //$NON-NLS-1$
return "/" + mountpoint; //$NON-NLS-1$
}
return mountpoint;
}
private String joinMountpoint(String prefix, String suffix) {
if (prefix.endsWith("/") || suffix.startsWith("/")) {
if (prefix.endsWith("/") || suffix.startsWith("/")) { //$NON-NLS-1$//$NON-NLS-2$
return prefix+suffix;
} else {
return prefix+"/"+suffix;
}
return prefix+"/"+suffix; //$NON-NLS-1$
}
private String getPathPattern(String mountpoint) {
if (!mountpoint.startsWith("/")) {
mountpoint = "/"+mountpoint;
if (!mountpoint.startsWith("/")) { //$NON-NLS-1$
mountpoint = "/"+mountpoint; //$NON-NLS-1$
}
if ("/".equals(mountpoint)) {
return "/";
if ("/".equals(mountpoint)) { //$NON-NLS-1$
return "/"; //$NON-NLS-1$
}
if (mountpoint.endsWith("/")) {
if (mountpoint.endsWith("/")) { //$NON-NLS-1$
return mountpoint.substring(0, mountpoint.length()-1);
}
@ -279,19 +277,18 @@ public class ApplicationManager implements XmlRpcHandler {
File file = new File(path);
if (file.isAbsolute()) {
return file;
} else {
return file.getAbsoluteFile();
}
return file.getAbsoluteFile();
}
private Log getLogger() {
return server.getLogger();
return this.server.getLogger();
}
private String findResource(String path) {
File file = new File(path);
if (!file.isAbsolute() && !file.exists()) {
file = new File(server.getHopHome(), path);
file = new File(this.server.getHopHome(), path);
}
return file.getAbsolutePath();
}
@ -336,58 +333,58 @@ public class ApplicationManager implements XmlRpcHandler {
* @param name the application name
*/
AppDescriptor(String name) {
ResourceProperties conf = props.getSubProperties(name + '.');
appName = name;
mountpoint = getMountpoint(conf.getProperty("mountpoint", appName));
pathPattern = getPathPattern(mountpoint);
staticDir = conf.getProperty("static");
staticMountpoint = getPathPattern(conf.getProperty("staticMountpoint",
joinMountpoint(mountpoint, "static")));
staticIndex = "true".equalsIgnoreCase(conf.getProperty("staticIndex"));
String home = conf.getProperty("staticHome");
ResourceProperties conf = ApplicationManager.this.props.getSubProperties(name + '.');
this.appName = name;
this.mountpoint = getMountpoint(conf.getProperty("mountpoint", this.appName)); //$NON-NLS-1$
this.pathPattern = getPathPattern(this.mountpoint);
this.staticDir = conf.getProperty("static"); //$NON-NLS-1$
this.staticMountpoint = getPathPattern(conf.getProperty("staticMountpoint", //$NON-NLS-1$
joinMountpoint(this.mountpoint, "static"))); //$NON-NLS-1$
this.staticIndex = "true".equalsIgnoreCase(conf.getProperty("staticIndex")); //$NON-NLS-1$//$NON-NLS-2$
String home = conf.getProperty("staticHome"); //$NON-NLS-1$
if (home == null) {
staticHome = new String[] {"index.html", "index.htm"};
this.staticHome = new String[] {"index.html", "index.htm"}; //$NON-NLS-1$ //$NON-NLS-2$
} else {
staticHome = StringUtils.split(home, ",");
this.staticHome = StringUtils.split(home, ","); //$NON-NLS-1$
}
protectedStaticDir = conf.getProperty("protectedStatic");
this.protectedStaticDir = conf.getProperty("protectedStatic"); //$NON-NLS-1$
cookieDomain = conf.getProperty("cookieDomain");
sessionCookieName = conf.getProperty("sessionCookieName");
protectedSessionCookie = conf.getProperty("protectedSessionCookie");
uploadLimit = conf.getProperty("uploadLimit");
uploadSoftfail = conf.getProperty("uploadSoftfail");
debug = conf.getProperty("debug");
String appDirName = conf.getProperty("appdir");
appDir = (appDirName == null) ? null : getAbsoluteFile(appDirName);
String dbDirName = conf.getProperty("dbdir");
dbDir = (dbDirName == null) ? null : getAbsoluteFile(dbDirName);
servletClassName = conf.getProperty("servletClass");
this.cookieDomain = conf.getProperty("cookieDomain"); //$NON-NLS-1$
this.sessionCookieName = conf.getProperty("sessionCookieName"); //$NON-NLS-1$
this.protectedSessionCookie = conf.getProperty("protectedSessionCookie"); //$NON-NLS-1$
this.uploadLimit = conf.getProperty("uploadLimit"); //$NON-NLS-1$
this.uploadSoftfail = conf.getProperty("uploadSoftfail"); //$NON-NLS-1$
this.debug = conf.getProperty("debug"); //$NON-NLS-1$
String appDirName = conf.getProperty("appdir"); //$NON-NLS-1$
this.appDir = (appDirName == null) ? null : getAbsoluteFile(appDirName);
String dbDirName = conf.getProperty("dbdir"); //$NON-NLS-1$
this.dbDir = (dbDirName == null) ? null : getAbsoluteFile(dbDirName);
this.servletClassName = conf.getProperty("servletClass"); //$NON-NLS-1$
// got ignore dirs
ignoreDirs = conf.getProperty("ignore");
this.ignoreDirs = conf.getProperty("ignore"); //$NON-NLS-1$
// read and configure app repositories
ArrayList repositoryList = new ArrayList();
Class[] parameters = { String.class };
for (int i = 0; true; i++) {
String repositoryArgs = conf.getProperty("repository." + i);
String repositoryArgs = conf.getProperty("repository." + i); //$NON-NLS-1$
if (repositoryArgs != null) {
// lookup repository implementation
String repositoryImpl = conf.getProperty("repository." + i +
".implementation");
String repositoryImpl = conf.getProperty("repository." + i + //$NON-NLS-1$
".implementation"); //$NON-NLS-1$
if (repositoryImpl == null) {
// implementation not set manually, have to guess it
if (repositoryArgs.endsWith(".zip")) {
if (repositoryArgs.endsWith(".zip")) { //$NON-NLS-1$
repositoryArgs = findResource(repositoryArgs);
repositoryImpl = "helma.framework.repository.ZipRepository";
} else if (repositoryArgs.endsWith(".js")) {
repositoryImpl = "helma.framework.repository.ZipRepository"; //$NON-NLS-1$
} else if (repositoryArgs.endsWith(".js")) { //$NON-NLS-1$
repositoryArgs = findResource(repositoryArgs);
repositoryImpl = "helma.framework.repository.SingleFileRepository";
repositoryImpl = "helma.framework.repository.SingleFileRepository"; //$NON-NLS-1$
} else {
repositoryArgs = findResource(repositoryArgs);
repositoryImpl = "helma.framework.repository.FileRepository";
repositoryImpl = "helma.framework.repository.FileRepository"; //$NON-NLS-1$
}
}
@ -408,17 +405,17 @@ public class ApplicationManager implements XmlRpcHandler {
}
}
if (appDir != null) {
FileRepository appRep = new FileRepository(appDir);
if (this.appDir != null) {
FileRepository appRep = new FileRepository(this.appDir);
if (!repositoryList.contains(appRep)) {
repositoryList.add(appRep);
}
} else if (repositoryList.isEmpty()) {
repositoryList.add(new FileRepository(
new File(server.getAppsHome(), appName)));
new File(ApplicationManager.this.server.getAppsHome(), this.appName)));
}
repositories = new Repository[repositoryList.size()];
repositories = (Repository[]) repositoryList.toArray(repositories);
this.repositories = (Repository[]) repositoryList.toArray(new Repository[repositoryList.size()]);
}
@ -427,21 +424,21 @@ public class ApplicationManager implements XmlRpcHandler {
try {
// create the application instance
app = new Application(appName, server, repositories, appDir, dbDir);
this.app = new Application(this.appName, ApplicationManager.this.server, this.repositories, this.appDir, this.dbDir);
// register ourselves
descriptors.put(appName, this);
applications.put(appName, app);
ApplicationManager.this.descriptors.put(this.appName, this);
ApplicationManager.this.applications.put(this.appName, this.app);
// the application is started later in the register method, when it's bound
app.init(ignoreDirs);
this.app.init(this.ignoreDirs);
// set application URL prefix if it isn't set in app.properties
if (!app.hasExplicitBaseURI()) {
app.setBaseURI(mountpoint);
if (!this.app.hasExplicitBaseURI()) {
this.app.setBaseURI(this.mountpoint);
}
app.start();
this.app.start();
} catch (Exception x) {
getLogger().error("Error creating application " + appName, x);
x.printStackTrace();
@ -462,8 +459,8 @@ public class ApplicationManager implements XmlRpcHandler {
getLogger().error("Couldn't stop app", x);
}
descriptors.remove(appName);
applications.remove(appName);
ApplicationManager.this.descriptors.remove(this.appName);
ApplicationManager.this.applications.remove(this.appName);
}
void bind() {
@ -471,8 +468,8 @@ public class ApplicationManager implements XmlRpcHandler {
getLogger().info("Binding application " + appName + " :: " + app.hashCode() + " :: " + this.hashCode());
// set application URL prefix if it isn't set in app.properties
if (!app.hasExplicitBaseURI()) {
app.setBaseURI(mountpoint);
if (!this.app.hasExplicitBaseURI()) {
this.app.setBaseURI(this.mountpoint);
}
// bind to Jetty HTTP server
@ -483,9 +480,9 @@ public class ApplicationManager implements XmlRpcHandler {
}
// if there is a static direcory specified, mount it
if (staticDir != null) {
if (this.staticDir != null) {
File staticContent = getAbsoluteFile(staticDir);
File staticContent = getAbsoluteFile(this.staticDir);
getLogger().info("Serving static from " + staticContent.getPath());
getLogger().info("Mounting static at " + staticMountpoint);
@ -494,7 +491,7 @@ public class ApplicationManager implements XmlRpcHandler {
rhandler.setResourceBase(staticContent.getPath());
rhandler.setWelcomeFiles(staticHome);
staticContext = context.addContext(staticMountpoint, "");
staticContext = ApplicationManager.this.context.addContext(staticMountpoint, ""); //$NON-NLS-1$
staticContext.setHandler(rhandler);
staticContext.start();
@ -507,30 +504,30 @@ public class ApplicationManager implements XmlRpcHandler {
holder.setInitParameter("application", appName);
appContext.addServlet(holder, "/*");
if (cookieDomain != null) {
holder.setInitParameter("cookieDomain", cookieDomain);
if (this.cookieDomain != null) {
holder.setInitParameter("cookieDomain", this.cookieDomain); //$NON-NLS-1$
}
if (sessionCookieName != null) {
holder.setInitParameter("sessionCookieName", sessionCookieName);
if (this.sessionCookieName != null) {
holder.setInitParameter("sessionCookieName", this.sessionCookieName); //$NON-NLS-1$
}
if (protectedSessionCookie != null) {
holder.setInitParameter("protectedSessionCookie", protectedSessionCookie);
if (this.protectedSessionCookie != null) {
holder.setInitParameter("protectedSessionCookie", this.protectedSessionCookie); //$NON-NLS-1$
}
if (uploadLimit != null) {
holder.setInitParameter("uploadLimit", uploadLimit);
if (this.uploadLimit != null) {
holder.setInitParameter("uploadLimit", this.uploadLimit); //$NON-NLS-1$
}
if (uploadSoftfail != null) {
holder.setInitParameter("uploadSoftfail", uploadSoftfail);
if (this.uploadSoftfail != null) {
holder.setInitParameter("uploadSoftfail", this.uploadSoftfail); //$NON-NLS-1$
}
if (debug != null) {
holder.setInitParameter("debug", debug);
if (this.debug != null) {
holder.setInitParameter("debug", this.debug); //$NON-NLS-1$
}
if (protectedStaticDir != null) {
File protectedContent = getAbsoluteFile(protectedStaticDir);
appContext.setResourceBase(protectedContent.getPath());
@ -539,13 +536,13 @@ public class ApplicationManager implements XmlRpcHandler {
}
// Remap the context paths and start
context.mapContexts();
appContext.start();
ApplicationManager.this.context.mapContexts();
this.appContext.start();
}
// register as XML-RPC handler
xmlrpcHandlerName = app.getXmlRpcHandlerName();
xmlrpcHandlers.put(xmlrpcHandlerName, app);
this.xmlrpcHandlerName = this.app.getXmlRpcHandlerName();
ApplicationManager.this.xmlrpcHandlers.put(this.xmlrpcHandlerName, this.app);
} catch (Exception x) {
getLogger().error("Couldn't bind app", x);
x.printStackTrace();
@ -557,26 +554,26 @@ public class ApplicationManager implements XmlRpcHandler {
try {
// unbind from Jetty HTTP server
if (jetty != null) {
if (appContext != null) {
context.removeHandler(appContext);
appContext.stop();
appContext.destroy();
appContext = null;
if (ApplicationManager.this.jetty != null) {
if (this.appContext != null) {
ApplicationManager.this.context.removeHandler(this.appContext);
this.appContext.stop();
this.appContext.destroy();
this.appContext = null;
}
if (staticContext != null) {
context.removeHandler(staticContext);
staticContext.stop();
staticContext.destroy();
staticContext = null;
if (this.staticContext != null) {
ApplicationManager.this.context.removeHandler(this.staticContext);
this.staticContext.stop();
this.staticContext.destroy();
this.staticContext = null;
}
context.mapContexts();
ApplicationManager.this.context.mapContexts();
}
// unregister as XML-RPC handler
if (xmlrpcHandlerName != null) {
xmlrpcHandlers.remove(xmlrpcHandlerName);
if (this.xmlrpcHandlerName != null) {
ApplicationManager.this.xmlrpcHandlers.remove(this.xmlrpcHandlerName);
}
} catch (Exception x) {
getLogger().error("Couldn't unbind app", x);
@ -584,8 +581,9 @@ public class ApplicationManager implements XmlRpcHandler {
}
@Override
public String toString() {
return "[AppDescriptor "+app+"]";
return "[AppDescriptor "+this.app+"]"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
}

View file

@ -216,15 +216,6 @@ public class HelmaSecurityManager extends SecurityManager {
public void checkMulticast(InetAddress addr) {
}
/**
*
*
* @param addr ...
* @param ttl ...
*/
public void checkMulticast(InetAddress addr, byte ttl) {
}
/**
*
*/

View file

@ -36,7 +36,13 @@ import helma.util.ResourceProperties;
*/
public class Server implements Runnable {
// version string
public static final String version = "🐜 (__builddate__)";
public static final String version = "__version__";
// build date
public static final String buildDate = "__builddate__";
// commit hash
public static final String commitHash = "__commithash__";
// static server instance
private static Server server;
@ -143,15 +149,13 @@ public class Server implements Runnable {
* check if we are running on a Java 2 VM - otherwise exit with an error message
*/
public static void checkJavaVersion() {
String javaVersion = System.getProperty("java.version");
String javaVersion = System.getProperty("java.version", "0");
int majorVersion = Integer.parseInt(javaVersion.split("\\.")[0]);
if ((javaVersion == null) || javaVersion.startsWith("1.3")
|| javaVersion.startsWith("1.2")
|| javaVersion.startsWith("1.1")
|| javaVersion.startsWith("1.0")) {
System.err.println("This version of Helma requires Java 1.4 or greater.");
if (majorVersion < 11) {
System.err.println("This version of Helma requires Java 11 or greater.");
if (javaVersion == null) { // don't think this will ever happen, but you never know
if (majorVersion == 0) { // don't think this will ever happen, but you never know
System.err.println("Your Java Runtime did not provide a version number. Please update to a more recent version.");
} else {
System.err.println("Your Java Runtime is version " + javaVersion +

View file

@ -22,6 +22,8 @@ package helma.objectmodel;
* will normally catch this and try again after a period of time.
*/
public class ConcurrencyException extends Error {
private static final long serialVersionUID = 4031542073544406467L;
/**
* Creates a new ConcurrencyException object.
*

View file

@ -21,6 +21,8 @@ package helma.objectmodel;
* Thrown on any kind of Database-Error
*/
public class DatabaseException extends RuntimeException {
private static final long serialVersionUID = -5715728591015640819L;
/**
* Creates a new DatabaseException object.
*

Some files were not shown because too many files have changed in this diff Show more