From e9e7b73a2c56b26e49cba0baac1a187be109fdb2 Mon Sep 17 00:00:00 2001 From: Aaron Iba Date: Fri, 18 Dec 2009 18:44:23 +1100 Subject: removed duplicate trunk directory --HG-- rename : trunk/trunk/COPYING => trunk/COPYING rename : trunk/trunk/README => trunk/README rename : trunk/trunk/etherpad/.gitignore => trunk/etherpad/.gitignore rename : trunk/trunk/etherpad/bin/.gitignore => trunk/etherpad/bin/.gitignore rename : trunk/trunk/etherpad/bin/rebuildjar.sh => trunk/etherpad/bin/rebuildjar.sh rename : trunk/trunk/etherpad/bin/run-local.sh => trunk/etherpad/bin/run-local.sh rename : trunk/trunk/etherpad/bin/setup-mysql-db.sh => trunk/etherpad/bin/setup-mysql-db.sh rename : trunk/trunk/etherpad/etc/etherpad.localdev-default.properties => trunk/etherpad/etc/etherpad.localdev-default.properties rename : trunk/trunk/etherpad/lib/dnsjava-2.0.6.jar => trunk/etherpad/lib/dnsjava-2.0.6.jar rename : trunk/trunk/etherpad/lib/jbcrypt-0.2.jar => trunk/etherpad/lib/jbcrypt-0.2.jar rename : trunk/trunk/etherpad/lib/jcommon-1.0.15.jar => trunk/etherpad/lib/jcommon-1.0.15.jar rename : trunk/trunk/etherpad/lib/jfreechart-1.0.12.jar => trunk/etherpad/lib/jfreechart-1.0.12.jar rename : trunk/trunk/etherpad/src/etherpad/admin/shell.js => trunk/etherpad/src/etherpad/admin/shell.js rename : trunk/trunk/etherpad/src/etherpad/billing/billing.js => trunk/etherpad/src/etherpad/billing/billing.js rename : trunk/trunk/etherpad/src/etherpad/billing/fields.js => trunk/etherpad/src/etherpad/billing/fields.js rename : trunk/trunk/etherpad/src/etherpad/billing/team_billing.js => trunk/etherpad/src/etherpad/billing/team_billing.js rename : trunk/trunk/etherpad/src/etherpad/collab/ace/contentcollector.js => trunk/etherpad/src/etherpad/collab/ace/contentcollector.js rename : trunk/trunk/etherpad/src/etherpad/collab/ace/domline.js => trunk/etherpad/src/etherpad/collab/ace/domline.js rename : trunk/trunk/etherpad/src/etherpad/collab/ace/easysync1.js => trunk/etherpad/src/etherpad/collab/ace/easysync1.js rename : trunk/trunk/etherpad/src/etherpad/collab/ace/easysync2.js => trunk/etherpad/src/etherpad/collab/ace/easysync2.js rename : trunk/trunk/etherpad/src/etherpad/collab/ace/easysync2_tests.js => trunk/etherpad/src/etherpad/collab/ace/easysync2_tests.js rename : trunk/trunk/etherpad/src/etherpad/collab/ace/linestylefilter.js => trunk/etherpad/src/etherpad/collab/ace/linestylefilter.js rename : trunk/trunk/etherpad/src/etherpad/collab/collab_server.js => trunk/etherpad/src/etherpad/collab/collab_server.js rename : trunk/trunk/etherpad/src/etherpad/collab/collabroom_server.js => trunk/etherpad/src/etherpad/collab/collabroom_server.js rename : trunk/trunk/etherpad/src/etherpad/collab/genimg.js => trunk/etherpad/src/etherpad/collab/genimg.js rename : trunk/trunk/etherpad/src/etherpad/collab/json_sans_eval.js => trunk/etherpad/src/etherpad/collab/json_sans_eval.js rename : trunk/trunk/etherpad/src/etherpad/collab/readonly_server.js => trunk/etherpad/src/etherpad/collab/readonly_server.js rename : trunk/trunk/etherpad/src/etherpad/collab/server_utils.js => trunk/etherpad/src/etherpad/collab/server_utils.js rename : trunk/trunk/etherpad/src/etherpad/control/aboutcontrol.js => trunk/etherpad/src/etherpad/control/aboutcontrol.js rename : trunk/trunk/etherpad/src/etherpad/control/admincontrol.js => trunk/etherpad/src/etherpad/control/admincontrol.js rename : trunk/trunk/etherpad/src/etherpad/control/blogcontrol.js => trunk/etherpad/src/etherpad/control/blogcontrol.js rename : trunk/trunk/etherpad/src/etherpad/control/connection_diagnostics_control.js => trunk/etherpad/src/etherpad/control/connection_diagnostics_control.js rename : trunk/trunk/etherpad/src/etherpad/control/global_pro_account_control.js => trunk/etherpad/src/etherpad/control/global_pro_account_control.js rename : trunk/trunk/etherpad/src/etherpad/control/historycontrol.js => trunk/etherpad/src/etherpad/control/historycontrol.js rename : trunk/trunk/etherpad/src/etherpad/control/loadtestcontrol.js => trunk/etherpad/src/etherpad/control/loadtestcontrol.js rename : trunk/trunk/etherpad/src/etherpad/control/maincontrol.js => trunk/etherpad/src/etherpad/control/maincontrol.js rename : trunk/trunk/etherpad/src/etherpad/control/pad/pad_changeset_control.js => trunk/etherpad/src/etherpad/control/pad/pad_changeset_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pad/pad_control.js => trunk/etherpad/src/etherpad/control/pad/pad_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pad/pad_importexport_control.js => trunk/etherpad/src/etherpad/control/pad/pad_importexport_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pad/pad_view_control.js => trunk/etherpad/src/etherpad/control/pad/pad_view_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pne_manual_control.js => trunk/etherpad/src/etherpad/control/pne_manual_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pne_tracker_control.js => trunk/etherpad/src/etherpad/control/pne_tracker_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro/account_control.js => trunk/etherpad/src/etherpad/control/pro/account_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro/admin/account_manager_control.js => trunk/etherpad/src/etherpad/control/pro/admin/account_manager_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro/admin/license_manager_control.js => trunk/etherpad/src/etherpad/control/pro/admin/license_manager_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro/admin/pro_admin_control.js => trunk/etherpad/src/etherpad/control/pro/admin/pro_admin_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro/admin/pro_config_control.js => trunk/etherpad/src/etherpad/control/pro/admin/pro_config_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro/admin/team_billing_control.js => trunk/etherpad/src/etherpad/control/pro/admin/team_billing_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro/pro_main_control.js => trunk/etherpad/src/etherpad/control/pro/pro_main_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro/pro_padlist_control.js => trunk/etherpad/src/etherpad/control/pro/pro_padlist_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro_beta_control.js => trunk/etherpad/src/etherpad/control/pro_beta_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro_help_control.js => trunk/etherpad/src/etherpad/control/pro_help_control.js rename : trunk/trunk/etherpad/src/etherpad/control/pro_signup_control.js => trunk/etherpad/src/etherpad/control/pro_signup_control.js rename : trunk/trunk/etherpad/src/etherpad/control/scriptcontrol.js => trunk/etherpad/src/etherpad/control/scriptcontrol.js rename : trunk/trunk/etherpad/src/etherpad/control/static_control.js => trunk/etherpad/src/etherpad/control/static_control.js rename : trunk/trunk/etherpad/src/etherpad/control/statscontrol.js => trunk/etherpad/src/etherpad/control/statscontrol.js rename : trunk/trunk/etherpad/src/etherpad/control/store/eepnet_checkout_control.js => trunk/etherpad/src/etherpad/control/store/eepnet_checkout_control.js rename : trunk/trunk/etherpad/src/etherpad/control/store/storecontrol.js => trunk/etherpad/src/etherpad/control/store/storecontrol.js rename : trunk/trunk/etherpad/src/etherpad/control/testcontrol.js => trunk/etherpad/src/etherpad/control/testcontrol.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0000_test.js => trunk/etherpad/src/etherpad/db_migrations/m0000_test.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0001_eepnet_signups_init.js => trunk/etherpad/src/etherpad/db_migrations/m0001_eepnet_signups_init.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0002_eepnet_signups_2.js => trunk/etherpad/src/etherpad/db_migrations/m0002_eepnet_signups_2.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0003_create_tests_table_v2.js => trunk/etherpad/src/etherpad/db_migrations/m0003_create_tests_table_v2.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0004_convert_all_tables_to_innodb.js => trunk/etherpad/src/etherpad/db_migrations/m0004_convert_all_tables_to_innodb.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0005_create_billing_tables.js => trunk/etherpad/src/etherpad/db_migrations/m0005_create_billing_tables.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0006_eepnet_signups_3.js => trunk/etherpad/src/etherpad/db_migrations/m0006_eepnet_signups_3.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0007_create_pro_tables_v4.js => trunk/etherpad/src/etherpad/db_migrations/m0007_create_pro_tables_v4.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0008_persistent_vars.js => trunk/etherpad/src/etherpad/db_migrations/m0008_persistent_vars.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0009_pad_tables.js => trunk/etherpad/src/etherpad/db_migrations/m0009_pad_tables.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0010_pad_sqlmeta.js => trunk/etherpad/src/etherpad/db_migrations/m0010_pad_sqlmeta.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0011_pro_users_temppass.js => trunk/etherpad/src/etherpad/db_migrations/m0011_pro_users_temppass.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0012_pro_users_auto_signin.js => trunk/etherpad/src/etherpad/db_migrations/m0012_pro_users_auto_signin.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0013_pne_padv2_upgrade.js => trunk/etherpad/src/etherpad/db_migrations/m0013_pne_padv2_upgrade.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0014_pne_globalpadids.js => trunk/etherpad/src/etherpad/db_migrations/m0014_pne_globalpadids.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0015_padmeta_passwords.js => trunk/etherpad/src/etherpad/db_migrations/m0015_padmeta_passwords.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0016_pne_tracking_data.js => trunk/etherpad/src/etherpad/db_migrations/m0016_pne_tracking_data.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0017_pne_tracking_data_v2.js => trunk/etherpad/src/etherpad/db_migrations/m0017_pne_tracking_data_v2.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0018_eepnet_checkout_tables.js => trunk/etherpad/src/etherpad/db_migrations/m0018_eepnet_checkout_tables.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0019_padmeta_deleted.js => trunk/etherpad/src/etherpad/db_migrations/m0019_padmeta_deleted.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0020_padmeta_archived.js => trunk/etherpad/src/etherpad/db_migrations/m0020_padmeta_archived.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0021_pro_padmeta_json.js => trunk/etherpad/src/etherpad/db_migrations/m0021_pro_padmeta_json.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0022_create_userids_table.js => trunk/etherpad/src/etherpad/db_migrations/m0022_create_userids_table.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0023_create_usagestats_table.js => trunk/etherpad/src/etherpad/db_migrations/m0023_create_usagestats_table.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0024_statistics_table.js => trunk/etherpad/src/etherpad/db_migrations/m0024_statistics_table.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0025_rename_pro_users_table.js => trunk/etherpad/src/etherpad/db_migrations/m0025_rename_pro_users_table.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0026_create_guests_table.js => trunk/etherpad/src/etherpad/db_migrations/m0026_create_guests_table.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0027_pro_config.js => trunk/etherpad/src/etherpad/db_migrations/m0027_pro_config.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0028_ondemand_beta_emails.js => trunk/etherpad/src/etherpad/db_migrations/m0028_ondemand_beta_emails.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0029_lowercase_subdomains.js => trunk/etherpad/src/etherpad/db_migrations/m0029_lowercase_subdomains.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0030_fix_statistics_values.js => trunk/etherpad/src/etherpad/db_migrations/m0030_fix_statistics_values.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0031_deleted_pro_users.js => trunk/etherpad/src/etherpad/db_migrations/m0031_deleted_pro_users.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0032_reduce_topvalues_counts.js => trunk/etherpad/src/etherpad/db_migrations/m0032_reduce_topvalues_counts.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0033_pro_account_usage.js => trunk/etherpad/src/etherpad/db_migrations/m0033_pro_account_usage.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0034_create_recurring_billing_table.js => trunk/etherpad/src/etherpad/db_migrations/m0034_create_recurring_billing_table.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0035_add_email_to_paymentinfo.js => trunk/etherpad/src/etherpad/db_migrations/m0035_add_email_to_paymentinfo.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0036_create_missing_subscription_records.js => trunk/etherpad/src/etherpad/db_migrations/m0036_create_missing_subscription_records.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0037_create_pro_referral_table.js => trunk/etherpad/src/etherpad/db_migrations/m0037_create_pro_referral_table.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/m0038_pad_coarse_revs.js => trunk/etherpad/src/etherpad/db_migrations/m0038_pad_coarse_revs.js rename : trunk/trunk/etherpad/src/etherpad/db_migrations/migration_runner.js => trunk/etherpad/src/etherpad/db_migrations/migration_runner.js rename : trunk/trunk/etherpad/src/etherpad/debug.js => trunk/etherpad/src/etherpad/debug.js rename : trunk/trunk/etherpad/src/etherpad/globals.js => trunk/etherpad/src/etherpad/globals.js rename : trunk/trunk/etherpad/src/etherpad/helpers.js => trunk/etherpad/src/etherpad/helpers.js rename : trunk/trunk/etherpad/src/etherpad/importexport/importexport.js => trunk/etherpad/src/etherpad/importexport/importexport.js rename : trunk/trunk/etherpad/src/etherpad/legacy_urls.js => trunk/etherpad/src/etherpad/legacy_urls.js rename : trunk/trunk/etherpad/src/etherpad/licensing.js => trunk/etherpad/src/etherpad/licensing.js rename : trunk/trunk/etherpad/src/etherpad/log.js => trunk/etherpad/src/etherpad/log.js rename : trunk/trunk/etherpad/src/etherpad/metrics/metrics.js => trunk/etherpad/src/etherpad/metrics/metrics.js rename : trunk/trunk/etherpad/src/etherpad/pad/activepads.js => trunk/etherpad/src/etherpad/pad/activepads.js rename : trunk/trunk/etherpad/src/etherpad/pad/chatarchive.js => trunk/etherpad/src/etherpad/pad/chatarchive.js rename : trunk/trunk/etherpad/src/etherpad/pad/dbwriter.js => trunk/etherpad/src/etherpad/pad/dbwriter.js rename : trunk/trunk/etherpad/src/etherpad/pad/easysync2migration.js => trunk/etherpad/src/etherpad/pad/easysync2migration.js rename : trunk/trunk/etherpad/src/etherpad/pad/exporthtml.js => trunk/etherpad/src/etherpad/pad/exporthtml.js rename : trunk/trunk/etherpad/src/etherpad/pad/importhtml.js => trunk/etherpad/src/etherpad/pad/importhtml.js rename : trunk/trunk/etherpad/src/etherpad/pad/model.js => trunk/etherpad/src/etherpad/pad/model.js rename : trunk/trunk/etherpad/src/etherpad/pad/noprowatcher.js => trunk/etherpad/src/etherpad/pad/noprowatcher.js rename : trunk/trunk/etherpad/src/etherpad/pad/pad_migrations.js => trunk/etherpad/src/etherpad/pad/pad_migrations.js rename : trunk/trunk/etherpad/src/etherpad/pad/pad_security.js => trunk/etherpad/src/etherpad/pad/pad_security.js rename : trunk/trunk/etherpad/src/etherpad/pad/padevents.js => trunk/etherpad/src/etherpad/pad/padevents.js rename : trunk/trunk/etherpad/src/etherpad/pad/padusers.js => trunk/etherpad/src/etherpad/pad/padusers.js rename : trunk/trunk/etherpad/src/etherpad/pad/padutils.js => trunk/etherpad/src/etherpad/pad/padutils.js rename : trunk/trunk/etherpad/src/etherpad/pad/revisions.js => trunk/etherpad/src/etherpad/pad/revisions.js rename : trunk/trunk/etherpad/src/etherpad/pne/pne_utils.js => trunk/etherpad/src/etherpad/pne/pne_utils.js rename : trunk/trunk/etherpad/src/etherpad/pro/domains.js => trunk/etherpad/src/etherpad/pro/domains.js rename : trunk/trunk/etherpad/src/etherpad/pro/pro_account_auto_signin.js => trunk/etherpad/src/etherpad/pro/pro_account_auto_signin.js rename : trunk/trunk/etherpad/src/etherpad/pro/pro_accounts.js => trunk/etherpad/src/etherpad/pro/pro_accounts.js rename : trunk/trunk/etherpad/src/etherpad/pro/pro_config.js => trunk/etherpad/src/etherpad/pro/pro_config.js rename : trunk/trunk/etherpad/src/etherpad/pro/pro_pad_db.js => trunk/etherpad/src/etherpad/pro/pro_pad_db.js rename : trunk/trunk/etherpad/src/etherpad/pro/pro_pad_editors.js => trunk/etherpad/src/etherpad/pro/pro_pad_editors.js rename : trunk/trunk/etherpad/src/etherpad/pro/pro_padlist.js => trunk/etherpad/src/etherpad/pro/pro_padlist.js rename : trunk/trunk/etherpad/src/etherpad/pro/pro_padmeta.js => trunk/etherpad/src/etherpad/pro/pro_padmeta.js rename : trunk/trunk/etherpad/src/etherpad/pro/pro_quotas.js => trunk/etherpad/src/etherpad/pro/pro_quotas.js rename : trunk/trunk/etherpad/src/etherpad/pro/pro_utils.js => trunk/etherpad/src/etherpad/pro/pro_utils.js rename : trunk/trunk/etherpad/src/etherpad/quotas.js => trunk/etherpad/src/etherpad/quotas.js rename : trunk/trunk/etherpad/src/etherpad/sessions.js => trunk/etherpad/src/etherpad/sessions.js rename : trunk/trunk/etherpad/src/etherpad/statistics/exceptions.js => trunk/etherpad/src/etherpad/statistics/exceptions.js rename : trunk/trunk/etherpad/src/etherpad/statistics/statistics.js => trunk/etherpad/src/etherpad/statistics/statistics.js rename : trunk/trunk/etherpad/src/etherpad/store/checkout.js => trunk/etherpad/src/etherpad/store/checkout.js rename : trunk/trunk/etherpad/src/etherpad/store/eepnet_checkout.js => trunk/etherpad/src/etherpad/store/eepnet_checkout.js rename : trunk/trunk/etherpad/src/etherpad/store/eepnet_trial.js => trunk/etherpad/src/etherpad/store/eepnet_trial.js rename : trunk/trunk/etherpad/src/etherpad/testing/testutils.js => trunk/etherpad/src/etherpad/testing/testutils.js rename : trunk/trunk/etherpad/src/etherpad/testing/unit_tests/t0000_test.js => trunk/etherpad/src/etherpad/testing/unit_tests/t0000_test.js rename : trunk/trunk/etherpad/src/etherpad/testing/unit_tests/t0001_sqlbase_transaction_rollback.js => trunk/etherpad/src/etherpad/testing/unit_tests/t0001_sqlbase_transaction_rollback.js rename : trunk/trunk/etherpad/src/etherpad/testing/unit_tests/t0002_license_generation.js => trunk/etherpad/src/etherpad/testing/unit_tests/t0002_license_generation.js rename : trunk/trunk/etherpad/src/etherpad/testing/unit_tests/t0003_persistent_vars.js => trunk/etherpad/src/etherpad/testing/unit_tests/t0003_persistent_vars.js rename : trunk/trunk/etherpad/src/etherpad/testing/unit_tests/t0004_sqlobj.js => trunk/etherpad/src/etherpad/testing/unit_tests/t0004_sqlobj.js rename : trunk/trunk/etherpad/src/etherpad/testing/unit_tests/t0005_easysync.js => trunk/etherpad/src/etherpad/testing/unit_tests/t0005_easysync.js rename : trunk/trunk/etherpad/src/etherpad/usage_stats/usage_stats.js => trunk/etherpad/src/etherpad/usage_stats/usage_stats.js rename : trunk/trunk/etherpad/src/etherpad/utils.js => trunk/etherpad/src/etherpad/utils.js rename : trunk/trunk/etherpad/src/main.js => trunk/etherpad/src/main.js rename : trunk/trunk/etherpad/src/static/crossdomain.xml => trunk/etherpad/src/static/crossdomain.xml rename : trunk/trunk/etherpad/src/static/css/admin/admin-stats.css => trunk/etherpad/src/static/css/admin/admin-stats.css rename : trunk/trunk/etherpad/src/static/css/beta.css => trunk/etherpad/src/static/css/beta.css rename : trunk/trunk/etherpad/src/static/css/broadcast.css => trunk/etherpad/src/static/css/broadcast.css rename : trunk/trunk/etherpad/src/static/css/connection_diagnostics.css => trunk/etherpad/src/static/css/connection_diagnostics.css rename : trunk/trunk/etherpad/src/static/css/etherpad.css => trunk/etherpad/src/static/css/etherpad.css rename : trunk/trunk/etherpad/src/static/css/fluxbb.css => trunk/etherpad/src/static/css/fluxbb.css rename : trunk/trunk/etherpad/src/static/css/framedpage.css => trunk/etherpad/src/static/css/framedpage.css rename : trunk/trunk/etherpad/src/static/css/global-pro-account.css => trunk/etherpad/src/static/css/global-pro-account.css rename : trunk/trunk/etherpad/src/static/css/home-opensource.css => trunk/etherpad/src/static/css/home-opensource.css rename : trunk/trunk/etherpad/src/static/css/home.css => trunk/etherpad/src/static/css/home.css rename : trunk/trunk/etherpad/src/static/css/lib/jquery.contextmenu.css => trunk/etherpad/src/static/css/lib/jquery.contextmenu.css rename : trunk/trunk/etherpad/src/static/css/pad.css => trunk/etherpad/src/static/css/pad.css rename : trunk/trunk/etherpad/src/static/css/pad2_ejs.css => trunk/etherpad/src/static/css/pad2_ejs.css rename : trunk/trunk/etherpad/src/static/css/pne-manual.css => trunk/etherpad/src/static/css/pne-manual.css rename : trunk/trunk/etherpad/src/static/css/pricing.css => trunk/etherpad/src/static/css/pricing.css rename : trunk/trunk/etherpad/src/static/css/pro-help.css => trunk/etherpad/src/static/css/pro-help.css rename : trunk/trunk/etherpad/src/static/css/pro-signup.css => trunk/etherpad/src/static/css/pro-signup.css rename : trunk/trunk/etherpad/src/static/css/pro/account.css => trunk/etherpad/src/static/css/pro/account.css rename : trunk/trunk/etherpad/src/static/css/pro/framedpage-pro.css => trunk/etherpad/src/static/css/pro/framedpage-pro.css rename : trunk/trunk/etherpad/src/static/css/pro/padlist.css => trunk/etherpad/src/static/css/pro/padlist.css rename : trunk/trunk/etherpad/src/static/css/pro/payment-required.css => trunk/etherpad/src/static/css/pro/payment-required.css rename : trunk/trunk/etherpad/src/static/css/pro/pro-admin.css => trunk/etherpad/src/static/css/pro/pro-admin.css rename : trunk/trunk/etherpad/src/static/css/pro/pro-home.css => trunk/etherpad/src/static/css/pro/pro-home.css rename : trunk/trunk/etherpad/src/static/css/stats.css => trunk/etherpad/src/static/css/stats.css rename : trunk/trunk/etherpad/src/static/css/store/eepnet-checkout.css => trunk/etherpad/src/static/css/store/eepnet-checkout.css rename : trunk/trunk/etherpad/src/static/css/store/ondemand-billing.css => trunk/etherpad/src/static/css/store/ondemand-billing.css rename : trunk/trunk/etherpad/src/static/css/store/store.css => trunk/etherpad/src/static/css/store/store.css rename : trunk/trunk/etherpad/src/static/favicon.ico => trunk/etherpad/src/static/favicon.ico rename : trunk/trunk/etherpad/src/static/img/about/appjet-logo-large.gif => trunk/etherpad/src/static/img/about/appjet-logo-large.gif rename : trunk/trunk/etherpad/src/static/img/about/appjet-logo-medium.png => trunk/etherpad/src/static/img/about/appjet-logo-medium.png rename : trunk/trunk/etherpad/src/static/img/about/investors/mitchkapor.jpg => trunk/etherpad/src/static/img/about/investors/mitchkapor.jpg rename : trunk/trunk/etherpad/src/static/img/about/investors/pb.jpg => trunk/etherpad/src/static/img/about/investors/pb.jpg rename : trunk/trunk/etherpad/src/static/img/about/investors/pg.jpg => trunk/etherpad/src/static/img/about/investors/pg.jpg rename : trunk/trunk/etherpad/src/static/img/about/investors/sanjeev.jpg => trunk/etherpad/src/static/img/about/investors/sanjeev.jpg rename : trunk/trunk/etherpad/src/static/img/about/investors/seth.jpg => trunk/etherpad/src/static/img/about/investors/seth.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/aaron-david-iphones-thumb.jpg => trunk/etherpad/src/static/img/about/people/aaron-david-iphones-thumb.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/aaron-david-iphones.jpg => trunk/etherpad/src/static/img/about/people/aaron-david-iphones.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/aaron-google-air.jpg => trunk/etherpad/src/static/img/about/people/aaron-google-air.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/aaron-headshot-thumb.jpg => trunk/etherpad/src/static/img/about/people/aaron-headshot-thumb.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/aaron-headshot.jpg => trunk/etherpad/src/static/img/about/people/aaron-headshot.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/aaron-headshot2-thumb.jpg => trunk/etherpad/src/static/img/about/people/aaron-headshot2-thumb.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/aaron-headshot2.jpg => trunk/etherpad/src/static/img/about/people/aaron-headshot2.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/aaron-headshot3-thumb.jpg => trunk/etherpad/src/static/img/about/people/aaron-headshot3-thumb.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/aaron-headshot3.jpg => trunk/etherpad/src/static/img/about/people/aaron-headshot3.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/daniel-headshot-thumb.jpg => trunk/etherpad/src/static/img/about/people/daniel-headshot-thumb.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/david-headshot-thumb.jpg => trunk/etherpad/src/static/img/about/people/david-headshot-thumb.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/david-headshot.jpg => trunk/etherpad/src/static/img/about/people/david-headshot.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/davy-headshot.jpg => trunk/etherpad/src/static/img/about/people/davy-headshot.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/jd-headshot-thumb.jpg => trunk/etherpad/src/static/img/about/people/jd-headshot-thumb.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/jd-headshot.jpg => trunk/etherpad/src/static/img/about/people/jd-headshot.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/rhonda-headshot-thumb.jpg => trunk/etherpad/src/static/img/about/people/rhonda-headshot-thumb.jpg rename : trunk/trunk/etherpad/src/static/img/about/people/rhonda-headshot.jpg => trunk/etherpad/src/static/img/about/people/rhonda-headshot.jpg rename : trunk/trunk/etherpad/src/static/img/about/pier38.png => trunk/etherpad/src/static/img/about/pier38.png rename : trunk/trunk/etherpad/src/static/img/about/quote-close.png => trunk/etherpad/src/static/img/about/quote-close.png rename : trunk/trunk/etherpad/src/static/img/about/quote-open.png => trunk/etherpad/src/static/img/about/quote-open.png rename : trunk/trunk/etherpad/src/static/img/about/screencastpreview800x600.jpg => trunk/etherpad/src/static/img/about/screencastpreview800x600.jpg rename : trunk/trunk/etherpad/src/static/img/account/betawarn.jpg => trunk/etherpad/src/static/img/account/betawarn.jpg rename : trunk/trunk/etherpad/src/static/img/acecarets/000000.gif => trunk/etherpad/src/static/img/acecarets/000000.gif rename : trunk/trunk/etherpad/src/static/img/acecarets/666666.gif => trunk/etherpad/src/static/img/acecarets/666666.gif rename : trunk/trunk/etherpad/src/static/img/acecarets/999999.gif => trunk/etherpad/src/static/img/acecarets/999999.gif rename : trunk/trunk/etherpad/src/static/img/acecarets/default.gif => trunk/etherpad/src/static/img/acecarets/default.gif rename : trunk/trunk/etherpad/src/static/img/apr09/backgrad.png => trunk/etherpad/src/static/img/apr09/backgrad.png rename : trunk/trunk/etherpad/src/static/img/apr09/black35.png => trunk/etherpad/src/static/img/apr09/black35.png rename : trunk/trunk/etherpad/src/static/img/apr09/blank.gif => trunk/etherpad/src/static/img/apr09/blank.gif rename : trunk/trunk/etherpad/src/static/img/apr09/modalbar.gif => trunk/etherpad/src/static/img/apr09/modalbar.gif rename : trunk/trunk/etherpad/src/static/img/apr09/newpadicon.gif => trunk/etherpad/src/static/img/apr09/newpadicon.gif rename : trunk/trunk/etherpad/src/static/img/apr09/shadbot.png => trunk/etherpad/src/static/img/apr09/shadbot.png rename : trunk/trunk/etherpad/src/static/img/apr09/shadleft.png => trunk/etherpad/src/static/img/apr09/shadleft.png rename : trunk/trunk/etherpad/src/static/img/apr09/shadleftbot.png => trunk/etherpad/src/static/img/apr09/shadleftbot.png rename : trunk/trunk/etherpad/src/static/img/apr09/shadlefttop.png => trunk/etherpad/src/static/img/apr09/shadlefttop.png rename : trunk/trunk/etherpad/src/static/img/apr09/shadright.png => trunk/etherpad/src/static/img/apr09/shadright.png rename : trunk/trunk/etherpad/src/static/img/apr09/shadrightbot.png => trunk/etherpad/src/static/img/apr09/shadrightbot.png rename : trunk/trunk/etherpad/src/static/img/apr09/shadrighttop.png => trunk/etherpad/src/static/img/apr09/shadrighttop.png rename : trunk/trunk/etherpad/src/static/img/apr09/topbar.gif => trunk/etherpad/src/static/img/apr09/topbar.gif rename : trunk/trunk/etherpad/src/static/img/apr09/topbarlogo.gif => trunk/etherpad/src/static/img/apr09/topbarlogo.gif rename : trunk/trunk/etherpad/src/static/img/apr09/widthfull.gif => trunk/etherpad/src/static/img/apr09/widthfull.gif rename : trunk/trunk/etherpad/src/static/img/apr09/widthfullactive.gif => trunk/etherpad/src/static/img/apr09/widthfullactive.gif rename : trunk/trunk/etherpad/src/static/img/apr09/widthlim.gif => trunk/etherpad/src/static/img/apr09/widthlim.gif rename : trunk/trunk/etherpad/src/static/img/apr09/widthlimactive.gif => trunk/etherpad/src/static/img/apr09/widthlimactive.gif rename : trunk/trunk/etherpad/src/static/img/billing/amex.gif => trunk/etherpad/src/static/img/billing/amex.gif rename : trunk/trunk/etherpad/src/static/img/billing/creditcard.gif => trunk/etherpad/src/static/img/billing/creditcard.gif rename : trunk/trunk/etherpad/src/static/img/billing/csc-help.gif => trunk/etherpad/src/static/img/billing/csc-help.gif rename : trunk/trunk/etherpad/src/static/img/billing/disc.gif => trunk/etherpad/src/static/img/billing/disc.gif rename : trunk/trunk/etherpad/src/static/img/billing/invoice.gif => trunk/etherpad/src/static/img/billing/invoice.gif rename : trunk/trunk/etherpad/src/static/img/billing/mc.gif => trunk/etherpad/src/static/img/billing/mc.gif rename : trunk/trunk/etherpad/src/static/img/billing/paypal.gif => trunk/etherpad/src/static/img/billing/paypal.gif rename : trunk/trunk/etherpad/src/static/img/billing/visa.gif => trunk/etherpad/src/static/img/billing/visa.gif rename : trunk/trunk/etherpad/src/static/img/blog/posts/new-features/fullwidth.gif => trunk/etherpad/src/static/img/blog/posts/new-features/fullwidth.gif rename : trunk/trunk/etherpad/src/static/img/blog/posts/new-features/importexport.gif => trunk/etherpad/src/static/img/blog/posts/new-features/importexport.gif rename : trunk/trunk/etherpad/src/static/img/blog/posts/new-features/richtext.gif => trunk/etherpad/src/static/img/blog/posts/new-features/richtext.gif rename : trunk/trunk/etherpad/src/static/img/blog/posts/new-features/viewzoom.gif => trunk/etherpad/src/static/img/blog/posts/new-features/viewzoom.gif rename : trunk/trunk/etherpad/src/static/img/blog/posts/pricing-survey-results.png => trunk/etherpad/src/static/img/blog/posts/pricing-survey-results.png rename : trunk/trunk/etherpad/src/static/img/blog/posts/pricing-survey.png => trunk/etherpad/src/static/img/blog/posts/pricing-survey.png rename : trunk/trunk/etherpad/src/static/img/blog/posts/time-slider-screenshot.gif => trunk/etherpad/src/static/img/blog/posts/time-slider-screenshot.gif rename : trunk/trunk/etherpad/src/static/img/davy/bg/home-createpad.png => trunk/etherpad/src/static/img/davy/bg/home-createpad.png rename : trunk/trunk/etherpad/src/static/img/davy/bg/home-features-bottom.gif => trunk/etherpad/src/static/img/davy/bg/home-features-bottom.gif rename : trunk/trunk/etherpad/src/static/img/davy/bg/home-features-free-bottom.gif => trunk/etherpad/src/static/img/davy/bg/home-features-free-bottom.gif rename : trunk/trunk/etherpad/src/static/img/davy/bg/home-features-paid-top.gif => trunk/etherpad/src/static/img/davy/bg/home-features-paid-top.gif rename : trunk/trunk/etherpad/src/static/img/davy/bg/home-features-top.gif => trunk/etherpad/src/static/img/davy/bg/home-features-top.gif rename : trunk/trunk/etherpad/src/static/img/davy/bg/home-nav-selected.png => trunk/etherpad/src/static/img/davy/bg/home-nav-selected.png rename : trunk/trunk/etherpad/src/static/img/davy/bg/home-screencast.png => trunk/etherpad/src/static/img/davy/bg/home-screencast.png rename : trunk/trunk/etherpad/src/static/img/davy/bg/home2.png => trunk/etherpad/src/static/img/davy/bg/home2.png rename : trunk/trunk/etherpad/src/static/img/davy/bg/product-nav-selected-white.png => trunk/etherpad/src/static/img/davy/bg/product-nav-selected-white.png rename : trunk/trunk/etherpad/src/static/img/davy/bg/product-nav-selected.png => trunk/etherpad/src/static/img/davy/bg/product-nav-selected.png rename : trunk/trunk/etherpad/src/static/img/davy/bg/product.png => trunk/etherpad/src/static/img/davy/bg/product.png rename : trunk/trunk/etherpad/src/static/img/davy/btn/createpad-home.gif => trunk/etherpad/src/static/img/davy/btn/createpad-home.gif rename : trunk/trunk/etherpad/src/static/img/davy/btn/createpad-large.gif => trunk/etherpad/src/static/img/davy/btn/createpad-large.gif rename : trunk/trunk/etherpad/src/static/img/davy/btn/createpad-small.gif => trunk/etherpad/src/static/img/davy/btn/createpad-small.gif rename : trunk/trunk/etherpad/src/static/img/davy/btn/intro-screencast.png => trunk/etherpad/src/static/img/davy/btn/intro-screencast.png rename : trunk/trunk/etherpad/src/static/img/davy/btn/intro-testimonials.png => trunk/etherpad/src/static/img/davy/btn/intro-testimonials.png rename : trunk/trunk/etherpad/src/static/img/davy/btn/learnmore.gif => trunk/etherpad/src/static/img/davy/btn/learnmore.gif rename : trunk/trunk/etherpad/src/static/img/davy/btn/signup-home-2.gif => trunk/etherpad/src/static/img/davy/btn/signup-home-2.gif rename : trunk/trunk/etherpad/src/static/img/davy/btn/signup-home-3.gif => trunk/etherpad/src/static/img/davy/btn/signup-home-3.gif rename : trunk/trunk/etherpad/src/static/img/davy/btn/signup-home-4.gif => trunk/etherpad/src/static/img/davy/btn/signup-home-4.gif rename : trunk/trunk/etherpad/src/static/img/davy/btn/signup-home.gif => trunk/etherpad/src/static/img/davy/btn/signup-home.gif rename : trunk/trunk/etherpad/src/static/img/davy/btn/uses-more.gif => trunk/etherpad/src/static/img/davy/btn/uses-more.gif rename : trunk/trunk/etherpad/src/static/img/davy/gfx/32/114.png => trunk/etherpad/src/static/img/davy/gfx/32/114.png rename : trunk/trunk/etherpad/src/static/img/davy/gfx/32/15.png => trunk/etherpad/src/static/img/davy/gfx/32/15.png rename : trunk/trunk/etherpad/src/static/img/davy/gfx/32/65.png => trunk/etherpad/src/static/img/davy/gfx/32/65.png rename : trunk/trunk/etherpad/src/static/img/davy/gfx/32/78.png => trunk/etherpad/src/static/img/davy/gfx/32/78.png rename : trunk/trunk/etherpad/src/static/img/davy/gfx/bullet.gif => trunk/etherpad/src/static/img/davy/gfx/bullet.gif rename : trunk/trunk/etherpad/src/static/img/davy/gfx/home-logo2.gif => trunk/etherpad/src/static/img/davy/gfx/home-logo2.gif rename : trunk/trunk/etherpad/src/static/img/davy/gfx/home-screencast.png => trunk/etherpad/src/static/img/davy/gfx/home-screencast.png rename : trunk/trunk/etherpad/src/static/img/davy/gfx/plane.gif => trunk/etherpad/src/static/img/davy/gfx/plane.gif rename : trunk/trunk/etherpad/src/static/img/davy/gfx/product-logo.gif => trunk/etherpad/src/static/img/davy/gfx/product-logo.gif rename : trunk/trunk/etherpad/src/static/img/davy/gfx/screenshot.gif => trunk/etherpad/src/static/img/davy/gfx/screenshot.gif rename : trunk/trunk/etherpad/src/static/img/davy/gfx/use-meetings.gif => trunk/etherpad/src/static/img/davy/gfx/use-meetings.gif rename : trunk/trunk/etherpad/src/static/img/davy/gfx/use-meetings.png => trunk/etherpad/src/static/img/davy/gfx/use-meetings.png rename : trunk/trunk/etherpad/src/static/img/davy/gfx/use-programming.gif => trunk/etherpad/src/static/img/davy/gfx/use-programming.gif rename : trunk/trunk/etherpad/src/static/img/davy/gfx/use-programming.png => trunk/etherpad/src/static/img/davy/gfx/use-programming.png rename : trunk/trunk/etherpad/src/static/img/davy/gfx/use-writing.gif => trunk/etherpad/src/static/img/davy/gfx/use-writing.gif rename : trunk/trunk/etherpad/src/static/img/davy/gfx/use-writing.png => trunk/etherpad/src/static/img/davy/gfx/use-writing.png rename : trunk/trunk/etherpad/src/static/img/davy/txt/home-button.gif => trunk/etherpad/src/static/img/davy/txt/home-button.gif rename : trunk/trunk/etherpad/src/static/img/featuretour/code.gif => trunk/etherpad/src/static/img/featuretour/code.gif rename : trunk/trunk/etherpad/src/static/img/featuretour/edits.gif => trunk/etherpad/src/static/img/featuretour/edits.gif rename : trunk/trunk/etherpad/src/static/img/featuretour/editsandusers.gif => trunk/etherpad/src/static/img/featuretour/editsandusers.gif rename : trunk/trunk/etherpad/src/static/img/featuretour/padlock.png => trunk/etherpad/src/static/img/featuretour/padlock.png rename : trunk/trunk/etherpad/src/static/img/featuretour/revisions.gif => trunk/etherpad/src/static/img/featuretour/revisions.gif rename : trunk/trunk/etherpad/src/static/img/featuretour/users.gif => trunk/etherpad/src/static/img/featuretour/users.gif rename : trunk/trunk/etherpad/src/static/img/feb09/framedheaderback.gif => trunk/etherpad/src/static/img/feb09/framedheaderback.gif rename : trunk/trunk/etherpad/src/static/img/feb09/framedheaderlogo.gif => trunk/etherpad/src/static/img/feb09/framedheaderlogo.gif rename : trunk/trunk/etherpad/src/static/img/feb09/home_firstp.gif => trunk/etherpad/src/static/img/feb09/home_firstp.gif rename : trunk/trunk/etherpad/src/static/img/feb09/home_firstp.png => trunk/etherpad/src/static/img/feb09/home_firstp.png rename : trunk/trunk/etherpad/src/static/img/feb09/home_firstp2.gif => trunk/etherpad/src/static/img/feb09/home_firstp2.gif rename : trunk/trunk/etherpad/src/static/img/feb09/home_h1.gif => trunk/etherpad/src/static/img/feb09/home_h1.gif rename : trunk/trunk/etherpad/src/static/img/feb09/home_h1.png => trunk/etherpad/src/static/img/feb09/home_h1.png rename : trunk/trunk/etherpad/src/static/img/feb09/home_newpadbutton.gif => trunk/etherpad/src/static/img/feb09/home_newpadbutton.gif rename : trunk/trunk/etherpad/src/static/img/feb09/home_newpadbutton.png => trunk/etherpad/src/static/img/feb09/home_newpadbutton.png rename : trunk/trunk/etherpad/src/static/img/feb09/home_newpadbutton2.gif => trunk/etherpad/src/static/img/feb09/home_newpadbutton2.gif rename : trunk/trunk/etherpad/src/static/img/feb09/home_newpadbutton_eepnet.gif => trunk/etherpad/src/static/img/feb09/home_newpadbutton_eepnet.gif rename : trunk/trunk/etherpad/src/static/img/feb09/hometop_back.gif => trunk/etherpad/src/static/img/feb09/hometop_back.gif rename : trunk/trunk/etherpad/src/static/img/feb09/nav1.gif => trunk/etherpad/src/static/img/feb09/nav1.gif rename : trunk/trunk/etherpad/src/static/img/feb09/nav1_back.gif => trunk/etherpad/src/static/img/feb09/nav1_back.gif rename : trunk/trunk/etherpad/src/static/img/feb09/nav2.gif => trunk/etherpad/src/static/img/feb09/nav2.gif rename : trunk/trunk/etherpad/src/static/img/feb09/screencast.gif => trunk/etherpad/src/static/img/feb09/screencast.gif rename : trunk/trunk/etherpad/src/static/img/home/etherpad-mainheader1.jpg => trunk/etherpad/src/static/img/home/etherpad-mainheader1.jpg rename : trunk/trunk/etherpad/src/static/img/home/headergradient.gif => trunk/etherpad/src/static/img/home/headergradient.gif rename : trunk/trunk/etherpad/src/static/img/home/homeheader1.jpg => trunk/etherpad/src/static/img/home/homeheader1.jpg rename : trunk/trunk/etherpad/src/static/img/home/homeheader2.jpg => trunk/etherpad/src/static/img/home/homeheader2.jpg rename : trunk/trunk/etherpad/src/static/img/home/leftgrad.gif => trunk/etherpad/src/static/img/home/leftgrad.gif rename : trunk/trunk/etherpad/src/static/img/home/pencilpaperback.png => trunk/etherpad/src/static/img/home/pencilpaperback.png rename : trunk/trunk/etherpad/src/static/img/home/screencapture1.gif => trunk/etherpad/src/static/img/home/screencapture1.gif rename : trunk/trunk/etherpad/src/static/img/home/underdevicon.gif => trunk/etherpad/src/static/img/home/underdevicon.gif rename : trunk/trunk/etherpad/src/static/img/icon/downarrow.gif => trunk/etherpad/src/static/img/icon/downarrow.gif rename : trunk/trunk/etherpad/src/static/img/icon/feed.gif => trunk/etherpad/src/static/img/icon/feed.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/backgrad.gif => trunk/etherpad/src/static/img/jun09/pad/backgrad.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/bottomareagfx.gif => trunk/etherpad/src/static/img/jun09/pad/bottomareagfx.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/colorpicker.gif => trunk/etherpad/src/static/img/jun09/pad/colorpicker.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/connectingbar.gif => trunk/etherpad/src/static/img/jun09/pad/connectingbar.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/connectionindicator.gif => trunk/etherpad/src/static/img/jun09/pad/connectionindicator.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/docbarstates.png => trunk/etherpad/src/static/img/jun09/pad/docbarstates.png rename : trunk/trunk/etherpad/src/static/img/jun09/pad/docbarstates2.png => trunk/etherpad/src/static/img/jun09/pad/docbarstates2.png rename : trunk/trunk/etherpad/src/static/img/jun09/pad/docbarstates3.png => trunk/etherpad/src/static/img/jun09/pad/docbarstates3.png rename : trunk/trunk/etherpad/src/static/img/jun09/pad/docpaneledge.png => trunk/etherpad/src/static/img/jun09/pad/docpaneledge.png rename : trunk/trunk/etherpad/src/static/img/jun09/pad/docpaneledge2.png => trunk/etherpad/src/static/img/jun09/pad/docpaneledge2.png rename : trunk/trunk/etherpad/src/static/img/jun09/pad/docpanelmiddle.png => trunk/etherpad/src/static/img/jun09/pad/docpanelmiddle.png rename : trunk/trunk/etherpad/src/static/img/jun09/pad/docpanelmiddle2.png => trunk/etherpad/src/static/img/jun09/pad/docpanelmiddle2.png rename : trunk/trunk/etherpad/src/static/img/jun09/pad/editbar.gif => trunk/etherpad/src/static/img/jun09/pad/editbar.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/editbar2.gif => trunk/etherpad/src/static/img/jun09/pad/editbar2.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/editbar3.gif => trunk/etherpad/src/static/img/jun09/pad/editbar3.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/editbarback.gif => trunk/etherpad/src/static/img/jun09/pad/editbarback.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/feedbackbox2.gif => trunk/etherpad/src/static/img/jun09/pad/feedbackbox2.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/fileicons.gif => trunk/etherpad/src/static/img/jun09/pad/fileicons.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/hdraggie.gif => trunk/etherpad/src/static/img/jun09/pad/hdraggie.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/inviteshare.gif => trunk/etherpad/src/static/img/jun09/pad/inviteshare.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/inviteshare2.gif => trunk/etherpad/src/static/img/jun09/pad/inviteshare2.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/layoutbuttons.gif => trunk/etherpad/src/static/img/jun09/pad/layoutbuttons.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/overlay.png => trunk/etherpad/src/static/img/jun09/pad/overlay.png rename : trunk/trunk/etherpad/src/static/img/jun09/pad/overlay2.png => trunk/etherpad/src/static/img/jun09/pad/overlay2.png rename : trunk/trunk/etherpad/src/static/img/jun09/pad/padtop.gif => trunk/etherpad/src/static/img/jun09/pad/padtop.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/padtop2.gif => trunk/etherpad/src/static/img/jun09/pad/padtop2.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/padtop3.gif => trunk/etherpad/src/static/img/jun09/pad/padtop3.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/padtop4.gif => trunk/etherpad/src/static/img/jun09/pad/padtop4.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/padtop5.gif => trunk/etherpad/src/static/img/jun09/pad/padtop5.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/padtopback.gif => trunk/etherpad/src/static/img/jun09/pad/padtopback.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/padtopback2.gif => trunk/etherpad/src/static/img/jun09/pad/padtopback2.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/protop.gif => trunk/etherpad/src/static/img/jun09/pad/protop.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/public.gif => trunk/etherpad/src/static/img/jun09/pad/public.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/savedrevarrows.gif => trunk/etherpad/src/static/img/jun09/pad/savedrevarrows.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/savedrevsgfx2.gif => trunk/etherpad/src/static/img/jun09/pad/savedrevsgfx2.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/sharebox2.gif => trunk/etherpad/src/static/img/jun09/pad/sharebox2.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/sharebox3.gif => trunk/etherpad/src/static/img/jun09/pad/sharebox3.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/sharebox4.gif => trunk/etherpad/src/static/img/jun09/pad/sharebox4.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/sharedistri.gif => trunk/etherpad/src/static/img/jun09/pad/sharedistri.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/syncdone.gif => trunk/etherpad/src/static/img/jun09/pad/syncdone.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/syncing.gif => trunk/etherpad/src/static/img/jun09/pad/syncing.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/syncing2.gif => trunk/etherpad/src/static/img/jun09/pad/syncing2.gif rename : trunk/trunk/etherpad/src/static/img/jun09/pad/viewbargfx.gif => trunk/etherpad/src/static/img/jun09/pad/viewbargfx.gif rename : trunk/trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-gloss-cyan-menu-item-hover.gif => trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-gloss-cyan-menu-item-hover.gif rename : trunk/trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-gloss-menu-item-hover.gif => trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-gloss-menu-item-hover.gif rename : trunk/trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-gloss-semitransparent-menu-item-hover.png => trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-gloss-semitransparent-menu-item-hover.png rename : trunk/trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-human-menu-item-hover.gif => trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-human-menu-item-hover.gif rename : trunk/trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-osx-menu-item-hover.gif => trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-osx-menu-item-hover.gif rename : trunk/trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-vista-bg.gif => trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-vista-bg.gif rename : trunk/trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-vista-menu-item-hover.gif => trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-vista-menu-item-hover.gif rename : trunk/trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-xp-bg.gif => trunk/etherpad/src/static/img/lib/jquery.contextmenu.images/cmenu-xp-bg.gif rename : trunk/trunk/etherpad/src/static/img/may09/bold.gif => trunk/etherpad/src/static/img/may09/bold.gif rename : trunk/trunk/etherpad/src/static/img/may09/doc.gif => trunk/etherpad/src/static/img/may09/doc.gif rename : trunk/trunk/etherpad/src/static/img/may09/doc.png => trunk/etherpad/src/static/img/may09/doc.png rename : trunk/trunk/etherpad/src/static/img/may09/html.gif => trunk/etherpad/src/static/img/may09/html.gif rename : trunk/trunk/etherpad/src/static/img/may09/html.png => trunk/etherpad/src/static/img/may09/html.png rename : trunk/trunk/etherpad/src/static/img/may09/italic.gif => trunk/etherpad/src/static/img/may09/italic.gif rename : trunk/trunk/etherpad/src/static/img/may09/leftarrow.gif => trunk/etherpad/src/static/img/may09/leftarrow.gif rename : trunk/trunk/etherpad/src/static/img/may09/leftarrow2.gif => trunk/etherpad/src/static/img/may09/leftarrow2.gif rename : trunk/trunk/etherpad/src/static/img/may09/link.gif => trunk/etherpad/src/static/img/may09/link.gif rename : trunk/trunk/etherpad/src/static/img/may09/link.png => trunk/etherpad/src/static/img/may09/link.png rename : trunk/trunk/etherpad/src/static/img/may09/odt.gif => trunk/etherpad/src/static/img/may09/odt.gif rename : trunk/trunk/etherpad/src/static/img/may09/odt.png => trunk/etherpad/src/static/img/may09/odt.png rename : trunk/trunk/etherpad/src/static/img/may09/padlock.gif => trunk/etherpad/src/static/img/may09/padlock.gif rename : trunk/trunk/etherpad/src/static/img/may09/padlockopen.gif => trunk/etherpad/src/static/img/may09/padlockopen.gif rename : trunk/trunk/etherpad/src/static/img/may09/passwordlocked.gif => trunk/etherpad/src/static/img/may09/passwordlocked.gif rename : trunk/trunk/etherpad/src/static/img/may09/passwordlocked_cropped.gif => trunk/etherpad/src/static/img/may09/passwordlocked_cropped.gif rename : trunk/trunk/etherpad/src/static/img/may09/passwordnone.gif => trunk/etherpad/src/static/img/may09/passwordnone.gif rename : trunk/trunk/etherpad/src/static/img/may09/paypal.gif => trunk/etherpad/src/static/img/may09/paypal.gif rename : trunk/trunk/etherpad/src/static/img/may09/pdf.gif => trunk/etherpad/src/static/img/may09/pdf.gif rename : trunk/trunk/etherpad/src/static/img/may09/pdf.png => trunk/etherpad/src/static/img/may09/pdf.png rename : trunk/trunk/etherpad/src/static/img/may09/redo.gif => trunk/etherpad/src/static/img/may09/redo.gif rename : trunk/trunk/etherpad/src/static/img/may09/txt.gif => trunk/etherpad/src/static/img/may09/txt.gif rename : trunk/trunk/etherpad/src/static/img/may09/txt.png => trunk/etherpad/src/static/img/may09/txt.png rename : trunk/trunk/etherpad/src/static/img/may09/underline.gif => trunk/etherpad/src/static/img/may09/underline.gif rename : trunk/trunk/etherpad/src/static/img/may09/undo.gif => trunk/etherpad/src/static/img/may09/undo.gif rename : trunk/trunk/etherpad/src/static/img/miniplane.gif => trunk/etherpad/src/static/img/miniplane.gif rename : trunk/trunk/etherpad/src/static/img/misc/diagnostic-links.gif => trunk/etherpad/src/static/img/misc/diagnostic-links.gif rename : trunk/trunk/etherpad/src/static/img/misc/status-ball.gif => trunk/etherpad/src/static/img/misc/status-ball.gif rename : trunk/trunk/etherpad/src/static/img/misc/traclogo.gif => trunk/etherpad/src/static/img/misc/traclogo.gif rename : trunk/trunk/etherpad/src/static/img/oct/atlonglast.gif => trunk/etherpad/src/static/img/oct/atlonglast.gif rename : trunk/trunk/etherpad/src/static/img/oct/banner1.jpg => trunk/etherpad/src/static/img/oct/banner1.jpg rename : trunk/trunk/etherpad/src/static/img/oct/banner2.jpg => trunk/etherpad/src/static/img/oct/banner2.jpg rename : trunk/trunk/etherpad/src/static/img/oct/banner3.jpg => trunk/etherpad/src/static/img/oct/banner3.jpg rename : trunk/trunk/etherpad/src/static/img/oct/banner4.jpg => trunk/etherpad/src/static/img/oct/banner4.jpg rename : trunk/trunk/etherpad/src/static/img/oct/banner5.gif => trunk/etherpad/src/static/img/oct/banner5.gif rename : trunk/trunk/etherpad/src/static/img/oct/banner6.gif => trunk/etherpad/src/static/img/oct/banner6.gif rename : trunk/trunk/etherpad/src/static/img/oct/banner7.gif => trunk/etherpad/src/static/img/oct/banner7.gif rename : trunk/trunk/etherpad/src/static/img/oct/banner8.gif => trunk/etherpad/src/static/img/oct/banner8.gif rename : trunk/trunk/etherpad/src/static/img/oct/banner9.gif => trunk/etherpad/src/static/img/oct/banner9.gif rename : trunk/trunk/etherpad/src/static/img/oct/bannerback5.gif => trunk/etherpad/src/static/img/oct/bannerback5.gif rename : trunk/trunk/etherpad/src/static/img/oct/bannerback6.gif => trunk/etherpad/src/static/img/oct/bannerback6.gif rename : trunk/trunk/etherpad/src/static/img/oct/bodyback1.gif => trunk/etherpad/src/static/img/oct/bodyback1.gif rename : trunk/trunk/etherpad/src/static/img/oct/bodyback2.gif => trunk/etherpad/src/static/img/oct/bodyback2.gif rename : trunk/trunk/etherpad/src/static/img/oct/bodyback3.gif => trunk/etherpad/src/static/img/oct/bodyback3.gif rename : trunk/trunk/etherpad/src/static/img/oct/bodyback4.gif => trunk/etherpad/src/static/img/oct/bodyback4.gif rename : trunk/trunk/etherpad/src/static/img/oct/bodyback5.gif => trunk/etherpad/src/static/img/oct/bodyback5.gif rename : trunk/trunk/etherpad/src/static/img/oct/bodybacktop1.gif => trunk/etherpad/src/static/img/oct/bodybacktop1.gif rename : trunk/trunk/etherpad/src/static/img/oct/computers.gif => trunk/etherpad/src/static/img/oct/computers.gif rename : trunk/trunk/etherpad/src/static/img/oct/computers2.gif => trunk/etherpad/src/static/img/oct/computers2.gif rename : trunk/trunk/etherpad/src/static/img/oct/glossyblue.gif => trunk/etherpad/src/static/img/oct/glossyblue.gif rename : trunk/trunk/etherpad/src/static/img/oct/glossyblue2.gif => trunk/etherpad/src/static/img/oct/glossyblue2.gif rename : trunk/trunk/etherpad/src/static/img/oct/glossyblueh.gif => trunk/etherpad/src/static/img/oct/glossyblueh.gif rename : trunk/trunk/etherpad/src/static/img/oct/insetrect.gif => trunk/etherpad/src/static/img/oct/insetrect.gif rename : trunk/trunk/etherpad/src/static/img/oct/minilogo1-05e.gif => trunk/etherpad/src/static/img/oct/minilogo1-05e.gif rename : trunk/trunk/etherpad/src/static/img/oct/minilogo1-07f.gif => trunk/etherpad/src/static/img/oct/minilogo1-07f.gif rename : trunk/trunk/etherpad/src/static/img/oct/minilogo3.jpg => trunk/etherpad/src/static/img/oct/minilogo3.jpg rename : trunk/trunk/etherpad/src/static/img/oct/minitopback1.gif => trunk/etherpad/src/static/img/oct/minitopback1.gif rename : trunk/trunk/etherpad/src/static/img/oct/minitopback2.gif => trunk/etherpad/src/static/img/oct/minitopback2.gif rename : trunk/trunk/etherpad/src/static/img/oct/minitopbar1-05e.gif => trunk/etherpad/src/static/img/oct/minitopbar1-05e.gif rename : trunk/trunk/etherpad/src/static/img/oct/minitopbar2-05e.gif => trunk/etherpad/src/static/img/oct/minitopbar2-05e.gif rename : trunk/trunk/etherpad/src/static/img/oct/minitopbar2-07f.gif => trunk/etherpad/src/static/img/oct/minitopbar2-07f.gif rename : trunk/trunk/etherpad/src/static/img/oct/minitopbar3.jpg => trunk/etherpad/src/static/img/oct/minitopbar3.jpg rename : trunk/trunk/etherpad/src/static/img/oct/minitopbar4.gif => trunk/etherpad/src/static/img/oct/minitopbar4.gif rename : trunk/trunk/etherpad/src/static/img/oct/minitoplogo1.gif => trunk/etherpad/src/static/img/oct/minitoplogo1.gif rename : trunk/trunk/etherpad/src/static/img/oct/minitoplogo2.gif => trunk/etherpad/src/static/img/oct/minitoplogo2.gif rename : trunk/trunk/etherpad/src/static/img/oct/newpadmain.gif => trunk/etherpad/src/static/img/oct/newpadmain.gif rename : trunk/trunk/etherpad/src/static/img/oct/newpadmainback.gif => trunk/etherpad/src/static/img/oct/newpadmainback.gif rename : trunk/trunk/etherpad/src/static/img/oct/newpadmainbackh.gif => trunk/etherpad/src/static/img/oct/newpadmainbackh.gif rename : trunk/trunk/etherpad/src/static/img/oct/pageshot.png => trunk/etherpad/src/static/img/oct/pageshot.png rename : trunk/trunk/etherpad/src/static/img/oct/pageshotmini.png => trunk/etherpad/src/static/img/oct/pageshotmini.png rename : trunk/trunk/etherpad/src/static/img/oct/sidehead-gradhilite.gif => trunk/etherpad/src/static/img/oct/sidehead-gradhilite.gif rename : trunk/trunk/etherpad/src/static/img/oct/tinytriangle.gif => trunk/etherpad/src/static/img/oct/tinytriangle.gif rename : trunk/trunk/etherpad/src/static/img/oct/topnav1.gif => trunk/etherpad/src/static/img/oct/topnav1.gif rename : trunk/trunk/etherpad/src/static/img/oct/topnav2.gif => trunk/etherpad/src/static/img/oct/topnav2.gif rename : trunk/trunk/etherpad/src/static/img/oct/topnav3.gif => trunk/etherpad/src/static/img/oct/topnav3.gif rename : trunk/trunk/etherpad/src/static/img/oct/topnav4.gif => trunk/etherpad/src/static/img/oct/topnav4.gif rename : trunk/trunk/etherpad/src/static/img/oct/topnav5.gif => trunk/etherpad/src/static/img/oct/topnav5.gif rename : trunk/trunk/etherpad/src/static/img/oct/topnav6.gif => trunk/etherpad/src/static/img/oct/topnav6.gif rename : trunk/trunk/etherpad/src/static/img/oct/topnavback1.gif => trunk/etherpad/src/static/img/oct/topnavback1.gif rename : trunk/trunk/etherpad/src/static/img/oct/topnavback2.gif => trunk/etherpad/src/static/img/oct/topnavback2.gif rename : trunk/trunk/etherpad/src/static/img/oct/topnavback3.gif => trunk/etherpad/src/static/img/oct/topnavback3.gif rename : trunk/trunk/etherpad/src/static/img/oct/usecasesnavdown.gif => trunk/etherpad/src/static/img/oct/usecasesnavdown.gif rename : trunk/trunk/etherpad/src/static/img/oct/usecasesnavdownh.gif => trunk/etherpad/src/static/img/oct/usecasesnavdownh.gif rename : trunk/trunk/etherpad/src/static/img/oct/usecasesnavup.gif => trunk/etherpad/src/static/img/oct/usecasesnavup.gif rename : trunk/trunk/etherpad/src/static/img/oct/usecasesnavuph.gif => trunk/etherpad/src/static/img/oct/usecasesnavuph.gif rename : trunk/trunk/etherpad/src/static/img/oct/watchscreencast.gif => trunk/etherpad/src/static/img/oct/watchscreencast.gif rename : trunk/trunk/etherpad/src/static/img/pad/animated-orb-orange-12.gif => trunk/etherpad/src/static/img/pad/animated-orb-orange-12.gif rename : trunk/trunk/etherpad/src/static/img/pad/backgrad.png => trunk/etherpad/src/static/img/pad/backgrad.png rename : trunk/trunk/etherpad/src/static/img/pad/backshadow/backshadow-940-20-eee-20.gif => trunk/etherpad/src/static/img/pad/backshadow/backshadow-940-20-eee-20.gif rename : trunk/trunk/etherpad/src/static/img/pad/backshadow/backshadow-940-20-fff-20.gif => trunk/etherpad/src/static/img/pad/backshadow/backshadow-940-20-fff-20.gif rename : trunk/trunk/etherpad/src/static/img/pad/backshadow/backshadow-940-20-fff-40.gif => trunk/etherpad/src/static/img/pad/backshadow/backshadow-940-20-fff-40.gif rename : trunk/trunk/etherpad/src/static/img/pad/backshadow/backshadow-940-20-fff-60.gif => trunk/etherpad/src/static/img/pad/backshadow/backshadow-940-20-fff-60.gif rename : trunk/trunk/etherpad/src/static/img/pad/backshadow/botshadow-940-20-eee-20.gif => trunk/etherpad/src/static/img/pad/backshadow/botshadow-940-20-eee-20.gif rename : trunk/trunk/etherpad/src/static/img/pad/etherpad-logo-small-grad.gif => trunk/etherpad/src/static/img/pad/etherpad-logo-small-grad.gif rename : trunk/trunk/etherpad/src/static/img/pad/etherpad-logo-small.gif => trunk/etherpad/src/static/img/pad/etherpad-logo-small.gif rename : trunk/trunk/etherpad/src/static/img/pad/etherpad-logo-small2.gif => trunk/etherpad/src/static/img/pad/etherpad-logo-small2.gif rename : trunk/trunk/etherpad/src/static/img/pad/expandy-arrow-down.gif => trunk/etherpad/src/static/img/pad/expandy-arrow-down.gif rename : trunk/trunk/etherpad/src/static/img/pad/expandy-arrow-right.gif => trunk/etherpad/src/static/img/pad/expandy-arrow-right.gif rename : trunk/trunk/etherpad/src/static/img/pad/expandy-arrow6-down-active.gif => trunk/etherpad/src/static/img/pad/expandy-arrow6-down-active.gif rename : trunk/trunk/etherpad/src/static/img/pad/expandy-arrow6-down.gif => trunk/etherpad/src/static/img/pad/expandy-arrow6-down.gif rename : trunk/trunk/etherpad/src/static/img/pad/expandy-arrow6-right-active.gif => trunk/etherpad/src/static/img/pad/expandy-arrow6-right-active.gif rename : trunk/trunk/etherpad/src/static/img/pad/expandy-arrow6-right.gif => trunk/etherpad/src/static/img/pad/expandy-arrow6-right.gif rename : trunk/trunk/etherpad/src/static/img/pad/header-revgrad.gif => trunk/etherpad/src/static/img/pad/header-revgrad.gif rename : trunk/trunk/etherpad/src/static/img/pad/newpad.gif => trunk/etherpad/src/static/img/pad/newpad.gif rename : trunk/trunk/etherpad/src/static/img/pad/orb-greenred-12.gif => trunk/etherpad/src/static/img/pad/orb-greenred-12.gif rename : trunk/trunk/etherpad/src/static/img/pad/padbg1.jpg => trunk/etherpad/src/static/img/pad/padbg1.jpg rename : trunk/trunk/etherpad/src/static/img/pad/padbg2.jpg => trunk/etherpad/src/static/img/pad/padbg2.jpg rename : trunk/trunk/etherpad/src/static/img/pad/padbg3.jpg => trunk/etherpad/src/static/img/pad/padbg3.jpg rename : trunk/trunk/etherpad/src/static/img/pad/padbg4.jpg => trunk/etherpad/src/static/img/pad/padbg4.jpg rename : trunk/trunk/etherpad/src/static/img/pad/padbg5.jpg => trunk/etherpad/src/static/img/pad/padbg5.jpg rename : trunk/trunk/etherpad/src/static/img/pad/padhead1.jpg => trunk/etherpad/src/static/img/pad/padhead1.jpg rename : trunk/trunk/etherpad/src/static/img/pad/padhead2.jpg => trunk/etherpad/src/static/img/pad/padhead2.jpg rename : trunk/trunk/etherpad/src/static/img/pad/padhead3.jpg => trunk/etherpad/src/static/img/pad/padhead3.jpg rename : trunk/trunk/etherpad/src/static/img/pad/pencil-icon-small-blue.gif => trunk/etherpad/src/static/img/pad/pencil-icon-small-blue.gif rename : trunk/trunk/etherpad/src/static/img/pad/sidehead-grad.gif => trunk/etherpad/src/static/img/pad/sidehead-grad.gif rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/button_depressed.png => trunk/etherpad/src/static/img/pad/timeslider/button_depressed.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/button_undepressed.png => trunk/etherpad/src/static/img/pad/timeslider/button_undepressed.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/crushed_button_depressed.png => trunk/etherpad/src/static/img/pad/timeslider/crushed_button_depressed.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/crushed_button_undepressed.png => trunk/etherpad/src/static/img/pad/timeslider/crushed_button_undepressed.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/crushed_current_location.png => trunk/etherpad/src/static/img/pad/timeslider/crushed_current_location.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/crushed_pause.png => trunk/etherpad/src/static/img/pad/timeslider/crushed_pause.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/crushed_play.png => trunk/etherpad/src/static/img/pad/timeslider/crushed_play.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/crushed_play_button.png => trunk/etherpad/src/static/img/pad/timeslider/crushed_play_button.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/crushed_timeslider_mockup.png => trunk/etherpad/src/static/img/pad/timeslider/crushed_timeslider_mockup.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/current_location.gif => trunk/etherpad/src/static/img/pad/timeslider/current_location.gif rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/current_location.png => trunk/etherpad/src/static/img/pad/timeslider/current_location.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/pause.gif => trunk/etherpad/src/static/img/pad/timeslider/pause.gif rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/pause.png => trunk/etherpad/src/static/img/pad/timeslider/pause.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/play.gif => trunk/etherpad/src/static/img/pad/timeslider/play.gif rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/play.png => trunk/etherpad/src/static/img/pad/timeslider/play.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/play_button.png => trunk/etherpad/src/static/img/pad/timeslider/play_button.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/star.gif => trunk/etherpad/src/static/img/pad/timeslider/star.gif rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/star.png => trunk/etherpad/src/static/img/pad/timeslider/star.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/star_selected.png => trunk/etherpad/src/static/img/pad/timeslider/star_selected.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/stepper_buttons.png => trunk/etherpad/src/static/img/pad/timeslider/stepper_buttons.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/timeslider_background.png => trunk/etherpad/src/static/img/pad/timeslider/timeslider_background.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/timeslider_left.png => trunk/etherpad/src/static/img/pad/timeslider/timeslider_left.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/timeslider_mockup.png => trunk/etherpad/src/static/img/pad/timeslider/timeslider_mockup.png rename : trunk/trunk/etherpad/src/static/img/pad/timeslider/timeslider_right.png => trunk/etherpad/src/static/img/pad/timeslider/timeslider_right.png rename : trunk/trunk/etherpad/src/static/img/pricing/free.gif => trunk/etherpad/src/static/img/pricing/free.gif rename : trunk/trunk/etherpad/src/static/img/pricing/group.gif => trunk/etherpad/src/static/img/pricing/group.gif rename : trunk/trunk/etherpad/src/static/img/pricing/on-demand.gif => trunk/etherpad/src/static/img/pricing/on-demand.gif rename : trunk/trunk/etherpad/src/static/img/pricing/private-network.gif => trunk/etherpad/src/static/img/pricing/private-network.gif rename : trunk/trunk/etherpad/src/static/img/pricing/support.gif => trunk/etherpad/src/static/img/pricing/support.gif rename : trunk/trunk/etherpad/src/static/img/pro/billing/cards-button.gif => trunk/etherpad/src/static/img/pro/billing/cards-button.gif rename : trunk/trunk/etherpad/src/static/img/pro/box/blue-boxtop.gif => trunk/etherpad/src/static/img/pro/box/blue-boxtop.gif rename : trunk/trunk/etherpad/src/static/img/pro/buttons/bluebutton120.gif => trunk/etherpad/src/static/img/pro/buttons/bluebutton120.gif rename : trunk/trunk/etherpad/src/static/img/pro/header/pro-header-back.gif => trunk/etherpad/src/static/img/pro/header/pro-header-back.gif rename : trunk/trunk/etherpad/src/static/img/pro/header/pro-header-logo.png => trunk/etherpad/src/static/img/pro/header/pro-header-logo.png rename : trunk/trunk/etherpad/src/static/img/pro/header/pro-header-plustopnav-back.gif => trunk/etherpad/src/static/img/pro/header/pro-header-plustopnav-back.gif rename : trunk/trunk/etherpad/src/static/img/pro/padlist/gear-drop.gif => trunk/etherpad/src/static/img/pro/padlist/gear-drop.gif rename : trunk/trunk/etherpad/src/static/img/pro/padlist/paper-icon.gif => trunk/etherpad/src/static/img/pro/padlist/paper-icon.gif rename : trunk/trunk/etherpad/src/static/img/pro/padlist/trash-icon.gif => trunk/etherpad/src/static/img/pro/padlist/trash-icon.gif rename : trunk/trunk/etherpad/src/static/img/pro/topnav/pro-topnav-back.gif => trunk/etherpad/src/static/img/pro/topnav/pro-topnav-back.gif rename : trunk/trunk/etherpad/src/static/img/pro/topnav/pro-topnav-notch.gif => trunk/etherpad/src/static/img/pro/topnav/pro-topnav-notch.gif rename : trunk/trunk/etherpad/src/static/img/tinyplane.gif => trunk/etherpad/src/static/img/tinyplane.gif rename : trunk/trunk/etherpad/src/static/img/wavejet.jpg => trunk/etherpad/src/static/img/wavejet.jpg rename : trunk/trunk/etherpad/src/static/js/ace.js => trunk/etherpad/src/static/js/ace.js rename : trunk/trunk/etherpad/src/static/js/billing.js => trunk/etherpad/src/static/js/billing.js rename : trunk/trunk/etherpad/src/static/js/billing_shared.js => trunk/etherpad/src/static/js/billing_shared.js rename : trunk/trunk/etherpad/src/static/js/broadcast.js => trunk/etherpad/src/static/js/broadcast.js rename : trunk/trunk/etherpad/src/static/js/broadcast_revisions.js => trunk/etherpad/src/static/js/broadcast_revisions.js rename : trunk/trunk/etherpad/src/static/js/broadcast_slider.js => trunk/etherpad/src/static/js/broadcast_slider.js rename : trunk/trunk/etherpad/src/static/js/collab_client.js => trunk/etherpad/src/static/js/collab_client.js rename : trunk/trunk/etherpad/src/static/js/colorutils.js => trunk/etherpad/src/static/js/colorutils.js rename : trunk/trunk/etherpad/src/static/js/confirmation.js => trunk/etherpad/src/static/js/confirmation.js rename : trunk/trunk/etherpad/src/static/js/connection_diagnostics.js => trunk/etherpad/src/static/js/connection_diagnostics.js rename : trunk/trunk/etherpad/src/static/js/cssmanager_client.js => trunk/etherpad/src/static/js/cssmanager_client.js rename : trunk/trunk/etherpad/src/static/js/domline_client.js => trunk/etherpad/src/static/js/domline_client.js rename : trunk/trunk/etherpad/src/static/js/draggable.js => trunk/etherpad/src/static/js/draggable.js rename : trunk/trunk/etherpad/src/static/js/easysync2_client.js => trunk/etherpad/src/static/js/easysync2_client.js rename : trunk/trunk/etherpad/src/static/js/etherpad.js => trunk/etherpad/src/static/js/etherpad.js rename : trunk/trunk/etherpad/src/static/js/jquery-1.2.6.js => trunk/etherpad/src/static/js/jquery-1.2.6.js rename : trunk/trunk/etherpad/src/static/js/jquery-1.3.2.js => trunk/etherpad/src/static/js/jquery-1.3.2.js rename : trunk/trunk/etherpad/src/static/js/json2.js => trunk/etherpad/src/static/js/json2.js rename : trunk/trunk/etherpad/src/static/js/lib/jquery.contextmenu.js => trunk/etherpad/src/static/js/lib/jquery.contextmenu.js rename : trunk/trunk/etherpad/src/static/js/linestylefilter_client.js => trunk/etherpad/src/static/js/linestylefilter_client.js rename : trunk/trunk/etherpad/src/static/js/pad.js.old => trunk/etherpad/src/static/js/pad.js.old rename : trunk/trunk/etherpad/src/static/js/pad2.js => trunk/etherpad/src/static/js/pad2.js rename : trunk/trunk/etherpad/src/static/js/pad_chat.js => trunk/etherpad/src/static/js/pad_chat.js rename : trunk/trunk/etherpad/src/static/js/pad_connectionstatus.js => trunk/etherpad/src/static/js/pad_connectionstatus.js rename : trunk/trunk/etherpad/src/static/js/pad_cookie.js => trunk/etherpad/src/static/js/pad_cookie.js rename : trunk/trunk/etherpad/src/static/js/pad_docbar.js => trunk/etherpad/src/static/js/pad_docbar.js rename : trunk/trunk/etherpad/src/static/js/pad_editbar.js => trunk/etherpad/src/static/js/pad_editbar.js rename : trunk/trunk/etherpad/src/static/js/pad_editor.js => trunk/etherpad/src/static/js/pad_editor.js rename : trunk/trunk/etherpad/src/static/js/pad_impexp.js => trunk/etherpad/src/static/js/pad_impexp.js rename : trunk/trunk/etherpad/src/static/js/pad_modals.js => trunk/etherpad/src/static/js/pad_modals.js rename : trunk/trunk/etherpad/src/static/js/pad_savedrevs.js => trunk/etherpad/src/static/js/pad_savedrevs.js rename : trunk/trunk/etherpad/src/static/js/pad_userlist.js => trunk/etherpad/src/static/js/pad_userlist.js rename : trunk/trunk/etherpad/src/static/js/pad_utils.js => trunk/etherpad/src/static/js/pad_utils.js rename : trunk/trunk/etherpad/src/static/js/pricing.js => trunk/etherpad/src/static/js/pricing.js rename : trunk/trunk/etherpad/src/static/js/pro/guest-knock-client.js => trunk/etherpad/src/static/js/pro/guest-knock-client.js rename : trunk/trunk/etherpad/src/static/js/pro/pro-padlist-client.js => trunk/etherpad/src/static/js/pro/pro-padlist-client.js rename : trunk/trunk/etherpad/src/static/js/pro/signin-client.js => trunk/etherpad/src/static/js/pro/signin-client.js rename : trunk/trunk/etherpad/src/static/js/pulse.jquery.js => trunk/etherpad/src/static/js/pulse.jquery.js rename : trunk/trunk/etherpad/src/static/js/statpage.js => trunk/etherpad/src/static/js/statpage.js rename : trunk/trunk/etherpad/src/static/js/store.js => trunk/etherpad/src/static/js/store.js rename : trunk/trunk/etherpad/src/static/js/swfobject.js => trunk/etherpad/src/static/js/swfobject.js rename : trunk/trunk/etherpad/src/static/js/timeslider.js => trunk/etherpad/src/static/js/timeslider.js rename : trunk/trunk/etherpad/src/static/js/undo-xpopup.js => trunk/etherpad/src/static/js/undo-xpopup.js rename : trunk/trunk/etherpad/src/static/swf/vidplayer.swf => trunk/etherpad/src/static/swf/vidplayer.swf rename : trunk/trunk/etherpad/src/templates/500_body.ejs => trunk/etherpad/src/templates/500_body.ejs rename : trunk/trunk/etherpad/src/templates/beta/signup.ejs => trunk/etherpad/src/templates/beta/signup.ejs rename : trunk/trunk/etherpad/src/templates/email/eepnet_license_info.ejs => trunk/etherpad/src/templates/email/eepnet_license_info.ejs rename : trunk/trunk/etherpad/src/templates/email/eepnet_purchase_receipt.ejs => trunk/etherpad/src/templates/email/eepnet_purchase_receipt.ejs rename : trunk/trunk/etherpad/src/templates/email/padinvite.ejs => trunk/etherpad/src/templates/email/padinvite.ejs rename : trunk/trunk/etherpad/src/templates/email/pro_beta_invite.ejs => trunk/etherpad/src/templates/email/pro_beta_invite.ejs rename : trunk/trunk/etherpad/src/templates/email/pro_payment_failure.ejs => trunk/etherpad/src/templates/email/pro_payment_failure.ejs rename : trunk/trunk/etherpad/src/templates/email/pro_payment_receipt.ejs => trunk/etherpad/src/templates/email/pro_payment_receipt.ejs rename : trunk/trunk/etherpad/src/templates/framed/framedfooter.ejs => trunk/etherpad/src/templates/framed/framedfooter.ejs rename : trunk/trunk/etherpad/src/templates/framed/framedheader-pro.ejs => trunk/etherpad/src/templates/framed/framedheader-pro.ejs rename : trunk/trunk/etherpad/src/templates/framed/framedheader.ejs => trunk/etherpad/src/templates/framed/framedheader.ejs rename : trunk/trunk/etherpad/src/templates/framed/framedpage-pro.ejs => trunk/etherpad/src/templates/framed/framedpage-pro.ejs rename : trunk/trunk/etherpad/src/templates/framed/framedpage.ejs => trunk/etherpad/src/templates/framed/framedpage.ejs rename : trunk/trunk/etherpad/src/templates/html.ejs => trunk/etherpad/src/templates/html.ejs rename : trunk/trunk/etherpad/src/templates/main/home.ejs => trunk/etherpad/src/templates/main/home.ejs rename : trunk/trunk/etherpad/src/templates/main/pro_signup_body.ejs => trunk/etherpad/src/templates/main/pro_signup_body.ejs rename : trunk/trunk/etherpad/src/templates/misc/pad_default.ejs => trunk/etherpad/src/templates/misc/pad_default.ejs rename : trunk/trunk/etherpad/src/templates/notice.ejs => trunk/etherpad/src/templates/notice.ejs rename : trunk/trunk/etherpad/src/templates/pad/create_body.ejs => trunk/etherpad/src/templates/pad/create_body.ejs rename : trunk/trunk/etherpad/src/templates/pad/create_body_rafter.ejs => trunk/etherpad/src/templates/pad/create_body_rafter.ejs rename : trunk/trunk/etherpad/src/templates/pad/exporthtml.ejs => trunk/etherpad/src/templates/pad/exporthtml.ejs rename : trunk/trunk/etherpad/src/templates/pad/pad_body.ejs => trunk/etherpad/src/templates/pad/pad_body.ejs rename : trunk/trunk/etherpad/src/templates/pad/pad_body2.ejs => trunk/etherpad/src/templates/pad/pad_body2.ejs rename : trunk/trunk/etherpad/src/templates/pad/pad_content.ejs => trunk/etherpad/src/templates/pad/pad_content.ejs rename : trunk/trunk/etherpad/src/templates/pad/pad_download_link.ejs => trunk/etherpad/src/templates/pad/pad_download_link.ejs rename : trunk/trunk/etherpad/src/templates/pad/pad_iphone_body.ejs => trunk/etherpad/src/templates/pad/pad_iphone_body.ejs rename : trunk/trunk/etherpad/src/templates/pad/padfull_body.ejs => trunk/etherpad/src/templates/pad/padfull_body.ejs rename : trunk/trunk/etherpad/src/templates/pad/padslider_body.ejs => trunk/etherpad/src/templates/pad/padslider_body.ejs rename : trunk/trunk/etherpad/src/templates/pad/padview_body.ejs => trunk/etherpad/src/templates/pad/padview_body.ejs rename : trunk/trunk/etherpad/src/templates/pad/total_users_exceeded.ejs => trunk/etherpad/src/templates/pad/total_users_exceeded.ejs rename : trunk/trunk/etherpad/src/templates/pro-account/recover.ejs => trunk/etherpad/src/templates/pro-account/recover.ejs rename : trunk/trunk/etherpad/src/templates/pro-account/sign-in.ejs => trunk/etherpad/src/templates/pro-account/sign-in.ejs rename : trunk/trunk/etherpad/src/templates/pro-help/billing.ejs => trunk/etherpad/src/templates/pro-help/billing.ejs rename : trunk/trunk/etherpad/src/templates/pro-help/essentials.ejs => trunk/etherpad/src/templates/pro-help/essentials.ejs rename : trunk/trunk/etherpad/src/templates/pro-help/main.ejs => trunk/etherpad/src/templates/pro-help/main.ejs rename : trunk/trunk/etherpad/src/templates/pro-help/pro-help-template.ejs => trunk/etherpad/src/templates/pro-help/pro-help-template.ejs rename : trunk/trunk/etherpad/src/templates/pro/account/account-welcome-email.ejs => trunk/etherpad/src/templates/pro/account/account-welcome-email.ejs rename : trunk/trunk/etherpad/src/templates/pro/account/create-admin-account.ejs => trunk/etherpad/src/templates/pro/account/create-admin-account.ejs rename : trunk/trunk/etherpad/src/templates/pro/account/forgot-password-email.ejs => trunk/etherpad/src/templates/pro/account/forgot-password-email.ejs rename : trunk/trunk/etherpad/src/templates/pro/account/forgot-password.ejs => trunk/etherpad/src/templates/pro/account/forgot-password.ejs rename : trunk/trunk/etherpad/src/templates/pro/account/global-multi-domain-recover-email.ejs => trunk/etherpad/src/templates/pro/account/global-multi-domain-recover-email.ejs rename : trunk/trunk/etherpad/src/templates/pro/account/guest-knock.ejs => trunk/etherpad/src/templates/pro/account/guest-knock.ejs rename : trunk/trunk/etherpad/src/templates/pro/account/my-account.ejs => trunk/etherpad/src/templates/pro/account/my-account.ejs rename : trunk/trunk/etherpad/src/templates/pro/account/signin-guest.ejs => trunk/etherpad/src/templates/pro/account/signin-guest.ejs rename : trunk/trunk/etherpad/src/templates/pro/account/signin.ejs => trunk/etherpad/src/templates/pro/account/signin.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/account-manager.ejs => trunk/etherpad/src/templates/pro/admin/account-manager.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/admin-template.ejs => trunk/etherpad/src/templates/pro/admin/admin-template.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/admin.ejs => trunk/etherpad/src/templates/pro/admin/admin.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/billing-invoices.ejs => trunk/etherpad/src/templates/pro/admin/billing-invoices.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/delete-account.ejs => trunk/etherpad/src/templates/pro/admin/delete-account.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/manage-account.ejs => trunk/etherpad/src/templates/pro/admin/manage-account.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/manage-billing.ejs => trunk/etherpad/src/templates/pro/admin/manage-billing.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/new-account.ejs => trunk/etherpad/src/templates/pro/admin/new-account.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/pne-config.ejs => trunk/etherpad/src/templates/pro/admin/pne-config.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/pne-dashboard.ejs => trunk/etherpad/src/templates/pro/admin/pne-dashboard.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs => trunk/etherpad/src/templates/pro/admin/pne-license-manager.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/pne-shell.ejs => trunk/etherpad/src/templates/pro/admin/pne-shell.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/pro-config.ejs => trunk/etherpad/src/templates/pro/admin/pro-config.ejs rename : trunk/trunk/etherpad/src/templates/pro/admin/single-invoice.ejs => trunk/etherpad/src/templates/pro/admin/single-invoice.ejs rename : trunk/trunk/etherpad/src/templates/pro/padlist/pro-padlist.ejs => trunk/etherpad/src/templates/pro/padlist/pro-padlist.ejs rename : trunk/trunk/etherpad/src/templates/pro/pro-payment-required.ejs => trunk/etherpad/src/templates/pro/pro-payment-required.ejs rename : trunk/trunk/etherpad/src/templates/pro/pro_home.ejs => trunk/etherpad/src/templates/pro/pro_home.ejs rename : trunk/trunk/etherpad/src/templates/statistics/stat_page.ejs => trunk/etherpad/src/templates/statistics/stat_page.ejs rename : trunk/trunk/etherpad/src/templates/store/csc-help.ejs => trunk/etherpad/src/templates/store/csc-help.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs => trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs => trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs => trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs => trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet-checkout/license-info.ejs => trunk/etherpad/src/templates/store/eepnet-checkout/license-info.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet-checkout/purchase.ejs => trunk/etherpad/src/templates/store/eepnet-checkout/purchase.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs => trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs => trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs => trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet_download.ejs => trunk/etherpad/src/templates/store/eepnet_download.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet_eval_nextsteps.ejs => trunk/etherpad/src/templates/store/eepnet_eval_nextsteps.ejs rename : trunk/trunk/etherpad/src/templates/store/eepnet_eval_signup.ejs => trunk/etherpad/src/templates/store/eepnet_eval_signup.ejs rename : trunk/trunk/infrastructure/.gitignore => trunk/infrastructure/.gitignore rename : trunk/trunk/infrastructure/ace/.gitignore => trunk/infrastructure/ace/.gitignore rename : trunk/trunk/infrastructure/ace/bin/backup.sh => trunk/infrastructure/ace/bin/backup.sh rename : trunk/trunk/infrastructure/ace/bin/jsmin.py => trunk/infrastructure/ace/bin/jsmin.py rename : trunk/trunk/infrastructure/ace/bin/make => trunk/infrastructure/ace/bin/make rename : trunk/trunk/infrastructure/ace/bin/publish.sh => trunk/infrastructure/ace/bin/publish.sh rename : trunk/trunk/infrastructure/ace/bin/serve => trunk/infrastructure/ace/bin/serve rename : trunk/trunk/infrastructure/ace/blog.txt => trunk/infrastructure/ace/blog.txt rename : trunk/trunk/infrastructure/ace/build/.gitignore => trunk/infrastructure/ace/build/.gitignore rename : trunk/trunk/infrastructure/ace/build/index.html => trunk/infrastructure/ace/build/index.html rename : trunk/trunk/infrastructure/ace/build/jquery-1.2.1.js => trunk/infrastructure/ace/build/jquery-1.2.1.js rename : trunk/trunk/infrastructure/ace/build/testcode.js => trunk/infrastructure/ace/build/testcode.js rename : trunk/trunk/infrastructure/ace/easysync-notes.txt => trunk/infrastructure/ace/easysync-notes.txt rename : trunk/trunk/infrastructure/ace/lib/rhino-js-1.7r1.jar => trunk/infrastructure/ace/lib/rhino-js-1.7r1.jar rename : trunk/trunk/infrastructure/ace/lib/yuicompressor-2.4-appjet.jar => trunk/infrastructure/ace/lib/yuicompressor-2.4-appjet.jar rename : trunk/trunk/infrastructure/ace/notes.txt => trunk/infrastructure/ace/notes.txt rename : trunk/trunk/infrastructure/ace/www/ace2_common.js => trunk/infrastructure/ace/www/ace2_common.js rename : trunk/trunk/infrastructure/ace/www/ace2_common_dev.js => trunk/infrastructure/ace/www/ace2_common_dev.js rename : trunk/trunk/infrastructure/ace/www/ace2_inner.js => trunk/infrastructure/ace/www/ace2_inner.js rename : trunk/trunk/infrastructure/ace/www/ace2_outer.js => trunk/infrastructure/ace/www/ace2_outer.js rename : trunk/trunk/infrastructure/ace/www/ace2_wrapper.js => trunk/infrastructure/ace/www/ace2_wrapper.js rename : trunk/trunk/infrastructure/ace/www/bbtree.js => trunk/infrastructure/ace/www/bbtree.js rename : trunk/trunk/infrastructure/ace/www/changesettracker.js => trunk/infrastructure/ace/www/changesettracker.js rename : trunk/trunk/infrastructure/ace/www/colorutils.js => trunk/infrastructure/ace/www/colorutils.js rename : trunk/trunk/infrastructure/ace/www/contentcollector.js => trunk/infrastructure/ace/www/contentcollector.js rename : trunk/trunk/infrastructure/ace/www/cssmanager.js => trunk/infrastructure/ace/www/cssmanager.js rename : trunk/trunk/infrastructure/ace/www/dev.html => trunk/infrastructure/ace/www/dev.html rename : trunk/trunk/infrastructure/ace/www/domline.js => trunk/infrastructure/ace/www/domline.js rename : trunk/trunk/infrastructure/ace/www/easy_sync.js => trunk/infrastructure/ace/www/easy_sync.js rename : trunk/trunk/infrastructure/ace/www/easysync2.js => trunk/infrastructure/ace/www/easysync2.js rename : trunk/trunk/infrastructure/ace/www/easysync2_tests.js => trunk/infrastructure/ace/www/easysync2_tests.js rename : trunk/trunk/infrastructure/ace/www/editor.css => trunk/infrastructure/ace/www/editor.css rename : trunk/trunk/infrastructure/ace/www/firebug/errorIcon.png => trunk/infrastructure/ace/www/firebug/errorIcon.png rename : trunk/trunk/infrastructure/ace/www/firebug/firebug.css => trunk/infrastructure/ace/www/firebug/firebug.css rename : trunk/trunk/infrastructure/ace/www/firebug/firebug.html => trunk/infrastructure/ace/www/firebug/firebug.html rename : trunk/trunk/infrastructure/ace/www/firebug/firebug.js => trunk/infrastructure/ace/www/firebug/firebug.js rename : trunk/trunk/infrastructure/ace/www/firebug/firebugx.js => trunk/infrastructure/ace/www/firebug/firebugx.js rename : trunk/trunk/infrastructure/ace/www/firebug/infoIcon.png => trunk/infrastructure/ace/www/firebug/infoIcon.png rename : trunk/trunk/infrastructure/ace/www/firebug/warningIcon.png => trunk/infrastructure/ace/www/firebug/warningIcon.png rename : trunk/trunk/infrastructure/ace/www/index.html => trunk/infrastructure/ace/www/index.html rename : trunk/trunk/infrastructure/ace/www/inner.css => trunk/infrastructure/ace/www/inner.css rename : trunk/trunk/infrastructure/ace/www/jquery-1.2.1.js => trunk/infrastructure/ace/www/jquery-1.2.1.js rename : trunk/trunk/infrastructure/ace/www/lang_html.js => trunk/infrastructure/ace/www/lang_html.js rename : trunk/trunk/infrastructure/ace/www/lang_js.js => trunk/infrastructure/ace/www/lang_js.js rename : trunk/trunk/infrastructure/ace/www/lexer_support.js => trunk/infrastructure/ace/www/lexer_support.js rename : trunk/trunk/infrastructure/ace/www/linestylefilter.js => trunk/infrastructure/ace/www/linestylefilter.js rename : trunk/trunk/infrastructure/ace/www/magicdom.js => trunk/infrastructure/ace/www/magicdom.js rename : trunk/trunk/infrastructure/ace/www/multilang_lexer.js => trunk/infrastructure/ace/www/multilang_lexer.js rename : trunk/trunk/infrastructure/ace/www/processing.js => trunk/infrastructure/ace/www/processing.js rename : trunk/trunk/infrastructure/ace/www/profiler.js => trunk/infrastructure/ace/www/profiler.js rename : trunk/trunk/infrastructure/ace/www/skiplist.js => trunk/infrastructure/ace/www/skiplist.js rename : trunk/trunk/infrastructure/ace/www/spanlist.js => trunk/infrastructure/ace/www/spanlist.js rename : trunk/trunk/infrastructure/ace/www/syntax-new.css => trunk/infrastructure/ace/www/syntax-new.css rename : trunk/trunk/infrastructure/ace/www/syntax.css => trunk/infrastructure/ace/www/syntax.css rename : trunk/trunk/infrastructure/ace/www/test.html => trunk/infrastructure/ace/www/test.html rename : trunk/trunk/infrastructure/ace/www/testcode.js => trunk/infrastructure/ace/www/testcode.js rename : trunk/trunk/infrastructure/ace/www/toSource.js => trunk/infrastructure/ace/www/toSource.js rename : trunk/trunk/infrastructure/ace/www/undomodule.js => trunk/infrastructure/ace/www/undomodule.js rename : trunk/trunk/infrastructure/ace/www/virtual_lines.js => trunk/infrastructure/ace/www/virtual_lines.js rename : trunk/trunk/infrastructure/bin/classpath.sh => trunk/infrastructure/bin/classpath.sh rename : trunk/trunk/infrastructure/bin/comp.sh => trunk/infrastructure/bin/comp.sh rename : trunk/trunk/infrastructure/bin/compilecache.sh => trunk/infrastructure/bin/compilecache.sh rename : trunk/trunk/infrastructure/bin/jscomp.sh => trunk/infrastructure/bin/jscomp.sh rename : trunk/trunk/infrastructure/bin/makejar.sh => trunk/infrastructure/bin/makejar.sh rename : trunk/trunk/infrastructure/bin/makesars.sh => trunk/infrastructure/bin/makesars.sh rename : trunk/trunk/infrastructure/bin/run.sh => trunk/infrastructure/bin/run.sh rename : trunk/trunk/infrastructure/com.etherpad.openofficeservice/importexport.scala => trunk/infrastructure/com.etherpad.openofficeservice/importexport.scala rename : trunk/trunk/infrastructure/com.etherpad/easysync2support.scala => trunk/infrastructure/com.etherpad/easysync2support.scala rename : trunk/trunk/infrastructure/com.etherpad/licensing.scala => trunk/infrastructure/com.etherpad/licensing.scala rename : trunk/trunk/infrastructure/com.etherpad/main.scala => trunk/infrastructure/com.etherpad/main.scala rename : trunk/trunk/infrastructure/framework-src/modules/atomfeed.js => trunk/infrastructure/framework-src/modules/atomfeed.js rename : trunk/trunk/infrastructure/framework-src/modules/blob.js => trunk/infrastructure/framework-src/modules/blob.js rename : trunk/trunk/infrastructure/framework-src/modules/cache_utils.js => trunk/infrastructure/framework-src/modules/cache_utils.js rename : trunk/trunk/infrastructure/framework-src/modules/comet.js => trunk/infrastructure/framework-src/modules/comet.js rename : trunk/trunk/infrastructure/framework-src/modules/dateutils.js => trunk/infrastructure/framework-src/modules/dateutils.js rename : trunk/trunk/infrastructure/framework-src/modules/dispatch.js => trunk/infrastructure/framework-src/modules/dispatch.js rename : trunk/trunk/infrastructure/framework-src/modules/ejs.js => trunk/infrastructure/framework-src/modules/ejs.js rename : trunk/trunk/infrastructure/framework-src/modules/email.js => trunk/infrastructure/framework-src/modules/email.js rename : trunk/trunk/infrastructure/framework-src/modules/exceptionutils.js => trunk/infrastructure/framework-src/modules/exceptionutils.js rename : trunk/trunk/infrastructure/framework-src/modules/execution.js => trunk/infrastructure/framework-src/modules/execution.js rename : trunk/trunk/infrastructure/framework-src/modules/fastJSON.js => trunk/infrastructure/framework-src/modules/fastJSON.js rename : trunk/trunk/infrastructure/framework-src/modules/faststatic.js => trunk/infrastructure/framework-src/modules/faststatic.js rename : trunk/trunk/infrastructure/framework-src/modules/fileutils.js => trunk/infrastructure/framework-src/modules/fileutils.js rename : trunk/trunk/infrastructure/framework-src/modules/funhtml.js => trunk/infrastructure/framework-src/modules/funhtml.js rename : trunk/trunk/infrastructure/framework-src/modules/global/appjet.js => trunk/infrastructure/framework-src/modules/global/appjet.js rename : trunk/trunk/infrastructure/framework-src/modules/global/request.js => trunk/infrastructure/framework-src/modules/global/request.js rename : trunk/trunk/infrastructure/framework-src/modules/global/response.js => trunk/infrastructure/framework-src/modules/global/response.js rename : trunk/trunk/infrastructure/framework-src/modules/image.js => trunk/infrastructure/framework-src/modules/image.js rename : trunk/trunk/infrastructure/framework-src/modules/jsmin.js => trunk/infrastructure/framework-src/modules/jsmin.js rename : trunk/trunk/infrastructure/framework-src/modules/jsutils.js => trunk/infrastructure/framework-src/modules/jsutils.js rename : trunk/trunk/infrastructure/framework-src/modules/netutils.js => trunk/infrastructure/framework-src/modules/netutils.js rename : trunk/trunk/infrastructure/framework-src/modules/profiler.js => trunk/infrastructure/framework-src/modules/profiler.js rename : trunk/trunk/infrastructure/framework-src/modules/sessions.js => trunk/infrastructure/framework-src/modules/sessions.js rename : trunk/trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js => trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js rename : trunk/trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js => trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js rename : trunk/trunk/infrastructure/framework-src/modules/sqlbase/sqlcommon.js => trunk/infrastructure/framework-src/modules/sqlbase/sqlcommon.js rename : trunk/trunk/infrastructure/framework-src/modules/sqlbase/sqlobj.js => trunk/infrastructure/framework-src/modules/sqlbase/sqlobj.js rename : trunk/trunk/infrastructure/framework-src/modules/stringutils.js => trunk/infrastructure/framework-src/modules/stringutils.js rename : trunk/trunk/infrastructure/framework-src/modules/sync.js => trunk/infrastructure/framework-src/modules/sync.js rename : trunk/trunk/infrastructure/framework-src/modules/timer.js => trunk/infrastructure/framework-src/modules/timer.js rename : trunk/trunk/infrastructure/framework-src/modules/varz.js => trunk/infrastructure/framework-src/modules/varz.js rename : trunk/trunk/infrastructure/framework-src/modules/yuicompressor.js => trunk/infrastructure/framework-src/modules/yuicompressor.js rename : trunk/trunk/infrastructure/framework-src/oncomet.js => trunk/infrastructure/framework-src/oncomet.js rename : trunk/trunk/infrastructure/framework-src/onerror.js => trunk/infrastructure/framework-src/onerror.js rename : trunk/trunk/infrastructure/framework-src/onprint.js => trunk/infrastructure/framework-src/onprint.js rename : trunk/trunk/infrastructure/framework-src/onrequest.js => trunk/infrastructure/framework-src/onrequest.js rename : trunk/trunk/infrastructure/framework-src/onreset.js => trunk/infrastructure/framework-src/onreset.js rename : trunk/trunk/infrastructure/framework-src/onsars.js => trunk/infrastructure/framework-src/onsars.js rename : trunk/trunk/infrastructure/framework-src/onscheduledtask.js => trunk/infrastructure/framework-src/onscheduledtask.js rename : trunk/trunk/infrastructure/framework-src/onshutdown.js => trunk/infrastructure/framework-src/onshutdown.js rename : trunk/trunk/infrastructure/framework-src/onstartup.js => trunk/infrastructure/framework-src/onstartup.js rename : trunk/trunk/infrastructure/framework-src/onsyntaxerror.js => trunk/infrastructure/framework-src/onsyntaxerror.js rename : trunk/trunk/infrastructure/framework-src/postamble.js => trunk/infrastructure/framework-src/postamble.js rename : trunk/trunk/infrastructure/framework-src/preamble.js => trunk/infrastructure/framework-src/preamble.js rename : trunk/trunk/infrastructure/framework-src/syntaxerror.js => trunk/infrastructure/framework-src/syntaxerror.js rename : trunk/trunk/infrastructure/lib/activation.jar => trunk/infrastructure/lib/activation.jar rename : trunk/trunk/infrastructure/lib/c3p0-0.9.1.2.jar => trunk/infrastructure/lib/c3p0-0.9.1.2.jar rename : trunk/trunk/infrastructure/lib/commons-lang-2.4.jar => trunk/infrastructure/lib/commons-lang-2.4.jar rename : trunk/trunk/infrastructure/lib/derby-10.5.1.1.jar => trunk/infrastructure/lib/derby-10.5.1.1.jar rename : trunk/trunk/infrastructure/lib/derbytools.jar => trunk/infrastructure/lib/derbytools.jar rename : trunk/trunk/infrastructure/lib/dnsjava-2.0.6.jar => trunk/infrastructure/lib/dnsjava-2.0.6.jar rename : trunk/trunk/infrastructure/lib/jetty-6.1.20.jar => trunk/infrastructure/lib/jetty-6.1.20.jar rename : trunk/trunk/infrastructure/lib/jetty-sslengine-6.1.20.jar => trunk/infrastructure/lib/jetty-sslengine-6.1.20.jar rename : trunk/trunk/infrastructure/lib/jetty-util-6.1.20.jar => trunk/infrastructure/lib/jetty-util-6.1.20.jar rename : trunk/trunk/infrastructure/lib/json.jar => trunk/infrastructure/lib/json.jar rename : trunk/trunk/infrastructure/lib/mail.jar => trunk/infrastructure/lib/mail.jar rename : trunk/trunk/infrastructure/lib/manifest => trunk/infrastructure/lib/manifest rename : trunk/trunk/infrastructure/lib/rhino-js-1.7r1.jar => trunk/infrastructure/lib/rhino-js-1.7r1.jar rename : trunk/trunk/infrastructure/lib/sanselan-0.94aj.jar => trunk/infrastructure/lib/sanselan-0.94aj.jar rename : trunk/trunk/infrastructure/lib/servlet-api-2.5-20081211.jar => trunk/infrastructure/lib/servlet-api-2.5-20081211.jar rename : trunk/trunk/infrastructure/lib/tagsoup-1.2.jar => trunk/infrastructure/lib/tagsoup-1.2.jar rename : trunk/trunk/infrastructure/lib/yuicompressor-2.4-appjet.jar => trunk/infrastructure/lib/yuicompressor-2.4-appjet.jar rename : trunk/trunk/infrastructure/net.appjet.ajstdlib/ajstdlib.scala => trunk/infrastructure/net.appjet.ajstdlib/ajstdlib.scala rename : trunk/trunk/infrastructure/net.appjet.ajstdlib/sqlbase.scala => trunk/infrastructure/net.appjet.ajstdlib/sqlbase.scala rename : trunk/trunk/infrastructure/net.appjet.ajstdlib/streaming-client.js => trunk/infrastructure/net.appjet.ajstdlib/streaming-client.js rename : trunk/trunk/infrastructure/net.appjet.ajstdlib/streaming-iframe.html => trunk/infrastructure/net.appjet.ajstdlib/streaming-iframe.html rename : trunk/trunk/infrastructure/net.appjet.ajstdlib/streaming.scala => trunk/infrastructure/net.appjet.ajstdlib/streaming.scala rename : trunk/trunk/infrastructure/net.appjet.ajstdlib/timer.scala => trunk/infrastructure/net.appjet.ajstdlib/timer.scala rename : trunk/trunk/infrastructure/net.appjet.bodylock/bodylock.scala => trunk/infrastructure/net.appjet.bodylock/bodylock.scala rename : trunk/trunk/infrastructure/net.appjet.bodylock/compressor.scala => trunk/infrastructure/net.appjet.bodylock/compressor.scala rename : trunk/trunk/infrastructure/net.appjet.common.cli/cli.scala => trunk/infrastructure/net.appjet.common.cli/cli.scala rename : trunk/trunk/infrastructure/net.appjet.common.sars/sars.scala => trunk/infrastructure/net.appjet.common.sars/sars.scala rename : trunk/trunk/infrastructure/net.appjet.common.sars/sha1.scala => trunk/infrastructure/net.appjet.common.sars/sha1.scala rename : trunk/trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala => trunk/infrastructure/net.appjet.common/rhino/rhinospect.scala rename : trunk/trunk/infrastructure/net.appjet.common/util/BCrypt.java => trunk/infrastructure/net.appjet.common/util/BCrypt.java rename : trunk/trunk/infrastructure/net.appjet.common/util/BetterFile.java => trunk/infrastructure/net.appjet.common/util/BetterFile.java rename : trunk/trunk/infrastructure/net.appjet.common/util/ClassReload.java => trunk/infrastructure/net.appjet.common/util/ClassReload.java rename : trunk/trunk/infrastructure/net.appjet.common/util/ExpiringMapping.java => trunk/infrastructure/net.appjet.common/util/ExpiringMapping.java rename : trunk/trunk/infrastructure/net.appjet.common/util/HttpServletRequestFactory.java => trunk/infrastructure/net.appjet.common/util/HttpServletRequestFactory.java rename : trunk/trunk/infrastructure/net.appjet.common/util/LenientFormatter.java => trunk/infrastructure/net.appjet.common/util/LenientFormatter.java rename : trunk/trunk/infrastructure/net.appjet.common/util/LimitedSizeMapping.java => trunk/infrastructure/net.appjet.common/util/LimitedSizeMapping.java rename : trunk/trunk/infrastructure/net.appjet.oui/ConfigParam.java => trunk/infrastructure/net.appjet.oui/ConfigParam.java rename : trunk/trunk/infrastructure/net.appjet.oui/FastJSON.scala => trunk/infrastructure/net.appjet.oui/FastJSON.scala rename : trunk/trunk/infrastructure/net.appjet.oui/GeneratedConfigParam.java => trunk/infrastructure/net.appjet.oui/GeneratedConfigParam.java rename : trunk/trunk/infrastructure/net.appjet.oui/config.scala => trunk/infrastructure/net.appjet.oui/config.scala rename : trunk/trunk/infrastructure/net.appjet.oui/dynamicvar.scala => trunk/infrastructure/net.appjet.oui/dynamicvar.scala rename : trunk/trunk/infrastructure/net.appjet.oui/encryption.scala => trunk/infrastructure/net.appjet.oui/encryption.scala rename : trunk/trunk/infrastructure/net.appjet.oui/execution.scala => trunk/infrastructure/net.appjet.oui/execution.scala rename : trunk/trunk/infrastructure/net.appjet.oui/files.scala => trunk/infrastructure/net.appjet.oui/files.scala rename : trunk/trunk/infrastructure/net.appjet.oui/logging.scala => trunk/infrastructure/net.appjet.oui/logging.scala rename : trunk/trunk/infrastructure/net.appjet.oui/main.scala => trunk/infrastructure/net.appjet.oui/main.scala rename : trunk/trunk/infrastructure/net.appjet.oui/monitoring.scala => trunk/infrastructure/net.appjet.oui/monitoring.scala rename : trunk/trunk/infrastructure/net.appjet.oui/network.scala => trunk/infrastructure/net.appjet.oui/network.scala rename : trunk/trunk/infrastructure/net.appjet.oui/servermodel.scala => trunk/infrastructure/net.appjet.oui/servermodel.scala rename : trunk/trunk/infrastructure/net.appjet.oui/stats.scala => trunk/infrastructure/net.appjet.oui/stats.scala rename : trunk/trunk/infrastructure/net.appjet.oui/synchronizer.scala => trunk/infrastructure/net.appjet.oui/synchronizer.scala rename : trunk/trunk/infrastructure/net.appjet.oui/util.scala => trunk/infrastructure/net.appjet.oui/util.scala rename : trunk/trunk/infrastructure/rhino1_7R1/apiClasses.properties => trunk/infrastructure/rhino1_7R1/apiClasses.properties rename : trunk/trunk/infrastructure/rhino1_7R1/build-date => trunk/infrastructure/rhino1_7R1/build-date rename : trunk/trunk/infrastructure/rhino1_7R1/build.properties => trunk/infrastructure/rhino1_7R1/build.properties rename : trunk/trunk/infrastructure/rhino1_7R1/build.xml => trunk/infrastructure/rhino1_7R1/build.xml rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/build.xml => trunk/infrastructure/rhino1_7R1/deprecatedsrc/build.xml rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/ClassDefinitionException.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/ClassDefinitionException.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/NotAFunctionException.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/NotAFunctionException.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/PropertyException.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/PropertyException.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/LogicalEquality.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/LogicalEquality.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/Namespace.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/Namespace.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/NamespaceHelper.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/NamespaceHelper.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/QName.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/QName.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XML.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XML.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLCtor.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLCtor.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLLibImpl.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLLibImpl.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLList.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLList.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLName.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLName.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLObjectImpl.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLObjectImpl.java rename : trunk/trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLWithScope.java => trunk/infrastructure/rhino1_7R1/deprecatedsrc/org/mozilla/javascript/xml/impl/xmlbeans/XMLWithScope.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/Control.java => trunk/infrastructure/rhino1_7R1/examples/Control.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/Counter.java => trunk/infrastructure/rhino1_7R1/examples/Counter.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/CounterTest.java => trunk/infrastructure/rhino1_7R1/examples/CounterTest.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/DynamicScopes.java => trunk/infrastructure/rhino1_7R1/examples/DynamicScopes.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/E4X/e4x_example.js => trunk/infrastructure/rhino1_7R1/examples/E4X/e4x_example.js rename : trunk/trunk/infrastructure/rhino1_7R1/examples/File.java => trunk/infrastructure/rhino1_7R1/examples/File.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/Foo.java => trunk/infrastructure/rhino1_7R1/examples/Foo.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/Matrix.java => trunk/infrastructure/rhino1_7R1/examples/Matrix.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/NervousText.html => trunk/infrastructure/rhino1_7R1/examples/NervousText.html rename : trunk/trunk/infrastructure/rhino1_7R1/examples/NervousText.js => trunk/infrastructure/rhino1_7R1/examples/NervousText.js rename : trunk/trunk/infrastructure/rhino1_7R1/examples/PrimitiveWrapFactory.java => trunk/infrastructure/rhino1_7R1/examples/PrimitiveWrapFactory.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/RunScript.java => trunk/infrastructure/rhino1_7R1/examples/RunScript.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/RunScript2.java => trunk/infrastructure/rhino1_7R1/examples/RunScript2.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/RunScript3.java => trunk/infrastructure/rhino1_7R1/examples/RunScript3.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/RunScript4.java => trunk/infrastructure/rhino1_7R1/examples/RunScript4.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/Shell.java => trunk/infrastructure/rhino1_7R1/examples/Shell.java rename : trunk/trunk/infrastructure/rhino1_7R1/examples/SwingApplication.js => trunk/infrastructure/rhino1_7R1/examples/SwingApplication.js rename : trunk/trunk/infrastructure/rhino1_7R1/examples/checkParam.js => trunk/infrastructure/rhino1_7R1/examples/checkParam.js rename : trunk/trunk/infrastructure/rhino1_7R1/examples/enum.js => trunk/infrastructure/rhino1_7R1/examples/enum.js rename : trunk/trunk/infrastructure/rhino1_7R1/examples/jsdoc.js => trunk/infrastructure/rhino1_7R1/examples/jsdoc.js rename : trunk/trunk/infrastructure/rhino1_7R1/examples/liveConnect.js => trunk/infrastructure/rhino1_7R1/examples/liveConnect.js rename : trunk/trunk/infrastructure/rhino1_7R1/examples/unique.js => trunk/infrastructure/rhino1_7R1/examples/unique.js rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/allclasses-frame.html => trunk/infrastructure/rhino1_7R1/javadoc/allclasses-frame.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/allclasses-noframe.html => trunk/infrastructure/rhino1_7R1/javadoc/allclasses-noframe.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/constant-values.html => trunk/infrastructure/rhino1_7R1/javadoc/constant-values.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/deprecated-list.html => trunk/infrastructure/rhino1_7R1/javadoc/deprecated-list.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/help-doc.html => trunk/infrastructure/rhino1_7R1/javadoc/help-doc.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/index-all.html => trunk/infrastructure/rhino1_7R1/javadoc/index-all.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/index.html => trunk/infrastructure/rhino1_7R1/javadoc/index.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Callable.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Callable.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ClassCache.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ClassCache.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ClassShutter.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ClassShutter.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/CompilerEnvirons.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/CompilerEnvirons.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Context.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Context.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ContextAction.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ContextAction.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ContextFactory.Listener.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ContextFactory.Listener.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ContextFactory.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ContextFactory.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/EcmaError.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/EcmaError.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ErrorReporter.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ErrorReporter.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/EvaluatorException.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/EvaluatorException.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Function.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Function.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/FunctionObject.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/FunctionObject.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/GeneratedClassLoader.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/GeneratedClassLoader.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ImporterTopLevel.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ImporterTopLevel.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/JavaScriptException.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/JavaScriptException.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/RefCallable.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/RefCallable.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/RhinoException.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/RhinoException.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Script.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Script.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Scriptable.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Scriptable.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ScriptableObject.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/ScriptableObject.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/SecurityController.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/SecurityController.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Synchronizer.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Synchronizer.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/WrapFactory.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/WrapFactory.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/WrappedException.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/WrappedException.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Wrapper.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/Wrapper.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/debug/DebuggableScript.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/debug/DebuggableScript.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/debug/package-frame.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/debug/package-frame.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/debug/package-summary.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/debug/package-summary.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/debug/package-tree.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/debug/package-tree.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/optimizer/ClassCompiler.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/optimizer/ClassCompiler.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/optimizer/package-frame.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/optimizer/package-frame.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/optimizer/package-summary.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/optimizer/package-summary.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/optimizer/package-tree.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/optimizer/package-tree.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/package-frame.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/package-frame.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/package-summary.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/package-summary.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/package-tree.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/package-tree.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/ScriptableInputStream.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/ScriptableInputStream.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/ScriptableOutputStream.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/ScriptableOutputStream.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/package-frame.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/package-frame.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/package-summary.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/package-summary.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/package-tree.html => trunk/infrastructure/rhino1_7R1/javadoc/org/mozilla/javascript/serialize/package-tree.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/overview-frame.html => trunk/infrastructure/rhino1_7R1/javadoc/overview-frame.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/overview-summary.html => trunk/infrastructure/rhino1_7R1/javadoc/overview-summary.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/overview-tree.html => trunk/infrastructure/rhino1_7R1/javadoc/overview-tree.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/package-list => trunk/infrastructure/rhino1_7R1/javadoc/package-list rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/resources/inherit.gif => trunk/infrastructure/rhino1_7R1/javadoc/resources/inherit.gif rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/serialized-form.html => trunk/infrastructure/rhino1_7R1/javadoc/serialized-form.html rename : trunk/trunk/infrastructure/rhino1_7R1/javadoc/stylesheet.css => trunk/infrastructure/rhino1_7R1/javadoc/stylesheet.css rename : trunk/trunk/infrastructure/rhino1_7R1/lib/jsr173_1.0_api.jar => trunk/infrastructure/rhino1_7R1/lib/jsr173_1.0_api.jar rename : trunk/trunk/infrastructure/rhino1_7R1/lib/xbean.jar => trunk/infrastructure/rhino1_7R1/lib/xbean.jar rename : trunk/trunk/infrastructure/rhino1_7R1/src/build.xml => trunk/infrastructure/rhino1_7R1/src/build.xml rename : trunk/trunk/infrastructure/rhino1_7R1/src/manifest => trunk/infrastructure/rhino1_7R1/src/manifest rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/classfile/ByteCode.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/classfile/ByteCode.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/classfile/ClassFileWriter.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/classfile/ClassFileWriter.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Arguments.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Arguments.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/BaseFunction.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/BaseFunction.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Callable.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Callable.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ClassCache.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ClassCache.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ClassShutter.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ClassShutter.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/CompilerEnvirons.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/CompilerEnvirons.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ConstProperties.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ConstProperties.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Context.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Context.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ContextAction.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ContextAction.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ContextFactory.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ContextFactory.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ContextListener.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ContextListener.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/DToA.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/DToA.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Decompiler.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Decompiler.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/DefaultErrorReporter.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/DefaultErrorReporter.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/DefiningClassLoader.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/DefiningClassLoader.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Delegator.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Delegator.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/EcmaError.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/EcmaError.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ErrorReporter.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ErrorReporter.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Evaluator.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Evaluator.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/EvaluatorException.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/EvaluatorException.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Function.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Function.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/FunctionNode.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/FunctionNode.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/FunctionObject.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/FunctionObject.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/GeneratedClassLoader.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/GeneratedClassLoader.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/IRFactory.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/IRFactory.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/IdFunctionCall.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/IdFunctionCall.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/IdFunctionObject.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/IdFunctionObject.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/IdScriptableObject.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/IdScriptableObject.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ImporterTopLevel.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ImporterTopLevel.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/InformativeParser.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/InformativeParser.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/InterfaceAdapter.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/InterfaceAdapter.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/InterpretedFunction.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/InterpretedFunction.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Interpreter.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Interpreter.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/InterpreterData.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/InterpreterData.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/JavaAdapter.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/JavaAdapter.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/JavaMembers.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/JavaMembers.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/JavaScriptException.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/JavaScriptException.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Kit.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Kit.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/LazilyLoadedCtor.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/LazilyLoadedCtor.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/MemberBox.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/MemberBox.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeArray.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeArray.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeBoolean.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeBoolean.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeCall.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeCall.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeDate.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeDate.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeError.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeError.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeFunction.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeFunction.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeGenerator.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeGenerator.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeGlobal.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeGlobal.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeIterator.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeIterator.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaArray.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaArray.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaClass.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaClass.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaConstructor.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaConstructor.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaMethod.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaMethod.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaObject.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaObject.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaPackage.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaPackage.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaTopPackage.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeJavaTopPackage.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeMath.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeMath.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeNumber.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeNumber.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeObject.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeObject.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeScript.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeScript.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeString.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeString.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeWith.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NativeWith.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Node.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Node.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NodeTransformer.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/NodeTransformer.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ObjArray.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ObjArray.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ObjToIntMap.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ObjToIntMap.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Parser.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Parser.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/PolicySecurityController.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/PolicySecurityController.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Ref.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Ref.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/RefCallable.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/RefCallable.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/RegExpProxy.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/RegExpProxy.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/RhinoException.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/RhinoException.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Script.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Script.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ScriptOrFnNode.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ScriptOrFnNode.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ScriptRuntime.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ScriptRuntime.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Scriptable.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Scriptable.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ScriptableObject.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/ScriptableObject.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/SecureCaller.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/SecureCaller.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/SecurityController.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/SecurityController.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/SecurityUtilities.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/SecurityUtilities.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/SpecialRef.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/SpecialRef.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Synchronizer.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Synchronizer.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Token.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Token.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/TokenStream.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/TokenStream.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/UintMap.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/UintMap.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Undefined.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Undefined.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/UniqueTag.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/UniqueTag.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/VMBridge.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/VMBridge.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/WrapFactory.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/WrapFactory.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/WrappedException.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/WrappedException.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Wrapper.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/Wrapper.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/continuations/Continuation.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/continuations/Continuation.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/debug/DebugFrame.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/debug/DebugFrame.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/debug/DebuggableObject.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/debug/DebuggableObject.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/debug/DebuggableScript.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/debug/DebuggableScript.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/debug/Debugger.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/debug/Debugger.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/jdk11/VMBridge_jdk11.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/jdk11/VMBridge_jdk11.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/jdk13/VMBridge_jdk13.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/jdk13/VMBridge_jdk13.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/jdk15/VMBridge_jdk15.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/jdk15/VMBridge_jdk15.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/Block.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/Block.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/ClassCompiler.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/ClassCompiler.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/Codegen.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/Codegen.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/DataFlowBitSet.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/DataFlowBitSet.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/OptFunctionNode.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/OptFunctionNode.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/OptRuntime.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/OptRuntime.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/OptTransformer.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/OptTransformer.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/Optimizer.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/optimizer/Optimizer.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/regexp/NativeRegExp.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/regexp/NativeRegExp.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/regexp/NativeRegExpCtor.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/regexp/NativeRegExpCtor.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/regexp/RegExpImpl.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/regexp/RegExpImpl.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/regexp/SubString.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/regexp/SubString.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/resources/Messages.properties => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/resources/Messages.properties rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/resources/Messages_fr.properties => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/resources/Messages_fr.properties rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/serialize/ScriptableInputStream.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/serialize/ScriptableInputStream.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/serialize/ScriptableOutputStream.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/serialize/ScriptableOutputStream.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/xml/XMLLib.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/xml/XMLLib.java rename : trunk/trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/xml/XMLObject.java => trunk/infrastructure/rhino1_7R1/src/org/mozilla/javascript/xml/XMLObject.java rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/base.skip => trunk/infrastructure/rhino1_7R1/testsrc/base.skip rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/build.xml => trunk/infrastructure/rhino1_7R1/testsrc/build.xml rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/opt1.skip => trunk/infrastructure/rhino1_7R1/testsrc/opt1.skip rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/drivers/JsDriver.java => trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/drivers/JsDriver.java rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/drivers/ShellTest.java => trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/drivers/ShellTest.java rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/drivers/StandardTests.java => trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/drivers/StandardTests.java rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/drivers/results.html => trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/drivers/results.html rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/tests/Bug409702Test.java => trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/tests/Bug409702Test.java rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/tests/JavaAcessibilityTest.java => trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/tests/JavaAcessibilityTest.java rename : trunk/trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/tests/PrivateAccessClass.java => trunk/infrastructure/rhino1_7R1/testsrc/org/mozilla/javascript/tests/PrivateAccessClass.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/build.xml => trunk/infrastructure/rhino1_7R1/toolsrc/build.xml rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/ToolErrorReporter.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/ToolErrorReporter.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/Dim.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/Dim.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/GuiCallback.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/GuiCallback.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/Main.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/Main.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/ScopeProvider.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/ScopeProvider.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/build.xml => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/debugger/build.xml rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/CodePrinter.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/CodePrinter.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/FileBody.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/FileBody.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/IdValuePair.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/IdValuePair.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/Main.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/Main.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/SwitchGenerator.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/idswitch/SwitchGenerator.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/jsc/Main.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/jsc/Main.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/resources/Messages.properties => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/resources/Messages.properties rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/ConsoleTextArea.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/ConsoleTextArea.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/Environment.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/Environment.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/Global.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/Global.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/JSConsole.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/JSConsole.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/Main.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/Main.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/QuitAction.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/QuitAction.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/SecurityProxy.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/SecurityProxy.java rename : trunk/trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/ShellContextFactory.java => trunk/infrastructure/rhino1_7R1/toolsrc/org/mozilla/javascript/tools/shell/ShellContextFactory.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/build.xml => trunk/infrastructure/rhino1_7R1/xmlimplsrc/build.xml rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLCtor.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLCtor.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLName.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLWithScope.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLWithScope.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XmlNode.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XmlNode.java rename : trunk/trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XmlProcessor.java => trunk/infrastructure/rhino1_7R1/xmlimplsrc/org/mozilla/javascript/xmlimpl/XmlProcessor.java rename : trunk/trunk/infrastructure/yuicompressor/lib/jargs-1.0.jar => trunk/infrastructure/yuicompressor/lib/jargs-1.0.jar rename : trunk/trunk/infrastructure/yuicompressor/lib/rhino-yuicompressor.jar => trunk/infrastructure/yuicompressor/lib/rhino-yuicompressor.jar rename : trunk/trunk/infrastructure/yuicompressor/make.sh => trunk/infrastructure/yuicompressor/make.sh rename : trunk/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/Bootstrap.java => trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/Bootstrap.java rename : trunk/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/CssCompressor.java => trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/CssCompressor.java rename : trunk/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JarClassLoader.java => trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JarClassLoader.java rename : trunk/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptCompressor.java => trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptCompressor.java rename : trunk/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java => trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptIdentifier.java rename : trunk/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptToken.java => trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/JavaScriptToken.java rename : trunk/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/ScriptOrFnScope.java => trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/ScriptOrFnScope.java rename : trunk/trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/YUICompressor.java => trunk/infrastructure/yuicompressor/src/com/yahoo/platform/yui/compressor/YUICompressor.java rename : trunk/trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Decompiler.java => trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Decompiler.java rename : trunk/trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Decompiler.java.orig => trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Decompiler.java.orig rename : trunk/trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Parser.java => trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Parser.java rename : trunk/trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Parser.java.orig => trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Parser.java.orig rename : trunk/trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Token.java => trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Token.java rename : trunk/trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Token.java.orig => trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/Token.java.orig rename : trunk/trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/TokenStream.java => trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/TokenStream.java rename : trunk/trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/TokenStream.java.orig => trunk/infrastructure/yuicompressor/src/yuicompressor/org/mozilla/javascript/TokenStream.java.orig --- .../framework-src/modules/atomfeed.js | 72 +++ trunk/infrastructure/framework-src/modules/blob.js | 50 ++ .../framework-src/modules/cache_utils.js | 36 ++ .../infrastructure/framework-src/modules/comet.js | 91 ++++ .../framework-src/modules/dateutils.js | 48 ++ .../framework-src/modules/dispatch.js | 149 ++++++ trunk/infrastructure/framework-src/modules/ejs.js | 471 +++++++++++++++++++ .../infrastructure/framework-src/modules/email.js | 53 +++ .../framework-src/modules/exceptionutils.js | 210 +++++++++ .../framework-src/modules/execution.js | 58 +++ .../framework-src/modules/fastJSON.js | 27 ++ .../framework-src/modules/faststatic.js | 318 +++++++++++++ .../framework-src/modules/fileutils.js | 108 +++++ .../framework-src/modules/funhtml.js | 158 +++++++ .../framework-src/modules/global/appjet.js | 107 +++++ .../framework-src/modules/global/request.js | 312 +++++++++++++ .../framework-src/modules/global/response.js | 294 ++++++++++++ .../infrastructure/framework-src/modules/image.js | 110 +++++ .../infrastructure/framework-src/modules/jsmin.js | 318 +++++++++++++ .../framework-src/modules/jsutils.js | 195 ++++++++ .../framework-src/modules/netutils.js | 88 ++++ .../framework-src/modules/profiler.js | 48 ++ .../framework-src/modules/sessions.js | 156 +++++++ .../modules/sqlbase/persistent_vars.js | 57 +++ .../framework-src/modules/sqlbase/sqlbase.js | 205 +++++++++ .../framework-src/modules/sqlbase/sqlcommon.js | 99 ++++ .../framework-src/modules/sqlbase/sqlobj.js | 505 +++++++++++++++++++++ .../framework-src/modules/stringutils.js | 399 ++++++++++++++++ trunk/infrastructure/framework-src/modules/sync.js | 81 ++++ .../infrastructure/framework-src/modules/timer.js | 29 ++ trunk/infrastructure/framework-src/modules/varz.js | 52 +++ .../framework-src/modules/yuicompressor.js | 85 ++++ trunk/infrastructure/framework-src/oncomet.js | 38 ++ trunk/infrastructure/framework-src/onerror.js | 24 + trunk/infrastructure/framework-src/onprint.js | 19 + trunk/infrastructure/framework-src/onrequest.js | 24 + trunk/infrastructure/framework-src/onreset.js | 19 + trunk/infrastructure/framework-src/onsars.js | 27 ++ .../framework-src/onscheduledtask.js | 33 ++ trunk/infrastructure/framework-src/onshutdown.js | 19 + trunk/infrastructure/framework-src/onstartup.js | 19 + .../infrastructure/framework-src/onsyntaxerror.js | 17 + trunk/infrastructure/framework-src/postamble.js | 19 + trunk/infrastructure/framework-src/preamble.js | 325 +++++++++++++ trunk/infrastructure/framework-src/syntaxerror.js | 32 ++ 45 files changed, 5604 insertions(+) create mode 100644 trunk/infrastructure/framework-src/modules/atomfeed.js create mode 100644 trunk/infrastructure/framework-src/modules/blob.js create mode 100644 trunk/infrastructure/framework-src/modules/cache_utils.js create mode 100644 trunk/infrastructure/framework-src/modules/comet.js create mode 100644 trunk/infrastructure/framework-src/modules/dateutils.js create mode 100644 trunk/infrastructure/framework-src/modules/dispatch.js create mode 100644 trunk/infrastructure/framework-src/modules/ejs.js create mode 100644 trunk/infrastructure/framework-src/modules/email.js create mode 100644 trunk/infrastructure/framework-src/modules/exceptionutils.js create mode 100644 trunk/infrastructure/framework-src/modules/execution.js create mode 100644 trunk/infrastructure/framework-src/modules/fastJSON.js create mode 100644 trunk/infrastructure/framework-src/modules/faststatic.js create mode 100644 trunk/infrastructure/framework-src/modules/fileutils.js create mode 100644 trunk/infrastructure/framework-src/modules/funhtml.js create mode 100644 trunk/infrastructure/framework-src/modules/global/appjet.js create mode 100644 trunk/infrastructure/framework-src/modules/global/request.js create mode 100644 trunk/infrastructure/framework-src/modules/global/response.js create mode 100644 trunk/infrastructure/framework-src/modules/image.js create mode 100644 trunk/infrastructure/framework-src/modules/jsmin.js create mode 100644 trunk/infrastructure/framework-src/modules/jsutils.js create mode 100644 trunk/infrastructure/framework-src/modules/netutils.js create mode 100644 trunk/infrastructure/framework-src/modules/profiler.js create mode 100644 trunk/infrastructure/framework-src/modules/sessions.js create mode 100644 trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js create mode 100644 trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js create mode 100644 trunk/infrastructure/framework-src/modules/sqlbase/sqlcommon.js create mode 100644 trunk/infrastructure/framework-src/modules/sqlbase/sqlobj.js create mode 100644 trunk/infrastructure/framework-src/modules/stringutils.js create mode 100644 trunk/infrastructure/framework-src/modules/sync.js create mode 100644 trunk/infrastructure/framework-src/modules/timer.js create mode 100644 trunk/infrastructure/framework-src/modules/varz.js create mode 100644 trunk/infrastructure/framework-src/modules/yuicompressor.js create mode 100644 trunk/infrastructure/framework-src/oncomet.js create mode 100644 trunk/infrastructure/framework-src/onerror.js create mode 100644 trunk/infrastructure/framework-src/onprint.js create mode 100644 trunk/infrastructure/framework-src/onrequest.js create mode 100644 trunk/infrastructure/framework-src/onreset.js create mode 100644 trunk/infrastructure/framework-src/onsars.js create mode 100644 trunk/infrastructure/framework-src/onscheduledtask.js create mode 100644 trunk/infrastructure/framework-src/onshutdown.js create mode 100644 trunk/infrastructure/framework-src/onstartup.js create mode 100644 trunk/infrastructure/framework-src/onsyntaxerror.js create mode 100644 trunk/infrastructure/framework-src/postamble.js create mode 100644 trunk/infrastructure/framework-src/preamble.js create mode 100644 trunk/infrastructure/framework-src/syntaxerror.js (limited to 'trunk/infrastructure/framework-src') diff --git a/trunk/infrastructure/framework-src/modules/atomfeed.js b/trunk/infrastructure/framework-src/modules/atomfeed.js new file mode 100644 index 0000000..4b86eeb --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/atomfeed.js @@ -0,0 +1,72 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("stringutils.sprintf"); + +// TODO: validate XHTML of entries? + +function _xmlDate(d) { + return sprintf("%04d-%02d-%02dT%02d:%02d:%02dZ", + d.getUTCFullYear(), d.getUTCMonth()+1, d.getUTCDate(), + d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds()); +} + +// "entries" is an object with "forEach" member (an Array works). +// Each entry should have these properties: +// * title +// * author +// * published (Date) +// * updated (Date) +// * href (URL for HTML version) +// * content (valid xhtml) +// +// NOTE: entries should be sorted descending by entry.updated (newest first) +// + +function renderFeed(title, lastUpdated, entries, href) { + function ampesc(url) { + return url.replace(/&/g, '&'); + } + + var r = []; + r.push('', + ''); + + r.push('' + title + ''); + r.push('' + _xmlDate(lastUpdated) + ''); + r.push(''); + r.push(''); + r.push('' + ampesc(request.url) + ''); + + entries.forEach(function(entry) { + r.push('', + '' + entry.title + '', + '' + entry.author + '', + '' + _xmlDate(entry.published) + '', + '' + _xmlDate(entry.updated) + '', + '', + ''+ampesc(entry.href)+'', + '', + '
'+entry.content+'
', + '
', + '
'); + }); + + r.push('
'); + + return r.join('\n'); +} + diff --git a/trunk/infrastructure/framework-src/modules/blob.js b/trunk/infrastructure/framework-src/modules/blob.js new file mode 100644 index 0000000..af788a0 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/blob.js @@ -0,0 +1,50 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + + + +/** + * Constructs and returns a new Blob from a JavaScript string. + */ +function stringToBlob(contentType, string) { + return { contentType: contentType, + _stringData: string, + numDataBytes: string.length*2 }; +} + +/** + * Constructs and returns a new Blob from a Java byte array (byte[]). + */ +function byteArrayToBlob(contentType, javaByteArray) { + return { contentType: contentType, + _binaryData: javaByteArray, + numDataBytes: javaByteArray.length }; +} + +/** + * Serves a Blob to the client, using the appropriate content-type, + * and stops execution of the current request. + */ +function serveBlob(blob) { + response.setContentType(blob.contentType); + if (blob._binaryData) { + response.writeBytes(new java.lang.String(blob._binaryData, 0)); + } + else if (blob._stringData) { + response.write(blob._stringData); + } + response.stop(); +} diff --git a/trunk/infrastructure/framework-src/modules/cache_utils.js b/trunk/infrastructure/framework-src/modules/cache_utils.js new file mode 100644 index 0000000..f2a360c --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/cache_utils.js @@ -0,0 +1,36 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("sync"); + +/* performs function on an object from the cache, all within a lock */ +function syncedWithCache(name, fn) { + return sync.doWithStringLock("cache/"+name, function() { + var parts = name.split("."); + var obj = appjet.cache; + for (var i = 0; i < parts.length; i++) { + var p = parts[i]; + if (!obj[p]) { + obj[p] = {}; + } + obj = obj[p]; + } + return fn(obj); + }); +} + + + diff --git a/trunk/infrastructure/framework-src/modules/comet.js b/trunk/infrastructure/framework-src/modules/comet.js new file mode 100644 index 0000000..2331f8b --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/comet.js @@ -0,0 +1,91 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +/** + * @fileOverview + * Comet presents a real-time bidirectional-channel interface. Using comet, your + * server can push data to any connected client without waiting for that client + * to issue a request. + * + * comet reserves the /newcomet path and its subpaths for its + * own use. + */ + +/** + * Gets a list of all client currently connected to the server. + * @function + * @name connections + * @return {array} An array of the string ids of all connected clients. + */ +function connections() { + return Packages.net.appjet.ajstdlib.Comet.connections(appjet.context); +} + +function getNumCurrentConnections() { + return Packages.net.appjet.ajstdlib.Comet.getNumCurrentConnections(); +} + +function isConnected(id) { + return Packages.net.appjet.ajstdlib.Comet.isConnected(id); +} + +function disconnect(id) { + Packages.net.appjet.ajstdlib.Comet.disconnect(id); +} + +function getAttribute(id, key) { + var ret = Packages.net.appjet.ajstdlib.Comet.getAttribute(appjet.context, id, key); + if (ret != null) + return String(ret); +} + +function setAttribute(id, key, value) { + Packages.net.appjet.ajstdlib.Comet.setAttribute(appjet.context, id, key, value); +} + +/** + * Sends a message to a particular client. + * @functionn + * @name sendMessage + * @param {string} id The id of the client to send to. + * @param {string} data The string data to send to the client. + */ +function sendMessage(id, msg) { + Packages.net.appjet.ajstdlib.Comet.write(id, msg); +} + +function headInclude() { return ''; }; +function clientCode() { + return Packages.net.appjet.ajstdlib.Comet.getClientCode(appjet.context); +}; +function clientMTime() { + return Packages.net.appjet.ajstdlib.Comet.getClientMTime(appjet.context); +}; + +/** + * WebSocket allows the client to connect to the server via a + * "bidirectional" channel. Messages sent by the server are received by + * the client without the need for additional connections or other delays. + * @class + * @name WebSocket + * @param {string} id The id to use for this client. + */ + +/** + * Connects to the server using the id specified in the constructor. + * @methodOf WebSocket + * @name connect + */ diff --git a/trunk/infrastructure/framework-src/modules/dateutils.js b/trunk/infrastructure/framework-src/modules/dateutils.js new file mode 100644 index 0000000..72e87c8 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/dateutils.js @@ -0,0 +1,48 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +function noon(date) { + return new Date(date.toString().split(' ').slice(0, 4).join(' ') + " 12:00"); +} + +function nextMonth(date) { + var newDate = new Date(date.getTime()); + var newMonth = date.getMonth() + 1; + var newYear = date.getFullYear(); + while (newMonth >= 12) { + newYear += 1; + newMonth -= 12; + } + newDate.setMonth(newMonth); + newDate.setFullYear(newYear); + return newDate; +} + +var months = + ["January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December"]; + +var shortMonths = months.map(function(mon) { return mon.substr(0, 3); }); + +var days = + ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; + +var shortDays = days.map(function(day) { return day.substr(0, 3); }); + +function dateFormat(date, format) { + var formatter = new Packages.java.text.SimpleDateFormat(format); + return String(formatter.format(date).toString()); +} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/modules/dispatch.js b/trunk/infrastructure/framework-src/modules/dispatch.js new file mode 100644 index 0000000..e7e3ef0 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/dispatch.js @@ -0,0 +1,149 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +/** + * @fileOverview Dispatching for dynamic pages and static files rendered from disk. + */ + +import("jsutils.eachProperty"); +import("stringutils"); + +jimport("java.lang.System.out.println"); + +//---------------------------------------------------------------- +// Util +//---------------------------------------------------------------- + +function PrefixMatcher(p) { + var rs = p.replace(/([\[\]\^\$\\\.\*\+\?\(\)\{\}\|])/g, "\\$1"); + var r = new RegExp('^' + rs + '(.*)$'); + return function(path) { + return r.exec(path); + } +} + +// Like PrefixMatcher, but makes trailing '/' optional, as in /ep/admin or /ep/admin/. +// If trailing '/' is omitted, will redirect to same path with trailing /. +function DirMatcher(p) { + if (p.substr(-1) == '/') { + p = p.substr(0, p.length-1); + } + var prefixMatcher = PrefixMatcher(p+'/'); + return function(path) { + if (path == p) { + response.redirect(p+'/'); + } + return prefixMatcher(path); + } +} + +function _pathMatches(p, loc) { + // returns a regex-result kind of array with length >= 1, or null + if (typeof(loc) == 'string') { + return (p == loc) ? [loc] : null; + } + if (typeof(loc) == 'function') { + return (loc(p) || null); + } + if (loc.exec) { // regexp + var r = loc.exec(p); + return r || null; + } + throw new Error('Uknown type of location: '+loc); +} + +//---------------------------------------------------------------- +// Dispatcher +//---------------------------------------------------------------- + +var Dispatcher = function() { + this._routes = []; // Array([location, (local file path or function)]) +}; + +Dispatcher.prototype.addLocations = function(l) { + var that = this; + l.forEach(function(x) { that._routes.push(x); }); +}; + +Dispatcher.prototype.dispatch = function() { + var p = request.path; + var served = false; + + for (var i = 0; (i < this._routes.length) && (served == false); i++) { + var loc = this._routes[i][0]; + var dst = this._routes[i][1]; + + var match = _pathMatches(p, loc); + if (match) { + if (typeof(dst) != 'function') { + throw new Error('dispatch only dispatches to functions, and this is not a function: '+typeof(dst)); + } + + // call dst(group1, group2, group3, ...) + served = dst.apply(this, Array.prototype.slice.call(match, 1)); + } + }; + + return served; +}; + +//---------------------------------------------------------------- +// fdisp +//---------------------------------------------------------------- + +function forward(module) { + return function(name) { + if (name === "") { + name = "main"; + } + if (name) { + name = name.replace(/\-/g, '_'); + } + var onreq = module['onRequest']; + var f = module['render_'+name]; + var fg = module['render_'+name+'_get']; + var fp = module['render_'+name+'_post']; + + var served = false; + + if (onreq) { + served = onreq(name); + } + + if (served) { + return true; + } + + var method = request.method; + if (method == "HEAD") { + method = "GET"; + } + + if (f) { + f(); + served = true; + } else if (method == "GET" && fg) { + fg(); + served = true; + } else if (method == "POST" && fp) { + fp(); + served = true; + } + + return served; + }; +} + diff --git a/trunk/infrastructure/framework-src/modules/ejs.js b/trunk/infrastructure/framework-src/modules/ejs.js new file mode 100644 index 0000000..bf14ed3 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/ejs.js @@ -0,0 +1,471 @@ +/*-------------------------------------------------------------------------- + * EJS - Embedded JavaScript, version 0.1.0 + * Copyright (c) 2007 Edward Benson + * http://www.edwardbenson.com/projects/ejs + * ------------------------------------------------------------------------ + * + * EJS is freely distributable under the terms of an MIT-style license. + * + * EJS is a client-side preprocessing engine written in and for JavaScript. + * If you have used PHP, ASP, JSP, or ERB then you get the idea: code embedded + * in <% // Code here %> tags will be executed, and code embedded in <%= .. %> + * tags will be evaluated and appended to the output. + * + * This is essentially a direct JavaScript port of Masatoshi Seki's erb.rb + * from the Ruby Core, though it contains a subset of ERB's functionality. + * + * Requirements: + * prototype.js + * + * Usage: + * // source should be either a string or a DOM node whose innerHTML + * // contains EJB source. + * var source = "<% var ejb="EJB"; %>

Hello, <%= ejb %>!

"; + * var compiler = new EjsCompiler(source); + * compiler.compile(); + * var output = eval(compiler.out); + * alert(output); // -> "

Hello, EJB!

" + * + * For a demo: see demo.html + * For the license: see license.txt + * + *--------------------------------------------------------------------------*/ + +import("jsutils.*"); +import("funhtml"); + +jimport("java.lang.System.out.println"); +jimport("net.appjet.ajstdlib.execution.executeCodeInNewScope"); + +/* Make a split function like Ruby's: "abc".split(/b/) -> ['a', 'b', 'c'] */ +function rsplit(x, regex) { + var item = x; + var result = regex.exec(item); + var retArr = new Array(); + while (result != null) + { + var first_idx = result.index; + var last_idx = regex.lastIndex; + if ((first_idx) != 0) + { + var first_bit = item.substring(0,first_idx); + retArr.push(item.substring(0,first_idx)); + item = item.slice(first_idx); + } + retArr.push(result[0]); + item = item.slice(result[0].length); + result = regex.exec(item); + } + if (! item == '') + { + retArr.push(item); + } + return retArr; +}; + +/* Chop is nice to have too */ +function chop(x) { + return x.substr(0, x.length - 1); +} + +/* Adaptation from the Scanner of erb.rb */ +var EjsScanner = function(source, left, right) { + this.left_delimiter = left +'%'; //<% + this.right_delimiter = '%'+right; //> + this.double_left = left+'%%'; + this.double_right = '%%'+right; + this.left_equal = left+'%='; + this.left_comment = left+'%#'; + if(left=='[') { + this.SplitRegexp = /(\[%%)|(%%\])|(\[%=)|(\[%#)|(\[%)|(%\]\n)|(%\])|(\n)/; + } + else { + this.SplitRegexp = new RegExp('('+this.double_left+')|(%%'+this.double_right+')|('+this.left_equal+')|('+this.left_comment+')|('+this.left_delimiter+')|('+this.right_delimiter+'\n)|('+this.right_delimiter+')|(\n)') + } + + this.source = source; + this.stag = null; + this.lines = 0; +}; +EjsView = function(data) { + this.data = data; +}; +EjsView.prototype.partial = function(options, data){ + if(!data) data = this.data; + return new EJS(options).render(data); +}; + +EjsScanner.to_text = function(input){ + if(input == null || input === undefined) + return ''; + if(input instanceof Date) + return input.toDateString(); + if(input.toString) + return input.toString(); + return ''; +} + +EjsScanner.prototype = { + + /* For each line, scan! */ + scan: function(block) { + scanline = this.scanline; + regex = this.SplitRegexp; + if (! this.source == '') + { + var source_split = rsplit(this.source, /\n/); + for(var i=0; i 0) + { + for (var i=0; i 0) + { + // Chould be content.dump in Ruby + + buff.push(put_cmd + '"' + clean(content) + '"'); + } + content = ''; + break; + case scanner.double_left: + content = content + scanner.left_delimiter; + break; + default: + content = content + token; + break; + } + } + else { + switch(token) { + case scanner.right_delimiter: + switch(scanner.stag) { + case scanner.left_delimiter: + if (content[content.length - 1] == '\n') + { + content = chop(content); + buff.push(content); + buff.cr(); + } + else { + buff.push(content); + } + break; + case scanner.left_equal: + buff.push(insert_cmd + "(EjsScanner.to_text(" + content + "))"); + break; + } + scanner.stag = null; + content = ''; + break; + case scanner.double_right: + content = content + scanner.right_delimiter; + break; + default: + content = content + token; + break; + } + } + }); + if (content.length > 0) + { + // Chould be content.dump in Ruby + buff.push(put_cmd + '"' + clean(content) + '"'); + } + buff.close(); + this.out = buff.script + ";"; + var to_be_evaled = [ + 'var process = function(_CONTEXT,_VIEW) {', + ' with(_VIEW) {', + ' with (_CONTEXT) {', + this.out, + ' return ___ejsO;', + ' }', + ' }', + '};' + ].join(''); + // make funhtml.* available in parent scope. + var parentScope = {}; + parentScope.EjsScanner = EjsScanner; + keys(funhtml).forEach(function(k) { + parentScope[k] = funhtml[k]; + }); + var ret = executeCodeInNewScope( + parentScope, + to_be_evaled, + (options.name || "template"), + 1 + ); + this.process = ret.process; + } +} + + +//type, cache, folder +EJS = function( options ){ + this.set_options(options); + + if(options.url){ + var template = EJS.get(options.url, this.cache); + if (template) return template; + if (template == EJS.INVALID_PATH) return null; + this.text = EJS.request(options.url); + if(this.text == null){ + //EJS.update(options.url, this.INVALID_PATH); + throw 'There is no template at '+options.url; + } + this.name = options.url; + }else if(options.element) + { + if(typeof options.element == 'string'){ + var name = options.element; + options.element = document.getElementById( options.element ); + if(options.element == null) throw name+'does not exist!'; + } + if(options.element.value){ + this.text = options.element.value; + }else{ + this.text = options.element.innerHTML; + } + this.name = options.element.id; + this.type = '['; + } + var template = new EjsCompiler(this.text, this.type); + + template.compile(options); + + + EJS.update(this.name, this); + this.template = template; +}; +EJS.config = function(options){ + EJS.cache = options.cache != null ? options.cache : EJS.cache; + EJS.type = options.type != null ? options.type : EJS.type; + var templates_directory = {}; //nice and private container + + EJS.get = function(path, cache){ + if(cache == false) return null; + if(templates_directory[path]) return templates_directory[path]; + return null; + }; + + EJS.update = function(path, template) { + if(path == null) return; + templates_directory[path] = template; + }; + + EJS.INVALID_PATH = -1; + + +}; +EJS.config( {cache: true, type: '<' } ); + +EJS.prototype = { + render : function(object){ + var v = new EjsView(object); + return this.template.process.call(v, object, v); + }, + out : function(){ + return this.template.out; + }, + set_options : function(options){ + this.type = options.type != null ? options.type : EJS.type; + this.cache = options.cache != null ? options.cache : EJS.cache; + this.text = options.text != null ? options.text : null; + this.name = options.name != null ? options.name : null; + }, + // called without options, returns a function that takes the object + // called with options being a string, uses that as a url + // called with options as an object + update : function(element, options){ + if(typeof element == 'string'){ + element = document.getElementById(element); + } + if(options == null){ + _template = this; + return function(object){ + EJS.prototype.update.call(_template, element, object); + }; + } + if(typeof options == 'string'){ + params = {}; + params.url = options; + _template = this; + params.onComplete = function(request){ + var object = eval( request.responseText ); + EJS.prototype.update.call(_template, element, object); + }; + EJS.ajax_request(params); + }else + { + element.innerHTML = this.render(options); + } + } +}; + + EJS.newRequest = function(){ + var factories = [function() { return new ActiveXObject("Msxml2.XMLHTTP"); },function() { return new XMLHttpRequest(); },function() { return new ActiveXObject("Microsoft.XMLHTTP"); }]; + for(var i = 0; i < factories.length; i++) { + try { + var request = factories[i](); + if (request != null) return request; + } + catch(e) { continue;} + } + }; + + EJS.request = function(path){ + var request = new EJS.newRequest(); + request.open("GET", path, false); + + try{request.send(null);} + catch(e){return null;} + + if ( request.status == 404 || request.status == 2 ||(request.status == 0 && request.responseText == '') ) return null; + + return request.responseText + }; + EJS.ajax_request = function(params){ + params.method = ( params.method ? params.method : 'GET'); + + var request = new EJS.newRequest(); + request.onreadystatechange = function(){ + if(request.readyState == 4){ + if(request.status == 200){ + params.onComplete(request); + }else + { + params.onComplete(request); + } + } + }; + request.open(params.method, params.url); + request.send(null); + }; + +//} + + diff --git a/trunk/infrastructure/framework-src/modules/email.js b/trunk/infrastructure/framework-src/modules/email.js new file mode 100644 index 0000000..2d81dc3 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/email.js @@ -0,0 +1,53 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +// import("jsutils.eachProperty"); +// +// function _paramObjectToParamArray(params, enc) { +// var pa = []; +// eachProperty(params, function(k, v) { +// pa.push(enc ? encodeURIComponent(k.toString()) : k.toString()); +// pa.push(enc ? encodeURIComponent(v.toString()) : v.toString()); +// }); +// return pa; +// } + +/** + * Simple way to send an email to a single recipient. Emails will have a + * "from" address of noreply@{appjet.appName}.{appjet.mainDomain}. + * + * Sending is limited to 100 emails per developer account per day. However, + * emails sent to the address on file for the app's owner are not counted + * toward this limit. + * + * @example +result = sendEmail("noone@example.com", "Test Subject", + "Greetings!", {"Reply-To": "sender@example.com"}); + * + * @param {strings} toAddress An array of email address strings, or a single string. + * @param {string} subject The message subject. + * @param {string} body The message body. + * @param {object} [headers] Optional headers to include in the + * message, as a dictionary of {name: value} entries. + */ +function sendEmail(toAddress, fromAddress, subject, headers, body) { + if (typeof(toAddress) == 'string') + toAddress = [toAddress]; + var ret = Packages.net.appjet.ajstdlib.email.sendEmail(toAddress, fromAddress, subject, headers, body); + if (ret != "") + throw new Error(ret); +} + diff --git a/trunk/infrastructure/framework-src/modules/exceptionutils.js b/trunk/infrastructure/framework-src/modules/exceptionutils.js new file mode 100644 index 0000000..b572a3a --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/exceptionutils.js @@ -0,0 +1,210 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("ejs.EJS"); +import("funhtml.*"); +import("jsutils.{scalaF0,scalaF1}"); +import("stringutils.{toHTML,sprintf}"); + +function _getException(ex) { + if (ex instanceof java.lang.Throwable) { + return new net.appjet.bodylock.JSRuntimeException(ex.getMessage(), ex); + } else if (ex.javaException) { + return new net.appjet.bodylock.JSRuntimeException(ex.javaException.getMessage(), ex.javaException); + } else if (ex.rhinoException) { + return new net.appjet.bodylock.JSRuntimeException(ex.rhinoException.getMessage(), ex.rhinoException); + } else { + return ex; + } +} + +function _convertStackFrameToTable(id, frame) { + var r = frame.errorContext(4); + var out = []; + var t = TABLE({className: "codecontext"}); + var counter = r._1(); + r._3().foreach(scalaF1(function(s) { + var row = TR(TD({className: "linecell"}, counter++), TD(String(s))); + if (counter-1 == frame.errorLine()) + row[1].attribs['class'] = "offendingline"; + t.push(row); + })); + if (id != 0) + out.push(DIV({className: "errorframe", + onclick: "toggleFrameView('"+id+"')"}, + IMG({className: "zippy", style: "margin-right: 0.5em;", align: "top", src: "http://appjet.com/img/open-arrow.png", id: "image"+id}), + SPAN({className: "errordetail"}, "...was called from "+frame.name()+ " (line "+frame.errorLine()+"):"), + SPAN({className: "sourceline"}, " "+frame.errorContext(0)._3().first()))); + out.push(DIV({id: 'frame'+id, style: (id == 0 ? "" : "display: none;")}, t)); + return out.map(function(tag) { return toHTML(tag); }).join(""); +} + +function getStackTraceHTML(ex) { + ex = _getException(ex); + if (ex.frames().isEmpty()) + return "No stack trace available."; + var out = []; + var counter = 0; + var firstFrame = ex.frames().first(); + out.push(toHTML(DIV({id: "errortitle"}, "Error in "+firstFrame.name()))); + out.push(toHTML(DIV({id: "errormessage"}, ""+ex.cause().getMessage()+" at "+firstFrame.name()+" (Line "+firstFrame.errorLine()+")"))); + ex.frames().foreach(scalaF1(function(frame) { + out.push(_convertStackFrameToTable(counter++, frame)); + })); + return out.join(""); +} + +function getStackTraceFullpage(ex) { + var tmpl = new EJS({text: _tmpl}); + return tmpl.render({trace: getStackTraceHTML(ex)}); +} + +function getStackTracePlain(ex) { + ex = _getException(ex); + if (ex.frames().isEmpty()) { + var cause = ex.cause(); + var sw = new java.io.StringWriter(); + cause.printStackTrace(new java.io.PrintWriter(sw)); + return sw.toString(); + } + var out = []; + var firstFrame = ex.frames().first(); + out.push("Error in "+firstFrame.name()); + out.push(""+ex.cause().getMessage()+" at "+firstFrame.name()+" (Line "+firstFrame.errorLine()+")"); + var counter = 0; + ex.frames().foreach(scalaF1(function(frame) { + if (counter++ > 0) { + out.push(""); + out.push("...was called from "+frame.name()+" (line "+frame.errorLine()+"): "+frame.errorContext(0)._3().first()); + } + var r = frame.errorContext(4); + var c2 = r._1(); + r._3().foreach(scalaF1(function(s) { + var pre = " "; + if (c2 == frame.errorLine()) + pre = ">"; + out.push(sprintf("%s %4s | %s", pre, ""+c2, s)); + c2++; + })); + })); + return out.join("\n"); +} + +/* template follows */ +var _tmpl = """ + + + AppJet Error + + + + + + + +<%= trace %> + +""" diff --git a/trunk/infrastructure/framework-src/modules/execution.js b/trunk/infrastructure/framework-src/modules/execution.js new file mode 100644 index 0000000..1cec418 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/execution.js @@ -0,0 +1,58 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("jsutils.{scalaF0,scalaF1}"); + +/** + * Asynchronously call a function as soon as the current request completes. + **/ +function async(f) { + Packages.net.appjet.ajstdlib.execution.runAsync(appjet.context, f); +} + +function initTaskThreadPool(name, poolSize) { + Packages.net.appjet.ajstdlib.execution.createNamedTaskThreadPool(name, poolSize); +} + +function scheduleTask(poolName, taskName, delayMillis, args) { + return Packages.net.appjet.ajstdlib.execution.scheduleTaskInPool(poolName, taskName, delayMillis, args); +} + +function shutdownAndWaitOnTaskThreadPool(poolName, timeoutMillis) { + return Packages.net.appjet.ajstdlib.execution.shutdownAndWaitOnTaskThreadPool(poolName, timeoutMillis); +} + +function fancyAssEval(initCode, mainCode) { + function init(runner) { + Packages.net.appjet.bodylock.BodyLock.evaluateString( + runner.globalScope(), + initCode, + "eval'd code imports", + 1); + } + var runner = Packages.net.appjet.oui.ScopeReuseManager.getEmpty(scalaF1(init)); + var ec = new Packages.net.appjet.oui.ExecutionContext( + new Packages.net.appjet.oui.RequestWrapper(request.underlying), + null, runner); + return Packages.net.appjet.oui.ExecutionContextUtils.withContext(ec, + scalaF0(function() { + return Packages.net.appjet.bodylock.BodyLock.evaluateString( + runner.globalScope(), + mainCode, + "eval'd code main", + 1); + })); +} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/modules/fastJSON.js b/trunk/infrastructure/framework-src/modules/fastJSON.js new file mode 100644 index 0000000..3198b96 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/fastJSON.js @@ -0,0 +1,27 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +jimport("net.appjet.oui.FastJSON"); +jimport("java.lang.System.out.println"); + +function stringify(x) { + return String(FastJSON.stringify(x)); +} + +function parse(x) { + return FastJSON.parse(appjet.context, x); +} + diff --git a/trunk/infrastructure/framework-src/modules/faststatic.js b/trunk/infrastructure/framework-src/modules/faststatic.js new file mode 100644 index 0000000..5cca676 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/faststatic.js @@ -0,0 +1,318 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +/** + * @fileOverview serving static files, including js and css, and cacheing + * and minifying. + * + * Terminology Note: + * "path" is confusing because paths can be part of URLs and part + * of filesystem paths, and static files have both types of paths + * associated with them. Therefore, in this module: + * + * LOCALDIR or LOCALFILE refers to directories or files on the filesystem. + * + * HREF is used to describe things that go in a URL. + */ + +import("fileutils.{readFile,readFileBytes}"); +import("yuicompressor"); +import("stringutils"); +import("varz"); +import("ejs.EJS"); + +jimport("java.lang.System.out.println"); + +//---------------------------------------------------------------- +// Content Type Guessing +//---------------------------------------------------------------- + +var _contentTypes = { + 'gif': 'image/gif', + 'png': 'image/png', + 'jpg': 'image/jpeg', + 'jpeg': 'image/jpeg', + 'css': 'text/css', + 'js': 'application/x-javascript', + 'txt': 'text/plain', + 'html': 'text/html; charset=utf-8', + 'ico': 'image/x-icon', + 'swf': 'application/x-shockwave-flash', + 'zip': 'application/zip', + 'xml': 'application/xml' +}; + +var _gzipableTypes = { + 'text/css': true, + 'application/x-javascript': true, + 'text/html; charset=utf-8': true +}; + +function _guessContentType(path) { + var ext = path.split('.').pop().toLowerCase(); + return _contentTypes[ext] || 'text/plain'; +} + +//---------------------------------------------------------------- + +function _getCache(name) { + var m = 'faststatic'; + if (!appjet.cache[m]) { + appjet.cache[m] = {}; + } + var c = appjet.cache[m]; + if (!c[name]) { + c[name] = {}; + } + return c[name]; +} + +var _mtimeCheckInterval = 5000; // 5 seconds + +function _getMTime(f) { + var mcache = _getCache('mtimes'); + var now = +(new Date); + if (appjet.config.devMode || + !(mcache[f] && (now - mcache[f].lastCheck < _mtimeCheckInterval))) { + var jfile = new net.appjet.oui.JarVirtualFile(f); + if (jfile.exists() && !jfile.isDirectory()) { + mcache[f] = { + lastCheck: now, + mtime: jfile.lastModified() + }; + } else { + mcache[f] = null; + } + } + if (mcache[f]) { + return +mcache[f].mtime; + } else { + return null; + } +} + +function _wrapFile(localFile) { + return { + getPath: function() { return localFile; }, + getMTime: function() { return _getMTime(localFile); }, + getContents: function() { return _readFileAndProcess(localFile, 'string'); } + }; +} + +function _readFileAndProcess(fileName, type) { + if (fileName.slice(-8) == "_ejs.css") { + // run CSS through EJS + var template = readFile(fileName); + var ejs = new EJS({text:template, name:fileName}); + var resultString = ejs.render({}); + if (type == 'bytes') { + return new java.lang.String(resultString).getBytes("UTF-8"); + } + else { + return resultString; + } + } + else if (type == 'string') { + return readFile(fileName); + } + else if (type == 'bytes') { + return readFileBytes(fileName); + } +} + +function _cachedFileBytes(f) { + var mtime = _getMTime(f); + if (!mtime) { return null; } + var fcache = _getCache('file-bytes-cache'); + if (!(fcache[f] && (fcache[f].mtime == mtime))) { + varz.incrementInt("faststatic-file-bytes-cache-miss"); + var bytes = _readFileAndProcess(f, 'bytes'); + if (bytes) { + fcache[f] = {mtime: mtime, bytes: bytes}; + }; + } + if (fcache[f] && fcache[f].bytes) { + return fcache[f].bytes; + } else { + return null; + } +} + +function _shouldGzip(contentType) { + var userAgent = request.headers["User-Agent"]; + if (! userAgent) return false; + if (! (/Firefox/.test(userAgent) || /webkit/i.test(userAgent))) return false; + if (! _gzipableTypes[contentType]) return false; + + return request.acceptsGzip; +} + +function _getCachedGzip(original, key) { + var c = _getCache("gzipped"); + if (! c[key] || ! java.util.Arrays.equals(c[key].original, original)) { + c[key] = {original: original, + gzip: stringutils.gzip(original)}; + } + return c[key].gzip; +} + +function _setGzipHeader() { + response.setHeader("Content-Encoding", "gzip"); +} + +//---------------------------------------------------------------- + +/** + * Function for serving a single static file. + */ +function singleFileServer(localPath, opts) { + var contentType = _guessContentType(localPath); + + return function() { + (opts.cache ? response.alwaysCache() : response.neverCache()); + response.setContentType(contentType); + var bytes = _cachedFileBytes(localPath); + if (bytes) { + if (_shouldGzip(contentType)) { + bytes = _getCachedGzip(bytes, "file:"+localPath); + _setGzipHeader(); + } + response.writeBytes(bytes); + return true; + } else { + return false; + } + }; +} + +/** + * valid opts: + * alwaysCache: default false + */ +function directoryServer(localDir, opts) { + if (stringutils.endsWith(localDir, "/")) { + localDir = localDir.substr(0, localDir.length-1); + } + return function(relpath) { + if (stringutils.startsWith(relpath, "/")) { + relpath = relpath.substr(1); + } + if (relpath.indexOf('..') != -1) { + response.forbid(); + } + (opts.cache ? response.alwaysCache() : response.neverCache()); + var contentType = _guessContentType(relpath); + response.setContentType(contentType); + var fullPath = localDir + "/" + relpath; + var bytes = _cachedFileBytes(fullPath); + + if (bytes) { + if (_shouldGzip(contentType)) { + bytes = _getCachedGzip(bytes, "file:"+fullPath); + _setGzipHeader(); + } + response.writeBytes(bytes); + return true; + } else { + return false; + } + }; +} + +/** + * Serves cat files, which are concatenated versions of many files. + */ +function compressedFileServer(opts) { + var cfcache = _getCache('compressed-files'); + return function() { + var key = request.path.split('/').slice(-1)[0]; + var contentType = _guessContentType(request.path); + response.setContentType(contentType); + response.alwaysCache(); + var data = cfcache[key]; + if (data) { + if (_shouldGzip(contentType)) { + data = _getCachedGzip((new java.lang.String(data)).getBytes(response.getCharacterEncoding()), "comp:"+key); + _setGzipHeader(); + response.writeBytes(data); + } else { + response.write(data); + } + return true; + } else { + return false; + } + }; +} + +function getCompressedFilesKey(type, baseLocalDir, localFileList) { + if (stringutils.endsWith(baseLocalDir, '/')) { + baseLocalDir = baseLocalDir.substr(0, baseLocalDir.length-1); + } + + var fileList = []; + // convert passed-in file list into list of our file objects + localFileList.forEach(function(f) { + if (typeof(f) == 'string') { + fileList.push(_wrapFile(baseLocalDir+'/'+f)); + } else { + fileList.push(f); + } + }); + + // have we seen this exact fileset before? + var fsId = fileList.map(function(f) { return f.getPath(); }).join('|'); + var fsMTime = Math.max.apply(this, + fileList.map(function(f) { return f.getMTime(); })); + + var kdcache = _getCache('fileset-keydata-cache'); + if (!(kdcache[fsId] && (kdcache[fsId].mtime == fsMTime))) { + //println("cache miss for fileset: "+fsId); + //println("compressing fileset..."); + kdcache[fsId] = { + mtime: fsMTime, + keyString: _compressFilesAndMakeKey(type, fileList) + }; + } + return kdcache[fsId].keyString; +} + +function _compressFilesAndMakeKey(type, fileList) { + function _compress(s) { + if (type == 'css') { + varz.incrementInt("faststatic-yuicompressor-compressCSS"); + return yuicompressor.compressCSS(s); + } else if (type == 'js') { + varz.incrementInt("faststatic-yuicompressor-compressJS"); + return yuicompressor.compressJS(s); + } else { + throw Error('Dont know how to compress this filetype: '+type); + } + } + + var fullstr = ""; + fileList.forEach(function(f) { + fullstr += _compress(f.getContents()); + }); + + fullstr = _compress(fullstr); + + var key = stringutils.md5(fullstr) + '.' + type; + var cfcache = _getCache('compressed-files'); + cfcache[key] = fullstr; + return key; +} + diff --git a/trunk/infrastructure/framework-src/modules/fileutils.js b/trunk/infrastructure/framework-src/modules/fileutils.js new file mode 100644 index 0000000..aaf12e2 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/fileutils.js @@ -0,0 +1,108 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +/** @fileOverview misc file functions */ + +jimport("java.io.File", + "java.io.DataInputStream", + "java.io.FileInputStream", + "java.lang.reflect.Array", + "java.lang.Byte", + "java.io.FileReader", + "java.io.BufferedReader", + "net.appjet.oui.JarVirtualFile"); + +function readFileBytes(path) { + var jfile = new JarVirtualFile(path); + if (!jfile.exists() || jfile.isDirectory()) { + throw 'Not a file: '+path; + } + return net.appjet.common.util.BetterFile.getStreamBytes(jfile.openStream()); +} + +function readFile(path) { + var bytes = readFileBytes(path); + if (bytes !== null) { + return String(new java.lang.String(bytes)); + } else { + return null; + } +} + +function fileLastModified(path) { + var jfile = new JarVirtualFile(path); + if (!jfile.exists()) { + throw "Not a file: "+path; + } + return jfile.lastModified(); +} + +//---------------------------------------------------------------- +// real files +//---------------------------------------------------------------- + +function readRealFileBytes(path) { + var jfile = new File(path); + if (!jfile.exists() || jfile.isDirectory()) { + throw 'Not a real file: '+path; + } + var jdata = new DataInputStream(new FileInputStream(jfile)); + var size = jfile.length(); + var bytes = Array.newInstance(Byte.TYPE, size); + jdata.read(bytes, 0, size); + jdata.close(); + return bytes; +} + +function readRealFile(path) { + var bytes = readRealFileBytes(path); + if (bytes !== null) { + return String(new java.lang.String(bytes)); + } else { + return null; + } +} + +function writeRealFile(path, data) { + var jf = new Packages.java.io.File(path); + var fw = new Packages.java.io.FileWriter(jf); + fw.write(data); + fw.flush(); + fw.close(); +} + + +function eachFileLine(file, fn) { + var iter = fileLineIterator(file); + while (iter.hasNext) { + fn(iter.next); + } +} + +function fileLineIterator(file) { + var reader = new BufferedReader(new FileReader(file)); + var nextLine = reader.readLine(); + return { + get hasNext() { return nextLine !== null }, + get next() { + var curLine = nextLine; + if (this.hasNext) { + nextLine = reader.readLine(); + } + return curLine; + } + }; +} diff --git a/trunk/infrastructure/framework-src/modules/funhtml.js b/trunk/infrastructure/framework-src/modules/funhtml.js new file mode 100644 index 0000000..c27b667 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/funhtml.js @@ -0,0 +1,158 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +/** + * @fileOverview Functional HTML tag writing.
+ * + *

This library allows you to write HTML in the form of nested function + * calls. By default, a function is predefined for each tag, with the function + * name being in all caps. A dictionary of HTML attributes can optionally be + * passed as a first argument to a tag; other arguments become child tags. + * Attribute names that conflict with JavaScript + * keywords have been renamed; use "className" in place of "class" and + * "htmlFor" in place of "for".

+ * + *

Tag objects inherit from Array, so array methods can be used to + * manipulate a tag's list of child tags.

+ * + * @example +print(P({id:"sec3"},"Tags are ",B(I("crazy"))," awesome.")); + */ + +import("jsutils.eachProperty"); +import("stringutils"); +import("stringutils.toHTML"); + +function html(x) { + // call out to stringutils.html(). + var args = Array.prototype.slice.call(arguments); + return stringutils.html.apply(this, args); +}; + +function toHTML(x) { + // call out to stringutils.toHTML(). + var args = Array.prototype.slice.call(arguments); + return stringutils.toHTML.apply(this, args) +}; + +//---------------------------------------------------------------- +// tags. +//---------------------------------------------------------------- + +var _neverSingletones = { + 'TEXTAREA': true, + 'SCRIPT': true, + 'DIV': true, + 'IFRAME': true, + 'UL': true, + 'TABLE': true +}; + +/** + * Imports a specified list of tags. All HTML tags are automatically imported + * by default, but you may wish to use the tag library to write other kinds + * of mark-up. For each tag you want to import, pass in the name (including + * any punctuation) with the (upper/lower) case you want to use for the function + * (traditionally all uppercase). The function name will have punctuation + * replaced with underscores, and the printed tag will be all lowercase. + * + * @param {object} scopeObj where to define the tags; to define in the global scope, pass this from the top level (not from inside a function) + * @param {array} tagArray an array of strings, the tags to import + * @example +importTags(this, ["MEDIA:TITLE"]); +print(MEDIA_TITLE({type:"html"}, "funny pictures")); +// prints <media:title type="html">funny pictures</media:title> + */ +function _importTags(scopeObj, tagArray) { + tagArray.forEach(function(arg) { + var funcName = arg.replace(/:/g, "_").replace(/-/g, "_"); + var tagName = arg.toLowerCase(); + scopeObj[funcName] = function() { + var tag = []; + tag.name = tagName; + var contents = Array.prototype.slice.call(arguments); + if (contents.length > 0) { + if (contents[0] && + (! contents[0].toHTML) && + ((typeof contents[0]) == "object") && + (! Array.prototype.isPrototypeOf(contents[0])) && + (! Date.prototype.isPrototypeOf(contents[0]))) { + // first arg is attributes + tag.attribs = contents[0]; + contents.shift(); + } + else { + tag.attribs = {}; + } + contents.forEach(function (content) { + tag.push(content); + }); + } + else { + tag.attribs = {}; + } + tag.toString = function() { return this.toHTML(); }; // this behavior is relied on + tag.toHTML = function() { + var t = this; + var result = []; + result.add = function(x) { this.push(x); return this; }; + result.add('<').add(t.name); + if (t.attribs) { + eachProperty(t.attribs, function(k,v) { + if (k == "className") k = "class"; + if (k == "htmlFor") k = "for"; + if (!(v === undefined)) { + // escape quotes and newlines in values + v = String(v).replace(/\"/g, '\\"').replace(/\n/g, '\\n'); + result.add(' ').add(k).add('="').add(v).add('"'); + } + }); + } + if ((t.length < 1) && (!(t.name.toUpperCase() in _neverSingletones))) { + result.add(' />'); + } + else { + result.add('>'); + t.forEach(function (x) { + result.add(toHTML(x)); + }); + result.add(''); + } + return result.join(""); + }; + return tag; + }; + }); +} + +var _html_tags = + ["A", "ABBR", "ACRONYM", "ADDRESS", "APPLET", "AREA", "B", + "BASE", "BASEFONT", "BDO", "BIG", "BLOCKQUOTE", "BODY", + "BR", "BUTTON", "CAPTION", "CENTER", "CITE", "CODE", "COL", + "COLGROUP", "DD", "DEL", "DIR", "DIV", "DFN", "DL", "DT", + "EM", "FIELDSET", "FONT", "FORM", "FRAME", "FRAMESET", + "H1", "H2", "H3", "H4", "H5", "H6", + "HEAD", "HR", "HTML", "I", "IFRAME", "IMG", "INPUT", + "INS", "ISINDEX", "KBD", "LABEL", "LEGEND", "LI", "LINK", + "MAP", "MENU", "META", "NOFRAMES", "NOSCRIPT", "OBJECT", + "OL", "OPTGROUP", "OPTION", "P", "PARAM", "PRE", "Q", "S", + "SAMP", "SCRIPT", "SELECT", "SMALL", "SPAN", "STRIKE", + "STRONG", "STYLE", "SUB", "SUP", "TABLE", "TBODY", "TD", + "TEXTAREA", "TFOOT", "TH", "THEAD", "TITLE", "TR", "TT", + "U", "UL", "VAR", "XMP"]; + +_importTags(this, _html_tags); + diff --git a/trunk/infrastructure/framework-src/modules/global/appjet.js b/trunk/infrastructure/framework-src/modules/global/appjet.js new file mode 100644 index 0000000..135ac44 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/global/appjet.js @@ -0,0 +1,107 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("jsutils.scalaF0"); + +//---------------------------------------------------------------- +// global static "appjet" object +//---------------------------------------------------------------- + +/** + * @fileOverview The global appjet object contains access to the AppJet runtime, + * app meta-data, and other information. + */ +var appjet = { + +/** + * This is the interface to the execution context. You probably won't need + * to use this, but if you do, be careful! + * @type object + */ +get context() { + return net.appjet.oui.ExecutionContextUtils.currentContext(); +}, + +get executionId() { + return this.context.executionId(); +}, + +// /** +// * Holds the current request's requestId. (These IDs may be reused!) +// * @type String +// */ +// get requestId() { +// return this.context.requestId(); +// }, + +/** + * Volatile cache that persists between requests. (JavaScript object). + */ +get cache() { + return Packages.net.appjet.ajstdlib.ajstdlib.attributes() + .getOrElseUpdate("cache", scalaF0({})); +}, + +get cacheRoot() { + return function(name) { + return Packages.net.appjet.ajstdlib.ajstdlib.attributes() + .getOrElseUpdate("cache-"+(name?name:""), scalaF0({})); + }; +}, + +/** + * A global lock for this app (ReentrantLock object). + */ +get globalLock() { + return net.appjet.ajstdlib.ajstdlib.globalLock(); +}, + +/** + * Per-request cache, cleared between requests. + */ +get requestCache() { + return this.context.attributes().getOrElseUpdate("requestCache", scalaF0({})) +}, + +/** + * Per-scope cache, persisted in this "server" instance. + */ +get scopeCache() { + return this.context.runner().attributes().getOrElseUpdate("scopeCache", scalaF0({})); +}, + +/** + * config params for app. + */ +get config() { + return Packages.net.appjet.oui.config.configObject(this.context.runner().globalScope()); +}, + +/** + * tells appjet not to re-use this "scope"/"server" + */ +get retireScope() { + return function() { this.context.runner().reuseOk_$eq(false); } +}, + +/** + * How many milliseconds the server has been running for. + */ +get uptime() { + return Date.now() - Packages.net.appjet.oui.main.startTime().getTime(); +} + +}; // end: var appjet = {... \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/modules/global/request.js b/trunk/infrastructure/framework-src/modules/global/request.js new file mode 100644 index 0000000..a4327f9 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/global/request.js @@ -0,0 +1,312 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("stringutils.trim"); +import("jsutils.scalaF0") + +function _cx() { return appjet.context }; + +function _addIfNotPresent(obj, key, value) { + if (!(key in obj)) obj[key] = value; +} + +var request = { + +get isDefined() { + return ( + _cx() != null && + _cx().request() != null && + (! _cx().request().isFake()) && + _cx().request().req() != null + ); +}, + +get cache() { + var req = _cx().request().req(); + if (req.getAttribute("jsCache") == null) { + req.setAttribute("jsCache", {}); + } + return req.getAttribute("jsCache"); +}, + +get continuation() { + if (this.isDefined) { + var c = Packages.net.appjet.ajstdlib.execution.getContinuation(_cx()); + var u = this.underlying; + return { + suspend: function(timeout) { + return Packages.net.appjet.ajstdlib.execution.sync( + u, scalaF0(function() { return c.suspend(timeout); })); + }, + resume: function() { + Packages.net.appjet.ajstdlib.execution.sync( + u, scalaF0(function() { c.resume(); })) + } + } + } +}, + +get underlying() { + if (this.isDefined) { + return _cx().request().req(); + } +}, + +/** + * The request path following the hostname. For example, if the user + * is visiting yourapp.appjet.net/foo, then this will be set to + * "/foo". + * + * This does not include CGI parameters or the domain name, and always + * begins with a "/". + * + * @type string + */ +get path() { + if (this.isDefined) { + return String(_cx().request().path()); + } +}, + +/** + * The value request query string. + * + * For example, if the user visits "yourapp.appjet.net/foo?id=20", then + * query will be "id=20". + * + * @type string + */ +get query() { + if (this.isDefined) { + if (_cx().request().query() != null) { + return _cx().request().query(); + } + } +}, + +/** + * The content of a POST request. Retrieving this value may interfere + * with the ability to get post request parameters sent in the body of + * a request via the "params" property. Use with care. + * + * @type string + */ +get content() { + if (this.isDefined) { + if (_cx().request().content() != null) { + return _cx().request().content(); + } + } +}, + +/** + * Either "GET" or "POST" (uppercase). + * @type string + */ +get method() { + if (this.isDefined) { + return String(_cx().request().method().toUpperCase()); + } +}, + +/** + * Whether the curent HTTP request is a GET request. + * @type boolean + */ +get isGet() { + return (this.method == "GET"); +}, + +/** + * Whether the current HTTP request is a POST request. + * @type boolean + */ +get isPost() { + return (this.method == "POST"); +}, + +/** + * Either "http" or "https" (lowercase). + * @type string + */ +get scheme() { + if (this.isDefined) { + return String(_cx().request().scheme()); + } +}, + +/** + * Whether the current request arrived using HTTPS. + * @type boolean + */ +get isSSL() { + return (this.scheme == "https"); +}, + +/** + * Holds the IP address of the user making the request. + * @type string + */ +get clientAddr() { + if (this.isDefined) { + return String(_cx().request().clientAddr()); + } +}, + +/** + * Parameters associated with the request, either from the query string + * or from the contents of a POST, e.g. from a form. Parameters are accessible + * by name as properties of this object. The property value is either a + * string (typically) or an array of strings (if the parameter occurs + * multiple times in the request). + * + * @type object + */ +get params() { + if (this.isDefined) { + var cx = _cx(); + var req = cx.request(); + return cx.attributes().getOrElseUpdate("requestParams", + scalaF0(function() { return req.params(cx.runner().globalScope()); })); + } +}, + +/** + * Uploaded files associated with the request, from the contents of a POST. + * + * @type object + */ +get files() { + if (this.isDefined) { + var cx = _cx(); + var req = cx.request(); + return cx.attributes().getOrElseUpdate("requestFiles", + scalaF0(function() { return req.files(cx.runner().globalScope()); })); + } +}, + +/** + * Used to access the HTTP headers of the current request. Properties are + * header names, and each value is either a string (typically) or an + * array of strings (if the header occurs multiple times in the request). + * + * @example +print(request.headers["User-Agent"]); + * + * @type object + */ +get headers() { + if (this.isDefined) { + var cx = _cx(); + var req = cx.request(); + return cx.attributes().getOrElseUpdate("requestHeaders", + scalaF0(function() { return req.headers(cx.runner().globalScope()); })); + } +}, + +// TODO: this is super inefficient to do each time someone accesses +// request.cookies.foo. We should probably store _cookies in the requestCache. +get cookies() { + var _cookies = {}; + var cookieHeaderArray = this.headers['Cookie']; + if (!cookieHeaderArray) { return {}; } + if (!(cookieHeaderArray instanceof Array)) + cookieHeaderArray = [cookieHeaderArray]; + var name, val; + + cookieHeaderArray.forEach(function (cookieHeader) { + cookieHeader.split(';').forEach(function(cs) { + var parts = cs.split('='); + if (parts.length == 2) { + name = trim(parts[0]); + val = trim(unescape(parts[1])); + _addIfNotPresent(_cookies, name, val); + } + }); + }); + + return _cookies; +}, + +/** + * Holds the full URL of the request. + */ +get url() { + if (this.isDefined) { + return this.scheme+"://"+this.host+this.path+(this.query ? "?"+this.query : ""); + } +}, + +get host() { + if (this.isDefined) { + // required by HTTP/1.1 to be present. + return String(this.headers['Host']).toLowerCase(); + } +}, + +get domain() { + if (this.isDefined) { + // like host, but without the port if there is one. + return this.host.split(':')[0]; + } +}, + +get uniqueId() { + return String(_cx().executionId()); +}, + +get protocol() { + if (this.isDefined) { + return String(_cx().request().protocol()); + } +}, + +get userAgent() { + if (this.isDefined) { + var agentString = (request.headers['User-Agent'] || "?"); + return { + toString: function() { return agentString; }, + isIPhone: function() { return (agentString.indexOf("(iPhone;") > 0); } + }; + } +}, + +get acceptsGzip() { + if (this.isDefined) { + var headerArray = this.headers["Accept-Encoding"]; + if (! (headerArray instanceof Array)) { + headerArray = [headerArray]; + } + // Want to see if some accept-encoding header OK's gzip. + // Starting with: "Accept-Encoding: gzip; q=0.5, deflate; q=1.0" + // 1. Split into ["gzip; q=0.5", "delfate; q=1.0"] + // 2. See if some entry is gzip with q > 0. (q is optional.) + return headerArray.some(function(header) { + if (! header) return false; + return header.split(/,\s*/).some(function(validEncoding) { + if (!validEncoding.indexOf("gzip") == 0) { + return false; + } + if (/q=[0\.]*$/.test(validEncoding)) { + return false; + } + return true; + }); + }); + } +} + +}; // end: var request = {... diff --git a/trunk/infrastructure/framework-src/modules/global/response.js b/trunk/infrastructure/framework-src/modules/global/response.js new file mode 100644 index 0000000..7236920 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/global/response.js @@ -0,0 +1,294 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +/** + * @fileOverview Helpers for the HTTP response. + */ + +/** @ignore */ +function _cx() { return appjet.context }; + +/** @ignore */ +function _cookiestring(c) { + var x = ''; + if (!c.name) { throw new Error('cookie name is required'); } + if (!c.value) { c.value = ''; } + x += (c.name + '=' + escape(c.value)); + + // expires + if (c.expires instanceof Date) { + x += ('; expires='+_cookiedate(c.expires)); + } + if (typeof(c.expires) == 'number') { + var today = (new Date()).valueOf(); + var d = new Date(today + 86400000*c.expires); + x += ('; expires='+_cookiedate(d)); + } + + // domain + if (c.domain) { x += ('; domain='+c.domain); } + + // path + if (c.path) { x += ('; path='+c.path); } + + // secure + if (c.secure == true) { x += '; secure'; } + + return x; +}; + +/** @ignore */ +function _cookiedate(d) { + var x = d.toGMTString(); + var p = x.split(' '); + return [p[0], [p[1], p[2], p[3]].join('-'), p[4], p[5]].join(' '); +}; + +var response = { + +get isDefined() { + return _cx().response() != null; +} + +}; + +/** + * Halts the program immediately and returns 403 Forbidden error to the user. + */ +response.forbid = function() { + _cx().response().error(403, "Forbidden"); +}; + +/** + * Halts the program immediately. + * + * @param {boolean} renderCurrentPage if false, an empty page will be rendered, + * otherwise calls to print() so far will be displayed. Either way, no more + * code will be executed. + */ +response.stop = function(renderCurrentPage) { + _cx().response().stop(); +}; + +/** + * Halts the program immediately and returns a 404 not found error to the user. + */ +response.notFound = function() { + _cx().response().error(404, "404: Not found"); +}; + +/** + * Halts the program immediately and sends an HTTP redirect response (302), + * redirecting to the given path (relative or absolute). + * + * @param {string} path The new path + */ +response.redirect = function(path) { + if ((! path) && path != "") { + throw new Error("Invalid redirect: "+path); + } + if (path.indexOf('/') == 0) { + // make sure absolute URL has proper host/port + path = request.scheme+"://"+request.host+path; + } + _cx().response().redirect(path); +}; + +/** + * Sets the status code in the HTTP response. + * + * @param {number} newCode + */ +response.setStatusCode = function(newCode) { + _cx().response().setStatusCode(newCode); +}; +response.getStatusCode = function() { + return _cx().response().getStatusCode(); +}; + +response.sendError = function(errorCode, errorHtml) { + _cx().response().error(errorCode, errorHtml); +}; + +response.reset = function() { + _cx().response().reset(); +}; + +/** + * Sets any header of the HTTP response. + * + * @example +response.setHeader('Cache-Control', 'no-cache'); + * + * @param {string} name + * @param {string} value + */ +response.setHeader = function(name, value) { + _cx().response().setHeader(name, value); +}; + +/** + * Adds the name,value pair to the headers. Useful for headers that are + * allowed to repeat, such as Set-Cookie. + * + * @param {string} name + * @param {string} value + */ +response.addHeader = function(name, value) { + _cx().response().addHeader(name, value); +}; + +/** + * Returns the value of a previously-set header. Useful in the + * postRequestHandler to see values of headers set during normal + * request processing. + * + * @param {string} name + * @return {array} An array of header values. Empty array if none set. + */ +response.getHeader = function(name) { + if (! this.isDefined) { + return []; + } else { + return _cx().response().getHeader(name); + } +}; + +/** + * Removes all instances of a header of the HTTP response. + * + * @param {string} name + */ +response.removeHeader = function(name) { + _cx().response().removeHeader(name); +}; + +/** + * Low-level hook for writing raw data to the response. + * @param {string} data will be written, verbatim, to the HTTP resonse. + */ +response.write = function(data) { + _cx().response().write(data); +}; + +/** + * Low-level hook for writing raw byte data to the response. Especially + * useful for writing the result of a wget of image data, + * or writing an uploaded file. + * @param {string} data will be written, verbatim, to the HTTP resonse. + */ +response.writeBytes = function(data) { + _cx().response().writeBytes(data); +}; + +//---------------------------------------------------------------- +// Cookies! +//---------------------------------------------------------------- + +/** + * Set a cookie in the response. + * + * @example +response.setCookie({ + name: "SessionID", + value: "25", + secure: true, + expires: 14 // 14 days +}); + * + * @param {object} cookieObject This may contain any of the following: +
    +
  • name (required): The name of the cookie
  • +
  • value (required): The value of the cookie. (Note: this value will be escaped). +
  • expires (optional): If an integer, means number of days until it expires; + if a Date object, means exact date on which to expire.
  • +
  • domain (optional): The cookie domain
  • +
  • path (optional): To restrict the cookie to a specific path.
  • +
  • secure (optional): Whether this cookie should only be sent securely.
  • +
+ */ +response.setCookie = function(cookieObject) { + this.addHeader('Set-Cookie', _cookiestring(cookieObject)); + + var p3pHeader = this.getHeader("P3P"); + if ((! p3pHeader) || p3pHeader.length == 0) { + // The existence of this "privacy policy" header allows cookies set on + // pages inside iframes to be accepted by IE. (This is some kind of + // default policy copied from an example online. -- dgreensp) + this.setHeader('P3P', 'CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"'); + } +}; + +/** + * Tells the client to delete the cookie of the given name (by setting + * its expiration time to zero). + * @param {string} name The name of the cookie to delete. + */ +response.deleteCookie = function(name) { + this.setCookie({name: name, value: '', expires: 0}); +}; + +function _trim(s) { + return String((new java.lang.String(s)).trim()); +} + +response.getCookie = function(name) { + var cookieHeaders = this.getHeader('Set-Cookie'); + if (! cookieHeaders) { return; } + for (var i = 0; i < cookieHeaders.length; ++i) { + if (_trim(cookieHeaders[i].split("=")[0]) == name) + return _trim(cookieHeaders[i].split(";")[0].split("=")[1]); + } +}; + +/** + * Sets the Content-Type header of the response. If the content-type includes + * a charset, that charset is used to send the response. + * @param {string} contentType the new content-type + */ +response.setContentType = function(contentType) { + _cx().response().setContentType(contentType); +}; + +response.getCharacterEncoding = function() { + return _cx().response().getCharacterEncoding(); +} + +response.neverCache = function() { + // be aggressive about not letting the response be cached. + var that = this; + function sh(k,v) { that.setHeader(k,v); } + sh('Expires', 'Sat, 18 Jun 1983 07:07:07 GMT'); + sh('Last-Modified', (new Date()).toGMTString()); + sh('Cache-Control', ('no-store, no-cache, must-revalidate, '+ + 'post-check=0, pre-check=0')); + sh('Pragma', 'no-cache'); +}; + +response.alwaysCache = function() { + var that = this; + function sh(k,v) { that.setHeader(k,v); } + that.removeHeader('Last-Modified'); + that.removeHeader('Pragma'); + var futureDate = new Date(); + futureDate.setTime(Date.now() + 315360000000); + sh('Expires', futureDate.toGMTString()); + sh('Cache-Control', 'max-age=315360000'); +}; + +response.setGzip = function(gzip) { + _cx().response().setGzip(gzip); +} diff --git a/trunk/infrastructure/framework-src/modules/image.js b/trunk/infrastructure/framework-src/modules/image.js new file mode 100644 index 0000000..8aec74b --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/image.js @@ -0,0 +1,110 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("blob"); + +jimport("java.awt.image.BufferedImage"); +jimport("org.apache.sanselan.Sanselan"); +jimport("org.apache.sanselan.ImageFormat"); + +if (java.lang.System.getProperty("java.awt.headless") == null) { + // If the system property isn't set either way, then default to "headless" mode, + // so that we don't start calling the window manager when the AWT classes + // are loaded. For example, on OS X the java process is given a Dock icon + // when we create our first BufferedImage. + java.lang.System.setProperty("java.awt.headless", "true"); +} + +/** + * Encodes the given pixel data into an image blob, ready to be served to + * the client. Pixels are specified as 32-bit ints in the format AARRGGBB, + * and the order is across rows first, then down columns. If useTransparency + * is true, then all pixels should have an alpha channel as their + * most-significant byte, with 0xff being fully opaque. If useTransparency + * is false, all pixels are fully opaque and the high byte is ignored. + * Supported formats: GIF. + *

+ * For example, to create a GIF image consisting of a green pixel followed + * by a transparent pixel to the right of it, use: + * imageBlobFromPixels(2, 1, [0xff00ff00, 0x00000000], true, "gif") + */ + +function pixelsToImageBlob(width, height, pixelArrayARGB, useTransparency, format) { + var image = _makeBufferedImage(width, height); + var array = _makePixelArray(width, height); + var alphaMask = (useTransparency ? 0x00000000 : 0xff000000); + + for(var i=0; i -1; +}; + +function jsmin(comment, input, level) { + + if (input === undefined) { + input = comment; + comment = ''; + level = 2; + } else if (level === undefined || level < 1 || level > 3) { + level = 2; + } + + if (comment.length > 0) { + comment += '\n'; + } + + var a = '', + b = '', + EOF = -1, + LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', + DIGITS = '0123456789', + ALNUM = LETTERS + DIGITS + '_$\\', + theLookahead = EOF; + + + /* isAlphanum -- return true if the character is a letter, digit, underscore, + dollar sign, or non-ASCII character. + */ + + function isAlphanum(c) { + return c != EOF && (ALNUM.has(c) || c.charCodeAt(0) > 126); + } + + + /* get -- return the next character. Watch out for lookahead. If the + character is a control character, translate it to a space or + linefeed. + */ + + function get() { + + var c = theLookahead; + if (get.i == get.l) { + return EOF; + } + theLookahead = EOF; + if (c == EOF) { + c = input.charAt(get.i); + ++get.i; + } + if (c >= ' ' || c == '\n') { + return c; + } + if (c == '\r') { + return '\n'; + } + return ' '; + } + + get.i = 0; + get.l = input.length; + + + /* peek -- get the next character without getting it. + */ + + function peek() { + theLookahead = get(); + return theLookahead; + } + + + /* next -- get the next character, excluding comments. peek() is used to see + if a '/' is followed by a '/' or '*'. + */ + + function next() { + + var c = get(); + if (c == '/') { + switch (peek()) { + case '/': + for (;;) { + c = get(); + if (c <= '\n') { + return c; + } + } + break; + case '*': + get(); + for (;;) { + switch (get()) { + case '*': + if (peek() == '/') { + get(); + return ' '; + } + break; + case EOF: + throw 'Error: Unterminated comment.'; + } + } + break; + default: + return c; + } + } + return c; + } + + + /* action -- do something! What you do is determined by the argument: + 1 Output A. Copy B to A. Get the next B. + 2 Copy B to A. Get the next B. (Delete A). + 3 Get the next B. (Delete B). + action treats a string as a single character. Wow! + action recognizes a regular expression if it is preceded by ( or , or =. + */ + + function action(d) { + + var r = []; + + if (d == 1) { + r.push(a); + } + + if (d < 3) { + a = b; + if (a == '\'' || a == '"') { + for (;;) { + r.push(a); + a = get(); + if (a == b) { + break; + } + if (a <= '\n') { + throw 'Error: unterminated string literal: ' + a; + } + if (a == '\\') { + r.push(a); + a = get(); + } + } + } + } + + b = next(); + + if (b == '/' && '(,=:[!&|'.has(a)) { + r.push(a); + r.push(b); + for (;;) { + a = get(); + if (a == '/') { + break; + } else if (a =='\\') { + r.push(a); + a = get(); + } else if (a <= '\n') { + throw 'Error: unterminated Regular Expression literal'; + } + r.push(a); + } + b = next(); + } + + return r.join(''); + } + + + /* m -- Copy the input to the output, deleting the characters which are + insignificant to JavaScript. Comments will be removed. Tabs will be + replaced with spaces. Carriage returns will be replaced with + linefeeds. + Most spaces and linefeeds will be removed. + */ + + function m() { + + var r = []; + a = '\n'; + + r.push(action(3)); + + while (a != EOF) { + switch (a) { + case ' ': + if (isAlphanum(b)) { + r.push(action(1)); + } else { + r.push(action(2)); + } + break; + case '\n': + switch (b) { + case '{': + case '[': + case '(': + case '+': + case '-': + r.push(action(1)); + break; + case ' ': + r.push(action(3)); + break; + default: + if (isAlphanum(b)) { + r.push(action(1)); + } else { + if (level == 1 && b != '\n') { + r.push(action(1)); + } else { + r.push(action(2)); + } + } + } + break; + default: + switch (b) { + case ' ': + if (isAlphanum(a)) { + r.push(action(1)); + break; + } + r.push(action(3)); + break; + case '\n': + if (level == 1 && a != '\n') { + r.push(action(1)); + } else { + switch (a) { + case '}': + case ']': + case ')': + case '+': + case '-': + case '"': + case '\'': + if (level == 3) { + r.push(action(3)); + } else { + r.push(action(1)); + } + break; + default: + if (isAlphanum(a)) { + r.push(action(1)); + } else { + r.push(action(3)); + } + } + } + break; + default: + r.push(action(1)); + break; + } + } + } + + return r.join(''); + } + + jsmin.oldSize = input.length; + var ret = m(input); + jsmin.newSize = ret.length; + + return comment + ret; + +} diff --git a/trunk/infrastructure/framework-src/modules/jsutils.js b/trunk/infrastructure/framework-src/modules/jsutils.js new file mode 100644 index 0000000..02f81a2 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/jsutils.js @@ -0,0 +1,195 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +/** + * @fileOverview A collection of core JavaScript utilities. + */ + +/** + * Iterator convenience for JavaScript Objects. + * + * Note that if func returns false, the iteration will be immediately terminated. + * (Returning undefined, or not specifying a return type, does not terminate the iteration). + * + * @example +var pastels = { + red: "#fcc", + green: "#cfc", + blue: "#ccf" +}; +eachProperty(pastels, function(key, value) { + print(DIV({style: 'background: '+value+';'}, key)); +}); + * + * @param {object} obj The object over which to iterate. + * @param {function} func The function to run on each [key,value] pair. + */ +function eachProperty(obj, func) { + var r; + for (k in obj) { + if (!obj.hasOwnProperty || obj.hasOwnProperty(k)) { + r = func(k,obj[k]); + if (r === false) { + break; + } + } + } +} + +/** + * Douglas Crockford's "object" function for prototypal inheritance, taken from + * http://javascript.crockford.com/prototypal.html + * + * @param {object} parent The parent object. + * @return {object} A new object whose prototype is parent. + */ +function object(parent) { + function f() {}; + f.prototype = parent; + return new f(); +} + +/** + * Creates an array of the properties of obj, + * not including built-in or inherited properties. If no + * argument is given, applies to the global object. + * + * @example +// Prints "abc" +keys({a: 1, b: 2, c: 3}).forEach(function(k) { + print(k); +} + * + * @example +// Prints all the functions and object members of the global "appjet" object, +// one per line. +print(keys(appjet).join('\n')); + * + * @param {object} obj + */ +function keys(obj) { + var array = []; + var o = obj; + if (o == undefined) { + o = this; + } + for(var k in o) { + if (!obj.hasOwnProperty || o.hasOwnProperty(k)) { + array.push(k); + } + } + return array; +} + +/** + * Comparator that returns -1, +1, or 0 depending on whether a < b, or a > b, or + * neither, respectively. + * @param {object} a + * @param {object} b + * @return {number} -1, 0, or +1 + */ +function cmp(a,b) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; +} + +function arrayToSet(arr) { + var set = {}; + arr.forEach(function(x) { + set[x] = true; + }); + return set; +} + +function mergeArrays(mergeFunction, a1, a2, etc) { + var len = a1.length; + var arrays = Array.prototype.slice.call(arguments, 1); + for (var i = 0; i < arrays.length; ++i) { + if (arrays[i].length != len) { + return; + } + } + out = []; + for (var i = 0; i < a1.length; ++i) { + out.push(mergeFunction.apply(this, arrays.map(function(array) { return array[i]; }))); + } + return out; +} + +function debug(obj) { + if (typeof(obj) == 'object') { + var ret = []; + if (obj) { + eachProperty(obj, function(k, v) { + ret.push(k+" -> "+debug(v)); + }); + return '['+ret.join(", ")+']'; + } else { + return String(obj); + } + } else { + return String(obj); + } +} + +/** + * Create a scala function out of the given JS function. + */ +function scalaFn(nargs, f) { + if (typeof(f) == 'function') { + return new Packages.scala['Function'+nargs]({ + apply: f + }); + } else { + return new Packages.scala['Function'+nargs]({ + apply: function() { return f; } + }) + } +} + +function scalaF0(f) { + return scalaFn(0, f); +} + +function scalaF1(f) { + return scalaFn(1, f); +} + +/** + * Some bonus functions for functional programming. + */ +function f_curry(thisPtr, f, arg1, arg2, etc) { + var curriedArgs = Array.prototype.slice.call(arguments, 2); + return function() { + var args = Array.prototype.slice.call(arguments, 0); + return f.apply(thisPtr, curriedArgs.concat(args)); + } +} + +function f_limitArgs(thisPtr, f, n) { + return function() { + var args = Array.prototype.slice.call(arguments, 0, n); + return f.apply(thisPtr, args); + } +} + + + diff --git a/trunk/infrastructure/framework-src/modules/netutils.js b/trunk/infrastructure/framework-src/modules/netutils.js new file mode 100644 index 0000000..6616b76 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/netutils.js @@ -0,0 +1,88 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +/** + * @fileOverview A collection of network-related utilities. + */ + +import("jsutils.eachProperty"); + +jimport("java.net.InetAddress"); + + +function urlPost(url0, params, options) { + var url = new java.net.URL(url0); + + var data; + if (typeof(params) == 'string') { + data = params; + } else if (typeof(params) == 'object') { + var components = []; + eachProperty(params, function(k, v) { + components.push(encodeURIComponent(k)+"="+encodeURIComponent(v)); + }); + data = components.join('&'); + } + var dataBytes = (new java.lang.String(data)).getBytes("UTF-8"); + var conn = url.openConnection(); + conn.setInstanceFollowRedirects(true); + conn.setRequestMethod("POST"); + conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); + conn.setRequestProperty("Content-Length", dataBytes.length); + conn.setDoInput(true); + conn.setDoOutput(true); + conn.setConnectTimeout(30*1000); + conn.setReadTimeout(30*1000); + conn.getOutputStream().write(dataBytes); + var content = conn.getContent(); + var responseCode = conn.getResponseCode(); + var contentType = conn.getContentType(); + var contentEncoding = conn.getContentEncoding(); + + if ((content instanceof java.io.InputStream) && (new java.lang.String(contentType)).startsWith("text/")) { + if (! contentEncoding) { + var encoding = contentType.split(/;\s*/); + if (encoding.length > 1) { + encoding = encoding[1].split("="); + if (encoding[0] == "charset") + contentEncoding = encoding[1]; + } + } + content = net.appjet.common.util.BetterFile.getStreamBytes(content); + if (contentEncoding) { + content = (new java.lang.String(content, contentEncoding)); + } + } + + return { + content: content, + status: responseCode, + contentType: contentType, + contentEncoding: contentEncoding + }; +} + +function getHostnameFromIp(ip) { + var ret = null; + try { + var addr = InetAddress.getByName(ip); + ret = addr.getHostName(); + } catch (ex) { } + return ret; +} + + + diff --git a/trunk/infrastructure/framework-src/modules/profiler.js b/trunk/infrastructure/framework-src/modules/profiler.js new file mode 100644 index 0000000..223c197 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/profiler.js @@ -0,0 +1,48 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + + +/** + * @fileDescription + * Sosme profiling functions. + */ +var time = function() { + return Packages.net.appjet.oui.profiler.time(); +} + +var record = function(op, time) { + Packages.net.appjet.oui.profiler.record(op, time); +} + +var recordCumulative = function(op, time) { + Packages.net.appjet.oui.profiler.recordCumulative(op, time); +} + +var reset = function() { + Packages.net.appjet.oui.profiler.reset(); +} + +var print = function() { + Packages.net.appjet.oui.profiler.print(); +} + +var rcb = function(op, cumulative) { + var start = time(); + return function() { + var end = time(); + (cumulative ? recordCumulative : record)(op, end-start); + } +} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/modules/sessions.js b/trunk/infrastructure/framework-src/modules/sessions.js new file mode 100644 index 0000000..3d0041b --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/sessions.js @@ -0,0 +1,156 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("dateutils"); +import("fastJSON"); +import("fileutils"); +import("jsutils.{eachProperty,keys}"); +import("stringutils.{randomHash,startsWith,endsWith}"); +import("sync"); + +jimport("net.appjet.common.util.ExpiringMapping"); + +//---------------------------------------------------------------- + +var _DEFAULT_COOKIE_NAME = "SessionID"; +var _DEFAULT_SERVER_EXPIRATION = 3*24*60*60*1000; // 72 hours + +function getSessionId(cookieName, createIfNotPresent, domain) { + if (request.isComet || request.isCron) { + return null; + } + + if (request.cookies[cookieName]) { + return request.cookies[cookieName]; + } + + if (!createIfNotPresent) { + return null; + } + + // Keep sessionId in requestCache so this function can be called multiple + // times per request without multiple calls to setCookie(). + if (!appjet.requestCache.sessionId) { + var sessionId = randomHash(16); + + response.setCookie({ + name: cookieName, + value: sessionId, + path: "/", + domain: (domain || undefined) + }); + + appjet.requestCache.sessionId = sessionId; + } + + return appjet.requestCache.sessionId; +} + +function _getExpiringSessionMap(db) { + sync.callsyncIfTrue(db, + function() { return (!db.map); }, + function() { db.map = new ExpiringMapping(_DEFAULT_SERVER_EXPIRATION); }); + return db.map; +} + +function _getCachedDb() { + return appjet.cacheRoot("net.appjet.ajstdlib.session"); +} + +//---------------------------------------------------------------- + +function getSession(opts) { + // Session options. + if (!opts) { opts = {}; } + var cookieName = opts.cookieName || _DEFAULT_COOKIE_NAME; + + // get cookie ID (sets response cookie if necessary) + var sessionId = getSessionId(cookieName, true, opts.domain); + + // get expiring session map + var db = _getCachedDb(); + var map = _getExpiringSessionMap(db); + + // get session data object + var domainKey = (opts.domain ? opts.domain : ""); + var dataKey = [domainKey, sessionId].join('$'); + + var sessionData = map.get(dataKey); + if (!sessionData) { + sessionData = {}; + map.put(dataKey, sessionData); + } + else { + map.touch(dataKey); + } + + return sessionData; +} + +function writeSessionsToDisk() { + var dateString = dateutils.dateFormat(new Date(), "yyyy-MM-dd"); + var dataFile = new Packages.java.io.File(appjet.config.sessionStoreDir+"/sessions-"+dateString+".jslog"); + dataFile.getParentFile().mkdirs(); + var writer = new java.io.FileWriter(dataFile); + var map = _getCachedDb().map; + if (! map) { return; } + var keyIterator = map.listAllKeys().iterator(); + while (keyIterator.hasNext()) { + var key = keyIterator.next(); + var session = map.get(key); + if (keys(session).length == 0) { continue; } + var obj = { key: key, session: session }; + var json = fastJSON.stringify(obj); + writer.write(json); + writer.write("\n"); + } + writer.flush(); + writer.close(); +} + +function _extractDate(fname) { + var datePart = fname.substr("sessions-".length, "2009-09-24".length); + return Number(datePart.split("-").join("")); +} + +function readLatestSessionsFromDisk() { + var dir = new Packages.java.io.File(appjet.config.sessionStoreDir); + if (! dir.exists()) { return; } + var files = dir.listFiles(new Packages.java.io.FilenameFilter({ + accept: function(dir, name) { + return startsWith(name, "sessions") && endsWith(name, ".jslog") + } + })); + if (files.length == 0) { return; } + var latestFile = files[0]; + for (var i = 1; i < files.length; ++i) { + if (_extractDate(files[i].getName()) > _extractDate(latestFile.getName())) { + latestFile = files[i]; + } + } + var map = _getExpiringSessionMap(_getCachedDb()); + fileutils.eachFileLine(latestFile, function(json) { + try { + var obj = fastJSON.parse(json); + var key = obj.key; + var session = obj.session; + map.put(key, session); + } catch (err) { + Packages.java.lang.System.out.println("Error reading sessions file on line '"+json+"': "+String(err)); + } + }); + latestFile.renameTo(new Packages.java.io.File(latestFile.getParent()+"/used-"+latestFile.getName())); +} diff --git a/trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js b/trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js new file mode 100644 index 0000000..1c4cc95 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js @@ -0,0 +1,57 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + + +import("sqlbase.sqlobj"); +import("sqlbase.sqlcommon"); + +jimport("java.lang.System.out.println"); + +// TODO: add caching? + +// Curently supports: +// Strings + +function get(name) { + if (!sqlcommon.doesTableExist('persistent_vars')) { + return undefined; + } + var r = sqlobj.selectSingle('persistent_vars', {name: name}); + if (!r) { + return undefined; + } + return r.stringVal; +} + +function put(name, val) { + if (typeof(val) != 'string') { + throw Error("unsupported type for persistent_vars: "+typeof(val)); + } + + var r = sqlobj.selectSingle('persistent_vars', {name: name}); + if (r) { + sqlobj.updateSingle('persistent_vars', {id: r.id}, {stringVal: val}); + } else { + sqlobj.insert('persistent_vars', {name: name, stringVal: val}); + } +} + +function remove(name) { + var r = sqlobj.selectSingle('persistent_vars', {name: name}); + if (r) { + sqlobj.deleteRows('persistent_vars', {id: r.id}); + } +} diff --git a/trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js b/trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js new file mode 100644 index 0000000..3df1a0f --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js @@ -0,0 +1,205 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("jsutils.*"); +import("sqlbase.sqlcommon"); +import("fastJSON"); +import("timer"); + +jimport("java.lang.System.out.println"); + +function _sqlbase() { + return sqlcommon.getSqlBase(); +} + +/** + * Creates a SQL table suitable for storing a mapping from String to JSON value. + * Maximum key length is 128 characters. Has no effect if the table already exists. + */ +function createJSONTable(tableName) { + _sqlbase().createJSONTable(String(tableName)); +} + +/** + * Retrieves a JavaScript object or value from a table. Returns undefined + * if there is no mapping for the given string key. Requires that the table + * exist. + */ +function getJSON(tableName, stringKey) { + var result = _sqlbase().getJSON(String(tableName), String(stringKey)); + if (result) { + + return fastJSON.parse(String(result))['x']; + + /* performance-testing JSON + var obj1 = timer.time("JSON.parse (json2)", function() { + return JSON.parse(String(result))['x']; + }); + var obj2 = timer.time("JSON.parse (fastJSON)", function() { + return fastJSON.parse(String(result))['x']; + }); + return obj2; + */ + } + return undefined; +} + +function getAllJSON(tableName, start, count) { + var result = _sqlbase().getAllJSON(String(tableName), Number(start), Number(count)); + return Array.prototype.map.call(result, function(x) { + return {id: x.id(), value: fastJSON.parse(String(x.value()))['x']}; + }) +} + +function getAllJSONKeys(tableName) { + var result = _sqlbase().getAllJSONKeys(String(tableName)); + return Array.prototype.map.call(result, function(x) { return String(x); }); +} + +/** + * Assigns a JavaScript object or primitive value to a string key in a table. + * Maximum key length is 128 characters. Requires that the table exist. + */ +function putJSON(tableName, stringKey, objectOrValue) { + var obj = ({x:objectOrValue}); + + var json = fastJSON.stringify(obj); + + /* performance-testing JSON + + var json1 = timer.time("JSON.stringify (json2)", function() { + return JSON.stringify(obj); + }); + var json2 = timer.time("JSON.stringify (fastJSON)", function() { + return fastJSON.stringify(obj); + }); + + if (json1 != json2) { + println("json strings do not match!"); + println("\n\n"); + println(json1); + println("\n"); + println(json2); + println("\n\n"); + }*/ + + _sqlbase().putJSON(String(tableName), String(stringKey), json); +} + +/** + * Removes the mapping for a string key from a table. Requires that the table + * exist. + */ +function deleteJSON(tableName, stringKey) { + _sqlbase().deleteJSON(String(tableName), String(stringKey)); +} + +/** + * Creates a SQL table suitable for storing a mapping from (key,n) to string. + * The mapping may be sparse, but storage is most efficient when n are consecutive. + * The "length" of the array is not stored and must be externally maintained. + * Maximum key length is 128 characters. This call has no effect if the table + * already exists. + */ +function createStringArrayTable(tableName) { + _sqlbase().createStringArrayTable(String(tableName)); +} + +/** + * Assigns a string value to a (key,n) pair in a StringArray table. Maximum key length + * is 128 characters. Requires that the table exist. + */ +function putStringArrayElement(tableName, stringKey, n, value) { + _sqlbase().putStringArrayElement(String(tableName), String(stringKey), + Number(n), String(value)); +} + +/** + * Equivalent to a series of consecutive puts of the elements of valueArray, with the first + * one going to n=startN, the second to n=startN+1, and so on, but much more efficient. + */ +function putConsecutiveStringArrayElements(tableName, stringKey, startN, valueArray) { + var putter = _sqlbase().putMultipleStringArrayElements(String(tableName), String(stringKey)); + for(var i=0;i 0) { + stmnt += "WHERE ("; + stmnt += constraintKeys.map(function(key) { + return _makeConstraintString(key, constraints[key]); + }).join(' AND '); + stmnt += ')'; + } + + if (options.orderBy) { + var orderEntries = []; + options.orderBy.split(",").forEach(function(orderBy) { + var asc = "ASC"; + if (orderBy.charAt(0) == '-') { + orderBy = orderBy.substr(1); + asc = "DESC"; + } + orderEntries.push(_bq(orderBy)+" "+asc); + }); + stmnt += " ORDER BY "+orderEntries.join(", "); + } + + if (options.limit) { + stmnt += " LIMIT "+options.limit; + } + + return withConnection(function(conn) { + var pstmnt = conn.prepareStatement(stmnt); + return closing(pstmnt, function() { + _setPreparedValues( + tableName, pstmnt, constraintKeys, + _preparedValuesConstraints(constraints), 0); + + _qdebug(stmnt); + var resultSet = pstmnt.executeQuery(); + var resultArray = []; + + return closing(resultSet, function() { + while (resultSet.next()) { + resultArray.push(_resultRowToJsObj(resultSet)); + } + + return resultArray; + }); + }); + }); +} + +/* returns number of rows updated */ +function update(tableName, constraints, obj) { + var objKeys = keys(obj); + var constraintKeys = keys(constraints); + + var stmnt = "UPDATE "+_bq(tableName)+" SET "; + stmnt += objKeys.map(function(k) { return ''+_bq(k)+' = ?'; }).join(', '); + stmnt += " WHERE ("; + stmnt += constraintKeys.map(function(k) { return '('+_bq(k)+' = ?)'; }).join(' AND '); + stmnt += ')'; + + return withConnection(function(conn) { + var pstmnt = conn.prepareStatement(stmnt); + return closing(pstmnt, function() { + _setPreparedValues(tableName, pstmnt, objKeys, obj, 0); + _setPreparedValues(tableName, pstmnt, constraintKeys, constraints, objKeys.length); + _qdebug(stmnt); + return pstmnt.executeUpdate(); + }); + }); +} + +function updateSingle(tableName, constraints, obj) { + var count = update(tableName, constraints, obj); + if (count != 1) { + throw Error("save count != 1. instead, count = "+count); + } +} + +function deleteRows(tableName, constraints) { + var constraintKeys = keys(constraints); + var stmnt = "DELETE FROM "+_bq(tableName)+" WHERE ("; + stmnt += constraintKeys.map(function(k) { return '('+_bq(k)+' = ?)'; }).join(' AND '); + stmnt += ')'; + withConnection(function(conn) { + var pstmnt = conn.prepareStatement(stmnt); + closing(pstmnt, function() { + _setPreparedValues(tableName, pstmnt, constraintKeys, constraints); + _qdebug(stmnt); + pstmnt.executeUpdate(); + }); + }) +} + +//---------------------------------------------------------------- +// table management +//---------------------------------------------------------------- + +/* + * Create a SQL table, specifying column names and types with a + * javascript object. + */ +function createTable(tableName, colspec, indices) { + if (doesTableExist(tableName)) { + return; + } + + var stmnt = "CREATE TABLE "+_bq(tableName)+ " ("; + stmnt += keys(colspec).map(function(k) { return (_bq(k) + ' ' + colspec[k]); }).join(', '); + if (indices) { + stmnt += ', ' + keys(indices).map(function(k) { return 'INDEX (' + _bq(k) + ')'; }).join(', '); + } + stmnt += ')'+createTableOptions(); + _execute(stmnt); +} + +function dropTable(tableName) { + _execute("DROP TABLE "+_bq(tableName)); +} + +function dropAndCreateTable(tableName, colspec, indices) { + if (doesTableExist(tableName)) { + dropTable(tableName); + } + + return createTable(tableName, colspec, indices); +} + +function renameTable(oldName, newName) { + _executeUpdate("RENAME TABLE "+_bq(oldName)+" TO "+_bq(newName)); +} + +function modifyColumn(tableName, columnName, newSpec) { + _executeUpdate("ALTER TABLE "+_bq(tableName)+" MODIFY "+_bq(columnName)+" "+newSpec); +} + +function alterColumn(tableName, columnName, alteration) { + var q = "ALTER TABLE "+_bq(tableName)+" ALTER COLUMN "+_bq(columnName)+" "+alteration; + _executeUpdate(q); +} + +function changeColumn(tableName, columnName, newSpec) { + var q = ("ALTER TABLE "+_bq(tableName)+" CHANGE COLUMN "+_bq(columnName) + +" "+newSpec); + _executeUpdate(q); +} + +function addColumns(tableName, colspec) { + inTransaction(function(conn) { + eachProperty(colspec, function(name, definition) { + var stmnt = "ALTER TABLE "+_bq(tableName)+" ADD COLUMN "+_bq(name)+" "+definition; + _executeUpdate(stmnt); + }); + }); +} + +function dropColumn(tableName, columnName) { + var stmnt = "ALTER TABLE "+_bq(tableName)+" DROP COLUMN "+_bq(columnName); + _executeUpdate(stmnt); +} + +function listTables() { + return withConnection(function(conn) { + var metadata = conn.getMetaData(); + var resultSet = metadata.getTables(null, null, null, null); + var resultArray = []; + + return closing(resultSet, function() { + while (resultSet.next()) { + resultArray.push(resultSet.getString("TABLE_NAME")); + } + return resultArray; + }); + }); +} + +function setTableEngine(tableName, engineName) { + var stmnt = "ALTER TABLE "+_bq(tableName)+" ENGINE="+_bq(engineName); + _executeUpdate(stmnt); +} + +function getTableEngine(tableName) { + if (!isMysql()) { + throw Error("getTableEngine() only supported by MySQL database type."); + } + + var tableEngines = {}; + + withConnection(function(conn) { + var stmnt = "show table status"; + var pstmnt = conn.prepareStatement(stmnt); + closing(pstmnt, function() { + _qdebug(stmnt); + var resultSet = pstmnt.executeQuery(); + closing(resultSet, function() { + while (resultSet.next()) { + var n = resultSet.getString("Name"); + var eng = resultSet.getString("Engine"); + tableEngines[n] = eng; + } + }); + }); + }); + + return tableEngines[tableName]; +} + +function createIndex(tableName, columns) { + var indexName = "idx_"+(columns.join("_")); + var stmnt = "CREATE INDEX "+_bq(indexName)+" on "+_bq(tableName)+" ("; + stmnt += columns.map(_bq).join(", "); + stmnt += ")"; + _executeUpdate(stmnt); +} + diff --git a/trunk/infrastructure/framework-src/modules/stringutils.js b/trunk/infrastructure/framework-src/modules/stringutils.js new file mode 100644 index 0000000..3fe5611 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/stringutils.js @@ -0,0 +1,399 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +/** + * @fileOverview A collection of various string utilities. + */ + +// TODO: uncomment with import works with * + +import("funhtml.{TABLE,TR,TH,TD,OL,LI}"); +import("jsutils.{object,eachProperty}"); + +//import("funhtml.*"); + +jimport("java.util.Random"); +jimport("java.lang.System.currentTimeMillis"); + + +/** + * Removes leading and trailing whitespace from a string. + * @param {string} str + * @return {string} The trimmed string. + */ +function trim(str) { + return str.replace(/^\s+|\s+$/g, ""); +} + +//---------------------------------------------------------------- +// String prototype enhancements. +// TODO: should we move this to a new library "enhancedstring"? +//---------------------------------------------------------------- +startsWith = function(s, prefix) { + return (s.indexOf(prefix) == 0); +}; +endsWith = function(s, suffix) { + return (s.substr(s.length - suffix.length) == suffix); +}; +contains = function(s, x) { + return (s.indexOf(x) != -1); +}; +makeTitle = function(s) { + if (! s) return; + return s.split(" ").map(function(x) { + return x[0].toUpperCase() + x.substr(1) + }).join(" "); +} +repeat = function(s, n) { + var out = []; + while (n-- > 0) { + out.push(s); + } + return out.join(''); +} + +/* + * Helper function that converts a raw string to an HTML string, with + * character entities replaced by appropriate HTML codes, and newlines + * rentered as BRs. + * + *

A more general version of this function is toHTML(), which can operate + * on not just strings, but any object. + * + * @param {string} str the raw string + * @return {string} HTML-formatted string + */ +function _stringToHTML(str) { + return String(net.appjet.oui.Util.stringToHTML(str)); +} + +// used to convert an object to HTML when the object does not have a +// toHTML method. +// +function _coerceObjectToHTML(obj) { + var t = TABLE({border: 1, cellpadding: 2, cellspacing: 0}); + eachProperty(obj, function(name, value) { + t.push(TR(TH(String(name)), TD(String(value)))); + }); + return toHTML(t); +} + +// Converts an array to an HTML list by listing its properties and +// recursively converting the values to HTML by calling toHTML() on +// each of them. +function _objectToOL(obj) { + var l = OL(); + eachProperty(obj, function(name, value) { + l.push(LI({value: name}, value)); + }); + return l; +} + +function _sameProperties(obj1, obj2) { + if (typeof(obj1) != 'object' || typeof(obj2) != 'object') + return typeof(obj1) == typeof(obj2); + + var mismatch = 0; + eachProperty(obj1, function(name) { + if (! obj2.hasOwnProperty(name)) { + mismatch++; + }}); + eachProperty(obj2, function(name) { + if (! obj1.hasOwnProperty(name)) { + mismatch++; + }}); + return mismatch < 2; +} + +// +// for pretty-printing arrays. needs a lot of work. +// +function _arrayToHTML(a) { + if (a.length === 0) { + return ""; + } + if (typeof(a[0]) != 'object') { + return toHTML(_objectToOL(a)); + } else if (! _sameProperties(a[0], a[1])) { + return toHTML(_objectToOL(a)); + } else { + return _likeObjectsToHTML(function (f) { + a.forEach(function(value, i) { + f({index: i}, value, {}); + });}, null); + } +} + +/** @ignore */ + +// a foreaching function that takes three arguments: properties to put first, +// properties to put in the middle, and properties to put at the end. +// and a table header (with large colspan) +function _likeObjectsToHTML(forEachFunction, tophead) { + objs = []; + prepnames = new StringSet(); + objpnames = new StringSet(); + postpnames = new StringSet(); + rows = []; + + var t = TABLE({border: 1, cellpadding: 2, cellspacing: 0}); + var head = TR(); + if (tophead) + t.push(tophead); + t.push(head); + + var butWaitTheresMore = false; + var howManyMore = 0; + + forEachFunction(function(pre, o, post) { + if (objs.length >= 10) { + butWaitTheresMore = true; + howManyMore++; + return; + } + objs.push({pre: pre, o: o, post: post}); + var tr = TR(); + rows.push(tr); + t.push(tr); + + eachProperty(pre, function(name) { prepnames.add(name); }); + eachProperty(o, function(name) { objpnames.add(name); }); + eachProperty(post, function(name) { postpnames.add(name); }); + }); + var numpnames = 0; + var appendTDsForPropName = function (where) { + return function(name) { + numpnames++; + head.push(TH(name)); + for (var j = 0; j < objs.length; ++j) { + if (! (objs[j][where] === undefined) && ! (objs[j][where][name] === undefined)) + rows[j].push(TD(String(objs[j][where][name]))); + else + rows[j].push(TD()); + } + }; + }; + prepnames.forEach(appendTDsForPropName("pre")); + objpnames.forEach(appendTDsForPropName("o")); + postpnames.forEach(appendTDsForPropName("post")); + if (butWaitTheresMore) { + t.push(TR(TD({colspan: numpnames}, "..."+howManyMore+ + " additional element"+(howManyMore == 1 ? "" : "s")+" omitted..."))); + } + return toHTML(t); +} + +/** + * Returns a string with any number of variables substituted in, as + * popularized by C's function of the same name. Some common substitutions: + * + *

  • %d - an integer
  • %f - a floating-point number
  • %b - a boolean
  • + *
  • %s - a string
+ * + *

Each time one of these "slot" appears in your format string, the next argument is displayed + * according to the type of slot you specified. + * + *

AppJet supports + * Java's specification of printf, which has a ton of features, including selecting + * arguments out of order, formatting dates and times, and specifying how many characters + * wide each slot should be. + * + * @example +var x = 5; +response.write(sprintf("an integer: %d", x)); +response.write(sprintf("Two strings: [%s] and [%s].", "string one", "string two")); + * + * @param {string} formatString + * @param {*} arg1 + * @param {*} arg2 + * @param {*} arg3 ... + */ +function sprintf(formatString, arg1, arg2, etc) { + if (typeof(formatString) != 'string') { + throw new Error('printf takes a string as the first argument.'); + } + var argList = java.lang.reflect.Array.newInstance(java.lang.Object, arguments.length-1); + for (var i = 1; i < arguments.length; i++) { + if (arguments[i] instanceof Date) + argList[i-1] = arguments[i].getTime(); + else + argList[i-1] = arguments[i]; + } + return String(net.appjet.ajstdlib.printf.printf(formatString, argList)); +}; + +/** + * Replaces keys of data found in string with their corresponding values. + * + *

(Inspired by http://javascript.crockford.com/remedial.html) + * + * @example +var data = {name: "Aaron", age: 25, today: new Date()}; +print(supplant(data, """ + +{name}'s age is {age} years, as of {today}. + +""")); + + * @param {object} data dictionary of values + * @param {string} str + * @return {string} str with keys of data replaced by their values + */ +function supplant(data, str) { + var s = str; + var o = data; + function rep(a, b) { + var r = o[b]; + if (typeof(r) != 'undefined') { + return r; + } else { + return a; + } + } + return s.replace(/{([^{}]*)}/g, rep); +}; + +//---------------------------------------------------------------- +// raw printing +//---------------------------------------------------------------- +var _raw_prototype; + +/** + * Used for printing un-escaped HTML, such as your own HTML tags. + * + *

Normally, printing a string will cause it to be translated + * so that it appears the same on the screen as it did in your code. + * If you're writing your own HTML, you don't want it to be processed + * this way. Wrapping a string in html(...) by-passes normal printing behavior, + * so that print(html(" -- html goes here ---")) will write the HTML + * directly to the page. + * + *

If you want to mix your own HTML code with HTML code generated from a + * tag object, you can get the HTML for the tag by calling its toHTML(...) method. + * + *

Multiple arguments to html(...) will be concatenated into one string. + * + * @example +print(html(""" +<br /> +<br /> +<div><p>Here is some text inside a P inside a DIV.</p> +</div> +<br /> +""")); + * + * @param {string} text the raw text + * @return {object} an object which, when printed, prints the raw html text + */ +function html(text) { + if (!_raw_prototype) { + _raw_prototype = object(Object.prototype); + _raw_prototype.toString = function() { return this._text; }; + _raw_prototype.toHTML = function() { return this._text; }; + } + var rawObj = object(_raw_prototype); + rawObj._text = Array.prototype.map.call(arguments, String).join(''); + return rawObj; +} + +/** + * This function is used by print(...) to convert a string or object + * into nice-looking printable HTML. It may be useful in conjunction + * with html(...) if you wish to work directly with HTML. + * + *

You can control how toHTML(...) (and therefore print(...)) behave on an object + * by giving that object a .toHTML() function. + * + * @param {*} x any javascript variable + * @return {string} html-formatted string + */ +function toHTML(x) { + if (typeof(x) == 'undefined') { + return 'undefined'; + } + if (x === null) { + return 'null'; + } + if (typeof x == "string" || (x instanceof java.lang.String)) { + return _stringToHTML(x); + } + if (typeof(x.toHTML) == "function") { + return x.toHTML(); + } + if (typeof(x) == "xml") { + return _stringToHTML(x.toSource()); + } + if (x instanceof Array) { + return _arrayToHTML(x); + } + if (x instanceof Date) { + var pieces = x.toString().split(" "); + return pieces.slice(0, 5).join(' ') + ' ' + pieces[6]; + } + if (typeof(x) == "object") { + return _coerceObjectToHTML(x); + } + // TODO: add more types to auto-printing, such as functions, + // numbers, what else? + return _stringToHTML(""+x); +} + + +/** + * Generates a random string of specified length using upper-case letters, lower-case letters, and numbers. + */ + +var _jrand = new Random(currentTimeMillis()); + +function randomString(nchars) { + var result = ''; + + // 48-58 or 65-91 or 97-123 (inclusive-exclusive) + // 0-10 or 0-26 or 0-26 + // 0-62 + + for (var i = 0; i < nchars; i++) { + var x = _jrand.nextInt(62); + var code; + if (x < 10) { code = x + 48; } + if (x >= 10 && x < 36) { code = x - 10 + 65/*a*/; } + if (x >= 36) { code = x - 36 + 97/*A*/; } + result += String.fromCharCode(code); + } + return result; +} + +function md5(x) { + return net.appjet.ajstdlib.md5.md5(x); +} + +function randomHash(len) { + var x = md5(""+_jrand.nextDouble()*1e12+_jrand.nextDouble()*1e12); + if (len) { + return String(x).substr(0,len); + } else { + return x; + } +} + +function gzip(x) { + return net.appjet.oui.Util.gzip(x) +} + +function isNumeric(x) { + return !!(/^\d+$/.test(x)); +} + diff --git a/trunk/infrastructure/framework-src/modules/sync.js b/trunk/infrastructure/framework-src/modules/sync.js new file mode 100644 index 0000000..a222ea0 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/sync.js @@ -0,0 +1,81 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +jimport("java.util.concurrent.locks.ReentrantLock"); +jimport("net.appjet.oui.GlobalSynchronizer"); + +/** + * synchronously calls a no-argument function. + * f may have return values. + */ +function callsync(obj, f) { + if (!obj._LOCK) { + try { + appjet.globalLock.lock(); + if (! obj._LOCK) { + obj._LOCK = new ReentrantLock(); + } + } finally { + appjet.globalLock.unlock(); + } + } + try { + obj._LOCK.lock(); + return f(); + } finally { + obj._LOCK.unlock(); + } +} + +/** + * synchronously calls a no-argument function iff + * condition() is true. condition may be called + * twice and shouldn't have side-effects. + */ +function callsyncIfTrue(obj, condition, f) { + if (condition()) { + callsync(obj, function() { + if (condition()) { + f(); + } + }); + } +} + +/** + * returns a function that synchronously calls + * f with its own arguments + */ +function wrapsync(obj, f, thisArg) { + return function() { + var args = Array.prototype.slice.call(arguments); + var wrapper = function() { + return f.apply(thisArg, args); + } + callsync(obj, wrapper); + } +} + +function doWithStringLock(lockName, fn) { + GlobalSynchronizer.acquire(lockName); + try { + return fn(); + } + finally { + GlobalSynchronizer.release(lockName); + } +} + diff --git a/trunk/infrastructure/framework-src/modules/timer.js b/trunk/infrastructure/framework-src/modules/timer.js new file mode 100644 index 0000000..01be175 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/timer.js @@ -0,0 +1,29 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("jsutils.*"); + +jimport("net.appjet.ajstdlib.timer"); + +function time(name, f) { + var t = timer.start(name); + try { + return f(); + } finally { + t.done(); + } +} + diff --git a/trunk/infrastructure/framework-src/modules/varz.js b/trunk/infrastructure/framework-src/modules/varz.js new file mode 100644 index 0000000..0e55d20 --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/varz.js @@ -0,0 +1,52 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +jimport("java.util.concurrent.atomic.AtomicInteger"); + +import("sync"); + +function varz() { + sync.callsyncIfTrue(appjet.cache, + function() { return ! appjet.cache.varz; }, + function() { appjet.cache.varz = {}; }); + return appjet.cache.varz; +} + +function _getInteger(name) { + sync.callsyncIfTrue(varz(), + function() { return ! varz()[name] }, + function() { varz()[name] = new AtomicInteger(0) }); + return varz()[name]; +} + +function incrementInt(name) { + _getInteger(name).getAndIncrement(); +} + +function addToInt(name, count) { + _getInteger(name).getAndAdd(count); +} + +function getSnapshot() { + var ret = {}; + for (var k in varz()) { + if (k[0] == '_') { + continue; + } + ret[k] = varz()[k].toString(); + } + return ret; +} diff --git a/trunk/infrastructure/framework-src/modules/yuicompressor.js b/trunk/infrastructure/framework-src/modules/yuicompressor.js new file mode 100644 index 0000000..572cc0d --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/yuicompressor.js @@ -0,0 +1,85 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + + +jimport("java.lang.System.err") +jimport("yuicompressor.org.mozilla.javascript.ErrorReporter"); +jimport("com.yahoo.platform.yui.compressor.JavaScriptCompressor") +jimport("com.yahoo.platform.yui.compressor.CssCompressor") +jimport("java.io.StringReader"); +jimport("java.io.StringWriter"); + +/** + * Compresses the given JavaScript code into an equivalent, shorter string of code using + * YUICompressor. In addition to removing white-space and comments, YUICompressor + * does a full semantic parse of the code and renames non-global variables to have + * very short names. Scopes that are visible to "eval" and "with" are excluded from + * variable renaming, making the operation very safe. + *

+ * For example, + * yuicompressor.compressJS("function foo() { var longVariableName = 3; return longVariableName }"); + * produces + * "function foo(){var A=3;return A;}" + */ + +function compressJS(code) { + function getComplaint(message, sourceName, line, lineSource, lineOffset) { + if (line < 0) return message; + else return (line+":"+lineOffset+":"+message); + } + function complaintHandler(func) { + return function(message, sourceName, line, lineSource, lineOffset) { + return func(getComplaint(message, sourceName, line, lineSource, lineOffset)); + } + } + var myErrorReporter = new JavaAdapter(ErrorReporter, { + warning: complaintHandler(function (msg) { + if (msg.indexOf("Try to use a single 'var' statement per scope.") >= 0) + return; + err.println("yuicompressor.compressJS warning: "+msg); + }), + error: complaintHandler(function (msg) { + throw new Error("yuicompressor.compressJS error: "+msg); + }), + runtimeError: complaintHandler(function (msg) { + throw new Error("yuicompressor.compressJS error: "+msg); + }) + }); + + var munge = true; + var verbose = false; + var optimize = true; + var wrapPos = 100; // characters, no wrap == -1 + var compressor = new JavaScriptCompressor(new StringReader(code), myErrorReporter); + var writer = new StringWriter(); + compressor.compress(writer, 100, munge, verbose, true, !optimize); + return String(writer.toString()); +} + +/** + * Compresses the given CSS code into an equivalent, shorter string of code using + * YUICompressor. Besides removing unnecessary white-space and comments, the operation + * performs an assortment of semantics-preserving optimizations. The operation attempts + * to preserve common "hacks" that take advantage of browser differences in parsing. + */ + +function compressCSS(code) { + var compressor = new CssCompressor(new StringReader(code)); + var wrapPos = 100; // characters, no wrap == -1 + var writer = new StringWriter(); + compressor.compress(writer, wrapPos); + return String(writer.toString()); +} diff --git a/trunk/infrastructure/framework-src/oncomet.js b/trunk/infrastructure/framework-src/oncomet.js new file mode 100644 index 0000000..b6aeda5 --- /dev/null +++ b/trunk/infrastructure/framework-src/oncomet.js @@ -0,0 +1,38 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +if (serverhandlers.cometHandler === undefined) { + throw new Packages.net.appjet.oui.NoHandlerException("No comet handler defined!"); +} + +function _ga(k) { + return String(appjet.context.attributes().apply(k)); +} + +var _op = String(_ga("cometOperation")); +switch (_op) { + case "connect": + serverhandlers.cometHandler("connect", _ga("cometId")); + break; + case "disconnect": + serverhandlers.cometHandler("disconnect", _ga("cometId")); + break; + case "message": + serverhandlers.cometHandler("message", _ga("cometId"), _ga("cometData")); + break; + default: + throw new Packages.net.appjet.oui.ExecutionException("Unknown comet operation: '"+_op+"'"); +} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onerror.js b/trunk/infrastructure/framework-src/onerror.js new file mode 100644 index 0000000..f19a85f --- /dev/null +++ b/trunk/infrastructure/framework-src/onerror.js @@ -0,0 +1,24 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +if (serverhandlers.errorHandler === undefined) { + throw new Packages.net.appjet.oui.NoHandlerException("No error handler defined!"); +} + +// default content type for request +response.setContentType('text/html; charset=utf-8'); + +serverhandlers.errorHandler(appjet.context.attributes().apply("error")); diff --git a/trunk/infrastructure/framework-src/onprint.js b/trunk/infrastructure/framework-src/onprint.js new file mode 100644 index 0000000..8e334fe --- /dev/null +++ b/trunk/infrastructure/framework-src/onprint.js @@ -0,0 +1,19 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +if (serverhandlers.postRequestHandler !== undefined) { + serverhandlers.postRequestHandler(); +} diff --git a/trunk/infrastructure/framework-src/onrequest.js b/trunk/infrastructure/framework-src/onrequest.js new file mode 100644 index 0000000..d76c8db --- /dev/null +++ b/trunk/infrastructure/framework-src/onrequest.js @@ -0,0 +1,24 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +if (serverhandlers.requestHandler === undefined) { + throw new Packages.net.appjet.oui.NoHandlerException("No request handler defined!"); +} + +// default content type for request +response.setContentType('text/html; charset=utf-8'); + +serverhandlers.requestHandler(); diff --git a/trunk/infrastructure/framework-src/onreset.js b/trunk/infrastructure/framework-src/onreset.js new file mode 100644 index 0000000..24b000a --- /dev/null +++ b/trunk/infrastructure/framework-src/onreset.js @@ -0,0 +1,19 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +if (serverhandlers.resetHandler !== undefined) { + serverhandlers.resetHandler(); +} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onsars.js b/trunk/infrastructure/framework-src/onsars.js new file mode 100644 index 0000000..31dc8ca --- /dev/null +++ b/trunk/infrastructure/framework-src/onsars.js @@ -0,0 +1,27 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +if (serverhandlers.sarsHandler === undefined) { + throw new Packages.net.appjet.oui.NoHandlerException("No SARS handler defined."); +} + +if (serverhandlers.sarsHandler !== undefined) { + (function() { + var ret = serverhandlers.sarsHandler(appjet.context.attributes().apply("sarsRequest")); + if (ret) + appjet.context.attributes().update("sarsResponse", ret); + })() +} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onscheduledtask.js b/trunk/infrastructure/framework-src/onscheduledtask.js new file mode 100644 index 0000000..810c3b5 --- /dev/null +++ b/trunk/infrastructure/framework-src/onscheduledtask.js @@ -0,0 +1,33 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +(function() { + if (serverhandlers.tasks === undefined) { + throw new Packages.net.appjet.oui.NoHandlerException("No task handlers defined!"); + } + var taskName = appjet.context.attributes().apply("taskName"); + if (serverhandlers.tasks[taskName] === undefined) { + throw new Packages.net.appjet.oui.NoHandlerException("No handler defined for task: "+taskName); + } + var taskArgs = appjet.context.attributes().apply("taskArguments"); + var argsArray = []; + if (taskArgs != null) { + for (var i = 0; i < taskArgs.length; ++i) { + argsArray.push(taskArgs[i]); + } + } + return serverhandlers.tasks[taskName].apply(null, argsArray); +})(); \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onshutdown.js b/trunk/infrastructure/framework-src/onshutdown.js new file mode 100644 index 0000000..0243bf6 --- /dev/null +++ b/trunk/infrastructure/framework-src/onshutdown.js @@ -0,0 +1,19 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +if (serverhandlers.shutdownHandler !== undefined) { + serverhandlers.shutdownHandler(); +} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onstartup.js b/trunk/infrastructure/framework-src/onstartup.js new file mode 100644 index 0000000..61feff7 --- /dev/null +++ b/trunk/infrastructure/framework-src/onstartup.js @@ -0,0 +1,19 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +if (serverhandlers.startupHandler !== undefined) { + serverhandlers.startupHandler(); +} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onsyntaxerror.js b/trunk/infrastructure/framework-src/onsyntaxerror.js new file mode 100644 index 0000000..7129a16 --- /dev/null +++ b/trunk/infrastructure/framework-src/onsyntaxerror.js @@ -0,0 +1,17 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +printSyntaxError(); \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/postamble.js b/trunk/infrastructure/framework-src/postamble.js new file mode 100644 index 0000000..76fa766 --- /dev/null +++ b/trunk/infrastructure/framework-src/postamble.js @@ -0,0 +1,19 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + + +_appjethidden_.finishImports(); + diff --git a/trunk/infrastructure/framework-src/preamble.js b/trunk/infrastructure/framework-src/preamble.js new file mode 100644 index 0000000..40f6845 --- /dev/null +++ b/trunk/infrastructure/framework-src/preamble.js @@ -0,0 +1,325 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +// appjetContext.cache_requestCache()._t_start = (new Date()).valueOf(); +var _appjethidden_ = {}; +var serverhandlers = { tasks: {} }; + +/* + * @overview + * + * AppJet standard library preamble. + * + * This is run at the beginning of every request, right after all + * native calls are loaded into appjetContext. This file is run + * in the same scope as the app, the global scope, which is also + * accessible from all modules. + */ + +//---------------------------------------------------------------- +// delete pesky rhino built-in string stuff +//---------------------------------------------------------------- +(function() { + // rhino strings come with a bunch of random "html helpers" + // that we don't want + var htmlStuff = ["bold", "italics", "fixed", "strike", + "small", "big", "sub", "fontsize", "fontcolor", "link", + "anchor", "sup", "blink"]; + for(var i in htmlStuff) { + delete String.prototype[htmlStuff[i]]; + } +})(); + +//---------------------------------------------------------------- +// module implementation +//---------------------------------------------------------------- + +(function(globalScope) { + + //---------------------------------------------------------------- + // Utility Functions + //---------------------------------------------------------------- + function appjetContext() { + return net.appjet.oui.ExecutionContextUtils.currentContext(); + } + function internalError(m) { + throw new Error("AppJet Internal Error: "+m); + } + function apiError(m) { + throw new Error("AppJet API Error: "+m); + } + function newScope() { + var o = new Object(); + o.__parent__ = null; + o.__proto__ = globalScope; + return o; + } + _appjethidden_._debugMessage = function(m) { + //java.lang.System.out.println(m); + }; + var debug = _appjethidden_._debugMessage; + function copySymbol(srcName, symName, src, dst, dstSymName) { + if (!src.hasOwnProperty(symName)) { + apiError("Import error: module \""+srcName+"\" does not contain the symbol \""+symName+"\"."); + } + if (symName.charAt(0) == '_') { + apiError("Import error: cannot import symbol \""+symName+"\" because it is private (begins with _)"); + } + debug(" | copying symbol ["+symName+"]"); + dst[dstSymName || symName] = src[symName]; + } + function copyPublicSymbols(src, dst) { + for (k in src) { + if (src.hasOwnProperty(k) && (k.length > 0) && (k.charAt(0) != '_')) { + copySymbol('', k, src, dst); + } + } + } + + // Module import cache... hidden from other scopes. + var moduleObjects = {}; + var modulesBeingLoaded = {}; + + /*-------------------------------------------------------------------------------- + * loadModule(): + * Evaluates moduleName in its own private scope, then copies its public identifiers + * into a new scope. This new scope is stored in moduleObjects[moduleName] for future use + * by import()s. + * + * If moduleName is currently being loaded (because we are in the middle of another loadModule() + * higher in the call stack), then this function does noething, on the assumption + * that moduleName will eventually be loaded anyway. Therefore, it cannot be assumed that + * moduleName is done being loaded when loadModule() returns, only that it eventually will be + * loaded when all loadModule calls return up the call stack. + *--------------------------------------------------------------------------------*/ + function loadModule(moduleName) { + if (modulesBeingLoaded[moduleName]) { + // This is OK. The module will be loaded eventually. + return; + } + if (moduleObjects[moduleName]) { + return; + } + modulesBeingLoaded[moduleName] = true; + try { + debug("loadModule: "+moduleName); + + var modulePrivateScope = + Packages.net.appjet.ajstdlib.ajstdlib.runModuleInNewScope( + appjetContext(), moduleName.split('.').join('/')); + + if (!modulePrivateScope) { + // moduleName is not a module. This is normal, because when someone calls + // import("foo.bar"), we dont know if bar is a module or an identifier in the foo module. + delete modulesBeingLoaded[moduleName]; + return; + } + // Thinking this could be useful: + // modulePrivateScope['__MODULE_NAME__'] = moduleName; + var moduleObj = newScope(); + copyPublicSymbols(modulePrivateScope, moduleObj); + moduleObjects[moduleName] = moduleObj; + } finally { + delete modulesBeingLoaded[moduleName]; + } + } + + /*-------------------------------------------------------------------------------- + * importSingleModule(): + * + * Takes a single moduleName (like "etherpad.foo.bar.baz") and creates the identifier "baz" + * in dstScope, referencing the module etherpad.foo.bar.baz. + * + * This function is called one or more times by importPath(). Note that importPath() is more like + * the import() function that modules ses. + *--------------------------------------------------------------------------------*/ + function importSingleModule(moduleName, dstScope) { + debug("importSingleModule: "+moduleName); + if (typeof(moduleName) != 'string') { + apiError("modules should be referred to with string, not "+typeof(moduleName)); + } + + var moduleObj = moduleObjects[moduleName]; // public module scope + if (!moduleObj) { + return false; + } + + var importedName = moduleName; + if (importedName.indexOf(".") != -1) { + importedName = importedName.split(".").slice(-1)[0]; + } + dstScope[importedName] = moduleObj; + return true; + } + + /*-------------------------------------------------------------------------------- + * importPath(): + * takes a modulePath (like "a.b.c.{d,e,f}" or "a.b.*" or just "a.b" or "a") and + * repeatedly calls importSingleModule() as necessary, copying public symbols into dst. + *--------------------------------------------------------------------------------*/ + function importPath(modulePath, dst) { + debug("importPath: "+modulePath); + + // Two possibilties: + // 1. import the exact module and that's it. + // + // 2. module contains a "." and we need to import up to the + // last ., and then import a name (or set of names) from it. + + // first try case 1: + var ok = importSingleModule(modulePath, dst); + if (ok) { + return; + } + + if (modulePath.indexOf(".") == -1) { + throw new Error("Module does not exist: "+modulePath); + } + + // now try case 2: + var tempDst = newScope(); + var moduleName = modulePath.split('.').slice(0, -1).join('.'); + var importedName = modulePath.split('.').slice(-1)[0]; + var lastName = modulePath.split('.').slice(-2, -1)[0]; + + ok = importSingleModule(moduleName, tempDst); + if (!ok) { + throw new Error("Neither module exists: "+moduleName+", "+modulePath); + } + + if (!tempDst[lastName]) { + internalError("import failed for "+moduleName+"|"+importedName+". This could be an appjet bug."); + } + if (importedName == "*") { + copyPublicSymbols(tempDst[lastName], dst); + } else if (importedName.match(/^\{.*\}$/)) { + importedName.slice(1,-1).split(',').forEach(function(sym) { + if (sym.match(/^.*=>.*$/)) { + copySymbol(moduleName, sym.split("=>")[0], tempDst[lastName], dst, sym.split("=>")[1]); + } else { + copySymbol(moduleName, sym, tempDst[lastName], dst); + } + }); + } else { + copySymbol(moduleName, importedName, tempDst[lastName], dst); + } + } + + //---------------------------------------------------------------- + // scheduling + //---------------------------------------------------------------- + + var scheduledImports = []; + + function scheduleImportPath(p, dst) { + scheduledImports.push([p, dst]); + } + + function runScheduledImports() { + scheduledImports.forEach(function(x) { + importPath(x[0], x[1]); + }); + } + + //---------------------------------------------------------------- + // The global import function + //---------------------------------------------------------------- + + _appjethidden_.importsAllowed = true; + + globalScope['import'] = function(path1, path2, etc) { + if (!_appjethidden_.importsAllowed) { + throw Error("Imports are finished. No more imports are allowed."); + } + + var dstScope = this; + if (arguments.length < 1) { + apiError("importModule() takes the name of at least one module as an argument."); + } + for (var i = 0; i < arguments.length; i++) { + var path = arguments[i]; + debug("scheduling import: "+path); + scheduleImportPath(path, dstScope); + // evaluate all modules in this path. + var parts = path.split('.'); + for (var j = 0; j < parts.length; j++) { + var moduleName = parts.slice(0,j+1).join('.'); + loadModule(moduleName); + } + } + }; + + _appjethidden_.finishImports = function() { + debug("Running scheduled imports..."); + runScheduledImports(); + _appjethidden_.importsAllowed = false; + }; + + //---------------------------------------------------------------- + // jimport + //---------------------------------------------------------------- + function _jimportSinglePackage(pname, dstScope) { + //_appjethidden_._debugMessage("_jimportSinglePackage: "+pname); + // TODO: support "*" and "{}" syntax like scala. + var src = Packages; + var srcParent = null; + var localName = pname.split(".").pop(); + var soFar = ''; + + pname.split(".").forEach(function(x) { + soFar += x+'.'; + if (!src[x]) { + throw ('Could not find java package/class: '+soFar); + } else { + //_appjethidden_._debugMessage("descenting into "+src+"["+x+"]"); + srcParent = src; + src = src[x]; + } + }); + + if (String(src).indexOf('function') == 0) { + // TODO: checking String(src).indexOf('function') is rather brittle. + // is there a cleaner way? + // TODO: this only works on static functions... so make sure + // src[x] is a static function! + dstScope[localName] = function() { + return src.apply(srcParent, Array.prototype.slice.call(arguments)); + }; + } else { + // importing a regular java class + dstScope[localName] = src; + } + } + + /** + * Import a java package over LiveConnect. + */ + globalScope['jimport'] = function() { + var dstScope = this; + for (var i = 0; i < arguments.length; i++) { + var pname = arguments[i].split(".").pop(); + _jimportSinglePackage(arguments[i], dstScope); + } + }; + + //---------------------------------------------------------------- + // {appjet, request, response} imported by default + //---------------------------------------------------------------- + globalScope['import'].call(globalScope, + "global.appjet.appjet", "global.request.request", "global.response.response"); + +})(this); + diff --git a/trunk/infrastructure/framework-src/syntaxerror.js b/trunk/infrastructure/framework-src/syntaxerror.js new file mode 100644 index 0000000..801066b --- /dev/null +++ b/trunk/infrastructure/framework-src/syntaxerror.js @@ -0,0 +1,32 @@ +/** + * Copyright 2009 Google Inc. + * + * 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. + */ + +import("exceptionutils"); + +function printSyntaxError() { + var ex = appjet.context.attributes().apply("error"); + + //java.lang.System.out.println("Syntax error: "+ex); + + if (response.isDefined) { + response.reset(); + response.setContentType('text/html; charset=utf-8'); + response.write(exceptionutils.getStackTraceFullpage(ex)); + } else { + java.lang.System.out.println("Syntax error: "+exceptionutils.getStackTracePlain(ex)); + } +} + -- cgit v1.2.3 From 23c364fb94d888e68d00134c99130a4b741132f8 Mon Sep 17 00:00:00 2001 From: Dan Bentley Date: Tue, 22 Dec 2009 14:51:36 -0500 Subject: Remove jsmin. --- .../infrastructure/framework-src/modules/jsmin.js | 318 --------------------- 1 file changed, 318 deletions(-) delete mode 100644 trunk/infrastructure/framework-src/modules/jsmin.js (limited to 'trunk/infrastructure/framework-src') diff --git a/trunk/infrastructure/framework-src/modules/jsmin.js b/trunk/infrastructure/framework-src/modules/jsmin.js deleted file mode 100644 index 156a331..0000000 --- a/trunk/infrastructure/framework-src/modules/jsmin.js +++ /dev/null @@ -1,318 +0,0 @@ -/* From http://fmarcia.info/jsmin/fulljsmin.js */ - -/* jsmin.js - 2006-08-31 -Author: Franck Marcia -This work is an adaptation of jsminc.c published by Douglas Crockford. -Permission is hereby granted to use the Javascript version under the same -conditions as the jsmin.c on which it is based. - -jsmin.c -2006-05-04 - -Copyright (c) 2002 Douglas Crockford (www.crockford.com) - -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 shall be used for Good, not Evil. - -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. - -Update: - add level: - 1: minimal, keep linefeeds if single - 2: normal, the standard algorithm - 3: agressive, remove any linefeed and doesn't take care of potential - missing semicolons (can be regressive) - store stats - jsmin.oldSize - jsmin.newSize -*/ - -String.prototype.has = function(c) { - return this.indexOf(c) > -1; -}; - -function jsmin(comment, input, level) { - - if (input === undefined) { - input = comment; - comment = ''; - level = 2; - } else if (level === undefined || level < 1 || level > 3) { - level = 2; - } - - if (comment.length > 0) { - comment += '\n'; - } - - var a = '', - b = '', - EOF = -1, - LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', - DIGITS = '0123456789', - ALNUM = LETTERS + DIGITS + '_$\\', - theLookahead = EOF; - - - /* isAlphanum -- return true if the character is a letter, digit, underscore, - dollar sign, or non-ASCII character. - */ - - function isAlphanum(c) { - return c != EOF && (ALNUM.has(c) || c.charCodeAt(0) > 126); - } - - - /* get -- return the next character. Watch out for lookahead. If the - character is a control character, translate it to a space or - linefeed. - */ - - function get() { - - var c = theLookahead; - if (get.i == get.l) { - return EOF; - } - theLookahead = EOF; - if (c == EOF) { - c = input.charAt(get.i); - ++get.i; - } - if (c >= ' ' || c == '\n') { - return c; - } - if (c == '\r') { - return '\n'; - } - return ' '; - } - - get.i = 0; - get.l = input.length; - - - /* peek -- get the next character without getting it. - */ - - function peek() { - theLookahead = get(); - return theLookahead; - } - - - /* next -- get the next character, excluding comments. peek() is used to see - if a '/' is followed by a '/' or '*'. - */ - - function next() { - - var c = get(); - if (c == '/') { - switch (peek()) { - case '/': - for (;;) { - c = get(); - if (c <= '\n') { - return c; - } - } - break; - case '*': - get(); - for (;;) { - switch (get()) { - case '*': - if (peek() == '/') { - get(); - return ' '; - } - break; - case EOF: - throw 'Error: Unterminated comment.'; - } - } - break; - default: - return c; - } - } - return c; - } - - - /* action -- do something! What you do is determined by the argument: - 1 Output A. Copy B to A. Get the next B. - 2 Copy B to A. Get the next B. (Delete A). - 3 Get the next B. (Delete B). - action treats a string as a single character. Wow! - action recognizes a regular expression if it is preceded by ( or , or =. - */ - - function action(d) { - - var r = []; - - if (d == 1) { - r.push(a); - } - - if (d < 3) { - a = b; - if (a == '\'' || a == '"') { - for (;;) { - r.push(a); - a = get(); - if (a == b) { - break; - } - if (a <= '\n') { - throw 'Error: unterminated string literal: ' + a; - } - if (a == '\\') { - r.push(a); - a = get(); - } - } - } - } - - b = next(); - - if (b == '/' && '(,=:[!&|'.has(a)) { - r.push(a); - r.push(b); - for (;;) { - a = get(); - if (a == '/') { - break; - } else if (a =='\\') { - r.push(a); - a = get(); - } else if (a <= '\n') { - throw 'Error: unterminated Regular Expression literal'; - } - r.push(a); - } - b = next(); - } - - return r.join(''); - } - - - /* m -- Copy the input to the output, deleting the characters which are - insignificant to JavaScript. Comments will be removed. Tabs will be - replaced with spaces. Carriage returns will be replaced with - linefeeds. - Most spaces and linefeeds will be removed. - */ - - function m() { - - var r = []; - a = '\n'; - - r.push(action(3)); - - while (a != EOF) { - switch (a) { - case ' ': - if (isAlphanum(b)) { - r.push(action(1)); - } else { - r.push(action(2)); - } - break; - case '\n': - switch (b) { - case '{': - case '[': - case '(': - case '+': - case '-': - r.push(action(1)); - break; - case ' ': - r.push(action(3)); - break; - default: - if (isAlphanum(b)) { - r.push(action(1)); - } else { - if (level == 1 && b != '\n') { - r.push(action(1)); - } else { - r.push(action(2)); - } - } - } - break; - default: - switch (b) { - case ' ': - if (isAlphanum(a)) { - r.push(action(1)); - break; - } - r.push(action(3)); - break; - case '\n': - if (level == 1 && a != '\n') { - r.push(action(1)); - } else { - switch (a) { - case '}': - case ']': - case ')': - case '+': - case '-': - case '"': - case '\'': - if (level == 3) { - r.push(action(3)); - } else { - r.push(action(1)); - } - break; - default: - if (isAlphanum(a)) { - r.push(action(1)); - } else { - r.push(action(3)); - } - } - } - break; - default: - r.push(action(1)); - break; - } - } - } - - return r.join(''); - } - - jsmin.oldSize = input.length; - var ret = m(input); - jsmin.newSize = ret.length; - - return comment + ret; - -} -- cgit v1.2.3 From c1894c8e0a52f4e3d2f89fa92f0066bbf0fcf1b1 Mon Sep 17 00:00:00 2001 From: Elliot Kroo Date: Sat, 23 Jan 2010 10:41:05 -0800 Subject: Applied LDAP patches See http://bit.ly/5BTvub for details. This patch provides two large changes of note. The first of which provides a general purpose library for external process execution (process.js), and the second of which provides LDAP and SSO authentication through a fairly simple LDAP library (pro_ldap_support.js, and pro_accounts.js). Patches and harsh unwarranted criticism welcome ;) --- .../framework-src/modules/process.js | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 trunk/infrastructure/framework-src/modules/process.js (limited to 'trunk/infrastructure/framework-src') diff --git a/trunk/infrastructure/framework-src/modules/process.js b/trunk/infrastructure/framework-src/modules/process.js new file mode 100644 index 0000000..48ab62e --- /dev/null +++ b/trunk/infrastructure/framework-src/modules/process.js @@ -0,0 +1,91 @@ +/** + * Simple way to execute external commands through javascript + * + * @example + cmd = exec("cat"); + System.out.println("First: " +cmd.write("this is a loop.").read(Process.READ_AVAILABLE)); // prints "this is a loop." + System.out.println("Second: " +cmd.writeAndClose(" hi there").result()); // prints "this is a loop. hi there" + * + */ + +jimport("java.lang.Runtime"); +jimport("java.io.BufferedInputStream"); +jimport("java.io.BufferedOutputStream"); +jimport("java.lang.System"); + +/* returns a process */ +function exec(process) { + return new Process(process); +}; + +function Process(cmd) { + this.cmd = cmd; + this.proc = Runtime.getRuntime().exec(cmd); + this.resultText = ""; + this.inputStream = new BufferedInputStream(this.proc.getInputStream()); + this.errorStream = new BufferedInputStream(this.proc.getErrorStream()); + this.outputStream = new BufferedOutputStream(this.proc.getOutputStream()); +} + +Process.CHUNK_SIZE = 1024; +Process.READ_ALL = -1; +Process.READ_AVAILABLE = -2; + +Process.prototype.write = function(stdinText) { + this.outputStream.write(new java.lang.String(stdinText).getBytes()); + this.outputStream.flush(); + return this; +}; + +Process.prototype.writeAndClose = function(stdinText) { + this.write(stdinText); + this.outputStream.close(); + return this; +}; + +/* Python file-like behavior: read specified number of bytes, else until EOF*/ +Process.prototype.read = function(nbytesToRead, stream) { + var inputStream = stream || this.inputStream; + var availBytes = inputStream.available(); + if (!availBytes) return null; + + var result = ""; + var nbytes = nbytesToRead || Process.READ_ALL; + var readAll = (nbytes == Process.READ_ALL); + var readAvailable = (nbytes == Process.READ_AVAILABLE); + while (nbytes > 0 || readAll || readAvailable) { + var chunkSize = readAll ? Process.CHUNK_SIZE : + readAvailable ? Process.CHUNK_SIZE : nbytes; + + // allocate a java byte array + var bytes = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, chunkSize); + + var len = inputStream.read(bytes, 0, chunkSize); + + // at end of stream, or when we run out of data, stop reading in chunks. + if (len == -1) break; + if (nbytes > 0) nbytes -= len; + + result += new java.lang.String(bytes); + + if (readAvailable && inputStream.available() == 0) break; + } + + this.resultText += new String(result); + return new String(result); +}; + +Process.prototype.result = function() { + this.outputStream.close(); + this.proc.waitFor(); + this.read(Process.READ_ALL, this.inputStream); + return new String(this.resultText); +}; + +Process.prototype.resultOrError = function() { + this.proc.waitFor(); + this.read(Process.READ_ALL, this.inputStream); + var result = this.resultText; + if(!result || result == "") result = this.read(Process.READ_ALL, this.errorStream); + return result || ""; +}; -- cgit v1.2.3 From 98e2821b38a775737e42a2479a6bc65107210859 Mon Sep 17 00:00:00 2001 From: Elliot Kroo Date: Thu, 11 Mar 2010 15:21:30 -0800 Subject: reorganizing the first level of folders (trunk/branch folders are not the git way :) --- .../framework-src/modules/atomfeed.js | 72 --- trunk/infrastructure/framework-src/modules/blob.js | 50 -- .../framework-src/modules/cache_utils.js | 36 -- .../infrastructure/framework-src/modules/comet.js | 91 ---- .../framework-src/modules/dateutils.js | 48 -- .../framework-src/modules/dispatch.js | 149 ------ trunk/infrastructure/framework-src/modules/ejs.js | 471 ------------------- .../infrastructure/framework-src/modules/email.js | 53 --- .../framework-src/modules/exceptionutils.js | 210 --------- .../framework-src/modules/execution.js | 58 --- .../framework-src/modules/fastJSON.js | 27 -- .../framework-src/modules/faststatic.js | 318 ------------- .../framework-src/modules/fileutils.js | 108 ----- .../framework-src/modules/funhtml.js | 158 ------- .../framework-src/modules/global/appjet.js | 107 ----- .../framework-src/modules/global/request.js | 312 ------------- .../framework-src/modules/global/response.js | 294 ------------ .../infrastructure/framework-src/modules/image.js | 110 ----- .../framework-src/modules/jsutils.js | 195 -------- .../framework-src/modules/netutils.js | 88 ---- .../framework-src/modules/process.js | 91 ---- .../framework-src/modules/profiler.js | 48 -- .../framework-src/modules/sessions.js | 156 ------- .../modules/sqlbase/persistent_vars.js | 57 --- .../framework-src/modules/sqlbase/sqlbase.js | 205 --------- .../framework-src/modules/sqlbase/sqlcommon.js | 99 ---- .../framework-src/modules/sqlbase/sqlobj.js | 505 --------------------- .../framework-src/modules/stringutils.js | 399 ---------------- trunk/infrastructure/framework-src/modules/sync.js | 81 ---- .../infrastructure/framework-src/modules/timer.js | 29 -- trunk/infrastructure/framework-src/modules/varz.js | 52 --- .../framework-src/modules/yuicompressor.js | 85 ---- trunk/infrastructure/framework-src/oncomet.js | 38 -- trunk/infrastructure/framework-src/onerror.js | 24 - trunk/infrastructure/framework-src/onprint.js | 19 - trunk/infrastructure/framework-src/onrequest.js | 24 - trunk/infrastructure/framework-src/onreset.js | 19 - trunk/infrastructure/framework-src/onsars.js | 27 -- .../framework-src/onscheduledtask.js | 33 -- trunk/infrastructure/framework-src/onshutdown.js | 19 - trunk/infrastructure/framework-src/onstartup.js | 19 - .../infrastructure/framework-src/onsyntaxerror.js | 17 - trunk/infrastructure/framework-src/postamble.js | 19 - trunk/infrastructure/framework-src/preamble.js | 325 ------------- trunk/infrastructure/framework-src/syntaxerror.js | 32 -- 45 files changed, 5377 deletions(-) delete mode 100644 trunk/infrastructure/framework-src/modules/atomfeed.js delete mode 100644 trunk/infrastructure/framework-src/modules/blob.js delete mode 100644 trunk/infrastructure/framework-src/modules/cache_utils.js delete mode 100644 trunk/infrastructure/framework-src/modules/comet.js delete mode 100644 trunk/infrastructure/framework-src/modules/dateutils.js delete mode 100644 trunk/infrastructure/framework-src/modules/dispatch.js delete mode 100644 trunk/infrastructure/framework-src/modules/ejs.js delete mode 100644 trunk/infrastructure/framework-src/modules/email.js delete mode 100644 trunk/infrastructure/framework-src/modules/exceptionutils.js delete mode 100644 trunk/infrastructure/framework-src/modules/execution.js delete mode 100644 trunk/infrastructure/framework-src/modules/fastJSON.js delete mode 100644 trunk/infrastructure/framework-src/modules/faststatic.js delete mode 100644 trunk/infrastructure/framework-src/modules/fileutils.js delete mode 100644 trunk/infrastructure/framework-src/modules/funhtml.js delete mode 100644 trunk/infrastructure/framework-src/modules/global/appjet.js delete mode 100644 trunk/infrastructure/framework-src/modules/global/request.js delete mode 100644 trunk/infrastructure/framework-src/modules/global/response.js delete mode 100644 trunk/infrastructure/framework-src/modules/image.js delete mode 100644 trunk/infrastructure/framework-src/modules/jsutils.js delete mode 100644 trunk/infrastructure/framework-src/modules/netutils.js delete mode 100644 trunk/infrastructure/framework-src/modules/process.js delete mode 100644 trunk/infrastructure/framework-src/modules/profiler.js delete mode 100644 trunk/infrastructure/framework-src/modules/sessions.js delete mode 100644 trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js delete mode 100644 trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js delete mode 100644 trunk/infrastructure/framework-src/modules/sqlbase/sqlcommon.js delete mode 100644 trunk/infrastructure/framework-src/modules/sqlbase/sqlobj.js delete mode 100644 trunk/infrastructure/framework-src/modules/stringutils.js delete mode 100644 trunk/infrastructure/framework-src/modules/sync.js delete mode 100644 trunk/infrastructure/framework-src/modules/timer.js delete mode 100644 trunk/infrastructure/framework-src/modules/varz.js delete mode 100644 trunk/infrastructure/framework-src/modules/yuicompressor.js delete mode 100644 trunk/infrastructure/framework-src/oncomet.js delete mode 100644 trunk/infrastructure/framework-src/onerror.js delete mode 100644 trunk/infrastructure/framework-src/onprint.js delete mode 100644 trunk/infrastructure/framework-src/onrequest.js delete mode 100644 trunk/infrastructure/framework-src/onreset.js delete mode 100644 trunk/infrastructure/framework-src/onsars.js delete mode 100644 trunk/infrastructure/framework-src/onscheduledtask.js delete mode 100644 trunk/infrastructure/framework-src/onshutdown.js delete mode 100644 trunk/infrastructure/framework-src/onstartup.js delete mode 100644 trunk/infrastructure/framework-src/onsyntaxerror.js delete mode 100644 trunk/infrastructure/framework-src/postamble.js delete mode 100644 trunk/infrastructure/framework-src/preamble.js delete mode 100644 trunk/infrastructure/framework-src/syntaxerror.js (limited to 'trunk/infrastructure/framework-src') diff --git a/trunk/infrastructure/framework-src/modules/atomfeed.js b/trunk/infrastructure/framework-src/modules/atomfeed.js deleted file mode 100644 index 4b86eeb..0000000 --- a/trunk/infrastructure/framework-src/modules/atomfeed.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("stringutils.sprintf"); - -// TODO: validate XHTML of entries? - -function _xmlDate(d) { - return sprintf("%04d-%02d-%02dT%02d:%02d:%02dZ", - d.getUTCFullYear(), d.getUTCMonth()+1, d.getUTCDate(), - d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds()); -} - -// "entries" is an object with "forEach" member (an Array works). -// Each entry should have these properties: -// * title -// * author -// * published (Date) -// * updated (Date) -// * href (URL for HTML version) -// * content (valid xhtml) -// -// NOTE: entries should be sorted descending by entry.updated (newest first) -// - -function renderFeed(title, lastUpdated, entries, href) { - function ampesc(url) { - return url.replace(/&/g, '&'); - } - - var r = []; - r.push('', - ''); - - r.push('' + title + ''); - r.push('' + _xmlDate(lastUpdated) + ''); - r.push(''); - r.push(''); - r.push('' + ampesc(request.url) + ''); - - entries.forEach(function(entry) { - r.push('', - '' + entry.title + '', - '' + entry.author + '', - '' + _xmlDate(entry.published) + '', - '' + _xmlDate(entry.updated) + '', - '', - ''+ampesc(entry.href)+'', - '', - '

'+entry.content+'
', - '', - ''); - }); - - r.push(''); - - return r.join('\n'); -} - diff --git a/trunk/infrastructure/framework-src/modules/blob.js b/trunk/infrastructure/framework-src/modules/blob.js deleted file mode 100644 index af788a0..0000000 --- a/trunk/infrastructure/framework-src/modules/blob.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - - - -/** - * Constructs and returns a new Blob from a JavaScript string. - */ -function stringToBlob(contentType, string) { - return { contentType: contentType, - _stringData: string, - numDataBytes: string.length*2 }; -} - -/** - * Constructs and returns a new Blob from a Java byte array (byte[]). - */ -function byteArrayToBlob(contentType, javaByteArray) { - return { contentType: contentType, - _binaryData: javaByteArray, - numDataBytes: javaByteArray.length }; -} - -/** - * Serves a Blob to the client, using the appropriate content-type, - * and stops execution of the current request. - */ -function serveBlob(blob) { - response.setContentType(blob.contentType); - if (blob._binaryData) { - response.writeBytes(new java.lang.String(blob._binaryData, 0)); - } - else if (blob._stringData) { - response.write(blob._stringData); - } - response.stop(); -} diff --git a/trunk/infrastructure/framework-src/modules/cache_utils.js b/trunk/infrastructure/framework-src/modules/cache_utils.js deleted file mode 100644 index f2a360c..0000000 --- a/trunk/infrastructure/framework-src/modules/cache_utils.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("sync"); - -/* performs function on an object from the cache, all within a lock */ -function syncedWithCache(name, fn) { - return sync.doWithStringLock("cache/"+name, function() { - var parts = name.split("."); - var obj = appjet.cache; - for (var i = 0; i < parts.length; i++) { - var p = parts[i]; - if (!obj[p]) { - obj[p] = {}; - } - obj = obj[p]; - } - return fn(obj); - }); -} - - - diff --git a/trunk/infrastructure/framework-src/modules/comet.js b/trunk/infrastructure/framework-src/modules/comet.js deleted file mode 100644 index 2331f8b..0000000 --- a/trunk/infrastructure/framework-src/modules/comet.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -/** - * @fileOverview - * Comet presents a real-time bidirectional-channel interface. Using comet, your - * server can push data to any connected client without waiting for that client - * to issue a request. - * - * comet reserves the /newcomet path and its subpaths for its - * own use. - */ - -/** - * Gets a list of all client currently connected to the server. - * @function - * @name connections - * @return {array} An array of the string ids of all connected clients. - */ -function connections() { - return Packages.net.appjet.ajstdlib.Comet.connections(appjet.context); -} - -function getNumCurrentConnections() { - return Packages.net.appjet.ajstdlib.Comet.getNumCurrentConnections(); -} - -function isConnected(id) { - return Packages.net.appjet.ajstdlib.Comet.isConnected(id); -} - -function disconnect(id) { - Packages.net.appjet.ajstdlib.Comet.disconnect(id); -} - -function getAttribute(id, key) { - var ret = Packages.net.appjet.ajstdlib.Comet.getAttribute(appjet.context, id, key); - if (ret != null) - return String(ret); -} - -function setAttribute(id, key, value) { - Packages.net.appjet.ajstdlib.Comet.setAttribute(appjet.context, id, key, value); -} - -/** - * Sends a message to a particular client. - * @functionn - * @name sendMessage - * @param {string} id The id of the client to send to. - * @param {string} data The string data to send to the client. - */ -function sendMessage(id, msg) { - Packages.net.appjet.ajstdlib.Comet.write(id, msg); -} - -function headInclude() { return ''; }; -function clientCode() { - return Packages.net.appjet.ajstdlib.Comet.getClientCode(appjet.context); -}; -function clientMTime() { - return Packages.net.appjet.ajstdlib.Comet.getClientMTime(appjet.context); -}; - -/** - * WebSocket allows the client to connect to the server via a - * "bidirectional" channel. Messages sent by the server are received by - * the client without the need for additional connections or other delays. - * @class - * @name WebSocket - * @param {string} id The id to use for this client. - */ - -/** - * Connects to the server using the id specified in the constructor. - * @methodOf WebSocket - * @name connect - */ diff --git a/trunk/infrastructure/framework-src/modules/dateutils.js b/trunk/infrastructure/framework-src/modules/dateutils.js deleted file mode 100644 index 72e87c8..0000000 --- a/trunk/infrastructure/framework-src/modules/dateutils.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -function noon(date) { - return new Date(date.toString().split(' ').slice(0, 4).join(' ') + " 12:00"); -} - -function nextMonth(date) { - var newDate = new Date(date.getTime()); - var newMonth = date.getMonth() + 1; - var newYear = date.getFullYear(); - while (newMonth >= 12) { - newYear += 1; - newMonth -= 12; - } - newDate.setMonth(newMonth); - newDate.setFullYear(newYear); - return newDate; -} - -var months = - ["January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December"]; - -var shortMonths = months.map(function(mon) { return mon.substr(0, 3); }); - -var days = - ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; - -var shortDays = days.map(function(day) { return day.substr(0, 3); }); - -function dateFormat(date, format) { - var formatter = new Packages.java.text.SimpleDateFormat(format); - return String(formatter.format(date).toString()); -} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/modules/dispatch.js b/trunk/infrastructure/framework-src/modules/dispatch.js deleted file mode 100644 index e7e3ef0..0000000 --- a/trunk/infrastructure/framework-src/modules/dispatch.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -/** - * @fileOverview Dispatching for dynamic pages and static files rendered from disk. - */ - -import("jsutils.eachProperty"); -import("stringutils"); - -jimport("java.lang.System.out.println"); - -//---------------------------------------------------------------- -// Util -//---------------------------------------------------------------- - -function PrefixMatcher(p) { - var rs = p.replace(/([\[\]\^\$\\\.\*\+\?\(\)\{\}\|])/g, "\\$1"); - var r = new RegExp('^' + rs + '(.*)$'); - return function(path) { - return r.exec(path); - } -} - -// Like PrefixMatcher, but makes trailing '/' optional, as in /ep/admin or /ep/admin/. -// If trailing '/' is omitted, will redirect to same path with trailing /. -function DirMatcher(p) { - if (p.substr(-1) == '/') { - p = p.substr(0, p.length-1); - } - var prefixMatcher = PrefixMatcher(p+'/'); - return function(path) { - if (path == p) { - response.redirect(p+'/'); - } - return prefixMatcher(path); - } -} - -function _pathMatches(p, loc) { - // returns a regex-result kind of array with length >= 1, or null - if (typeof(loc) == 'string') { - return (p == loc) ? [loc] : null; - } - if (typeof(loc) == 'function') { - return (loc(p) || null); - } - if (loc.exec) { // regexp - var r = loc.exec(p); - return r || null; - } - throw new Error('Uknown type of location: '+loc); -} - -//---------------------------------------------------------------- -// Dispatcher -//---------------------------------------------------------------- - -var Dispatcher = function() { - this._routes = []; // Array([location, (local file path or function)]) -}; - -Dispatcher.prototype.addLocations = function(l) { - var that = this; - l.forEach(function(x) { that._routes.push(x); }); -}; - -Dispatcher.prototype.dispatch = function() { - var p = request.path; - var served = false; - - for (var i = 0; (i < this._routes.length) && (served == false); i++) { - var loc = this._routes[i][0]; - var dst = this._routes[i][1]; - - var match = _pathMatches(p, loc); - if (match) { - if (typeof(dst) != 'function') { - throw new Error('dispatch only dispatches to functions, and this is not a function: '+typeof(dst)); - } - - // call dst(group1, group2, group3, ...) - served = dst.apply(this, Array.prototype.slice.call(match, 1)); - } - }; - - return served; -}; - -//---------------------------------------------------------------- -// fdisp -//---------------------------------------------------------------- - -function forward(module) { - return function(name) { - if (name === "") { - name = "main"; - } - if (name) { - name = name.replace(/\-/g, '_'); - } - var onreq = module['onRequest']; - var f = module['render_'+name]; - var fg = module['render_'+name+'_get']; - var fp = module['render_'+name+'_post']; - - var served = false; - - if (onreq) { - served = onreq(name); - } - - if (served) { - return true; - } - - var method = request.method; - if (method == "HEAD") { - method = "GET"; - } - - if (f) { - f(); - served = true; - } else if (method == "GET" && fg) { - fg(); - served = true; - } else if (method == "POST" && fp) { - fp(); - served = true; - } - - return served; - }; -} - diff --git a/trunk/infrastructure/framework-src/modules/ejs.js b/trunk/infrastructure/framework-src/modules/ejs.js deleted file mode 100644 index bf14ed3..0000000 --- a/trunk/infrastructure/framework-src/modules/ejs.js +++ /dev/null @@ -1,471 +0,0 @@ -/*-------------------------------------------------------------------------- - * EJS - Embedded JavaScript, version 0.1.0 - * Copyright (c) 2007 Edward Benson - * http://www.edwardbenson.com/projects/ejs - * ------------------------------------------------------------------------ - * - * EJS is freely distributable under the terms of an MIT-style license. - * - * EJS is a client-side preprocessing engine written in and for JavaScript. - * If you have used PHP, ASP, JSP, or ERB then you get the idea: code embedded - * in <% // Code here %> tags will be executed, and code embedded in <%= .. %> - * tags will be evaluated and appended to the output. - * - * This is essentially a direct JavaScript port of Masatoshi Seki's erb.rb - * from the Ruby Core, though it contains a subset of ERB's functionality. - * - * Requirements: - * prototype.js - * - * Usage: - * // source should be either a string or a DOM node whose innerHTML - * // contains EJB source. - * var source = "<% var ejb="EJB"; %>

Hello, <%= ejb %>!

"; - * var compiler = new EjsCompiler(source); - * compiler.compile(); - * var output = eval(compiler.out); - * alert(output); // -> "

Hello, EJB!

" - * - * For a demo: see demo.html - * For the license: see license.txt - * - *--------------------------------------------------------------------------*/ - -import("jsutils.*"); -import("funhtml"); - -jimport("java.lang.System.out.println"); -jimport("net.appjet.ajstdlib.execution.executeCodeInNewScope"); - -/* Make a split function like Ruby's: "abc".split(/b/) -> ['a', 'b', 'c'] */ -function rsplit(x, regex) { - var item = x; - var result = regex.exec(item); - var retArr = new Array(); - while (result != null) - { - var first_idx = result.index; - var last_idx = regex.lastIndex; - if ((first_idx) != 0) - { - var first_bit = item.substring(0,first_idx); - retArr.push(item.substring(0,first_idx)); - item = item.slice(first_idx); - } - retArr.push(result[0]); - item = item.slice(result[0].length); - result = regex.exec(item); - } - if (! item == '') - { - retArr.push(item); - } - return retArr; -}; - -/* Chop is nice to have too */ -function chop(x) { - return x.substr(0, x.length - 1); -} - -/* Adaptation from the Scanner of erb.rb */ -var EjsScanner = function(source, left, right) { - this.left_delimiter = left +'%'; //<% - this.right_delimiter = '%'+right; //> - this.double_left = left+'%%'; - this.double_right = '%%'+right; - this.left_equal = left+'%='; - this.left_comment = left+'%#'; - if(left=='[') { - this.SplitRegexp = /(\[%%)|(%%\])|(\[%=)|(\[%#)|(\[%)|(%\]\n)|(%\])|(\n)/; - } - else { - this.SplitRegexp = new RegExp('('+this.double_left+')|(%%'+this.double_right+')|('+this.left_equal+')|('+this.left_comment+')|('+this.left_delimiter+')|('+this.right_delimiter+'\n)|('+this.right_delimiter+')|(\n)') - } - - this.source = source; - this.stag = null; - this.lines = 0; -}; -EjsView = function(data) { - this.data = data; -}; -EjsView.prototype.partial = function(options, data){ - if(!data) data = this.data; - return new EJS(options).render(data); -}; - -EjsScanner.to_text = function(input){ - if(input == null || input === undefined) - return ''; - if(input instanceof Date) - return input.toDateString(); - if(input.toString) - return input.toString(); - return ''; -} - -EjsScanner.prototype = { - - /* For each line, scan! */ - scan: function(block) { - scanline = this.scanline; - regex = this.SplitRegexp; - if (! this.source == '') - { - var source_split = rsplit(this.source, /\n/); - for(var i=0; i 0) - { - for (var i=0; i 0) - { - // Chould be content.dump in Ruby - - buff.push(put_cmd + '"' + clean(content) + '"'); - } - content = ''; - break; - case scanner.double_left: - content = content + scanner.left_delimiter; - break; - default: - content = content + token; - break; - } - } - else { - switch(token) { - case scanner.right_delimiter: - switch(scanner.stag) { - case scanner.left_delimiter: - if (content[content.length - 1] == '\n') - { - content = chop(content); - buff.push(content); - buff.cr(); - } - else { - buff.push(content); - } - break; - case scanner.left_equal: - buff.push(insert_cmd + "(EjsScanner.to_text(" + content + "))"); - break; - } - scanner.stag = null; - content = ''; - break; - case scanner.double_right: - content = content + scanner.right_delimiter; - break; - default: - content = content + token; - break; - } - } - }); - if (content.length > 0) - { - // Chould be content.dump in Ruby - buff.push(put_cmd + '"' + clean(content) + '"'); - } - buff.close(); - this.out = buff.script + ";"; - var to_be_evaled = [ - 'var process = function(_CONTEXT,_VIEW) {', - ' with(_VIEW) {', - ' with (_CONTEXT) {', - this.out, - ' return ___ejsO;', - ' }', - ' }', - '};' - ].join(''); - // make funhtml.* available in parent scope. - var parentScope = {}; - parentScope.EjsScanner = EjsScanner; - keys(funhtml).forEach(function(k) { - parentScope[k] = funhtml[k]; - }); - var ret = executeCodeInNewScope( - parentScope, - to_be_evaled, - (options.name || "template"), - 1 - ); - this.process = ret.process; - } -} - - -//type, cache, folder -EJS = function( options ){ - this.set_options(options); - - if(options.url){ - var template = EJS.get(options.url, this.cache); - if (template) return template; - if (template == EJS.INVALID_PATH) return null; - this.text = EJS.request(options.url); - if(this.text == null){ - //EJS.update(options.url, this.INVALID_PATH); - throw 'There is no template at '+options.url; - } - this.name = options.url; - }else if(options.element) - { - if(typeof options.element == 'string'){ - var name = options.element; - options.element = document.getElementById( options.element ); - if(options.element == null) throw name+'does not exist!'; - } - if(options.element.value){ - this.text = options.element.value; - }else{ - this.text = options.element.innerHTML; - } - this.name = options.element.id; - this.type = '['; - } - var template = new EjsCompiler(this.text, this.type); - - template.compile(options); - - - EJS.update(this.name, this); - this.template = template; -}; -EJS.config = function(options){ - EJS.cache = options.cache != null ? options.cache : EJS.cache; - EJS.type = options.type != null ? options.type : EJS.type; - var templates_directory = {}; //nice and private container - - EJS.get = function(path, cache){ - if(cache == false) return null; - if(templates_directory[path]) return templates_directory[path]; - return null; - }; - - EJS.update = function(path, template) { - if(path == null) return; - templates_directory[path] = template; - }; - - EJS.INVALID_PATH = -1; - - -}; -EJS.config( {cache: true, type: '<' } ); - -EJS.prototype = { - render : function(object){ - var v = new EjsView(object); - return this.template.process.call(v, object, v); - }, - out : function(){ - return this.template.out; - }, - set_options : function(options){ - this.type = options.type != null ? options.type : EJS.type; - this.cache = options.cache != null ? options.cache : EJS.cache; - this.text = options.text != null ? options.text : null; - this.name = options.name != null ? options.name : null; - }, - // called without options, returns a function that takes the object - // called with options being a string, uses that as a url - // called with options as an object - update : function(element, options){ - if(typeof element == 'string'){ - element = document.getElementById(element); - } - if(options == null){ - _template = this; - return function(object){ - EJS.prototype.update.call(_template, element, object); - }; - } - if(typeof options == 'string'){ - params = {}; - params.url = options; - _template = this; - params.onComplete = function(request){ - var object = eval( request.responseText ); - EJS.prototype.update.call(_template, element, object); - }; - EJS.ajax_request(params); - }else - { - element.innerHTML = this.render(options); - } - } -}; - - EJS.newRequest = function(){ - var factories = [function() { return new ActiveXObject("Msxml2.XMLHTTP"); },function() { return new XMLHttpRequest(); },function() { return new ActiveXObject("Microsoft.XMLHTTP"); }]; - for(var i = 0; i < factories.length; i++) { - try { - var request = factories[i](); - if (request != null) return request; - } - catch(e) { continue;} - } - }; - - EJS.request = function(path){ - var request = new EJS.newRequest(); - request.open("GET", path, false); - - try{request.send(null);} - catch(e){return null;} - - if ( request.status == 404 || request.status == 2 ||(request.status == 0 && request.responseText == '') ) return null; - - return request.responseText - }; - EJS.ajax_request = function(params){ - params.method = ( params.method ? params.method : 'GET'); - - var request = new EJS.newRequest(); - request.onreadystatechange = function(){ - if(request.readyState == 4){ - if(request.status == 200){ - params.onComplete(request); - }else - { - params.onComplete(request); - } - } - }; - request.open(params.method, params.url); - request.send(null); - }; - -//} - - diff --git a/trunk/infrastructure/framework-src/modules/email.js b/trunk/infrastructure/framework-src/modules/email.js deleted file mode 100644 index 2d81dc3..0000000 --- a/trunk/infrastructure/framework-src/modules/email.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -// import("jsutils.eachProperty"); -// -// function _paramObjectToParamArray(params, enc) { -// var pa = []; -// eachProperty(params, function(k, v) { -// pa.push(enc ? encodeURIComponent(k.toString()) : k.toString()); -// pa.push(enc ? encodeURIComponent(v.toString()) : v.toString()); -// }); -// return pa; -// } - -/** - * Simple way to send an email to a single recipient. Emails will have a - * "from" address of noreply@{appjet.appName}.{appjet.mainDomain}. - * - * Sending is limited to 100 emails per developer account per day. However, - * emails sent to the address on file for the app's owner are not counted - * toward this limit. - * - * @example -result = sendEmail("noone@example.com", "Test Subject", - "Greetings!", {"Reply-To": "sender@example.com"}); - * - * @param {strings} toAddress An array of email address strings, or a single string. - * @param {string} subject The message subject. - * @param {string} body The message body. - * @param {object} [headers] Optional headers to include in the - * message, as a dictionary of {name: value} entries. - */ -function sendEmail(toAddress, fromAddress, subject, headers, body) { - if (typeof(toAddress) == 'string') - toAddress = [toAddress]; - var ret = Packages.net.appjet.ajstdlib.email.sendEmail(toAddress, fromAddress, subject, headers, body); - if (ret != "") - throw new Error(ret); -} - diff --git a/trunk/infrastructure/framework-src/modules/exceptionutils.js b/trunk/infrastructure/framework-src/modules/exceptionutils.js deleted file mode 100644 index b572a3a..0000000 --- a/trunk/infrastructure/framework-src/modules/exceptionutils.js +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("ejs.EJS"); -import("funhtml.*"); -import("jsutils.{scalaF0,scalaF1}"); -import("stringutils.{toHTML,sprintf}"); - -function _getException(ex) { - if (ex instanceof java.lang.Throwable) { - return new net.appjet.bodylock.JSRuntimeException(ex.getMessage(), ex); - } else if (ex.javaException) { - return new net.appjet.bodylock.JSRuntimeException(ex.javaException.getMessage(), ex.javaException); - } else if (ex.rhinoException) { - return new net.appjet.bodylock.JSRuntimeException(ex.rhinoException.getMessage(), ex.rhinoException); - } else { - return ex; - } -} - -function _convertStackFrameToTable(id, frame) { - var r = frame.errorContext(4); - var out = []; - var t = TABLE({className: "codecontext"}); - var counter = r._1(); - r._3().foreach(scalaF1(function(s) { - var row = TR(TD({className: "linecell"}, counter++), TD(String(s))); - if (counter-1 == frame.errorLine()) - row[1].attribs['class'] = "offendingline"; - t.push(row); - })); - if (id != 0) - out.push(DIV({className: "errorframe", - onclick: "toggleFrameView('"+id+"')"}, - IMG({className: "zippy", style: "margin-right: 0.5em;", align: "top", src: "http://appjet.com/img/open-arrow.png", id: "image"+id}), - SPAN({className: "errordetail"}, "...was called from "+frame.name()+ " (line "+frame.errorLine()+"):"), - SPAN({className: "sourceline"}, " "+frame.errorContext(0)._3().first()))); - out.push(DIV({id: 'frame'+id, style: (id == 0 ? "" : "display: none;")}, t)); - return out.map(function(tag) { return toHTML(tag); }).join(""); -} - -function getStackTraceHTML(ex) { - ex = _getException(ex); - if (ex.frames().isEmpty()) - return "No stack trace available."; - var out = []; - var counter = 0; - var firstFrame = ex.frames().first(); - out.push(toHTML(DIV({id: "errortitle"}, "Error in "+firstFrame.name()))); - out.push(toHTML(DIV({id: "errormessage"}, ""+ex.cause().getMessage()+" at "+firstFrame.name()+" (Line "+firstFrame.errorLine()+")"))); - ex.frames().foreach(scalaF1(function(frame) { - out.push(_convertStackFrameToTable(counter++, frame)); - })); - return out.join(""); -} - -function getStackTraceFullpage(ex) { - var tmpl = new EJS({text: _tmpl}); - return tmpl.render({trace: getStackTraceHTML(ex)}); -} - -function getStackTracePlain(ex) { - ex = _getException(ex); - if (ex.frames().isEmpty()) { - var cause = ex.cause(); - var sw = new java.io.StringWriter(); - cause.printStackTrace(new java.io.PrintWriter(sw)); - return sw.toString(); - } - var out = []; - var firstFrame = ex.frames().first(); - out.push("Error in "+firstFrame.name()); - out.push(""+ex.cause().getMessage()+" at "+firstFrame.name()+" (Line "+firstFrame.errorLine()+")"); - var counter = 0; - ex.frames().foreach(scalaF1(function(frame) { - if (counter++ > 0) { - out.push(""); - out.push("...was called from "+frame.name()+" (line "+frame.errorLine()+"): "+frame.errorContext(0)._3().first()); - } - var r = frame.errorContext(4); - var c2 = r._1(); - r._3().foreach(scalaF1(function(s) { - var pre = " "; - if (c2 == frame.errorLine()) - pre = ">"; - out.push(sprintf("%s %4s | %s", pre, ""+c2, s)); - c2++; - })); - })); - return out.join("\n"); -} - -/* template follows */ -var _tmpl = """ - - - AppJet Error - - - - - - - -<%= trace %> - -""" diff --git a/trunk/infrastructure/framework-src/modules/execution.js b/trunk/infrastructure/framework-src/modules/execution.js deleted file mode 100644 index 1cec418..0000000 --- a/trunk/infrastructure/framework-src/modules/execution.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("jsutils.{scalaF0,scalaF1}"); - -/** - * Asynchronously call a function as soon as the current request completes. - **/ -function async(f) { - Packages.net.appjet.ajstdlib.execution.runAsync(appjet.context, f); -} - -function initTaskThreadPool(name, poolSize) { - Packages.net.appjet.ajstdlib.execution.createNamedTaskThreadPool(name, poolSize); -} - -function scheduleTask(poolName, taskName, delayMillis, args) { - return Packages.net.appjet.ajstdlib.execution.scheduleTaskInPool(poolName, taskName, delayMillis, args); -} - -function shutdownAndWaitOnTaskThreadPool(poolName, timeoutMillis) { - return Packages.net.appjet.ajstdlib.execution.shutdownAndWaitOnTaskThreadPool(poolName, timeoutMillis); -} - -function fancyAssEval(initCode, mainCode) { - function init(runner) { - Packages.net.appjet.bodylock.BodyLock.evaluateString( - runner.globalScope(), - initCode, - "eval'd code imports", - 1); - } - var runner = Packages.net.appjet.oui.ScopeReuseManager.getEmpty(scalaF1(init)); - var ec = new Packages.net.appjet.oui.ExecutionContext( - new Packages.net.appjet.oui.RequestWrapper(request.underlying), - null, runner); - return Packages.net.appjet.oui.ExecutionContextUtils.withContext(ec, - scalaF0(function() { - return Packages.net.appjet.bodylock.BodyLock.evaluateString( - runner.globalScope(), - mainCode, - "eval'd code main", - 1); - })); -} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/modules/fastJSON.js b/trunk/infrastructure/framework-src/modules/fastJSON.js deleted file mode 100644 index 3198b96..0000000 --- a/trunk/infrastructure/framework-src/modules/fastJSON.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -jimport("net.appjet.oui.FastJSON"); -jimport("java.lang.System.out.println"); - -function stringify(x) { - return String(FastJSON.stringify(x)); -} - -function parse(x) { - return FastJSON.parse(appjet.context, x); -} - diff --git a/trunk/infrastructure/framework-src/modules/faststatic.js b/trunk/infrastructure/framework-src/modules/faststatic.js deleted file mode 100644 index 5cca676..0000000 --- a/trunk/infrastructure/framework-src/modules/faststatic.js +++ /dev/null @@ -1,318 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -/** - * @fileOverview serving static files, including js and css, and cacheing - * and minifying. - * - * Terminology Note: - * "path" is confusing because paths can be part of URLs and part - * of filesystem paths, and static files have both types of paths - * associated with them. Therefore, in this module: - * - * LOCALDIR or LOCALFILE refers to directories or files on the filesystem. - * - * HREF is used to describe things that go in a URL. - */ - -import("fileutils.{readFile,readFileBytes}"); -import("yuicompressor"); -import("stringutils"); -import("varz"); -import("ejs.EJS"); - -jimport("java.lang.System.out.println"); - -//---------------------------------------------------------------- -// Content Type Guessing -//---------------------------------------------------------------- - -var _contentTypes = { - 'gif': 'image/gif', - 'png': 'image/png', - 'jpg': 'image/jpeg', - 'jpeg': 'image/jpeg', - 'css': 'text/css', - 'js': 'application/x-javascript', - 'txt': 'text/plain', - 'html': 'text/html; charset=utf-8', - 'ico': 'image/x-icon', - 'swf': 'application/x-shockwave-flash', - 'zip': 'application/zip', - 'xml': 'application/xml' -}; - -var _gzipableTypes = { - 'text/css': true, - 'application/x-javascript': true, - 'text/html; charset=utf-8': true -}; - -function _guessContentType(path) { - var ext = path.split('.').pop().toLowerCase(); - return _contentTypes[ext] || 'text/plain'; -} - -//---------------------------------------------------------------- - -function _getCache(name) { - var m = 'faststatic'; - if (!appjet.cache[m]) { - appjet.cache[m] = {}; - } - var c = appjet.cache[m]; - if (!c[name]) { - c[name] = {}; - } - return c[name]; -} - -var _mtimeCheckInterval = 5000; // 5 seconds - -function _getMTime(f) { - var mcache = _getCache('mtimes'); - var now = +(new Date); - if (appjet.config.devMode || - !(mcache[f] && (now - mcache[f].lastCheck < _mtimeCheckInterval))) { - var jfile = new net.appjet.oui.JarVirtualFile(f); - if (jfile.exists() && !jfile.isDirectory()) { - mcache[f] = { - lastCheck: now, - mtime: jfile.lastModified() - }; - } else { - mcache[f] = null; - } - } - if (mcache[f]) { - return +mcache[f].mtime; - } else { - return null; - } -} - -function _wrapFile(localFile) { - return { - getPath: function() { return localFile; }, - getMTime: function() { return _getMTime(localFile); }, - getContents: function() { return _readFileAndProcess(localFile, 'string'); } - }; -} - -function _readFileAndProcess(fileName, type) { - if (fileName.slice(-8) == "_ejs.css") { - // run CSS through EJS - var template = readFile(fileName); - var ejs = new EJS({text:template, name:fileName}); - var resultString = ejs.render({}); - if (type == 'bytes') { - return new java.lang.String(resultString).getBytes("UTF-8"); - } - else { - return resultString; - } - } - else if (type == 'string') { - return readFile(fileName); - } - else if (type == 'bytes') { - return readFileBytes(fileName); - } -} - -function _cachedFileBytes(f) { - var mtime = _getMTime(f); - if (!mtime) { return null; } - var fcache = _getCache('file-bytes-cache'); - if (!(fcache[f] && (fcache[f].mtime == mtime))) { - varz.incrementInt("faststatic-file-bytes-cache-miss"); - var bytes = _readFileAndProcess(f, 'bytes'); - if (bytes) { - fcache[f] = {mtime: mtime, bytes: bytes}; - }; - } - if (fcache[f] && fcache[f].bytes) { - return fcache[f].bytes; - } else { - return null; - } -} - -function _shouldGzip(contentType) { - var userAgent = request.headers["User-Agent"]; - if (! userAgent) return false; - if (! (/Firefox/.test(userAgent) || /webkit/i.test(userAgent))) return false; - if (! _gzipableTypes[contentType]) return false; - - return request.acceptsGzip; -} - -function _getCachedGzip(original, key) { - var c = _getCache("gzipped"); - if (! c[key] || ! java.util.Arrays.equals(c[key].original, original)) { - c[key] = {original: original, - gzip: stringutils.gzip(original)}; - } - return c[key].gzip; -} - -function _setGzipHeader() { - response.setHeader("Content-Encoding", "gzip"); -} - -//---------------------------------------------------------------- - -/** - * Function for serving a single static file. - */ -function singleFileServer(localPath, opts) { - var contentType = _guessContentType(localPath); - - return function() { - (opts.cache ? response.alwaysCache() : response.neverCache()); - response.setContentType(contentType); - var bytes = _cachedFileBytes(localPath); - if (bytes) { - if (_shouldGzip(contentType)) { - bytes = _getCachedGzip(bytes, "file:"+localPath); - _setGzipHeader(); - } - response.writeBytes(bytes); - return true; - } else { - return false; - } - }; -} - -/** - * valid opts: - * alwaysCache: default false - */ -function directoryServer(localDir, opts) { - if (stringutils.endsWith(localDir, "/")) { - localDir = localDir.substr(0, localDir.length-1); - } - return function(relpath) { - if (stringutils.startsWith(relpath, "/")) { - relpath = relpath.substr(1); - } - if (relpath.indexOf('..') != -1) { - response.forbid(); - } - (opts.cache ? response.alwaysCache() : response.neverCache()); - var contentType = _guessContentType(relpath); - response.setContentType(contentType); - var fullPath = localDir + "/" + relpath; - var bytes = _cachedFileBytes(fullPath); - - if (bytes) { - if (_shouldGzip(contentType)) { - bytes = _getCachedGzip(bytes, "file:"+fullPath); - _setGzipHeader(); - } - response.writeBytes(bytes); - return true; - } else { - return false; - } - }; -} - -/** - * Serves cat files, which are concatenated versions of many files. - */ -function compressedFileServer(opts) { - var cfcache = _getCache('compressed-files'); - return function() { - var key = request.path.split('/').slice(-1)[0]; - var contentType = _guessContentType(request.path); - response.setContentType(contentType); - response.alwaysCache(); - var data = cfcache[key]; - if (data) { - if (_shouldGzip(contentType)) { - data = _getCachedGzip((new java.lang.String(data)).getBytes(response.getCharacterEncoding()), "comp:"+key); - _setGzipHeader(); - response.writeBytes(data); - } else { - response.write(data); - } - return true; - } else { - return false; - } - }; -} - -function getCompressedFilesKey(type, baseLocalDir, localFileList) { - if (stringutils.endsWith(baseLocalDir, '/')) { - baseLocalDir = baseLocalDir.substr(0, baseLocalDir.length-1); - } - - var fileList = []; - // convert passed-in file list into list of our file objects - localFileList.forEach(function(f) { - if (typeof(f) == 'string') { - fileList.push(_wrapFile(baseLocalDir+'/'+f)); - } else { - fileList.push(f); - } - }); - - // have we seen this exact fileset before? - var fsId = fileList.map(function(f) { return f.getPath(); }).join('|'); - var fsMTime = Math.max.apply(this, - fileList.map(function(f) { return f.getMTime(); })); - - var kdcache = _getCache('fileset-keydata-cache'); - if (!(kdcache[fsId] && (kdcache[fsId].mtime == fsMTime))) { - //println("cache miss for fileset: "+fsId); - //println("compressing fileset..."); - kdcache[fsId] = { - mtime: fsMTime, - keyString: _compressFilesAndMakeKey(type, fileList) - }; - } - return kdcache[fsId].keyString; -} - -function _compressFilesAndMakeKey(type, fileList) { - function _compress(s) { - if (type == 'css') { - varz.incrementInt("faststatic-yuicompressor-compressCSS"); - return yuicompressor.compressCSS(s); - } else if (type == 'js') { - varz.incrementInt("faststatic-yuicompressor-compressJS"); - return yuicompressor.compressJS(s); - } else { - throw Error('Dont know how to compress this filetype: '+type); - } - } - - var fullstr = ""; - fileList.forEach(function(f) { - fullstr += _compress(f.getContents()); - }); - - fullstr = _compress(fullstr); - - var key = stringutils.md5(fullstr) + '.' + type; - var cfcache = _getCache('compressed-files'); - cfcache[key] = fullstr; - return key; -} - diff --git a/trunk/infrastructure/framework-src/modules/fileutils.js b/trunk/infrastructure/framework-src/modules/fileutils.js deleted file mode 100644 index aaf12e2..0000000 --- a/trunk/infrastructure/framework-src/modules/fileutils.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -/** @fileOverview misc file functions */ - -jimport("java.io.File", - "java.io.DataInputStream", - "java.io.FileInputStream", - "java.lang.reflect.Array", - "java.lang.Byte", - "java.io.FileReader", - "java.io.BufferedReader", - "net.appjet.oui.JarVirtualFile"); - -function readFileBytes(path) { - var jfile = new JarVirtualFile(path); - if (!jfile.exists() || jfile.isDirectory()) { - throw 'Not a file: '+path; - } - return net.appjet.common.util.BetterFile.getStreamBytes(jfile.openStream()); -} - -function readFile(path) { - var bytes = readFileBytes(path); - if (bytes !== null) { - return String(new java.lang.String(bytes)); - } else { - return null; - } -} - -function fileLastModified(path) { - var jfile = new JarVirtualFile(path); - if (!jfile.exists()) { - throw "Not a file: "+path; - } - return jfile.lastModified(); -} - -//---------------------------------------------------------------- -// real files -//---------------------------------------------------------------- - -function readRealFileBytes(path) { - var jfile = new File(path); - if (!jfile.exists() || jfile.isDirectory()) { - throw 'Not a real file: '+path; - } - var jdata = new DataInputStream(new FileInputStream(jfile)); - var size = jfile.length(); - var bytes = Array.newInstance(Byte.TYPE, size); - jdata.read(bytes, 0, size); - jdata.close(); - return bytes; -} - -function readRealFile(path) { - var bytes = readRealFileBytes(path); - if (bytes !== null) { - return String(new java.lang.String(bytes)); - } else { - return null; - } -} - -function writeRealFile(path, data) { - var jf = new Packages.java.io.File(path); - var fw = new Packages.java.io.FileWriter(jf); - fw.write(data); - fw.flush(); - fw.close(); -} - - -function eachFileLine(file, fn) { - var iter = fileLineIterator(file); - while (iter.hasNext) { - fn(iter.next); - } -} - -function fileLineIterator(file) { - var reader = new BufferedReader(new FileReader(file)); - var nextLine = reader.readLine(); - return { - get hasNext() { return nextLine !== null }, - get next() { - var curLine = nextLine; - if (this.hasNext) { - nextLine = reader.readLine(); - } - return curLine; - } - }; -} diff --git a/trunk/infrastructure/framework-src/modules/funhtml.js b/trunk/infrastructure/framework-src/modules/funhtml.js deleted file mode 100644 index c27b667..0000000 --- a/trunk/infrastructure/framework-src/modules/funhtml.js +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -/** - * @fileOverview Functional HTML tag writing.
- * - *

This library allows you to write HTML in the form of nested function - * calls. By default, a function is predefined for each tag, with the function - * name being in all caps. A dictionary of HTML attributes can optionally be - * passed as a first argument to a tag; other arguments become child tags. - * Attribute names that conflict with JavaScript - * keywords have been renamed; use "className" in place of "class" and - * "htmlFor" in place of "for".

- * - *

Tag objects inherit from Array, so array methods can be used to - * manipulate a tag's list of child tags.

- * - * @example -print(P({id:"sec3"},"Tags are ",B(I("crazy"))," awesome.")); - */ - -import("jsutils.eachProperty"); -import("stringutils"); -import("stringutils.toHTML"); - -function html(x) { - // call out to stringutils.html(). - var args = Array.prototype.slice.call(arguments); - return stringutils.html.apply(this, args); -}; - -function toHTML(x) { - // call out to stringutils.toHTML(). - var args = Array.prototype.slice.call(arguments); - return stringutils.toHTML.apply(this, args) -}; - -//---------------------------------------------------------------- -// tags. -//---------------------------------------------------------------- - -var _neverSingletones = { - 'TEXTAREA': true, - 'SCRIPT': true, - 'DIV': true, - 'IFRAME': true, - 'UL': true, - 'TABLE': true -}; - -/** - * Imports a specified list of tags. All HTML tags are automatically imported - * by default, but you may wish to use the tag library to write other kinds - * of mark-up. For each tag you want to import, pass in the name (including - * any punctuation) with the (upper/lower) case you want to use for the function - * (traditionally all uppercase). The function name will have punctuation - * replaced with underscores, and the printed tag will be all lowercase. - * - * @param {object} scopeObj where to define the tags; to define in the global scope, pass this from the top level (not from inside a function) - * @param {array} tagArray an array of strings, the tags to import - * @example -importTags(this, ["MEDIA:TITLE"]); -print(MEDIA_TITLE({type:"html"}, "funny pictures")); -// prints <media:title type="html">funny pictures</media:title> - */ -function _importTags(scopeObj, tagArray) { - tagArray.forEach(function(arg) { - var funcName = arg.replace(/:/g, "_").replace(/-/g, "_"); - var tagName = arg.toLowerCase(); - scopeObj[funcName] = function() { - var tag = []; - tag.name = tagName; - var contents = Array.prototype.slice.call(arguments); - if (contents.length > 0) { - if (contents[0] && - (! contents[0].toHTML) && - ((typeof contents[0]) == "object") && - (! Array.prototype.isPrototypeOf(contents[0])) && - (! Date.prototype.isPrototypeOf(contents[0]))) { - // first arg is attributes - tag.attribs = contents[0]; - contents.shift(); - } - else { - tag.attribs = {}; - } - contents.forEach(function (content) { - tag.push(content); - }); - } - else { - tag.attribs = {}; - } - tag.toString = function() { return this.toHTML(); }; // this behavior is relied on - tag.toHTML = function() { - var t = this; - var result = []; - result.add = function(x) { this.push(x); return this; }; - result.add('<').add(t.name); - if (t.attribs) { - eachProperty(t.attribs, function(k,v) { - if (k == "className") k = "class"; - if (k == "htmlFor") k = "for"; - if (!(v === undefined)) { - // escape quotes and newlines in values - v = String(v).replace(/\"/g, '\\"').replace(/\n/g, '\\n'); - result.add(' ').add(k).add('="').add(v).add('"'); - } - }); - } - if ((t.length < 1) && (!(t.name.toUpperCase() in _neverSingletones))) { - result.add(' />'); - } - else { - result.add('>'); - t.forEach(function (x) { - result.add(toHTML(x)); - }); - result.add(''); - } - return result.join(""); - }; - return tag; - }; - }); -} - -var _html_tags = - ["A", "ABBR", "ACRONYM", "ADDRESS", "APPLET", "AREA", "B", - "BASE", "BASEFONT", "BDO", "BIG", "BLOCKQUOTE", "BODY", - "BR", "BUTTON", "CAPTION", "CENTER", "CITE", "CODE", "COL", - "COLGROUP", "DD", "DEL", "DIR", "DIV", "DFN", "DL", "DT", - "EM", "FIELDSET", "FONT", "FORM", "FRAME", "FRAMESET", - "H1", "H2", "H3", "H4", "H5", "H6", - "HEAD", "HR", "HTML", "I", "IFRAME", "IMG", "INPUT", - "INS", "ISINDEX", "KBD", "LABEL", "LEGEND", "LI", "LINK", - "MAP", "MENU", "META", "NOFRAMES", "NOSCRIPT", "OBJECT", - "OL", "OPTGROUP", "OPTION", "P", "PARAM", "PRE", "Q", "S", - "SAMP", "SCRIPT", "SELECT", "SMALL", "SPAN", "STRIKE", - "STRONG", "STYLE", "SUB", "SUP", "TABLE", "TBODY", "TD", - "TEXTAREA", "TFOOT", "TH", "THEAD", "TITLE", "TR", "TT", - "U", "UL", "VAR", "XMP"]; - -_importTags(this, _html_tags); - diff --git a/trunk/infrastructure/framework-src/modules/global/appjet.js b/trunk/infrastructure/framework-src/modules/global/appjet.js deleted file mode 100644 index 135ac44..0000000 --- a/trunk/infrastructure/framework-src/modules/global/appjet.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("jsutils.scalaF0"); - -//---------------------------------------------------------------- -// global static "appjet" object -//---------------------------------------------------------------- - -/** - * @fileOverview The global appjet object contains access to the AppJet runtime, - * app meta-data, and other information. - */ -var appjet = { - -/** - * This is the interface to the execution context. You probably won't need - * to use this, but if you do, be careful! - * @type object - */ -get context() { - return net.appjet.oui.ExecutionContextUtils.currentContext(); -}, - -get executionId() { - return this.context.executionId(); -}, - -// /** -// * Holds the current request's requestId. (These IDs may be reused!) -// * @type String -// */ -// get requestId() { -// return this.context.requestId(); -// }, - -/** - * Volatile cache that persists between requests. (JavaScript object). - */ -get cache() { - return Packages.net.appjet.ajstdlib.ajstdlib.attributes() - .getOrElseUpdate("cache", scalaF0({})); -}, - -get cacheRoot() { - return function(name) { - return Packages.net.appjet.ajstdlib.ajstdlib.attributes() - .getOrElseUpdate("cache-"+(name?name:""), scalaF0({})); - }; -}, - -/** - * A global lock for this app (ReentrantLock object). - */ -get globalLock() { - return net.appjet.ajstdlib.ajstdlib.globalLock(); -}, - -/** - * Per-request cache, cleared between requests. - */ -get requestCache() { - return this.context.attributes().getOrElseUpdate("requestCache", scalaF0({})) -}, - -/** - * Per-scope cache, persisted in this "server" instance. - */ -get scopeCache() { - return this.context.runner().attributes().getOrElseUpdate("scopeCache", scalaF0({})); -}, - -/** - * config params for app. - */ -get config() { - return Packages.net.appjet.oui.config.configObject(this.context.runner().globalScope()); -}, - -/** - * tells appjet not to re-use this "scope"/"server" - */ -get retireScope() { - return function() { this.context.runner().reuseOk_$eq(false); } -}, - -/** - * How many milliseconds the server has been running for. - */ -get uptime() { - return Date.now() - Packages.net.appjet.oui.main.startTime().getTime(); -} - -}; // end: var appjet = {... \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/modules/global/request.js b/trunk/infrastructure/framework-src/modules/global/request.js deleted file mode 100644 index a4327f9..0000000 --- a/trunk/infrastructure/framework-src/modules/global/request.js +++ /dev/null @@ -1,312 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("stringutils.trim"); -import("jsutils.scalaF0") - -function _cx() { return appjet.context }; - -function _addIfNotPresent(obj, key, value) { - if (!(key in obj)) obj[key] = value; -} - -var request = { - -get isDefined() { - return ( - _cx() != null && - _cx().request() != null && - (! _cx().request().isFake()) && - _cx().request().req() != null - ); -}, - -get cache() { - var req = _cx().request().req(); - if (req.getAttribute("jsCache") == null) { - req.setAttribute("jsCache", {}); - } - return req.getAttribute("jsCache"); -}, - -get continuation() { - if (this.isDefined) { - var c = Packages.net.appjet.ajstdlib.execution.getContinuation(_cx()); - var u = this.underlying; - return { - suspend: function(timeout) { - return Packages.net.appjet.ajstdlib.execution.sync( - u, scalaF0(function() { return c.suspend(timeout); })); - }, - resume: function() { - Packages.net.appjet.ajstdlib.execution.sync( - u, scalaF0(function() { c.resume(); })) - } - } - } -}, - -get underlying() { - if (this.isDefined) { - return _cx().request().req(); - } -}, - -/** - * The request path following the hostname. For example, if the user - * is visiting yourapp.appjet.net/foo, then this will be set to - * "/foo". - * - * This does not include CGI parameters or the domain name, and always - * begins with a "/". - * - * @type string - */ -get path() { - if (this.isDefined) { - return String(_cx().request().path()); - } -}, - -/** - * The value request query string. - * - * For example, if the user visits "yourapp.appjet.net/foo?id=20", then - * query will be "id=20". - * - * @type string - */ -get query() { - if (this.isDefined) { - if (_cx().request().query() != null) { - return _cx().request().query(); - } - } -}, - -/** - * The content of a POST request. Retrieving this value may interfere - * with the ability to get post request parameters sent in the body of - * a request via the "params" property. Use with care. - * - * @type string - */ -get content() { - if (this.isDefined) { - if (_cx().request().content() != null) { - return _cx().request().content(); - } - } -}, - -/** - * Either "GET" or "POST" (uppercase). - * @type string - */ -get method() { - if (this.isDefined) { - return String(_cx().request().method().toUpperCase()); - } -}, - -/** - * Whether the curent HTTP request is a GET request. - * @type boolean - */ -get isGet() { - return (this.method == "GET"); -}, - -/** - * Whether the current HTTP request is a POST request. - * @type boolean - */ -get isPost() { - return (this.method == "POST"); -}, - -/** - * Either "http" or "https" (lowercase). - * @type string - */ -get scheme() { - if (this.isDefined) { - return String(_cx().request().scheme()); - } -}, - -/** - * Whether the current request arrived using HTTPS. - * @type boolean - */ -get isSSL() { - return (this.scheme == "https"); -}, - -/** - * Holds the IP address of the user making the request. - * @type string - */ -get clientAddr() { - if (this.isDefined) { - return String(_cx().request().clientAddr()); - } -}, - -/** - * Parameters associated with the request, either from the query string - * or from the contents of a POST, e.g. from a form. Parameters are accessible - * by name as properties of this object. The property value is either a - * string (typically) or an array of strings (if the parameter occurs - * multiple times in the request). - * - * @type object - */ -get params() { - if (this.isDefined) { - var cx = _cx(); - var req = cx.request(); - return cx.attributes().getOrElseUpdate("requestParams", - scalaF0(function() { return req.params(cx.runner().globalScope()); })); - } -}, - -/** - * Uploaded files associated with the request, from the contents of a POST. - * - * @type object - */ -get files() { - if (this.isDefined) { - var cx = _cx(); - var req = cx.request(); - return cx.attributes().getOrElseUpdate("requestFiles", - scalaF0(function() { return req.files(cx.runner().globalScope()); })); - } -}, - -/** - * Used to access the HTTP headers of the current request. Properties are - * header names, and each value is either a string (typically) or an - * array of strings (if the header occurs multiple times in the request). - * - * @example -print(request.headers["User-Agent"]); - * - * @type object - */ -get headers() { - if (this.isDefined) { - var cx = _cx(); - var req = cx.request(); - return cx.attributes().getOrElseUpdate("requestHeaders", - scalaF0(function() { return req.headers(cx.runner().globalScope()); })); - } -}, - -// TODO: this is super inefficient to do each time someone accesses -// request.cookies.foo. We should probably store _cookies in the requestCache. -get cookies() { - var _cookies = {}; - var cookieHeaderArray = this.headers['Cookie']; - if (!cookieHeaderArray) { return {}; } - if (!(cookieHeaderArray instanceof Array)) - cookieHeaderArray = [cookieHeaderArray]; - var name, val; - - cookieHeaderArray.forEach(function (cookieHeader) { - cookieHeader.split(';').forEach(function(cs) { - var parts = cs.split('='); - if (parts.length == 2) { - name = trim(parts[0]); - val = trim(unescape(parts[1])); - _addIfNotPresent(_cookies, name, val); - } - }); - }); - - return _cookies; -}, - -/** - * Holds the full URL of the request. - */ -get url() { - if (this.isDefined) { - return this.scheme+"://"+this.host+this.path+(this.query ? "?"+this.query : ""); - } -}, - -get host() { - if (this.isDefined) { - // required by HTTP/1.1 to be present. - return String(this.headers['Host']).toLowerCase(); - } -}, - -get domain() { - if (this.isDefined) { - // like host, but without the port if there is one. - return this.host.split(':')[0]; - } -}, - -get uniqueId() { - return String(_cx().executionId()); -}, - -get protocol() { - if (this.isDefined) { - return String(_cx().request().protocol()); - } -}, - -get userAgent() { - if (this.isDefined) { - var agentString = (request.headers['User-Agent'] || "?"); - return { - toString: function() { return agentString; }, - isIPhone: function() { return (agentString.indexOf("(iPhone;") > 0); } - }; - } -}, - -get acceptsGzip() { - if (this.isDefined) { - var headerArray = this.headers["Accept-Encoding"]; - if (! (headerArray instanceof Array)) { - headerArray = [headerArray]; - } - // Want to see if some accept-encoding header OK's gzip. - // Starting with: "Accept-Encoding: gzip; q=0.5, deflate; q=1.0" - // 1. Split into ["gzip; q=0.5", "delfate; q=1.0"] - // 2. See if some entry is gzip with q > 0. (q is optional.) - return headerArray.some(function(header) { - if (! header) return false; - return header.split(/,\s*/).some(function(validEncoding) { - if (!validEncoding.indexOf("gzip") == 0) { - return false; - } - if (/q=[0\.]*$/.test(validEncoding)) { - return false; - } - return true; - }); - }); - } -} - -}; // end: var request = {... diff --git a/trunk/infrastructure/framework-src/modules/global/response.js b/trunk/infrastructure/framework-src/modules/global/response.js deleted file mode 100644 index 7236920..0000000 --- a/trunk/infrastructure/framework-src/modules/global/response.js +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -/** - * @fileOverview Helpers for the HTTP response. - */ - -/** @ignore */ -function _cx() { return appjet.context }; - -/** @ignore */ -function _cookiestring(c) { - var x = ''; - if (!c.name) { throw new Error('cookie name is required'); } - if (!c.value) { c.value = ''; } - x += (c.name + '=' + escape(c.value)); - - // expires - if (c.expires instanceof Date) { - x += ('; expires='+_cookiedate(c.expires)); - } - if (typeof(c.expires) == 'number') { - var today = (new Date()).valueOf(); - var d = new Date(today + 86400000*c.expires); - x += ('; expires='+_cookiedate(d)); - } - - // domain - if (c.domain) { x += ('; domain='+c.domain); } - - // path - if (c.path) { x += ('; path='+c.path); } - - // secure - if (c.secure == true) { x += '; secure'; } - - return x; -}; - -/** @ignore */ -function _cookiedate(d) { - var x = d.toGMTString(); - var p = x.split(' '); - return [p[0], [p[1], p[2], p[3]].join('-'), p[4], p[5]].join(' '); -}; - -var response = { - -get isDefined() { - return _cx().response() != null; -} - -}; - -/** - * Halts the program immediately and returns 403 Forbidden error to the user. - */ -response.forbid = function() { - _cx().response().error(403, "Forbidden"); -}; - -/** - * Halts the program immediately. - * - * @param {boolean} renderCurrentPage if false, an empty page will be rendered, - * otherwise calls to print() so far will be displayed. Either way, no more - * code will be executed. - */ -response.stop = function(renderCurrentPage) { - _cx().response().stop(); -}; - -/** - * Halts the program immediately and returns a 404 not found error to the user. - */ -response.notFound = function() { - _cx().response().error(404, "404: Not found"); -}; - -/** - * Halts the program immediately and sends an HTTP redirect response (302), - * redirecting to the given path (relative or absolute). - * - * @param {string} path The new path - */ -response.redirect = function(path) { - if ((! path) && path != "") { - throw new Error("Invalid redirect: "+path); - } - if (path.indexOf('/') == 0) { - // make sure absolute URL has proper host/port - path = request.scheme+"://"+request.host+path; - } - _cx().response().redirect(path); -}; - -/** - * Sets the status code in the HTTP response. - * - * @param {number} newCode - */ -response.setStatusCode = function(newCode) { - _cx().response().setStatusCode(newCode); -}; -response.getStatusCode = function() { - return _cx().response().getStatusCode(); -}; - -response.sendError = function(errorCode, errorHtml) { - _cx().response().error(errorCode, errorHtml); -}; - -response.reset = function() { - _cx().response().reset(); -}; - -/** - * Sets any header of the HTTP response. - * - * @example -response.setHeader('Cache-Control', 'no-cache'); - * - * @param {string} name - * @param {string} value - */ -response.setHeader = function(name, value) { - _cx().response().setHeader(name, value); -}; - -/** - * Adds the name,value pair to the headers. Useful for headers that are - * allowed to repeat, such as Set-Cookie. - * - * @param {string} name - * @param {string} value - */ -response.addHeader = function(name, value) { - _cx().response().addHeader(name, value); -}; - -/** - * Returns the value of a previously-set header. Useful in the - * postRequestHandler to see values of headers set during normal - * request processing. - * - * @param {string} name - * @return {array} An array of header values. Empty array if none set. - */ -response.getHeader = function(name) { - if (! this.isDefined) { - return []; - } else { - return _cx().response().getHeader(name); - } -}; - -/** - * Removes all instances of a header of the HTTP response. - * - * @param {string} name - */ -response.removeHeader = function(name) { - _cx().response().removeHeader(name); -}; - -/** - * Low-level hook for writing raw data to the response. - * @param {string} data will be written, verbatim, to the HTTP resonse. - */ -response.write = function(data) { - _cx().response().write(data); -}; - -/** - * Low-level hook for writing raw byte data to the response. Especially - * useful for writing the result of a wget of image data, - * or writing an uploaded file. - * @param {string} data will be written, verbatim, to the HTTP resonse. - */ -response.writeBytes = function(data) { - _cx().response().writeBytes(data); -}; - -//---------------------------------------------------------------- -// Cookies! -//---------------------------------------------------------------- - -/** - * Set a cookie in the response. - * - * @example -response.setCookie({ - name: "SessionID", - value: "25", - secure: true, - expires: 14 // 14 days -}); - * - * @param {object} cookieObject This may contain any of the following: -
    -
  • name (required): The name of the cookie
  • -
  • value (required): The value of the cookie. (Note: this value will be escaped). -
  • expires (optional): If an integer, means number of days until it expires; - if a Date object, means exact date on which to expire.
  • -
  • domain (optional): The cookie domain
  • -
  • path (optional): To restrict the cookie to a specific path.
  • -
  • secure (optional): Whether this cookie should only be sent securely.
  • -
- */ -response.setCookie = function(cookieObject) { - this.addHeader('Set-Cookie', _cookiestring(cookieObject)); - - var p3pHeader = this.getHeader("P3P"); - if ((! p3pHeader) || p3pHeader.length == 0) { - // The existence of this "privacy policy" header allows cookies set on - // pages inside iframes to be accepted by IE. (This is some kind of - // default policy copied from an example online. -- dgreensp) - this.setHeader('P3P', 'CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"'); - } -}; - -/** - * Tells the client to delete the cookie of the given name (by setting - * its expiration time to zero). - * @param {string} name The name of the cookie to delete. - */ -response.deleteCookie = function(name) { - this.setCookie({name: name, value: '', expires: 0}); -}; - -function _trim(s) { - return String((new java.lang.String(s)).trim()); -} - -response.getCookie = function(name) { - var cookieHeaders = this.getHeader('Set-Cookie'); - if (! cookieHeaders) { return; } - for (var i = 0; i < cookieHeaders.length; ++i) { - if (_trim(cookieHeaders[i].split("=")[0]) == name) - return _trim(cookieHeaders[i].split(";")[0].split("=")[1]); - } -}; - -/** - * Sets the Content-Type header of the response. If the content-type includes - * a charset, that charset is used to send the response. - * @param {string} contentType the new content-type - */ -response.setContentType = function(contentType) { - _cx().response().setContentType(contentType); -}; - -response.getCharacterEncoding = function() { - return _cx().response().getCharacterEncoding(); -} - -response.neverCache = function() { - // be aggressive about not letting the response be cached. - var that = this; - function sh(k,v) { that.setHeader(k,v); } - sh('Expires', 'Sat, 18 Jun 1983 07:07:07 GMT'); - sh('Last-Modified', (new Date()).toGMTString()); - sh('Cache-Control', ('no-store, no-cache, must-revalidate, '+ - 'post-check=0, pre-check=0')); - sh('Pragma', 'no-cache'); -}; - -response.alwaysCache = function() { - var that = this; - function sh(k,v) { that.setHeader(k,v); } - that.removeHeader('Last-Modified'); - that.removeHeader('Pragma'); - var futureDate = new Date(); - futureDate.setTime(Date.now() + 315360000000); - sh('Expires', futureDate.toGMTString()); - sh('Cache-Control', 'max-age=315360000'); -}; - -response.setGzip = function(gzip) { - _cx().response().setGzip(gzip); -} diff --git a/trunk/infrastructure/framework-src/modules/image.js b/trunk/infrastructure/framework-src/modules/image.js deleted file mode 100644 index 8aec74b..0000000 --- a/trunk/infrastructure/framework-src/modules/image.js +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("blob"); - -jimport("java.awt.image.BufferedImage"); -jimport("org.apache.sanselan.Sanselan"); -jimport("org.apache.sanselan.ImageFormat"); - -if (java.lang.System.getProperty("java.awt.headless") == null) { - // If the system property isn't set either way, then default to "headless" mode, - // so that we don't start calling the window manager when the AWT classes - // are loaded. For example, on OS X the java process is given a Dock icon - // when we create our first BufferedImage. - java.lang.System.setProperty("java.awt.headless", "true"); -} - -/** - * Encodes the given pixel data into an image blob, ready to be served to - * the client. Pixels are specified as 32-bit ints in the format AARRGGBB, - * and the order is across rows first, then down columns. If useTransparency - * is true, then all pixels should have an alpha channel as their - * most-significant byte, with 0xff being fully opaque. If useTransparency - * is false, all pixels are fully opaque and the high byte is ignored. - * Supported formats: GIF. - *

- * For example, to create a GIF image consisting of a green pixel followed - * by a transparent pixel to the right of it, use: - * imageBlobFromPixels(2, 1, [0xff00ff00, 0x00000000], true, "gif") - */ - -function pixelsToImageBlob(width, height, pixelArrayARGB, useTransparency, format) { - var image = _makeBufferedImage(width, height); - var array = _makePixelArray(width, height); - var alphaMask = (useTransparency ? 0x00000000 : 0xff000000); - - for(var i=0; iobj, - * not including built-in or inherited properties. If no - * argument is given, applies to the global object. - * - * @example -// Prints "abc" -keys({a: 1, b: 2, c: 3}).forEach(function(k) { - print(k); -} - * - * @example -// Prints all the functions and object members of the global "appjet" object, -// one per line. -print(keys(appjet).join('\n')); - * - * @param {object} obj - */ -function keys(obj) { - var array = []; - var o = obj; - if (o == undefined) { - o = this; - } - for(var k in o) { - if (!obj.hasOwnProperty || o.hasOwnProperty(k)) { - array.push(k); - } - } - return array; -} - -/** - * Comparator that returns -1, +1, or 0 depending on whether a < b, or a > b, or - * neither, respectively. - * @param {object} a - * @param {object} b - * @return {number} -1, 0, or +1 - */ -function cmp(a,b) { - if (a < b) { - return -1; - } - if (a > b) { - return 1; - } - return 0; -} - -function arrayToSet(arr) { - var set = {}; - arr.forEach(function(x) { - set[x] = true; - }); - return set; -} - -function mergeArrays(mergeFunction, a1, a2, etc) { - var len = a1.length; - var arrays = Array.prototype.slice.call(arguments, 1); - for (var i = 0; i < arrays.length; ++i) { - if (arrays[i].length != len) { - return; - } - } - out = []; - for (var i = 0; i < a1.length; ++i) { - out.push(mergeFunction.apply(this, arrays.map(function(array) { return array[i]; }))); - } - return out; -} - -function debug(obj) { - if (typeof(obj) == 'object') { - var ret = []; - if (obj) { - eachProperty(obj, function(k, v) { - ret.push(k+" -> "+debug(v)); - }); - return '['+ret.join(", ")+']'; - } else { - return String(obj); - } - } else { - return String(obj); - } -} - -/** - * Create a scala function out of the given JS function. - */ -function scalaFn(nargs, f) { - if (typeof(f) == 'function') { - return new Packages.scala['Function'+nargs]({ - apply: f - }); - } else { - return new Packages.scala['Function'+nargs]({ - apply: function() { return f; } - }) - } -} - -function scalaF0(f) { - return scalaFn(0, f); -} - -function scalaF1(f) { - return scalaFn(1, f); -} - -/** - * Some bonus functions for functional programming. - */ -function f_curry(thisPtr, f, arg1, arg2, etc) { - var curriedArgs = Array.prototype.slice.call(arguments, 2); - return function() { - var args = Array.prototype.slice.call(arguments, 0); - return f.apply(thisPtr, curriedArgs.concat(args)); - } -} - -function f_limitArgs(thisPtr, f, n) { - return function() { - var args = Array.prototype.slice.call(arguments, 0, n); - return f.apply(thisPtr, args); - } -} - - - diff --git a/trunk/infrastructure/framework-src/modules/netutils.js b/trunk/infrastructure/framework-src/modules/netutils.js deleted file mode 100644 index 6616b76..0000000 --- a/trunk/infrastructure/framework-src/modules/netutils.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -/** - * @fileOverview A collection of network-related utilities. - */ - -import("jsutils.eachProperty"); - -jimport("java.net.InetAddress"); - - -function urlPost(url0, params, options) { - var url = new java.net.URL(url0); - - var data; - if (typeof(params) == 'string') { - data = params; - } else if (typeof(params) == 'object') { - var components = []; - eachProperty(params, function(k, v) { - components.push(encodeURIComponent(k)+"="+encodeURIComponent(v)); - }); - data = components.join('&'); - } - var dataBytes = (new java.lang.String(data)).getBytes("UTF-8"); - var conn = url.openConnection(); - conn.setInstanceFollowRedirects(true); - conn.setRequestMethod("POST"); - conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); - conn.setRequestProperty("Content-Length", dataBytes.length); - conn.setDoInput(true); - conn.setDoOutput(true); - conn.setConnectTimeout(30*1000); - conn.setReadTimeout(30*1000); - conn.getOutputStream().write(dataBytes); - var content = conn.getContent(); - var responseCode = conn.getResponseCode(); - var contentType = conn.getContentType(); - var contentEncoding = conn.getContentEncoding(); - - if ((content instanceof java.io.InputStream) && (new java.lang.String(contentType)).startsWith("text/")) { - if (! contentEncoding) { - var encoding = contentType.split(/;\s*/); - if (encoding.length > 1) { - encoding = encoding[1].split("="); - if (encoding[0] == "charset") - contentEncoding = encoding[1]; - } - } - content = net.appjet.common.util.BetterFile.getStreamBytes(content); - if (contentEncoding) { - content = (new java.lang.String(content, contentEncoding)); - } - } - - return { - content: content, - status: responseCode, - contentType: contentType, - contentEncoding: contentEncoding - }; -} - -function getHostnameFromIp(ip) { - var ret = null; - try { - var addr = InetAddress.getByName(ip); - ret = addr.getHostName(); - } catch (ex) { } - return ret; -} - - - diff --git a/trunk/infrastructure/framework-src/modules/process.js b/trunk/infrastructure/framework-src/modules/process.js deleted file mode 100644 index 48ab62e..0000000 --- a/trunk/infrastructure/framework-src/modules/process.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Simple way to execute external commands through javascript - * - * @example - cmd = exec("cat"); - System.out.println("First: " +cmd.write("this is a loop.").read(Process.READ_AVAILABLE)); // prints "this is a loop." - System.out.println("Second: " +cmd.writeAndClose(" hi there").result()); // prints "this is a loop. hi there" - * - */ - -jimport("java.lang.Runtime"); -jimport("java.io.BufferedInputStream"); -jimport("java.io.BufferedOutputStream"); -jimport("java.lang.System"); - -/* returns a process */ -function exec(process) { - return new Process(process); -}; - -function Process(cmd) { - this.cmd = cmd; - this.proc = Runtime.getRuntime().exec(cmd); - this.resultText = ""; - this.inputStream = new BufferedInputStream(this.proc.getInputStream()); - this.errorStream = new BufferedInputStream(this.proc.getErrorStream()); - this.outputStream = new BufferedOutputStream(this.proc.getOutputStream()); -} - -Process.CHUNK_SIZE = 1024; -Process.READ_ALL = -1; -Process.READ_AVAILABLE = -2; - -Process.prototype.write = function(stdinText) { - this.outputStream.write(new java.lang.String(stdinText).getBytes()); - this.outputStream.flush(); - return this; -}; - -Process.prototype.writeAndClose = function(stdinText) { - this.write(stdinText); - this.outputStream.close(); - return this; -}; - -/* Python file-like behavior: read specified number of bytes, else until EOF*/ -Process.prototype.read = function(nbytesToRead, stream) { - var inputStream = stream || this.inputStream; - var availBytes = inputStream.available(); - if (!availBytes) return null; - - var result = ""; - var nbytes = nbytesToRead || Process.READ_ALL; - var readAll = (nbytes == Process.READ_ALL); - var readAvailable = (nbytes == Process.READ_AVAILABLE); - while (nbytes > 0 || readAll || readAvailable) { - var chunkSize = readAll ? Process.CHUNK_SIZE : - readAvailable ? Process.CHUNK_SIZE : nbytes; - - // allocate a java byte array - var bytes = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, chunkSize); - - var len = inputStream.read(bytes, 0, chunkSize); - - // at end of stream, or when we run out of data, stop reading in chunks. - if (len == -1) break; - if (nbytes > 0) nbytes -= len; - - result += new java.lang.String(bytes); - - if (readAvailable && inputStream.available() == 0) break; - } - - this.resultText += new String(result); - return new String(result); -}; - -Process.prototype.result = function() { - this.outputStream.close(); - this.proc.waitFor(); - this.read(Process.READ_ALL, this.inputStream); - return new String(this.resultText); -}; - -Process.prototype.resultOrError = function() { - this.proc.waitFor(); - this.read(Process.READ_ALL, this.inputStream); - var result = this.resultText; - if(!result || result == "") result = this.read(Process.READ_ALL, this.errorStream); - return result || ""; -}; diff --git a/trunk/infrastructure/framework-src/modules/profiler.js b/trunk/infrastructure/framework-src/modules/profiler.js deleted file mode 100644 index 223c197..0000000 --- a/trunk/infrastructure/framework-src/modules/profiler.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - - -/** - * @fileDescription - * Sosme profiling functions. - */ -var time = function() { - return Packages.net.appjet.oui.profiler.time(); -} - -var record = function(op, time) { - Packages.net.appjet.oui.profiler.record(op, time); -} - -var recordCumulative = function(op, time) { - Packages.net.appjet.oui.profiler.recordCumulative(op, time); -} - -var reset = function() { - Packages.net.appjet.oui.profiler.reset(); -} - -var print = function() { - Packages.net.appjet.oui.profiler.print(); -} - -var rcb = function(op, cumulative) { - var start = time(); - return function() { - var end = time(); - (cumulative ? recordCumulative : record)(op, end-start); - } -} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/modules/sessions.js b/trunk/infrastructure/framework-src/modules/sessions.js deleted file mode 100644 index 3d0041b..0000000 --- a/trunk/infrastructure/framework-src/modules/sessions.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("dateutils"); -import("fastJSON"); -import("fileutils"); -import("jsutils.{eachProperty,keys}"); -import("stringutils.{randomHash,startsWith,endsWith}"); -import("sync"); - -jimport("net.appjet.common.util.ExpiringMapping"); - -//---------------------------------------------------------------- - -var _DEFAULT_COOKIE_NAME = "SessionID"; -var _DEFAULT_SERVER_EXPIRATION = 3*24*60*60*1000; // 72 hours - -function getSessionId(cookieName, createIfNotPresent, domain) { - if (request.isComet || request.isCron) { - return null; - } - - if (request.cookies[cookieName]) { - return request.cookies[cookieName]; - } - - if (!createIfNotPresent) { - return null; - } - - // Keep sessionId in requestCache so this function can be called multiple - // times per request without multiple calls to setCookie(). - if (!appjet.requestCache.sessionId) { - var sessionId = randomHash(16); - - response.setCookie({ - name: cookieName, - value: sessionId, - path: "/", - domain: (domain || undefined) - }); - - appjet.requestCache.sessionId = sessionId; - } - - return appjet.requestCache.sessionId; -} - -function _getExpiringSessionMap(db) { - sync.callsyncIfTrue(db, - function() { return (!db.map); }, - function() { db.map = new ExpiringMapping(_DEFAULT_SERVER_EXPIRATION); }); - return db.map; -} - -function _getCachedDb() { - return appjet.cacheRoot("net.appjet.ajstdlib.session"); -} - -//---------------------------------------------------------------- - -function getSession(opts) { - // Session options. - if (!opts) { opts = {}; } - var cookieName = opts.cookieName || _DEFAULT_COOKIE_NAME; - - // get cookie ID (sets response cookie if necessary) - var sessionId = getSessionId(cookieName, true, opts.domain); - - // get expiring session map - var db = _getCachedDb(); - var map = _getExpiringSessionMap(db); - - // get session data object - var domainKey = (opts.domain ? opts.domain : ""); - var dataKey = [domainKey, sessionId].join('$'); - - var sessionData = map.get(dataKey); - if (!sessionData) { - sessionData = {}; - map.put(dataKey, sessionData); - } - else { - map.touch(dataKey); - } - - return sessionData; -} - -function writeSessionsToDisk() { - var dateString = dateutils.dateFormat(new Date(), "yyyy-MM-dd"); - var dataFile = new Packages.java.io.File(appjet.config.sessionStoreDir+"/sessions-"+dateString+".jslog"); - dataFile.getParentFile().mkdirs(); - var writer = new java.io.FileWriter(dataFile); - var map = _getCachedDb().map; - if (! map) { return; } - var keyIterator = map.listAllKeys().iterator(); - while (keyIterator.hasNext()) { - var key = keyIterator.next(); - var session = map.get(key); - if (keys(session).length == 0) { continue; } - var obj = { key: key, session: session }; - var json = fastJSON.stringify(obj); - writer.write(json); - writer.write("\n"); - } - writer.flush(); - writer.close(); -} - -function _extractDate(fname) { - var datePart = fname.substr("sessions-".length, "2009-09-24".length); - return Number(datePart.split("-").join("")); -} - -function readLatestSessionsFromDisk() { - var dir = new Packages.java.io.File(appjet.config.sessionStoreDir); - if (! dir.exists()) { return; } - var files = dir.listFiles(new Packages.java.io.FilenameFilter({ - accept: function(dir, name) { - return startsWith(name, "sessions") && endsWith(name, ".jslog") - } - })); - if (files.length == 0) { return; } - var latestFile = files[0]; - for (var i = 1; i < files.length; ++i) { - if (_extractDate(files[i].getName()) > _extractDate(latestFile.getName())) { - latestFile = files[i]; - } - } - var map = _getExpiringSessionMap(_getCachedDb()); - fileutils.eachFileLine(latestFile, function(json) { - try { - var obj = fastJSON.parse(json); - var key = obj.key; - var session = obj.session; - map.put(key, session); - } catch (err) { - Packages.java.lang.System.out.println("Error reading sessions file on line '"+json+"': "+String(err)); - } - }); - latestFile.renameTo(new Packages.java.io.File(latestFile.getParent()+"/used-"+latestFile.getName())); -} diff --git a/trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js b/trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js deleted file mode 100644 index 1c4cc95..0000000 --- a/trunk/infrastructure/framework-src/modules/sqlbase/persistent_vars.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - - -import("sqlbase.sqlobj"); -import("sqlbase.sqlcommon"); - -jimport("java.lang.System.out.println"); - -// TODO: add caching? - -// Curently supports: -// Strings - -function get(name) { - if (!sqlcommon.doesTableExist('persistent_vars')) { - return undefined; - } - var r = sqlobj.selectSingle('persistent_vars', {name: name}); - if (!r) { - return undefined; - } - return r.stringVal; -} - -function put(name, val) { - if (typeof(val) != 'string') { - throw Error("unsupported type for persistent_vars: "+typeof(val)); - } - - var r = sqlobj.selectSingle('persistent_vars', {name: name}); - if (r) { - sqlobj.updateSingle('persistent_vars', {id: r.id}, {stringVal: val}); - } else { - sqlobj.insert('persistent_vars', {name: name, stringVal: val}); - } -} - -function remove(name) { - var r = sqlobj.selectSingle('persistent_vars', {name: name}); - if (r) { - sqlobj.deleteRows('persistent_vars', {id: r.id}); - } -} diff --git a/trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js b/trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js deleted file mode 100644 index 3df1a0f..0000000 --- a/trunk/infrastructure/framework-src/modules/sqlbase/sqlbase.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("jsutils.*"); -import("sqlbase.sqlcommon"); -import("fastJSON"); -import("timer"); - -jimport("java.lang.System.out.println"); - -function _sqlbase() { - return sqlcommon.getSqlBase(); -} - -/** - * Creates a SQL table suitable for storing a mapping from String to JSON value. - * Maximum key length is 128 characters. Has no effect if the table already exists. - */ -function createJSONTable(tableName) { - _sqlbase().createJSONTable(String(tableName)); -} - -/** - * Retrieves a JavaScript object or value from a table. Returns undefined - * if there is no mapping for the given string key. Requires that the table - * exist. - */ -function getJSON(tableName, stringKey) { - var result = _sqlbase().getJSON(String(tableName), String(stringKey)); - if (result) { - - return fastJSON.parse(String(result))['x']; - - /* performance-testing JSON - var obj1 = timer.time("JSON.parse (json2)", function() { - return JSON.parse(String(result))['x']; - }); - var obj2 = timer.time("JSON.parse (fastJSON)", function() { - return fastJSON.parse(String(result))['x']; - }); - return obj2; - */ - } - return undefined; -} - -function getAllJSON(tableName, start, count) { - var result = _sqlbase().getAllJSON(String(tableName), Number(start), Number(count)); - return Array.prototype.map.call(result, function(x) { - return {id: x.id(), value: fastJSON.parse(String(x.value()))['x']}; - }) -} - -function getAllJSONKeys(tableName) { - var result = _sqlbase().getAllJSONKeys(String(tableName)); - return Array.prototype.map.call(result, function(x) { return String(x); }); -} - -/** - * Assigns a JavaScript object or primitive value to a string key in a table. - * Maximum key length is 128 characters. Requires that the table exist. - */ -function putJSON(tableName, stringKey, objectOrValue) { - var obj = ({x:objectOrValue}); - - var json = fastJSON.stringify(obj); - - /* performance-testing JSON - - var json1 = timer.time("JSON.stringify (json2)", function() { - return JSON.stringify(obj); - }); - var json2 = timer.time("JSON.stringify (fastJSON)", function() { - return fastJSON.stringify(obj); - }); - - if (json1 != json2) { - println("json strings do not match!"); - println("\n\n"); - println(json1); - println("\n"); - println(json2); - println("\n\n"); - }*/ - - _sqlbase().putJSON(String(tableName), String(stringKey), json); -} - -/** - * Removes the mapping for a string key from a table. Requires that the table - * exist. - */ -function deleteJSON(tableName, stringKey) { - _sqlbase().deleteJSON(String(tableName), String(stringKey)); -} - -/** - * Creates a SQL table suitable for storing a mapping from (key,n) to string. - * The mapping may be sparse, but storage is most efficient when n are consecutive. - * The "length" of the array is not stored and must be externally maintained. - * Maximum key length is 128 characters. This call has no effect if the table - * already exists. - */ -function createStringArrayTable(tableName) { - _sqlbase().createStringArrayTable(String(tableName)); -} - -/** - * Assigns a string value to a (key,n) pair in a StringArray table. Maximum key length - * is 128 characters. Requires that the table exist. - */ -function putStringArrayElement(tableName, stringKey, n, value) { - _sqlbase().putStringArrayElement(String(tableName), String(stringKey), - Number(n), String(value)); -} - -/** - * Equivalent to a series of consecutive puts of the elements of valueArray, with the first - * one going to n=startN, the second to n=startN+1, and so on, but much more efficient. - */ -function putConsecutiveStringArrayElements(tableName, stringKey, startN, valueArray) { - var putter = _sqlbase().putMultipleStringArrayElements(String(tableName), String(stringKey)); - for(var i=0;i 0) { - stmnt += "WHERE ("; - stmnt += constraintKeys.map(function(key) { - return _makeConstraintString(key, constraints[key]); - }).join(' AND '); - stmnt += ')'; - } - - if (options.orderBy) { - var orderEntries = []; - options.orderBy.split(",").forEach(function(orderBy) { - var asc = "ASC"; - if (orderBy.charAt(0) == '-') { - orderBy = orderBy.substr(1); - asc = "DESC"; - } - orderEntries.push(_bq(orderBy)+" "+asc); - }); - stmnt += " ORDER BY "+orderEntries.join(", "); - } - - if (options.limit) { - stmnt += " LIMIT "+options.limit; - } - - return withConnection(function(conn) { - var pstmnt = conn.prepareStatement(stmnt); - return closing(pstmnt, function() { - _setPreparedValues( - tableName, pstmnt, constraintKeys, - _preparedValuesConstraints(constraints), 0); - - _qdebug(stmnt); - var resultSet = pstmnt.executeQuery(); - var resultArray = []; - - return closing(resultSet, function() { - while (resultSet.next()) { - resultArray.push(_resultRowToJsObj(resultSet)); - } - - return resultArray; - }); - }); - }); -} - -/* returns number of rows updated */ -function update(tableName, constraints, obj) { - var objKeys = keys(obj); - var constraintKeys = keys(constraints); - - var stmnt = "UPDATE "+_bq(tableName)+" SET "; - stmnt += objKeys.map(function(k) { return ''+_bq(k)+' = ?'; }).join(', '); - stmnt += " WHERE ("; - stmnt += constraintKeys.map(function(k) { return '('+_bq(k)+' = ?)'; }).join(' AND '); - stmnt += ')'; - - return withConnection(function(conn) { - var pstmnt = conn.prepareStatement(stmnt); - return closing(pstmnt, function() { - _setPreparedValues(tableName, pstmnt, objKeys, obj, 0); - _setPreparedValues(tableName, pstmnt, constraintKeys, constraints, objKeys.length); - _qdebug(stmnt); - return pstmnt.executeUpdate(); - }); - }); -} - -function updateSingle(tableName, constraints, obj) { - var count = update(tableName, constraints, obj); - if (count != 1) { - throw Error("save count != 1. instead, count = "+count); - } -} - -function deleteRows(tableName, constraints) { - var constraintKeys = keys(constraints); - var stmnt = "DELETE FROM "+_bq(tableName)+" WHERE ("; - stmnt += constraintKeys.map(function(k) { return '('+_bq(k)+' = ?)'; }).join(' AND '); - stmnt += ')'; - withConnection(function(conn) { - var pstmnt = conn.prepareStatement(stmnt); - closing(pstmnt, function() { - _setPreparedValues(tableName, pstmnt, constraintKeys, constraints); - _qdebug(stmnt); - pstmnt.executeUpdate(); - }); - }) -} - -//---------------------------------------------------------------- -// table management -//---------------------------------------------------------------- - -/* - * Create a SQL table, specifying column names and types with a - * javascript object. - */ -function createTable(tableName, colspec, indices) { - if (doesTableExist(tableName)) { - return; - } - - var stmnt = "CREATE TABLE "+_bq(tableName)+ " ("; - stmnt += keys(colspec).map(function(k) { return (_bq(k) + ' ' + colspec[k]); }).join(', '); - if (indices) { - stmnt += ', ' + keys(indices).map(function(k) { return 'INDEX (' + _bq(k) + ')'; }).join(', '); - } - stmnt += ')'+createTableOptions(); - _execute(stmnt); -} - -function dropTable(tableName) { - _execute("DROP TABLE "+_bq(tableName)); -} - -function dropAndCreateTable(tableName, colspec, indices) { - if (doesTableExist(tableName)) { - dropTable(tableName); - } - - return createTable(tableName, colspec, indices); -} - -function renameTable(oldName, newName) { - _executeUpdate("RENAME TABLE "+_bq(oldName)+" TO "+_bq(newName)); -} - -function modifyColumn(tableName, columnName, newSpec) { - _executeUpdate("ALTER TABLE "+_bq(tableName)+" MODIFY "+_bq(columnName)+" "+newSpec); -} - -function alterColumn(tableName, columnName, alteration) { - var q = "ALTER TABLE "+_bq(tableName)+" ALTER COLUMN "+_bq(columnName)+" "+alteration; - _executeUpdate(q); -} - -function changeColumn(tableName, columnName, newSpec) { - var q = ("ALTER TABLE "+_bq(tableName)+" CHANGE COLUMN "+_bq(columnName) - +" "+newSpec); - _executeUpdate(q); -} - -function addColumns(tableName, colspec) { - inTransaction(function(conn) { - eachProperty(colspec, function(name, definition) { - var stmnt = "ALTER TABLE "+_bq(tableName)+" ADD COLUMN "+_bq(name)+" "+definition; - _executeUpdate(stmnt); - }); - }); -} - -function dropColumn(tableName, columnName) { - var stmnt = "ALTER TABLE "+_bq(tableName)+" DROP COLUMN "+_bq(columnName); - _executeUpdate(stmnt); -} - -function listTables() { - return withConnection(function(conn) { - var metadata = conn.getMetaData(); - var resultSet = metadata.getTables(null, null, null, null); - var resultArray = []; - - return closing(resultSet, function() { - while (resultSet.next()) { - resultArray.push(resultSet.getString("TABLE_NAME")); - } - return resultArray; - }); - }); -} - -function setTableEngine(tableName, engineName) { - var stmnt = "ALTER TABLE "+_bq(tableName)+" ENGINE="+_bq(engineName); - _executeUpdate(stmnt); -} - -function getTableEngine(tableName) { - if (!isMysql()) { - throw Error("getTableEngine() only supported by MySQL database type."); - } - - var tableEngines = {}; - - withConnection(function(conn) { - var stmnt = "show table status"; - var pstmnt = conn.prepareStatement(stmnt); - closing(pstmnt, function() { - _qdebug(stmnt); - var resultSet = pstmnt.executeQuery(); - closing(resultSet, function() { - while (resultSet.next()) { - var n = resultSet.getString("Name"); - var eng = resultSet.getString("Engine"); - tableEngines[n] = eng; - } - }); - }); - }); - - return tableEngines[tableName]; -} - -function createIndex(tableName, columns) { - var indexName = "idx_"+(columns.join("_")); - var stmnt = "CREATE INDEX "+_bq(indexName)+" on "+_bq(tableName)+" ("; - stmnt += columns.map(_bq).join(", "); - stmnt += ")"; - _executeUpdate(stmnt); -} - diff --git a/trunk/infrastructure/framework-src/modules/stringutils.js b/trunk/infrastructure/framework-src/modules/stringutils.js deleted file mode 100644 index 3fe5611..0000000 --- a/trunk/infrastructure/framework-src/modules/stringutils.js +++ /dev/null @@ -1,399 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -/** - * @fileOverview A collection of various string utilities. - */ - -// TODO: uncomment with import works with * - -import("funhtml.{TABLE,TR,TH,TD,OL,LI}"); -import("jsutils.{object,eachProperty}"); - -//import("funhtml.*"); - -jimport("java.util.Random"); -jimport("java.lang.System.currentTimeMillis"); - - -/** - * Removes leading and trailing whitespace from a string. - * @param {string} str - * @return {string} The trimmed string. - */ -function trim(str) { - return str.replace(/^\s+|\s+$/g, ""); -} - -//---------------------------------------------------------------- -// String prototype enhancements. -// TODO: should we move this to a new library "enhancedstring"? -//---------------------------------------------------------------- -startsWith = function(s, prefix) { - return (s.indexOf(prefix) == 0); -}; -endsWith = function(s, suffix) { - return (s.substr(s.length - suffix.length) == suffix); -}; -contains = function(s, x) { - return (s.indexOf(x) != -1); -}; -makeTitle = function(s) { - if (! s) return; - return s.split(" ").map(function(x) { - return x[0].toUpperCase() + x.substr(1) - }).join(" "); -} -repeat = function(s, n) { - var out = []; - while (n-- > 0) { - out.push(s); - } - return out.join(''); -} - -/* - * Helper function that converts a raw string to an HTML string, with - * character entities replaced by appropriate HTML codes, and newlines - * rentered as BRs. - * - *

A more general version of this function is toHTML(), which can operate - * on not just strings, but any object. - * - * @param {string} str the raw string - * @return {string} HTML-formatted string - */ -function _stringToHTML(str) { - return String(net.appjet.oui.Util.stringToHTML(str)); -} - -// used to convert an object to HTML when the object does not have a -// toHTML method. -// -function _coerceObjectToHTML(obj) { - var t = TABLE({border: 1, cellpadding: 2, cellspacing: 0}); - eachProperty(obj, function(name, value) { - t.push(TR(TH(String(name)), TD(String(value)))); - }); - return toHTML(t); -} - -// Converts an array to an HTML list by listing its properties and -// recursively converting the values to HTML by calling toHTML() on -// each of them. -function _objectToOL(obj) { - var l = OL(); - eachProperty(obj, function(name, value) { - l.push(LI({value: name}, value)); - }); - return l; -} - -function _sameProperties(obj1, obj2) { - if (typeof(obj1) != 'object' || typeof(obj2) != 'object') - return typeof(obj1) == typeof(obj2); - - var mismatch = 0; - eachProperty(obj1, function(name) { - if (! obj2.hasOwnProperty(name)) { - mismatch++; - }}); - eachProperty(obj2, function(name) { - if (! obj1.hasOwnProperty(name)) { - mismatch++; - }}); - return mismatch < 2; -} - -// -// for pretty-printing arrays. needs a lot of work. -// -function _arrayToHTML(a) { - if (a.length === 0) { - return ""; - } - if (typeof(a[0]) != 'object') { - return toHTML(_objectToOL(a)); - } else if (! _sameProperties(a[0], a[1])) { - return toHTML(_objectToOL(a)); - } else { - return _likeObjectsToHTML(function (f) { - a.forEach(function(value, i) { - f({index: i}, value, {}); - });}, null); - } -} - -/** @ignore */ - -// a foreaching function that takes three arguments: properties to put first, -// properties to put in the middle, and properties to put at the end. -// and a table header (with large colspan) -function _likeObjectsToHTML(forEachFunction, tophead) { - objs = []; - prepnames = new StringSet(); - objpnames = new StringSet(); - postpnames = new StringSet(); - rows = []; - - var t = TABLE({border: 1, cellpadding: 2, cellspacing: 0}); - var head = TR(); - if (tophead) - t.push(tophead); - t.push(head); - - var butWaitTheresMore = false; - var howManyMore = 0; - - forEachFunction(function(pre, o, post) { - if (objs.length >= 10) { - butWaitTheresMore = true; - howManyMore++; - return; - } - objs.push({pre: pre, o: o, post: post}); - var tr = TR(); - rows.push(tr); - t.push(tr); - - eachProperty(pre, function(name) { prepnames.add(name); }); - eachProperty(o, function(name) { objpnames.add(name); }); - eachProperty(post, function(name) { postpnames.add(name); }); - }); - var numpnames = 0; - var appendTDsForPropName = function (where) { - return function(name) { - numpnames++; - head.push(TH(name)); - for (var j = 0; j < objs.length; ++j) { - if (! (objs[j][where] === undefined) && ! (objs[j][where][name] === undefined)) - rows[j].push(TD(String(objs[j][where][name]))); - else - rows[j].push(TD()); - } - }; - }; - prepnames.forEach(appendTDsForPropName("pre")); - objpnames.forEach(appendTDsForPropName("o")); - postpnames.forEach(appendTDsForPropName("post")); - if (butWaitTheresMore) { - t.push(TR(TD({colspan: numpnames}, "..."+howManyMore+ - " additional element"+(howManyMore == 1 ? "" : "s")+" omitted..."))); - } - return toHTML(t); -} - -/** - * Returns a string with any number of variables substituted in, as - * popularized by C's function of the same name. Some common substitutions: - * - *

  • %d - an integer
  • %f - a floating-point number
  • %b - a boolean
  • - *
  • %s - a string
- * - *

Each time one of these "slot" appears in your format string, the next argument is displayed - * according to the type of slot you specified. - * - *

AppJet supports - * Java's specification of printf, which has a ton of features, including selecting - * arguments out of order, formatting dates and times, and specifying how many characters - * wide each slot should be. - * - * @example -var x = 5; -response.write(sprintf("an integer: %d", x)); -response.write(sprintf("Two strings: [%s] and [%s].", "string one", "string two")); - * - * @param {string} formatString - * @param {*} arg1 - * @param {*} arg2 - * @param {*} arg3 ... - */ -function sprintf(formatString, arg1, arg2, etc) { - if (typeof(formatString) != 'string') { - throw new Error('printf takes a string as the first argument.'); - } - var argList = java.lang.reflect.Array.newInstance(java.lang.Object, arguments.length-1); - for (var i = 1; i < arguments.length; i++) { - if (arguments[i] instanceof Date) - argList[i-1] = arguments[i].getTime(); - else - argList[i-1] = arguments[i]; - } - return String(net.appjet.ajstdlib.printf.printf(formatString, argList)); -}; - -/** - * Replaces keys of data found in string with their corresponding values. - * - *

(Inspired by http://javascript.crockford.com/remedial.html) - * - * @example -var data = {name: "Aaron", age: 25, today: new Date()}; -print(supplant(data, """ - -{name}'s age is {age} years, as of {today}. - -""")); - - * @param {object} data dictionary of values - * @param {string} str - * @return {string} str with keys of data replaced by their values - */ -function supplant(data, str) { - var s = str; - var o = data; - function rep(a, b) { - var r = o[b]; - if (typeof(r) != 'undefined') { - return r; - } else { - return a; - } - } - return s.replace(/{([^{}]*)}/g, rep); -}; - -//---------------------------------------------------------------- -// raw printing -//---------------------------------------------------------------- -var _raw_prototype; - -/** - * Used for printing un-escaped HTML, such as your own HTML tags. - * - *

Normally, printing a string will cause it to be translated - * so that it appears the same on the screen as it did in your code. - * If you're writing your own HTML, you don't want it to be processed - * this way. Wrapping a string in html(...) by-passes normal printing behavior, - * so that print(html(" -- html goes here ---")) will write the HTML - * directly to the page. - * - *

If you want to mix your own HTML code with HTML code generated from a - * tag object, you can get the HTML for the tag by calling its toHTML(...) method. - * - *

Multiple arguments to html(...) will be concatenated into one string. - * - * @example -print(html(""" -<br /> -<br /> -<div><p>Here is some text inside a P inside a DIV.</p> -</div> -<br /> -""")); - * - * @param {string} text the raw text - * @return {object} an object which, when printed, prints the raw html text - */ -function html(text) { - if (!_raw_prototype) { - _raw_prototype = object(Object.prototype); - _raw_prototype.toString = function() { return this._text; }; - _raw_prototype.toHTML = function() { return this._text; }; - } - var rawObj = object(_raw_prototype); - rawObj._text = Array.prototype.map.call(arguments, String).join(''); - return rawObj; -} - -/** - * This function is used by print(...) to convert a string or object - * into nice-looking printable HTML. It may be useful in conjunction - * with html(...) if you wish to work directly with HTML. - * - *

You can control how toHTML(...) (and therefore print(...)) behave on an object - * by giving that object a .toHTML() function. - * - * @param {*} x any javascript variable - * @return {string} html-formatted string - */ -function toHTML(x) { - if (typeof(x) == 'undefined') { - return 'undefined'; - } - if (x === null) { - return 'null'; - } - if (typeof x == "string" || (x instanceof java.lang.String)) { - return _stringToHTML(x); - } - if (typeof(x.toHTML) == "function") { - return x.toHTML(); - } - if (typeof(x) == "xml") { - return _stringToHTML(x.toSource()); - } - if (x instanceof Array) { - return _arrayToHTML(x); - } - if (x instanceof Date) { - var pieces = x.toString().split(" "); - return pieces.slice(0, 5).join(' ') + ' ' + pieces[6]; - } - if (typeof(x) == "object") { - return _coerceObjectToHTML(x); - } - // TODO: add more types to auto-printing, such as functions, - // numbers, what else? - return _stringToHTML(""+x); -} - - -/** - * Generates a random string of specified length using upper-case letters, lower-case letters, and numbers. - */ - -var _jrand = new Random(currentTimeMillis()); - -function randomString(nchars) { - var result = ''; - - // 48-58 or 65-91 or 97-123 (inclusive-exclusive) - // 0-10 or 0-26 or 0-26 - // 0-62 - - for (var i = 0; i < nchars; i++) { - var x = _jrand.nextInt(62); - var code; - if (x < 10) { code = x + 48; } - if (x >= 10 && x < 36) { code = x - 10 + 65/*a*/; } - if (x >= 36) { code = x - 36 + 97/*A*/; } - result += String.fromCharCode(code); - } - return result; -} - -function md5(x) { - return net.appjet.ajstdlib.md5.md5(x); -} - -function randomHash(len) { - var x = md5(""+_jrand.nextDouble()*1e12+_jrand.nextDouble()*1e12); - if (len) { - return String(x).substr(0,len); - } else { - return x; - } -} - -function gzip(x) { - return net.appjet.oui.Util.gzip(x) -} - -function isNumeric(x) { - return !!(/^\d+$/.test(x)); -} - diff --git a/trunk/infrastructure/framework-src/modules/sync.js b/trunk/infrastructure/framework-src/modules/sync.js deleted file mode 100644 index a222ea0..0000000 --- a/trunk/infrastructure/framework-src/modules/sync.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -jimport("java.util.concurrent.locks.ReentrantLock"); -jimport("net.appjet.oui.GlobalSynchronizer"); - -/** - * synchronously calls a no-argument function. - * f may have return values. - */ -function callsync(obj, f) { - if (!obj._LOCK) { - try { - appjet.globalLock.lock(); - if (! obj._LOCK) { - obj._LOCK = new ReentrantLock(); - } - } finally { - appjet.globalLock.unlock(); - } - } - try { - obj._LOCK.lock(); - return f(); - } finally { - obj._LOCK.unlock(); - } -} - -/** - * synchronously calls a no-argument function iff - * condition() is true. condition may be called - * twice and shouldn't have side-effects. - */ -function callsyncIfTrue(obj, condition, f) { - if (condition()) { - callsync(obj, function() { - if (condition()) { - f(); - } - }); - } -} - -/** - * returns a function that synchronously calls - * f with its own arguments - */ -function wrapsync(obj, f, thisArg) { - return function() { - var args = Array.prototype.slice.call(arguments); - var wrapper = function() { - return f.apply(thisArg, args); - } - callsync(obj, wrapper); - } -} - -function doWithStringLock(lockName, fn) { - GlobalSynchronizer.acquire(lockName); - try { - return fn(); - } - finally { - GlobalSynchronizer.release(lockName); - } -} - diff --git a/trunk/infrastructure/framework-src/modules/timer.js b/trunk/infrastructure/framework-src/modules/timer.js deleted file mode 100644 index 01be175..0000000 --- a/trunk/infrastructure/framework-src/modules/timer.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("jsutils.*"); - -jimport("net.appjet.ajstdlib.timer"); - -function time(name, f) { - var t = timer.start(name); - try { - return f(); - } finally { - t.done(); - } -} - diff --git a/trunk/infrastructure/framework-src/modules/varz.js b/trunk/infrastructure/framework-src/modules/varz.js deleted file mode 100644 index 0e55d20..0000000 --- a/trunk/infrastructure/framework-src/modules/varz.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -jimport("java.util.concurrent.atomic.AtomicInteger"); - -import("sync"); - -function varz() { - sync.callsyncIfTrue(appjet.cache, - function() { return ! appjet.cache.varz; }, - function() { appjet.cache.varz = {}; }); - return appjet.cache.varz; -} - -function _getInteger(name) { - sync.callsyncIfTrue(varz(), - function() { return ! varz()[name] }, - function() { varz()[name] = new AtomicInteger(0) }); - return varz()[name]; -} - -function incrementInt(name) { - _getInteger(name).getAndIncrement(); -} - -function addToInt(name, count) { - _getInteger(name).getAndAdd(count); -} - -function getSnapshot() { - var ret = {}; - for (var k in varz()) { - if (k[0] == '_') { - continue; - } - ret[k] = varz()[k].toString(); - } - return ret; -} diff --git a/trunk/infrastructure/framework-src/modules/yuicompressor.js b/trunk/infrastructure/framework-src/modules/yuicompressor.js deleted file mode 100644 index 572cc0d..0000000 --- a/trunk/infrastructure/framework-src/modules/yuicompressor.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - - -jimport("java.lang.System.err") -jimport("yuicompressor.org.mozilla.javascript.ErrorReporter"); -jimport("com.yahoo.platform.yui.compressor.JavaScriptCompressor") -jimport("com.yahoo.platform.yui.compressor.CssCompressor") -jimport("java.io.StringReader"); -jimport("java.io.StringWriter"); - -/** - * Compresses the given JavaScript code into an equivalent, shorter string of code using - * YUICompressor. In addition to removing white-space and comments, YUICompressor - * does a full semantic parse of the code and renames non-global variables to have - * very short names. Scopes that are visible to "eval" and "with" are excluded from - * variable renaming, making the operation very safe. - *

- * For example, - * yuicompressor.compressJS("function foo() { var longVariableName = 3; return longVariableName }"); - * produces - * "function foo(){var A=3;return A;}" - */ - -function compressJS(code) { - function getComplaint(message, sourceName, line, lineSource, lineOffset) { - if (line < 0) return message; - else return (line+":"+lineOffset+":"+message); - } - function complaintHandler(func) { - return function(message, sourceName, line, lineSource, lineOffset) { - return func(getComplaint(message, sourceName, line, lineSource, lineOffset)); - } - } - var myErrorReporter = new JavaAdapter(ErrorReporter, { - warning: complaintHandler(function (msg) { - if (msg.indexOf("Try to use a single 'var' statement per scope.") >= 0) - return; - err.println("yuicompressor.compressJS warning: "+msg); - }), - error: complaintHandler(function (msg) { - throw new Error("yuicompressor.compressJS error: "+msg); - }), - runtimeError: complaintHandler(function (msg) { - throw new Error("yuicompressor.compressJS error: "+msg); - }) - }); - - var munge = true; - var verbose = false; - var optimize = true; - var wrapPos = 100; // characters, no wrap == -1 - var compressor = new JavaScriptCompressor(new StringReader(code), myErrorReporter); - var writer = new StringWriter(); - compressor.compress(writer, 100, munge, verbose, true, !optimize); - return String(writer.toString()); -} - -/** - * Compresses the given CSS code into an equivalent, shorter string of code using - * YUICompressor. Besides removing unnecessary white-space and comments, the operation - * performs an assortment of semantics-preserving optimizations. The operation attempts - * to preserve common "hacks" that take advantage of browser differences in parsing. - */ - -function compressCSS(code) { - var compressor = new CssCompressor(new StringReader(code)); - var wrapPos = 100; // characters, no wrap == -1 - var writer = new StringWriter(); - compressor.compress(writer, wrapPos); - return String(writer.toString()); -} diff --git a/trunk/infrastructure/framework-src/oncomet.js b/trunk/infrastructure/framework-src/oncomet.js deleted file mode 100644 index b6aeda5..0000000 --- a/trunk/infrastructure/framework-src/oncomet.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -if (serverhandlers.cometHandler === undefined) { - throw new Packages.net.appjet.oui.NoHandlerException("No comet handler defined!"); -} - -function _ga(k) { - return String(appjet.context.attributes().apply(k)); -} - -var _op = String(_ga("cometOperation")); -switch (_op) { - case "connect": - serverhandlers.cometHandler("connect", _ga("cometId")); - break; - case "disconnect": - serverhandlers.cometHandler("disconnect", _ga("cometId")); - break; - case "message": - serverhandlers.cometHandler("message", _ga("cometId"), _ga("cometData")); - break; - default: - throw new Packages.net.appjet.oui.ExecutionException("Unknown comet operation: '"+_op+"'"); -} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onerror.js b/trunk/infrastructure/framework-src/onerror.js deleted file mode 100644 index f19a85f..0000000 --- a/trunk/infrastructure/framework-src/onerror.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -if (serverhandlers.errorHandler === undefined) { - throw new Packages.net.appjet.oui.NoHandlerException("No error handler defined!"); -} - -// default content type for request -response.setContentType('text/html; charset=utf-8'); - -serverhandlers.errorHandler(appjet.context.attributes().apply("error")); diff --git a/trunk/infrastructure/framework-src/onprint.js b/trunk/infrastructure/framework-src/onprint.js deleted file mode 100644 index 8e334fe..0000000 --- a/trunk/infrastructure/framework-src/onprint.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -if (serverhandlers.postRequestHandler !== undefined) { - serverhandlers.postRequestHandler(); -} diff --git a/trunk/infrastructure/framework-src/onrequest.js b/trunk/infrastructure/framework-src/onrequest.js deleted file mode 100644 index d76c8db..0000000 --- a/trunk/infrastructure/framework-src/onrequest.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -if (serverhandlers.requestHandler === undefined) { - throw new Packages.net.appjet.oui.NoHandlerException("No request handler defined!"); -} - -// default content type for request -response.setContentType('text/html; charset=utf-8'); - -serverhandlers.requestHandler(); diff --git a/trunk/infrastructure/framework-src/onreset.js b/trunk/infrastructure/framework-src/onreset.js deleted file mode 100644 index 24b000a..0000000 --- a/trunk/infrastructure/framework-src/onreset.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -if (serverhandlers.resetHandler !== undefined) { - serverhandlers.resetHandler(); -} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onsars.js b/trunk/infrastructure/framework-src/onsars.js deleted file mode 100644 index 31dc8ca..0000000 --- a/trunk/infrastructure/framework-src/onsars.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -if (serverhandlers.sarsHandler === undefined) { - throw new Packages.net.appjet.oui.NoHandlerException("No SARS handler defined."); -} - -if (serverhandlers.sarsHandler !== undefined) { - (function() { - var ret = serverhandlers.sarsHandler(appjet.context.attributes().apply("sarsRequest")); - if (ret) - appjet.context.attributes().update("sarsResponse", ret); - })() -} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onscheduledtask.js b/trunk/infrastructure/framework-src/onscheduledtask.js deleted file mode 100644 index 810c3b5..0000000 --- a/trunk/infrastructure/framework-src/onscheduledtask.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -(function() { - if (serverhandlers.tasks === undefined) { - throw new Packages.net.appjet.oui.NoHandlerException("No task handlers defined!"); - } - var taskName = appjet.context.attributes().apply("taskName"); - if (serverhandlers.tasks[taskName] === undefined) { - throw new Packages.net.appjet.oui.NoHandlerException("No handler defined for task: "+taskName); - } - var taskArgs = appjet.context.attributes().apply("taskArguments"); - var argsArray = []; - if (taskArgs != null) { - for (var i = 0; i < taskArgs.length; ++i) { - argsArray.push(taskArgs[i]); - } - } - return serverhandlers.tasks[taskName].apply(null, argsArray); -})(); \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onshutdown.js b/trunk/infrastructure/framework-src/onshutdown.js deleted file mode 100644 index 0243bf6..0000000 --- a/trunk/infrastructure/framework-src/onshutdown.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -if (serverhandlers.shutdownHandler !== undefined) { - serverhandlers.shutdownHandler(); -} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onstartup.js b/trunk/infrastructure/framework-src/onstartup.js deleted file mode 100644 index 61feff7..0000000 --- a/trunk/infrastructure/framework-src/onstartup.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -if (serverhandlers.startupHandler !== undefined) { - serverhandlers.startupHandler(); -} \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/onsyntaxerror.js b/trunk/infrastructure/framework-src/onsyntaxerror.js deleted file mode 100644 index 7129a16..0000000 --- a/trunk/infrastructure/framework-src/onsyntaxerror.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -printSyntaxError(); \ No newline at end of file diff --git a/trunk/infrastructure/framework-src/postamble.js b/trunk/infrastructure/framework-src/postamble.js deleted file mode 100644 index 76fa766..0000000 --- a/trunk/infrastructure/framework-src/postamble.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - - -_appjethidden_.finishImports(); - diff --git a/trunk/infrastructure/framework-src/preamble.js b/trunk/infrastructure/framework-src/preamble.js deleted file mode 100644 index 40f6845..0000000 --- a/trunk/infrastructure/framework-src/preamble.js +++ /dev/null @@ -1,325 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -// appjetContext.cache_requestCache()._t_start = (new Date()).valueOf(); -var _appjethidden_ = {}; -var serverhandlers = { tasks: {} }; - -/* - * @overview - * - * AppJet standard library preamble. - * - * This is run at the beginning of every request, right after all - * native calls are loaded into appjetContext. This file is run - * in the same scope as the app, the global scope, which is also - * accessible from all modules. - */ - -//---------------------------------------------------------------- -// delete pesky rhino built-in string stuff -//---------------------------------------------------------------- -(function() { - // rhino strings come with a bunch of random "html helpers" - // that we don't want - var htmlStuff = ["bold", "italics", "fixed", "strike", - "small", "big", "sub", "fontsize", "fontcolor", "link", - "anchor", "sup", "blink"]; - for(var i in htmlStuff) { - delete String.prototype[htmlStuff[i]]; - } -})(); - -//---------------------------------------------------------------- -// module implementation -//---------------------------------------------------------------- - -(function(globalScope) { - - //---------------------------------------------------------------- - // Utility Functions - //---------------------------------------------------------------- - function appjetContext() { - return net.appjet.oui.ExecutionContextUtils.currentContext(); - } - function internalError(m) { - throw new Error("AppJet Internal Error: "+m); - } - function apiError(m) { - throw new Error("AppJet API Error: "+m); - } - function newScope() { - var o = new Object(); - o.__parent__ = null; - o.__proto__ = globalScope; - return o; - } - _appjethidden_._debugMessage = function(m) { - //java.lang.System.out.println(m); - }; - var debug = _appjethidden_._debugMessage; - function copySymbol(srcName, symName, src, dst, dstSymName) { - if (!src.hasOwnProperty(symName)) { - apiError("Import error: module \""+srcName+"\" does not contain the symbol \""+symName+"\"."); - } - if (symName.charAt(0) == '_') { - apiError("Import error: cannot import symbol \""+symName+"\" because it is private (begins with _)"); - } - debug(" | copying symbol ["+symName+"]"); - dst[dstSymName || symName] = src[symName]; - } - function copyPublicSymbols(src, dst) { - for (k in src) { - if (src.hasOwnProperty(k) && (k.length > 0) && (k.charAt(0) != '_')) { - copySymbol('', k, src, dst); - } - } - } - - // Module import cache... hidden from other scopes. - var moduleObjects = {}; - var modulesBeingLoaded = {}; - - /*-------------------------------------------------------------------------------- - * loadModule(): - * Evaluates moduleName in its own private scope, then copies its public identifiers - * into a new scope. This new scope is stored in moduleObjects[moduleName] for future use - * by import()s. - * - * If moduleName is currently being loaded (because we are in the middle of another loadModule() - * higher in the call stack), then this function does noething, on the assumption - * that moduleName will eventually be loaded anyway. Therefore, it cannot be assumed that - * moduleName is done being loaded when loadModule() returns, only that it eventually will be - * loaded when all loadModule calls return up the call stack. - *--------------------------------------------------------------------------------*/ - function loadModule(moduleName) { - if (modulesBeingLoaded[moduleName]) { - // This is OK. The module will be loaded eventually. - return; - } - if (moduleObjects[moduleName]) { - return; - } - modulesBeingLoaded[moduleName] = true; - try { - debug("loadModule: "+moduleName); - - var modulePrivateScope = - Packages.net.appjet.ajstdlib.ajstdlib.runModuleInNewScope( - appjetContext(), moduleName.split('.').join('/')); - - if (!modulePrivateScope) { - // moduleName is not a module. This is normal, because when someone calls - // import("foo.bar"), we dont know if bar is a module or an identifier in the foo module. - delete modulesBeingLoaded[moduleName]; - return; - } - // Thinking this could be useful: - // modulePrivateScope['__MODULE_NAME__'] = moduleName; - var moduleObj = newScope(); - copyPublicSymbols(modulePrivateScope, moduleObj); - moduleObjects[moduleName] = moduleObj; - } finally { - delete modulesBeingLoaded[moduleName]; - } - } - - /*-------------------------------------------------------------------------------- - * importSingleModule(): - * - * Takes a single moduleName (like "etherpad.foo.bar.baz") and creates the identifier "baz" - * in dstScope, referencing the module etherpad.foo.bar.baz. - * - * This function is called one or more times by importPath(). Note that importPath() is more like - * the import() function that modules ses. - *--------------------------------------------------------------------------------*/ - function importSingleModule(moduleName, dstScope) { - debug("importSingleModule: "+moduleName); - if (typeof(moduleName) != 'string') { - apiError("modules should be referred to with string, not "+typeof(moduleName)); - } - - var moduleObj = moduleObjects[moduleName]; // public module scope - if (!moduleObj) { - return false; - } - - var importedName = moduleName; - if (importedName.indexOf(".") != -1) { - importedName = importedName.split(".").slice(-1)[0]; - } - dstScope[importedName] = moduleObj; - return true; - } - - /*-------------------------------------------------------------------------------- - * importPath(): - * takes a modulePath (like "a.b.c.{d,e,f}" or "a.b.*" or just "a.b" or "a") and - * repeatedly calls importSingleModule() as necessary, copying public symbols into dst. - *--------------------------------------------------------------------------------*/ - function importPath(modulePath, dst) { - debug("importPath: "+modulePath); - - // Two possibilties: - // 1. import the exact module and that's it. - // - // 2. module contains a "." and we need to import up to the - // last ., and then import a name (or set of names) from it. - - // first try case 1: - var ok = importSingleModule(modulePath, dst); - if (ok) { - return; - } - - if (modulePath.indexOf(".") == -1) { - throw new Error("Module does not exist: "+modulePath); - } - - // now try case 2: - var tempDst = newScope(); - var moduleName = modulePath.split('.').slice(0, -1).join('.'); - var importedName = modulePath.split('.').slice(-1)[0]; - var lastName = modulePath.split('.').slice(-2, -1)[0]; - - ok = importSingleModule(moduleName, tempDst); - if (!ok) { - throw new Error("Neither module exists: "+moduleName+", "+modulePath); - } - - if (!tempDst[lastName]) { - internalError("import failed for "+moduleName+"|"+importedName+". This could be an appjet bug."); - } - if (importedName == "*") { - copyPublicSymbols(tempDst[lastName], dst); - } else if (importedName.match(/^\{.*\}$/)) { - importedName.slice(1,-1).split(',').forEach(function(sym) { - if (sym.match(/^.*=>.*$/)) { - copySymbol(moduleName, sym.split("=>")[0], tempDst[lastName], dst, sym.split("=>")[1]); - } else { - copySymbol(moduleName, sym, tempDst[lastName], dst); - } - }); - } else { - copySymbol(moduleName, importedName, tempDst[lastName], dst); - } - } - - //---------------------------------------------------------------- - // scheduling - //---------------------------------------------------------------- - - var scheduledImports = []; - - function scheduleImportPath(p, dst) { - scheduledImports.push([p, dst]); - } - - function runScheduledImports() { - scheduledImports.forEach(function(x) { - importPath(x[0], x[1]); - }); - } - - //---------------------------------------------------------------- - // The global import function - //---------------------------------------------------------------- - - _appjethidden_.importsAllowed = true; - - globalScope['import'] = function(path1, path2, etc) { - if (!_appjethidden_.importsAllowed) { - throw Error("Imports are finished. No more imports are allowed."); - } - - var dstScope = this; - if (arguments.length < 1) { - apiError("importModule() takes the name of at least one module as an argument."); - } - for (var i = 0; i < arguments.length; i++) { - var path = arguments[i]; - debug("scheduling import: "+path); - scheduleImportPath(path, dstScope); - // evaluate all modules in this path. - var parts = path.split('.'); - for (var j = 0; j < parts.length; j++) { - var moduleName = parts.slice(0,j+1).join('.'); - loadModule(moduleName); - } - } - }; - - _appjethidden_.finishImports = function() { - debug("Running scheduled imports..."); - runScheduledImports(); - _appjethidden_.importsAllowed = false; - }; - - //---------------------------------------------------------------- - // jimport - //---------------------------------------------------------------- - function _jimportSinglePackage(pname, dstScope) { - //_appjethidden_._debugMessage("_jimportSinglePackage: "+pname); - // TODO: support "*" and "{}" syntax like scala. - var src = Packages; - var srcParent = null; - var localName = pname.split(".").pop(); - var soFar = ''; - - pname.split(".").forEach(function(x) { - soFar += x+'.'; - if (!src[x]) { - throw ('Could not find java package/class: '+soFar); - } else { - //_appjethidden_._debugMessage("descenting into "+src+"["+x+"]"); - srcParent = src; - src = src[x]; - } - }); - - if (String(src).indexOf('function') == 0) { - // TODO: checking String(src).indexOf('function') is rather brittle. - // is there a cleaner way? - // TODO: this only works on static functions... so make sure - // src[x] is a static function! - dstScope[localName] = function() { - return src.apply(srcParent, Array.prototype.slice.call(arguments)); - }; - } else { - // importing a regular java class - dstScope[localName] = src; - } - } - - /** - * Import a java package over LiveConnect. - */ - globalScope['jimport'] = function() { - var dstScope = this; - for (var i = 0; i < arguments.length; i++) { - var pname = arguments[i].split(".").pop(); - _jimportSinglePackage(arguments[i], dstScope); - } - }; - - //---------------------------------------------------------------- - // {appjet, request, response} imported by default - //---------------------------------------------------------------- - globalScope['import'].call(globalScope, - "global.appjet.appjet", "global.request.request", "global.response.response"); - -})(this); - diff --git a/trunk/infrastructure/framework-src/syntaxerror.js b/trunk/infrastructure/framework-src/syntaxerror.js deleted file mode 100644 index 801066b..0000000 --- a/trunk/infrastructure/framework-src/syntaxerror.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright 2009 Google Inc. - * - * 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. - */ - -import("exceptionutils"); - -function printSyntaxError() { - var ex = appjet.context.attributes().apply("error"); - - //java.lang.System.out.println("Syntax error: "+ex); - - if (response.isDefined) { - response.reset(); - response.setContentType('text/html; charset=utf-8'); - response.write(exceptionutils.getStackTraceFullpage(ex)); - } else { - java.lang.System.out.println("Syntax error: "+exceptionutils.getStackTracePlain(ex)); - } -} - -- cgit v1.2.3