From 3d5a6baf289a0b114668619f1184d6d6a1593755 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 26 Aug 2012 14:55:34 +0000 Subject: [PATCH] Introduced experimental apt-proxy sub project (a connector for apt-proxy usage into node network) --- .gitattributes | 27 ++++ application/hub/config.php | 74 ++++++++-- .../hub/interfaces/apt-proxy/.htaccess | 1 + .../interfaces/apt-proxy/class_AptProxy.php | 69 +++++++++ .../cruncher/class_CruncherHelper.php | 2 +- application/hub/main/apt-proxy/.htaccess | 1 + application/hub/main/apt-proxy/class_ | 82 +++++++++++ .../main/apt-proxy/class_BaseNodeAptProxy.php | 62 +++++++++ .../hub/main/apt-proxy/console/.htaccess | 1 + .../console/class_NodeConsoleAptProxy.php | 93 +++++++++++++ application/hub/main/chat/class_ | 2 +- .../hub/main/chat/class_BaseNodeChat.php | 2 +- .../chat/console/class_NodeConsoleChat.php | 4 +- .../class_HubConsoleAptProxyCommand.php | 131 ++++++++++++++++++ .../console/class_HubConsoleChatCommand.php | 2 +- .../class_HubConsoleCruncherCommand.php | 2 +- .../class_HubConsoleAptProxyController.php | 131 ++++++++++++++++++ .../class_HubConsoleChatController.php | 2 +- .../class_HubConsoleCruncherController.php | 2 +- application/hub/main/cruncher/class_ | 2 +- .../main/cruncher/class_BaseHubCruncher.php | 2 +- .../mcrypt/class_HubMcryptCruncher.php | 4 +- .../class_CruncherUnitDatabaseWrapper.php | 2 +- .../cruncher/class_CruncherStateFactory.php | 2 +- .../hub/main/filter/apt-proxy/.htaccess | 1 + .../class_AptProxyInitializationFilter.php | 75 ++++++++++ .../class_AptProxyPhpRequirementsFilter.php | 78 +++++++++++ .../class_AptProxyWelcomeTeaserFilter.php | 67 +++++++++ .../main/filter/bootstrap/apt-proxy/.htaccess | 1 + .../apt-proxy/class_AptProxyBootstrap | 66 +++++++++ ...ProxyBootstrapExtraBootstrappingFilter.php | 66 +++++++++ ...tProxyBootstrapGenericActivationFilter.php | 69 +++++++++ .../filter/bootstrap/chat/class_ChatBootstrap | 2 +- ..._ChatBootstrapExtraBootstrappingFilter.php | 2 +- ...s_ChatBootstrapGenericActivationFilter.php | 2 +- ...uncherBootstrapGenericActivationFilter.php | 2 +- .../chat/class_ChatInitializationFilter.php | 2 +- .../chat/class_ChatPhpRequirementsFilter.php | 2 +- .../chat/class_ChatWelcomeTeaserFilter.php | 2 +- .../main/filter/class_BaseAptProxyFilter.php | 38 +++++ .../hub/main/filter/class_BaseChatFilter.php | 2 +- .../main/filter/class_BaseCruncherFilter.php | 2 +- .../hub/main/filter/cruncher/class_Cruncher | 2 +- .../class_CruncherInitializationFilter.php | 2 +- .../class_CruncherPhpRequirementsFilter.php | 2 +- .../class_CruncherWelcomeTeaserFilter.php | 2 +- .../main/filter/shutdown/apt-proxy/.htaccess | 1 + .../class_AptProxyShutdownFilter.php | 68 +++++++++ .../chat/class_ChatShutdownFilter.php | 4 +- .../cruncher/class_CruncherShutdownFilter.php | 2 +- ...ass_PackageAnnouncementAnswerTagFilter.php | 8 -- ..._PackageRequestNodeListAnswerTagFilter.php | 81 +++++++++++ .../hub/main/filter/task/apt-proxy/.htaccess | 1 + ...s_AptProxyTaskHandlerInitializerFilter.php | 78 +++++++++++ ...class_ChatTaskHandlerInitializerFilter.php | 2 +- application/hub/main/helper/work_units/class_ | 2 +- .../cruncher/class_CruncherTestUnitHelper.php | 2 +- .../keys/class_CruncherKeyProducer.php | 2 +- .../class_CruncherTestUnitProducer.php | 2 +- application/hub/main/states/cruncher/class_ | 2 +- .../cruncher/class_BaseCruncherState.php | 2 +- .../cruncher/init/class_CruncherInitState.php | 2 +- .../virgin/class_CruncherVirginState.php | 2 +- .../hub/main/tasks/apt-proxy/.htaccess | 1 + application/hub/main/tasks/apt-proxy/class_ | 72 ++++++++++ .../apt-proxy/class_AptProxyListenerTask.php | 72 ++++++++++ .../chat/class_ChatTelnetListenerTask.php | 2 +- application/hub/main/tasks/cruncher/class_ | 2 +- .../class_CruncherKeyProducerTask.php | 2 +- .../class_CruncherTestUnitProducerTask.php | 2 +- .../class_CruncherWorkUnitFetcherTask.php | 2 +- .../class_XmlAnnouncementTemplateEngine.php | 50 +++---- ...ss_XmlAnnouncementAnswerTemplateEngine.php | 54 ++++---- ...XmlRequestNodeListAnswerTemplateEngine.php | 10 +- .../template/class_BaseXmlTemplateEngine.php | 2 +- .../class_XmlSelfConnectTemplateEngine.php | 18 +-- .../class_XmlObjectRegistryTemplateEngine.php | 34 ++--- .../template/producer/work_units/.htaccess | 1 + application/hub/templates/xml/.xml | 2 +- .../announcement/announcement_answer.xml | 2 +- .../requests/request_node_list_answer.xml | 2 +- .../xml/cruncher/producer/test_unit.xml | 4 +- .../xml/cruncher/producer/work_unit.xml | 4 +- .../xml/requests/request_node_list.xml | 2 +- 84 files changed, 1631 insertions(+), 159 deletions(-) create mode 100644 application/hub/interfaces/apt-proxy/.htaccess create mode 100644 application/hub/interfaces/apt-proxy/class_AptProxy.php create mode 100644 application/hub/main/apt-proxy/.htaccess create mode 100644 application/hub/main/apt-proxy/class_ create mode 100644 application/hub/main/apt-proxy/class_BaseNodeAptProxy.php create mode 100644 application/hub/main/apt-proxy/console/.htaccess create mode 100644 application/hub/main/apt-proxy/console/class_NodeConsoleAptProxy.php create mode 100644 application/hub/main/commands/console/class_HubConsoleAptProxyCommand.php create mode 100644 application/hub/main/controller/console/class_HubConsoleAptProxyController.php create mode 100644 application/hub/main/filter/apt-proxy/.htaccess create mode 100644 application/hub/main/filter/apt-proxy/class_AptProxyInitializationFilter.php create mode 100644 application/hub/main/filter/apt-proxy/class_AptProxyPhpRequirementsFilter.php create mode 100644 application/hub/main/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php create mode 100644 application/hub/main/filter/bootstrap/apt-proxy/.htaccess create mode 100644 application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrap create mode 100644 application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapExtraBootstrappingFilter.php create mode 100644 application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php create mode 100644 application/hub/main/filter/class_BaseAptProxyFilter.php create mode 100644 application/hub/main/filter/shutdown/apt-proxy/.htaccess create mode 100644 application/hub/main/filter/shutdown/apt-proxy/class_AptProxyShutdownFilter.php create mode 100644 application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php create mode 100644 application/hub/main/filter/task/apt-proxy/.htaccess create mode 100644 application/hub/main/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php create mode 100644 application/hub/main/tasks/apt-proxy/.htaccess create mode 100644 application/hub/main/tasks/apt-proxy/class_ create mode 100644 application/hub/main/tasks/apt-proxy/class_AptProxyListenerTask.php create mode 100644 application/hub/main/template/producer/work_units/.htaccess diff --git a/.gitattributes b/.gitattributes index 98b6c28dc..71c04f816 100644 --- a/.gitattributes +++ b/.gitattributes @@ -43,6 +43,8 @@ application/hub/exceptions/tasks/.htaccess -text svneol=unset#text/plain application/hub/exceptions/tasks/class_InvalidTaskException.php svneol=native#text/plain application/hub/init.php svneol=native#text/plain application/hub/interfaces/.htaccess -text svneol=unset#text/plain +application/hub/interfaces/apt-proxy/.htaccess svneol=native#text/plain +application/hub/interfaces/apt-proxy/class_AptProxy.php svneol=native#text/plain application/hub/interfaces/chat/.htaccess svneol=native#text/plain application/hub/interfaces/chat/class_Chatter.php svneol=native#text/plain application/hub/interfaces/connectors/.htaccess -text svneol=unset#text/plain @@ -160,6 +162,11 @@ application/hub/interfaces/wrapper/class_NodeInformationWrapper.php svneol=nativ application/hub/interfaces/wrapper/class_NodeListWrapper.php svneol=native#text/plain application/hub/loader.php svneol=native#text/plain application/hub/main/.htaccess -text svneol=unset#text/plain +application/hub/main/apt-proxy/.htaccess svneol=native#text/plain +application/hub/main/apt-proxy/class_ -text +application/hub/main/apt-proxy/class_BaseNodeAptProxy.php svneol=native#text/plain +application/hub/main/apt-proxy/console/.htaccess svneol=native#text/plain +application/hub/main/apt-proxy/console/class_NodeConsoleAptProxy.php svneol=native#text/plain application/hub/main/chat/.htaccess svneol=native#text/plain application/hub/main/chat/class_ -text application/hub/main/chat/class_BaseNodeChat.php svneol=native#text/plain @@ -169,6 +176,7 @@ application/hub/main/class_ svneol=native#text/plain application/hub/main/class_BaseHubSystem.php svneol=native#text/plain application/hub/main/commands/.htaccess -text svneol=unset#text/plain application/hub/main/commands/console/.htaccess -text svneol=unset#text/plain +application/hub/main/commands/console/class_HubConsoleAptProxyCommand.php svneol=native#text/plain application/hub/main/commands/console/class_HubConsoleChatCommand.php svneol=native#text/plain application/hub/main/commands/console/class_HubConsoleCruncherCommand.php svneol=native#text/plain application/hub/main/commands/console/class_HubConsoleMainCommand.php svneol=native#text/plain @@ -189,6 +197,7 @@ application/hub/main/connectors/queues/local/.htaccess -text svneol=unset#text/p application/hub/main/connectors/queues/local/class_LocalQueueConnector.php svneol=native#text/plain application/hub/main/controller/.htaccess -text svneol=unset#text/plain application/hub/main/controller/console/.htaccess -text svneol=unset#text/plain +application/hub/main/controller/console/class_HubConsoleAptProxyController.php svneol=native#text/plain application/hub/main/controller/console/class_HubConsoleChatController.php svneol=native#text/plain application/hub/main/controller/console/class_HubConsoleCruncherController.php svneol=native#text/plain application/hub/main/controller/console/class_HubConsoleDefaultNewsController.php svneol=native#text/plain @@ -256,7 +265,15 @@ application/hub/main/filter/.htaccess -text svneol=unset#text/plain application/hub/main/filter/activation/.htaccess -text svneol=unset#text/plain application/hub/main/filter/activation/node/.htaccess svneol=native#text/plain application/hub/main/filter/activation/node/class_NodeActivationSelfAnnouncementFilter.php svneol=native#text/plain +application/hub/main/filter/apt-proxy/.htaccess svneol=native#text/plain +application/hub/main/filter/apt-proxy/class_AptProxyInitializationFilter.php svneol=native#text/plain +application/hub/main/filter/apt-proxy/class_AptProxyPhpRequirementsFilter.php svneol=native#text/plain +application/hub/main/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php svneol=native#text/plain application/hub/main/filter/bootstrap/.htaccess -text svneol=unset#text/plain +application/hub/main/filter/bootstrap/apt-proxy/.htaccess svneol=native#text/plain +application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrap -text +application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapExtraBootstrappingFilter.php svneol=native#text/plain +application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php svneol=native#text/plain application/hub/main/filter/bootstrap/chat/.htaccess svneol=native#text/plain application/hub/main/filter/bootstrap/chat/class_ChatBootstrap -text application/hub/main/filter/bootstrap/chat/class_ChatBootstrapExtraBootstrappingFilter.php svneol=native#text/plain @@ -279,6 +296,7 @@ application/hub/main/filter/chat/class_ChatInitializationFilter.php svneol=nativ application/hub/main/filter/chat/class_ChatPhpRequirementsFilter.php svneol=native#text/plain application/hub/main/filter/chat/class_ChatWelcomeTeaserFilter.php svneol=native#text/plain application/hub/main/filter/class_ svneol=native#text/plain +application/hub/main/filter/class_BaseAptProxyFilter.php svneol=native#text/plain application/hub/main/filter/class_BaseChatFilter.php svneol=native#text/plain application/hub/main/filter/class_BaseCruncherFilter.php svneol=native#text/plain application/hub/main/filter/class_BaseHubFilter.php svneol=native#text/plain @@ -293,6 +311,8 @@ application/hub/main/filter/node/class_NodeInitializationFilter.php svneol=nativ application/hub/main/filter/node/class_NodePhpRequirementsFilter.php svneol=native#text/plain application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php svneol=native#text/plain application/hub/main/filter/shutdown/.htaccess -text svneol=unset#text/plain +application/hub/main/filter/shutdown/apt-proxy/.htaccess svneol=native#text/plain +application/hub/main/filter/shutdown/apt-proxy/class_AptProxyShutdownFilter.php svneol=native#text/plain application/hub/main/filter/shutdown/chat/.htaccess svneol=native#text/plain application/hub/main/filter/shutdown/chat/class_ChatShutdownFilter.php svneol=native#text/plain application/hub/main/filter/shutdown/cruncher/.htaccess svneol=native#text/plain @@ -305,10 +325,13 @@ application/hub/main/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.ph application/hub/main/filter/tags/.htaccess -text svneol=unset#text/plain application/hub/main/filter/tags/answer/.htaccess -text svneol=unset#text/plain application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php svneol=native#text/plain +application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php svneol=native#text/plain application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php svneol=native#text/plain application/hub/main/filter/tags/class_PackageRequestNodeListTagFilter.php svneol=native#text/plain application/hub/main/filter/tags/class_PackageSelfConnectTagFilter.php svneol=native#text/plain application/hub/main/filter/task/.htaccess -text svneol=unset#text/plain +application/hub/main/filter/task/apt-proxy/.htaccess svneol=native#text/plain +application/hub/main/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php svneol=native#text/plain application/hub/main/filter/task/chat/.htaccess svneol=native#text/plain application/hub/main/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php svneol=native#text/plain application/hub/main/filter/task/cruncher/.htaccess svneol=native#text/plain @@ -558,6 +581,9 @@ application/hub/main/tags/class_BaseTags.php svneol=native#text/plain application/hub/main/tags/package/.htaccess -text svneol=unset#text/plain application/hub/main/tags/package/class_PackageTags.php svneol=native#text/plain application/hub/main/tasks/.htaccess -text svneol=unset#text/plain +application/hub/main/tasks/apt-proxy/.htaccess -text svneol=unset#text/plain +application/hub/main/tasks/apt-proxy/class_ svneol=native#text/plain +application/hub/main/tasks/apt-proxy/class_AptProxyListenerTask.php svneol=native#text/plain application/hub/main/tasks/chat/.htaccess -text svneol=unset#text/plain application/hub/main/tasks/chat/class_ svneol=native#text/plain application/hub/main/tasks/chat/class_ChatTelnetListenerTask.php svneol=native#text/plain @@ -597,6 +623,7 @@ application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php application/hub/main/template/producer/.htaccess svneol=native#text/plain application/hub/main/template/producer/test_units/.htaccess svneol=native#text/plain application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php svneol=native#text/plain +application/hub/main/template/producer/work_units/.htaccess svneol=native#text/plain application/hub/main/template/requests/.htaccess -text svneol=unset#text/plain application/hub/main/template/work_units/.htaccess svneol=native#text/plain application/hub/main/tools/.htaccess -text svneol=unset#text/plain diff --git a/application/hub/config.php b/application/hub/config.php index 7b3252211..8531bf96e 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -213,6 +213,9 @@ $cfg->setConfigEntry('package_tag_self_connect_filter', 'PackageSelfConnectTagFi // CFG: PACKAGE-TAG-REQUEST-NODE-LIST-FILTER $cfg->setConfigEntry('package_tag_request_node_list_filter', 'PackageRequestNodeListTagFilter'); +// CFG: PACKAGE-TAG-REQUEST-NODE-LIST-ANSWER-FILTER +$cfg->setConfigEntry('package_tag_request_node_list_answer_filter', 'PackageRequestNodeListAnswerTagFilter'); + // CFG: MESSAGE-TYPE-ANNOUNCEMENT-HANDLER-CLASS $cfg->setConfigEntry('message_type_announcement_handler_class', 'NodeMessageAnnouncementHandler'); @@ -321,24 +324,21 @@ $cfg->setConfigEntry('producer_outgoing_queue', 'FiFoStacker'); // CFG: PRODUCER-INCOMING-QUEUE $cfg->setConfigEntry('producer_incoming_queue', 'FiFoStacker'); -// CFG: STACKER-ANNOUNCEMENT-MAX-SIZE -$cfg->setConfigEntry('stacker_announcement_max_size', 20); - -// CFG: STACKER-ANNOUNCEMENT-ANSWER-MAX-SIZE -$cfg->setConfigEntry('stacker_announcement_answer_max_size', 20); - -// CFG: STACKER-REQUEST-NODE-LIST-ANSWER-MAX-SIZE -$cfg->setConfigEntry('stacker_request_node_list_answer_max_size', 20); +// CFG: STACKER-NODE-ANNOUNCEMENT-MAX-SIZE +$cfg->setConfigEntry('stacker_node_announcement_max_size', 20); -// CFG: STACKER-SELF-CONNECT-MAX-SIZE -$cfg->setConfigEntry('stacker_self_connect_max_size', 10); +// CFG: STACKER-NODE-ANNOUNCEMENT-ANSWER-MAX-SIZE +$cfg->setConfigEntry('stacker_node_announcement_answer_max_size', 20); -// CFG: STACKER-REQUEST-NODE-LIST-MAX-SIZE -$cfg->setConfigEntry('stacker_request_node_list_max_size', 10); +// CFG: STACKER-NODE-SELF-CONNECT-MAX-SIZE +$cfg->setConfigEntry('stacker_node_self_connect_max_size', 10); // CFG: STACKER-NODE-REQUEST-NODE-LIST-MAX_SIZE $cfg->setConfigEntry('stacker_node_request_node_list_max_size', 10); +// CFG: STACKER-NODE-REQUEST-NODE-LIST-ANSWER-MAX-SIZE +$cfg->setConfigEntry('stacker_node_request_node_list_answer_max_size', 20); + // CFG: STACKER-UNDECLARED-MAX-SIZE $cfg->setConfigEntry('stacker_package_undeclared_max_size', 10000); @@ -372,8 +372,8 @@ $cfg->setConfigEntry('stacker_in_queue_max_size', 10000); // CFG: STACKER-OUT-QUEUE-MAX-SIZE $cfg->setConfigEntry('stacker_out_queue_max_size', 10000); -// CFG: STACKER-OBJECT-REGISTRY-MAX-SIZE -$cfg->setConfigEntry('stacker_object_registry_max_size', 100); +// CFG: STACKER-NODE-OBJECT-REGISTRY-MAX-SIZE +$cfg->setConfigEntry('stacker_node_object_registry_max_size', 100); // CFG: STACKER-OUTGOING-QUEUE-MAX-SIZE $cfg->setConfigEntry('stacker_outgoing_queue_max_size', 100000); @@ -827,6 +827,9 @@ $cfg->setConfigEntry('cruncher_key_producer_class', 'CruncherKeyProducer'); // CFG: CRUNCHER-TEST-UNIT-PRODUCER-TEMPLATE-CLASS $cfg->setConfigEntry('cruncher_test_unit_producer_template_class', 'XmlCruncherTestUnitTemplateEngine'); +// CFG: CRUNCHER-MESSAGE-TEMPLATE-EXTENSION +$cfg->setConfigEntry('cruncher_message_template_extension', '.xml'); + // CFG: CRUNCHER-TEST-UNIT-TEMPLATE-EXTENSION $cfg->setConfigEntry('cruncher_test_unit_template_extension', '.xml'); @@ -928,5 +931,48 @@ $cfg->setConfigEntry('web_cmd_home_resolver_class', 'WebCommandResolver'); // CFG: NEWS-HOME-LIMIT $cfg->setConfigEntry('news_home_limit', 10); +/////////////////////////////////////////////////////////////////////////////// +// Apt-Aproxy Configuration +/////////////////////////////////////////////////////////////////////////////// + +// CFG: HUBCONSOLE-CMD-APT-PROXY-RESOLVER-CLASS +$cfg->setConfigEntry('hubconsole_cmd_apt_proxy_resolver_class', 'HubConsoleCommandResolver'); + +// CFG: APT-PROXY-PHP-REQUIREMENTS-FILTER +$cfg->setConfigEntry('apt_proxy_php_requirements_filter', 'AptProxyPhpRequirementsFilter'); + +// CFG: APT-PROXY-INITIALIZER-FILTER +$cfg->setConfigEntry('apt_proxy_initializer_filter', 'AptProxyInitializationFilter'); + +// CFG: NODE-CONSOLE-APT-PROXY +$cfg->setConfigEntry('node_console_apt_proxy_class', 'NodeConsoleAptProxy'); + +// CFG: APT-PROXY-WELCOME-TEASER-FILTER +$cfg->setConfigEntry('apt_proxy_welcome_teaser_filter', 'AptProxyWelcomeTeaserFilter'); + +// CFG: APT-PROXY-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER +$cfg->setConfigEntry('apt_proxy_bootstrap_task_handler_initializer_filter', 'AptProxyTaskHandlerInitializerFilter'); + +// CFG: APT-PROXY-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER +$cfg->setConfigEntry('apt_proxy_bootstrap_extra_bootstrapping_filter', 'AptProxyBootstrapExtraBootstrappingFilter'); + +// CFG: APT-PROXY-BOOTSTRAP-GENERIC-ACTIVATION-FILTER +$cfg->setConfigEntry('apt_proxy_bootstrap_generic_activation_filter', 'AptProxyBootstrapGenericActivationFilter'); + +// CFG: APT-PROXY-SHUTDOWN-FILTER +$cfg->setConfigEntry('apt_proxy_shutdown_filter', 'AptProxyShutdownFilter'); + +// CFG: APT-PROXY-LISTENER-TASK-CLASS +$cfg->setConfigEntry('apt_proxy_listener_task_class', 'AptProxyListenerTask'); + +// CFG: TASK-APT-PROXY-LISTENER-STARTUP-DELAY +$cfg->setConfigEntry('task_apt_proxy_listener_startup_delay', 2500); + +// CFG: TASK-APT-PROXY-LISTENER-INTERVAL-DELAY +$cfg->setConfigEntry('task_apt_proxy_listener_interval_delay', 10); + +// CFG: TASK-APT-PROXY-LISTENER-MAX-RUNS +$cfg->setConfigEntry('task_apt_proxy_listener_max_runs', 0); + // [EOF] ?> diff --git a/application/hub/interfaces/apt-proxy/.htaccess b/application/hub/interfaces/apt-proxy/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/apt-proxy/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/apt-proxy/class_AptProxy.php b/application/hub/interfaces/apt-proxy/class_AptProxy.php new file mode 100644 index 000000000..935df79e3 --- /dev/null +++ b/application/hub/interfaces/apt-proxy/class_AptProxy.php @@ -0,0 +1,69 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * @todo We need to find a better name for this interface + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +interface AptProxy extends FrameworkInterface { + /** + * Method to "bootstrap" the apt-proxy. This step does also apply provided + * command-line arguments stored in the request instance. You should now + * get it from calling $this->getRequestInstance(). + * + * @return void + */ + function doBootstrapping (); + + /** + * Outputs the console teaser. This should only be executed on startup or + * full restarts. This method generates some space around the teaser. + * + * @return void + */ + function outputConsoleTeaser (); + + /** + * Add some apt-proxy-specific filters + * + * @param $controllerInstance An object of a Controller instance + * @param $responseInstance An object of a Responseable instance + * @return void + */ + function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance); + + /** + * Enables/disables the apt-proxy (just sets a flag) + * + * @param $version Version number of this apt-proxy + * @return void + */ + function enableIsActive ($isActive = true); + + /** + * Determines whether the apt-proxy is active + * + * @return $isActive Whether the apt-proxy is active + */ + function isActive (); +} + +// [EOF] +?> diff --git a/application/hub/interfaces/cruncher/class_CruncherHelper.php b/application/hub/interfaces/cruncher/class_CruncherHelper.php index 0f9adf109..0c23d22ca 100644 --- a/application/hub/interfaces/cruncher/class_CruncherHelper.php +++ b/application/hub/interfaces/cruncher/class_CruncherHelper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @todo We need to find a better name for this interface diff --git a/application/hub/main/apt-proxy/.htaccess b/application/hub/main/apt-proxy/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/apt-proxy/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/apt-proxy/class_ b/application/hub/main/apt-proxy/class_ new file mode 100644 index 000000000..2ec43314b --- /dev/null +++ b/application/hub/main/apt-proxy/class_ @@ -0,0 +1,82 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class Node???AptProxy extends BaseNodeAptProxy implements AptProxyter { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $proxyInstance An instance of a AptProxyter class + */ + public final static function createNode???AptProxy () { + // Get new instance + $proxyInstance = new Node???AptProxy(); + + // Return the prepared instance + return $proxyInstance; + } + + /** + * Method to "bootstrap" the apt-proxy. This step does also apply provided + * command-line arguments stored in the request instance. You should now + * get it from calling $this->getRequestInstance(). + * + * @return void + */ + public function doBootstrapping () { + $this->partialStub('Please implement this method.'); + } + + /** + * Outputs the console teaser. This should only be executed on startup or + * full restarts. This method generates some space around the teaser. + * + * @return void + */ + public function outputConsoleTeaser () { + $this->partialStub('Please implement this method.'); + } + + /** + * Add some apt-proxy-specific filters + * + * @param $controllerInstance An object of a Controller instance + * @param $responseInstance An object of a Responseable instance + * @return void + */ + public function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance) { + $this->partialStub('Please implement this method.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/apt-proxy/class_BaseNodeAptProxy.php b/application/hub/main/apt-proxy/class_BaseNodeAptProxy.php new file mode 100644 index 000000000..be1d3f5fc --- /dev/null +++ b/application/hub/main/apt-proxy/class_BaseNodeAptProxy.php @@ -0,0 +1,62 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class BaseNodeAptProxy extends BaseHubSystem { + /** + * Whether this apt-proxy is active + */ + private $isActive = false; + + /** + * Protected constructor + * + * @param $className Name of the class + * @return void + */ + protected function __construct ($className) { + // Call parent constructor + parent::__construct($className); + } + + /** + * Enables/disables the apt-proxy (just sets a flag) + * + * @param $version Version number of this apt-proxy + * @return void + */ + public final function enableIsActive ($isActive = true) { + $this->isActive = (bool) $isActive; + } + + /** + * Determines whether the apt-proxy is active + * + * @return $isActive Whether the apt-proxy is active + */ + public final function isActive () { + return $this->isActive; + } +} + +// [EOF] +?> diff --git a/application/hub/main/apt-proxy/console/.htaccess b/application/hub/main/apt-proxy/console/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/apt-proxy/console/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/apt-proxy/console/class_NodeConsoleAptProxy.php b/application/hub/main/apt-proxy/console/class_NodeConsoleAptProxy.php new file mode 100644 index 000000000..7601e1ef0 --- /dev/null +++ b/application/hub/main/apt-proxy/console/class_NodeConsoleAptProxy.php @@ -0,0 +1,93 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class NodeConsoleAptProxy extends BaseNodeAptProxy implements AptProxy, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $proxyInstance An instance of a AptProxy class + */ + public final static function createNodeConsoleAptProxy () { + // Get new instance + $proxyInstance = new NodeConsoleAptProxy(); + + // Return the prepared instance + return $proxyInstance; + } + + /** + * Method to "bootstrap" the apt-proxy. This step does also apply provided + * command-line arguments stored in the request instance. You should now + * get it from calling $this->getRequestInstance(). + * + * @return void + */ + public function doBootstrapping () { + $this->partialStub('Please implement this method.'); + } + + /** + * Outputs the console teaser. This should only be executed on startup or + * full restarts. This method generates some space around the teaser. + * + * @return void + */ + public function outputConsoleTeaser () { + // Get the app instance (for shortening our code) + $app = $this->getApplicationInstance(); + + // Output all lines + self::createDebugInstance(__CLASS__)->debugOutput(' '); + self::createDebugInstance(__CLASS__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - An apt-proxy connection helper'); + self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2012 Apt-Proxy Developer Team'); + self::createDebugInstance(__CLASS__)->debugOutput(' '); + self::createDebugInstance(__CLASS__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.'); + self::createDebugInstance(__CLASS__)->debugOutput('This is free software, and you are welcome to redistribute it under certain'); + self::createDebugInstance(__CLASS__)->debugOutput('conditions; see docs/COPYING for details.'); + self::createDebugInstance(__CLASS__)->debugOutput(' '); + } + + /** + * Add some apt-proxy-specific filters + * + * @param $controllerInstance An object of a Controller instance + * @param $responseInstance An object of a Responseable instance + * @return void + */ + public function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance) { + $this->partialStub('Please implement this method.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/chat/class_ b/application/hub/main/chat/class_ index 12f7eeeea..ac7a45fb4 100644 --- a/application/hub/main/chat/class_ +++ b/application/hub/main/chat/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/chat/class_BaseNodeChat.php b/application/hub/main/chat/class_BaseNodeChat.php index a1b004417..2678bf1b0 100644 --- a/application/hub/main/chat/class_BaseNodeChat.php +++ b/application/hub/main/chat/class_BaseNodeChat.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/chat/console/class_NodeConsoleChat.php b/application/hub/main/chat/console/class_NodeConsoleChat.php index 190ee631e..8fcac7f81 100644 --- a/application/hub/main/chat/console/class_NodeConsoleChat.php +++ b/application/hub/main/chat/console/class_NodeConsoleChat.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -69,7 +69,7 @@ class NodeConsoleChat extends BaseNodeChat implements Chatter, Registerable { // Output all lines self::createDebugInstance(__CLASS__)->debugOutput(' '); self::createDebugInstance(__CLASS__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - A telnet connection helper'); - self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team'); + self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2012 Chat Developer Team'); self::createDebugInstance(__CLASS__)->debugOutput(' '); self::createDebugInstance(__CLASS__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.'); self::createDebugInstance(__CLASS__)->debugOutput('This is free software, and you are welcome to redistribute it under certain'); diff --git a/application/hub/main/commands/console/class_HubConsoleAptProxyCommand.php b/application/hub/main/commands/console/class_HubConsoleAptProxyCommand.php new file mode 100644 index 000000000..f701dc74d --- /dev/null +++ b/application/hub/main/commands/console/class_HubConsoleAptProxyCommand.php @@ -0,0 +1,131 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class HubConsoleAptProxyCommand extends BaseCommand implements Commandable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @param $resolverInstance An instance of a command resolver class + * @return $commandInstance An instance a prepared command class + */ + public static final function createHubConsoleAptProxyCommand (CommandResolver $resolverInstance) { + // Get new instance + $commandInstance = new HubConsoleAptProxyCommand(); + + // Set the application instance + $commandInstance->setResolverInstance($resolverInstance); + + // Return the prepared instance + return $commandInstance; + } + + /** + * Executes the given command with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo Try to create a AptProxyActivationTask or so + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get a registry and the application instance from it + $applicationInstance = Registry::getRegistry()->getInstance('app'); + + /* + * ----------------------- Bootstrapping phase ------------------------ + * Try to bootstrap the node and pass the request instance to it for + * extra arguments which mostly override config entries or enable special + * features within the hub (none is ready at this development stage) + */ + self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Beginning with bootstrap...'); + $applicationInstance->getControllerInstance()->executeBootstrapFilters($requestInstance, $responseInstance); + self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Bootstrap finished.'); + + // Get apt-proxy instance + $proxyInstance = Registry::getRegistry()->getInstance('apt_proxy'); + + // Add some apt-proxy-specific filters + $proxyInstance->addExtraAptProxyFilters(); + + // Get task handler instance + $handlerInstance = Registry::getRegistry()->getInstance('task'); + + // Debug message + self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Entering main loop. ---'); + + /* + * ----------------------------- Main loop ---------------------------- + * This is the main loop. Queried calls should come back here very fast + * so the whole application runs on nice speed. This while-loop goes + * until the apt-proxy is no longer active or all tasks are killed. + */ + while (($proxyInstance->isActive()) && ($handlerInstance->hasTasksLeft())) { + // Handle all tasks here + $handlerInstance->handleTasks(); + } // END - while + + // Debug message + self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Leaving main loop. ---'); + } + + /** + * Adds extra filters to the given controller instance + * + * @param $controllerInstance A controller instance + * @param $requestInstance An instance of a class with an Requestable interface + * @return void + * @todo Should we add some more filters? + */ + public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { + // Add pre filters + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_php_requirements_filter')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_initializer_filter')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_welcome_teaser_filter')); + + // Add bootstrap filters + $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_bootstrap_task_handler_initializer_filter')); + $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_bootstrap_extra_bootstrapping_filter')); + + // This is the last generic boostrap filter + $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_bootstrap_generic_activation_filter')); + + // Add shutdown filters + //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_shutdown_task_handler_filter')); + + // This is the last generic shutdown filter + $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_shutdown_filter')); + } +} + +// [EOF] +?> diff --git a/application/hub/main/commands/console/class_HubConsoleChatCommand.php b/application/hub/main/commands/console/class_HubConsoleChatCommand.php index 1d50cd873..5f5acd5b9 100644 --- a/application/hub/main/commands/console/class_HubConsoleChatCommand.php +++ b/application/hub/main/commands/console/class_HubConsoleChatCommand.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php b/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php index 501bb7508..d5fa52a93 100644 --- a/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php +++ b/application/hub/main/commands/console/class_HubConsoleCruncherCommand.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/controller/console/class_HubConsoleAptProxyController.php b/application/hub/main/controller/console/class_HubConsoleAptProxyController.php new file mode 100644 index 000000000..97707c9d7 --- /dev/null +++ b/application/hub/main/controller/console/class_HubConsoleAptProxyController.php @@ -0,0 +1,131 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class HubConsoleAptProxyController extends BaseController implements Controller { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + + // Init additional filter chains + foreach (array('bootstrap','shutdown') as $filterChain) { + $this->initFilterChain($filterChain); + } // END - foreach + } + + /** + * Creates an instance of this class + * + * @param $resolverInstance An instance of a command resolver class + * @return $controllerInstance A prepared instance of this class + */ + public static final function createHubConsoleAptProxyController (CommandResolver $resolverInstance) { + // Create the instance + $controllerInstance = new HubConsoleAptProxyController(); + + // Set the command resolver + $controllerInstance->setResolverInstance($resolverInstance); + + // Return the prepared instance + return $controllerInstance; + } + + /** + * Handles the given request and response + * + * @param $requestInstance An instance of a request class + * @param $responseInstance An instance of a response class + * @return void + */ + public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) { + // Get the command instance from the resolver by sending a request instance to the resolver + $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance); + + // Add more filters by the command + $commandInstance->addExtraFilters($this, $requestInstance); + + // Run the pre filters + $this->executePreFilters($requestInstance, $responseInstance); + + // This request was valid! :-D + $requestInstance->requestIsValid(); + + // Execute the command + $commandInstance->execute($requestInstance, $responseInstance); + + // Run the pre filters + $this->executePostFilters($requestInstance, $responseInstance); + + // Flush the response out + $responseInstance->flushBuffer(); + } + + /** + * Add a bootstrap filter + * + * @param $filterInstance A Filterable class + * @return void + */ + public function addBootstrapFilter (Filterable $filterInstance) { + $this->addFilter('bootstrap', $filterInstance); + } + + /** + * Executes all bootstrap filters + * + * @param $requestInstance A Requestable class + * @param $responseInstance A Responseable class + * @return void + */ + public function executeBootstrapFilters (Requestable $requestInstance, Responseable $responseInstance) { + $this->executeFilters('bootstrap', $requestInstance, $responseInstance); + } + + /** + * Add a shutdown filter + * + * @param $filterInstance A Filterable class + * @return void + */ + public function addShutdownFilter (Filterable $filterInstance) { + $this->addFilter('shutdown', $filterInstance); + } + + /** + * Executes all shutdown filters + * + * @param $requestInstance A Requestable class + * @param $responseInstance A Responseable class + * @return void + */ + public function executeShutdownFilters (Requestable $requestInstance, Responseable $responseInstance) { + $this->executeFilters('shutdown', $requestInstance, $responseInstance); + } +} + +// [EOF] +?> diff --git a/application/hub/main/controller/console/class_HubConsoleChatController.php b/application/hub/main/controller/console/class_HubConsoleChatController.php index ab835fdaa..39ef65894 100644 --- a/application/hub/main/controller/console/class_HubConsoleChatController.php +++ b/application/hub/main/controller/console/class_HubConsoleChatController.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/controller/console/class_HubConsoleCruncherController.php b/application/hub/main/controller/console/class_HubConsoleCruncherController.php index 9a62b4fb9..9991f2d91 100644 --- a/application/hub/main/controller/console/class_HubConsoleCruncherController.php +++ b/application/hub/main/controller/console/class_HubConsoleCruncherController.php @@ -5,7 +5,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/cruncher/class_ b/application/hub/main/cruncher/class_ index aa6c95e30..d4b0fb2c4 100644 --- a/application/hub/main/cruncher/class_ +++ b/application/hub/main/cruncher/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/cruncher/class_BaseHubCruncher.php b/application/hub/main/cruncher/class_BaseHubCruncher.php index b0c359f1d..9eab56368 100644 --- a/application/hub/main/cruncher/class_BaseHubCruncher.php +++ b/application/hub/main/cruncher/class_BaseHubCruncher.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php b/application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php index 9795b87a4..51d622444 100644 --- a/application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php +++ b/application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -121,7 +121,7 @@ class HubMcryptCruncher extends BaseHubCruncher implements CruncherHelper, Regis // Output all lines self::createDebugInstance(__CLASS__)->debugOutput(' '); self::createDebugInstance(__CLASS__)->debugOutput('MCrypt Cruncher v' . $this->getVersion() . ' is starting ...'); - self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2011 Hub Developer Team'); + self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2011 Cruncher Developer Team'); self::createDebugInstance(__CLASS__)->debugOutput(' '); self::createDebugInstance(__CLASS__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.'); self::createDebugInstance(__CLASS__)->debugOutput('This is free software, and you are welcome to redistribute it under certain'); diff --git a/application/hub/main/database/wrapper/cruncher/class_CruncherUnitDatabaseWrapper.php b/application/hub/main/database/wrapper/cruncher/class_CruncherUnitDatabaseWrapper.php index 077f7a5dc..5bbb0e7ac 100644 --- a/application/hub/main/database/wrapper/cruncher/class_CruncherUnitDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/cruncher/class_CruncherUnitDatabaseWrapper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/factories/states/cruncher/class_CruncherStateFactory.php b/application/hub/main/factories/states/cruncher/class_CruncherStateFactory.php index 3a797e1f7..cbf0e1d8b 100644 --- a/application/hub/main/factories/states/cruncher/class_CruncherStateFactory.php +++ b/application/hub/main/factories/states/cruncher/class_CruncherStateFactory.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/apt-proxy/.htaccess b/application/hub/main/filter/apt-proxy/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/filter/apt-proxy/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/filter/apt-proxy/class_AptProxyInitializationFilter.php b/application/hub/main/filter/apt-proxy/class_AptProxyInitializationFilter.php new file mode 100644 index 000000000..2b77452c3 --- /dev/null +++ b/application/hub/main/filter/apt-proxy/class_AptProxyInitializationFilter.php @@ -0,0 +1,75 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxyInitializationFilter extends BaseAptProxyFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createAptProxyInitializationFilter () { + // Get a new instance + $filterInstance = new AptProxyInitializationFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get an instance + $proxyInstance = ObjectFactory::createObjectByConfiguredName('node_console_apt_proxy_class'); + + // Get a registry + $applicationInstance = Registry::getRegistry()->getInstance('app'); + + // Set the app instance + $proxyInstance->setApplicationInstance($applicationInstance); + + // Add apt-proxy-specific filters + $proxyInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance); + + // Set the apt_proxy instance in registry + Registry::getRegistry()->addInstance('apt_proxy', $proxyInstance); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/apt-proxy/class_AptProxyPhpRequirementsFilter.php b/application/hub/main/filter/apt-proxy/class_AptProxyPhpRequirementsFilter.php new file mode 100644 index 000000000..a8f192cf1 --- /dev/null +++ b/application/hub/main/filter/apt-proxy/class_AptProxyPhpRequirementsFilter.php @@ -0,0 +1,78 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxyPhpRequirementsFilter extends BaseAptProxyFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createAptProxyPhpRequirementsFilter () { + // Get a new instance + $filterInstance = new AptProxyPhpRequirementsFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If a required PHP function is not available + * @todo Add more test and try to add an extra message to the thrown exception + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // By default, the requirement check is passed and zero checks are failed + $checkPassed = true; + $checksFailed = 0; + + // Socket support is essential... + if (!function_exists('socket_create')) { + // Test failed + $checkPassed = false; + $checksFailed++; + } // END -if + + // Are all tests passed? + if ($checkPassed === false) { + // Throw an exception + throw new FilterChainException($this, self::FILTER_CHAIN_INTERCEPTED); + } // END - if + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php b/application/hub/main/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php new file mode 100644 index 000000000..13c278925 --- /dev/null +++ b/application/hub/main/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php @@ -0,0 +1,67 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxyWelcomeTeaserFilter extends BaseAptProxyFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createAptProxyWelcomeTeaserFilter () { + // Get a new instance + $filterInstance = new AptProxyWelcomeTeaserFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If $nodeInstance is null (no NullPointerException here) + * @todo Handle over the $responseInstance to outputConsoleTeaser() + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get node instance + $proxyInstance = Registry::getRegistry()->getInstance('apt_proxy'); + + // Now output the teaser + $proxyInstance->outputConsoleTeaser(); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/bootstrap/apt-proxy/.htaccess b/application/hub/main/filter/bootstrap/apt-proxy/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/filter/bootstrap/apt-proxy/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrap b/application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrap new file mode 100644 index 000000000..008987a8f --- /dev/null +++ b/application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrap @@ -0,0 +1,66 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxyBootstrap???Filter extends BaseAptProxyFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public final static function createAptProxyBootstrap???Filter () { + // Get a new instance + $filterInstance = new AptProxyBootstrap???Filter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo 0% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get apt-proxy instance + $proxyInstance = Registry::getRegistry()->getInstance('apt_proxy'); + + // Now do something + $this->partialStub('Please implement this step.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapExtraBootstrappingFilter.php b/application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapExtraBootstrappingFilter.php new file mode 100644 index 000000000..6d30a3284 --- /dev/null +++ b/application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapExtraBootstrappingFilter.php @@ -0,0 +1,66 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxyBootstrapExtraBootstrappingFilter extends BaseAptProxyFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createAptProxyBootstrapExtraBootstrappingFilter () { + // Get a new instance + $filterInstance = new AptProxyBootstrapExtraBootstrappingFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If $proxyInstance is null (no NullPointerException here) + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get apt-proxy instance + $proxyInstance = Registry::getRegistry()->getInstance('apt_proxy'); + + // Do some extra bootstrapping steps + $proxyInstance->doBootstrapping(); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php b/application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php new file mode 100644 index 000000000..ec5acf445 --- /dev/null +++ b/application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php @@ -0,0 +1,69 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxyBootstrapGenericActivationFilter extends BaseAptProxyFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public final static function createAptProxyBootstrapGenericActivationFilter () { + // Get a new instance + $filterInstance = new AptProxyBootstrapGenericActivationFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo Maybe we want to do somthing more here? + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get a apt-proxy instance + $proxyInstance = Registry::getRegistry()->getInstance('apt_proxy'); + + // Set the flag + $proxyInstance->enableIsActive(); + + // Debug message + self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Apt-Proxy has been activated.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/bootstrap/chat/class_ChatBootstrap b/application/hub/main/filter/bootstrap/chat/class_ChatBootstrap index 810fecfdc..9047bdcbb 100644 --- a/application/hub/main/filter/bootstrap/chat/class_ChatBootstrap +++ b/application/hub/main/filter/bootstrap/chat/class_ChatBootstrap @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Chat Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/chat/class_ChatBootstrapExtraBootstrappingFilter.php b/application/hub/main/filter/bootstrap/chat/class_ChatBootstrapExtraBootstrappingFilter.php index 2c10143cf..2a1365e93 100644 --- a/application/hub/main/filter/bootstrap/chat/class_ChatBootstrapExtraBootstrappingFilter.php +++ b/application/hub/main/filter/bootstrap/chat/class_ChatBootstrapExtraBootstrappingFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Chat Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php b/application/hub/main/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php index ef584aa22..e9123f448 100644 --- a/application/hub/main/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php +++ b/application/hub/main/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php b/application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php index f7a0f4994..4209923d9 100644 --- a/application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php +++ b/application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/chat/class_ChatInitializationFilter.php b/application/hub/main/filter/chat/class_ChatInitializationFilter.php index 98971e8d3..6dae54214 100644 --- a/application/hub/main/filter/chat/class_ChatInitializationFilter.php +++ b/application/hub/main/filter/chat/class_ChatInitializationFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/chat/class_ChatPhpRequirementsFilter.php b/application/hub/main/filter/chat/class_ChatPhpRequirementsFilter.php index fafda5ea3..ce2a04c00 100644 --- a/application/hub/main/filter/chat/class_ChatPhpRequirementsFilter.php +++ b/application/hub/main/filter/chat/class_ChatPhpRequirementsFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Teama * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/chat/class_ChatWelcomeTeaserFilter.php b/application/hub/main/filter/chat/class_ChatWelcomeTeaserFilter.php index 8a69ee688..c18d9a829 100644 --- a/application/hub/main/filter/chat/class_ChatWelcomeTeaserFilter.php +++ b/application/hub/main/filter/chat/class_ChatWelcomeTeaserFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/class_BaseAptProxyFilter.php b/application/hub/main/filter/class_BaseAptProxyFilter.php new file mode 100644 index 000000000..46caedf3a --- /dev/null +++ b/application/hub/main/filter/class_BaseAptProxyFilter.php @@ -0,0 +1,38 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class BaseAptProxyFilter extends BaseHubFilter { + /** + * Protected constructor + * + * @param $className Real name of class + * @return void + */ + protected function __construct ($className) { + // Call parent constructor + parent::__construct($className); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/class_BaseChatFilter.php b/application/hub/main/filter/class_BaseChatFilter.php index ab63d9ece..901d970ea 100644 --- a/application/hub/main/filter/class_BaseChatFilter.php +++ b/application/hub/main/filter/class_BaseChatFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/class_BaseCruncherFilter.php b/application/hub/main/filter/class_BaseCruncherFilter.php index 395968bad..ac679ac67 100644 --- a/application/hub/main/filter/class_BaseCruncherFilter.php +++ b/application/hub/main/filter/class_BaseCruncherFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/cruncher/class_Cruncher b/application/hub/main/filter/cruncher/class_Cruncher index 32ca1f586..85ab4f8b2 100644 --- a/application/hub/main/filter/cruncher/class_Cruncher +++ b/application/hub/main/filter/cruncher/class_Cruncher @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Hub Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php b/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php index 97b9067ad..32ce221d9 100644 --- a/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php +++ b/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php b/application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php index 82beb0784..cbafdd088 100644 --- a/application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php +++ b/application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php b/application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php index f066850e0..29e2d6d22 100644 --- a/application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php +++ b/application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/shutdown/apt-proxy/.htaccess b/application/hub/main/filter/shutdown/apt-proxy/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/filter/shutdown/apt-proxy/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/filter/shutdown/apt-proxy/class_AptProxyShutdownFilter.php b/application/hub/main/filter/shutdown/apt-proxy/class_AptProxyShutdownFilter.php new file mode 100644 index 000000000..f98d541c6 --- /dev/null +++ b/application/hub/main/filter/shutdown/apt-proxy/class_AptProxyShutdownFilter.php @@ -0,0 +1,68 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxyShutdownFilter extends BaseAptProxyFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createAptProxyShutdownFilter () { + // Get a new instance + $filterInstance = new AptProxyShutdownFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If $nodeInstance is null (no NullPointerException please) + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get node instance + $proxyInstance = Registry::getRegistry()->getInstance('apt_proxy'); + + // Shutdown the apt-proxy. This should be the last line + $proxyInstance->doShutdown(); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/shutdown/chat/class_ChatShutdownFilter.php b/application/hub/main/filter/shutdown/chat/class_ChatShutdownFilter.php index cc2f859aa..04cb196d8 100644 --- a/application/hub/main/filter/shutdown/chat/class_ChatShutdownFilter.php +++ b/application/hub/main/filter/shutdown/chat/class_ChatShutdownFilter.php @@ -1,12 +1,12 @@ * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/shutdown/cruncher/class_CruncherShutdownFilter.php b/application/hub/main/filter/shutdown/cruncher/class_CruncherShutdownFilter.php index b8bb0bc4b..67587e926 100644 --- a/application/hub/main/filter/shutdown/cruncher/class_CruncherShutdownFilter.php +++ b/application/hub/main/filter/shutdown/cruncher/class_CruncherShutdownFilter.php @@ -6,7 +6,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php b/application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php index 5be9528e0..a25eb165c 100644 --- a/application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php +++ b/application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php @@ -73,17 +73,9 @@ class PackageAnnouncementAnswerTagFilter extends BaseNodeFilter implements Filte * Processes the given raw message content. The method renderXmlContent * may throw (not the method itself) several exceptions: * - * InvalidXmlNodeException - If an invalid XML node has been found (e.g. - * wrong/out-dated template used) - * XmlNodeMismatchException - Again might be caused by invalid XML node - * usage - * XmlParserException - If the XML message is damaged or not - * well-formed - * * @param $messageContent Raw message content * @param $packageInstance An instance of a Receivable class * @return void - * @todo Exceptions from renderXmlContent() are currently unhandled */ public function processMessage ($messageContent, Receivable $packageInstance) { // Process message in generic way diff --git a/application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php b/application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php new file mode 100644 index 000000000..7b3e0cb8e --- /dev/null +++ b/application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php @@ -0,0 +1,81 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class PackageRequestNodeListAnswerTagFilter extends BaseNodeFilter implements FilterablePackage { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + + // Init array + $this->dataXmlNodes = array( + //XmlRequestNodeListAnswerTemplateEngine::ANNOUNCEMENT_DATA_ANSWER_STATUS => '', + ); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public final static function createPackageRequestNodeListAnswerTagFilter () { + // Get a new instance + $filterInstance = new PackageRequestNodeListAnswerTagFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws UnsupportedOperationException If this method is called, please use processMessage() instead! + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Please don't call this method + throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + } + + /** + * Processes the given raw message content. The method renderXmlContent + * may throw (not the method itself) several exceptions: + * + * @param $messageContent Raw message content + * @param $packageInstance An instance of a Receivable class + * @return void + */ + public function processMessage ($messageContent, Receivable $packageInstance) { + // Process message in generic way + $this->genericProcessMessage('request_node_list_answer', $messageContent, $packageInstance); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/task/apt-proxy/.htaccess b/application/hub/main/filter/task/apt-proxy/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/filter/task/apt-proxy/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php b/application/hub/main/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php new file mode 100644 index 000000000..3c673e5d3 --- /dev/null +++ b/application/hub/main/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php @@ -0,0 +1,78 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 apt-proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxyTaskHandlerInitializerFilter extends BaseAptProxyFilter implements Filterable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this filter class + * + * @return $filterInstance An instance of this filter class + */ + public static final function createAptProxyTaskHandlerInitializerFilter () { + // Get a new instance + $filterInstance = new AptProxyTaskHandlerInitializerFilter(); + + // Return the instance + return $filterInstance; + } + + /** + * Executes the filter with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @throws FilterChainException If we need to interrupt the filter chain + * @todo 5% done + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Get apt-proxy instance + //$chatInstance = Registry::getRegistry()->getInstance('chat'); + + // Get a new task handler instance + $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class'); + + /* + * Register all tasks: + * + * 1) apt-proxy listener + */ + $taskInstance = ObjectFactory::createObjectByConfiguredName('apt_proxy_listener_task_class'); + $handlerInstance->registerTask('apt_proxy_listener', $taskInstance); + + // Put the task handler in registry + Registry::getRegistry()->addInstance('task', $handlerInstance); + } +} + +// [EOF] +?> diff --git a/application/hub/main/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php b/application/hub/main/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php index db6646c3c..bd9fda316 100644 --- a/application/hub/main/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php +++ b/application/hub/main/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 chat Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/helper/work_units/class_ b/application/hub/main/helper/work_units/class_ index de038ec7e..400fac1fe 100644 --- a/application/hub/main/helper/work_units/class_ +++ b/application/hub/main/helper/work_units/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/helper/work_units/cruncher/class_CruncherTestUnitHelper.php b/application/hub/main/helper/work_units/cruncher/class_CruncherTestUnitHelper.php index ef1b90eff..3c84019af 100644 --- a/application/hub/main/helper/work_units/cruncher/class_CruncherTestUnitHelper.php +++ b/application/hub/main/helper/work_units/cruncher/class_CruncherTestUnitHelper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php b/application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php index 9242d0f0b..fda0dedd9 100644 --- a/application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php +++ b/application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php b/application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php index 98298c637..638c4c569 100644 --- a/application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php +++ b/application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/cruncher/class_ b/application/hub/main/states/cruncher/class_ index 68dabf19b..1bed676a7 100644 --- a/application/hub/main/states/cruncher/class_ +++ b/application/hub/main/states/cruncher/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/cruncher/class_BaseCruncherState.php b/application/hub/main/states/cruncher/class_BaseCruncherState.php index e849574cd..d0ce9683a 100644 --- a/application/hub/main/states/cruncher/class_BaseCruncherState.php +++ b/application/hub/main/states/cruncher/class_BaseCruncherState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/cruncher/init/class_CruncherInitState.php b/application/hub/main/states/cruncher/init/class_CruncherInitState.php index 1806afbb2..36ea75823 100644 --- a/application/hub/main/states/cruncher/init/class_CruncherInitState.php +++ b/application/hub/main/states/cruncher/init/class_CruncherInitState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/states/cruncher/virgin/class_CruncherVirginState.php b/application/hub/main/states/cruncher/virgin/class_CruncherVirginState.php index 6f95fe697..b5b0e4b3e 100644 --- a/application/hub/main/states/cruncher/virgin/class_CruncherVirginState.php +++ b/application/hub/main/states/cruncher/virgin/class_CruncherVirginState.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/apt-proxy/.htaccess b/application/hub/main/tasks/apt-proxy/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/tasks/apt-proxy/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/main/tasks/apt-proxy/class_ b/application/hub/main/tasks/apt-proxy/class_ new file mode 100644 index 000000000..7246337c1 --- /dev/null +++ b/application/hub/main/tasks/apt-proxy/class_ @@ -0,0 +1,72 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Apt-Proxy Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxy???Task extends BaseTask implements Taskable, Visitable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $taskInstance An instance of a Visitable class + */ + public final static function createAptProxy???Task () { + // Get new instance + $taskInstance = new AptProxy???Task(); + + // Return the prepared instance + return $taskInstance; + } + + /** + * Accepts the visitor to process the visit "request" + * + * @param $visitorInstance An instance of a Visitor class + * @return void + * @todo Maybe visit some sub-objects + */ + public function accept (Visitor $visitorInstance) { + // Visit this task + $visitorInstance->visitTask($this); + } + + /** + * Executes the task + * + * @return void + * @todo 0% + */ + public function executeTask () { + $this->partialStub('Unimplemented task.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/tasks/apt-proxy/class_AptProxyListenerTask.php b/application/hub/main/tasks/apt-proxy/class_AptProxyListenerTask.php new file mode 100644 index 000000000..5d49f2c88 --- /dev/null +++ b/application/hub/main/tasks/apt-proxy/class_AptProxyListenerTask.php @@ -0,0 +1,72 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2011 - 2012 Chat Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AptProxyListenerTask extends BaseTask implements Taskable, Visitable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class + * + * @return $taskInstance An instance of a Visitable class + */ + public final static function createAptProxyListenerTask () { + // Get new instance + $taskInstance = new AptProxyListenerTask(); + + // Return the prepared instance + return $taskInstance; + } + + /** + * Accepts the visitor to process the visit "request" + * + * @param $visitorInstance An instance of a Visitor class + * @return void + * @todo Maybe visit some sub-objects + */ + public function accept (Visitor $visitorInstance) { + // Visit this task + $visitorInstance->visitTask($this); + } + + /** + * Executes the task + * + * @return void + * @todo 0% + */ + public function executeTask () { + $this->partialStub('Unimplemented task.'); + } +} + +// [EOF] +?> diff --git a/application/hub/main/tasks/chat/class_ChatTelnetListenerTask.php b/application/hub/main/tasks/chat/class_ChatTelnetListenerTask.php index 236c45b04..f33e33d7a 100644 --- a/application/hub/main/tasks/chat/class_ChatTelnetListenerTask.php +++ b/application/hub/main/tasks/chat/class_ChatTelnetListenerTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2012 Chat Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/cruncher/class_ b/application/hub/main/tasks/cruncher/class_ index f481ce064..14e300980 100644 --- a/application/hub/main/tasks/cruncher/class_ +++ b/application/hub/main/tasks/cruncher/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/cruncher/class_CruncherKeyProducerTask.php b/application/hub/main/tasks/cruncher/class_CruncherKeyProducerTask.php index 46496142a..550f3b518 100644 --- a/application/hub/main/tasks/cruncher/class_CruncherKeyProducerTask.php +++ b/application/hub/main/tasks/cruncher/class_CruncherKeyProducerTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/cruncher/class_CruncherTestUnitProducerTask.php b/application/hub/main/tasks/cruncher/class_CruncherTestUnitProducerTask.php index 2b23eb9fd..41dedf414 100644 --- a/application/hub/main/tasks/cruncher/class_CruncherTestUnitProducerTask.php +++ b/application/hub/main/tasks/cruncher/class_CruncherTestUnitProducerTask.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php b/application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php index 640d62e9d..126fe0ecd 100644 --- a/application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php +++ b/application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php @@ -5,7 +5,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * diff --git a/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php b/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php index b230b49d9..e0fdbd70a 100644 --- a/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php +++ b/application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php @@ -101,7 +101,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com * Assign the found characters to variable and use the last entry from * stack as the name. */ - parent::assignVariable($this->getStackerInstance()->getNamed('announcement'), $characters); + parent::assignVariable($this->getStackerInstance()->getNamed('node_announcement'), $characters); } /** @@ -120,7 +120,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startAnnouncement () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', 'announcement'); + $this->getStackerInstance()->pushNamed('node_announcement', 'node_announcement'); } /** @@ -130,7 +130,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startAnnouncementData () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', 'announcement-data'); + $this->getStackerInstance()->pushNamed('node_announcement', 'announcement-data'); } /** @@ -140,7 +140,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startNodeStatus () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_NODE_STATUS); + $this->getStackerInstance()->pushNamed('node_announcement', self::ANNOUNCEMENT_DATA_NODE_STATUS); } /** @@ -150,7 +150,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startNodeMode () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_NODE_MODE); + $this->getStackerInstance()->pushNamed('node_announcement', self::ANNOUNCEMENT_DATA_NODE_MODE); } /** @@ -160,7 +160,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startListener () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', 'listener'); + $this->getStackerInstance()->pushNamed('node_announcement', 'listener'); } /** @@ -170,7 +170,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startTcpPort () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_TCP_PORT); + $this->getStackerInstance()->pushNamed('node_announcement', self::ANNOUNCEMENT_DATA_TCP_PORT); } /** @@ -180,7 +180,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startUdpPort () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_UDP_PORT); + $this->getStackerInstance()->pushNamed('node_announcement', self::ANNOUNCEMENT_DATA_UDP_PORT); } /** @@ -190,7 +190,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startSessionId () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_SESSION_ID); + $this->getStackerInstance()->pushNamed('node_announcement', self::ANNOUNCEMENT_DATA_SESSION_ID); } /** @@ -200,7 +200,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startExternalIp () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_EXTERNAL_IP); + $this->getStackerInstance()->pushNamed('node_announcement', self::ANNOUNCEMENT_DATA_EXTERNAL_IP); } /** @@ -210,7 +210,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startInternalIp () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', self::ANNOUNCEMENT_DATA_INTERNAL_IP); + $this->getStackerInstance()->pushNamed('node_announcement', self::ANNOUNCEMENT_DATA_INTERNAL_IP); } /** @@ -220,7 +220,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startObjectTypeList () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', 'object-type-list'); + $this->getStackerInstance()->pushNamed('node_announcement', 'object-type-list'); } /** @@ -230,7 +230,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function startObjectType () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement', 'object-type'); + $this->getStackerInstance()->pushNamed('node_announcement', 'object-type'); } /** @@ -240,7 +240,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishObjectType () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -250,7 +250,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishObjectTypeList () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -260,7 +260,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishSessionId () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -270,7 +270,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishInternalIp () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -280,7 +280,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishExternalIp () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -290,7 +290,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishUdpPort () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -300,7 +300,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishTcpPort () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -310,7 +310,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishListener () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -320,7 +320,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishNodeMode () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -330,7 +330,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishNodeStatus () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -340,7 +340,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishAnnouncementData () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } /** @@ -350,7 +350,7 @@ class XmlAnnouncementTemplateEngine extends BaseXmlTemplateEngine implements Com */ protected function finishAnnouncement () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement'); + $this->getStackerInstance()->popNamed('node_announcement'); } } diff --git a/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php b/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php index 62fc3212c..7fbaa465e 100644 --- a/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php +++ b/application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php @@ -108,7 +108,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen * Assign the found characters to variable and use the last entry from * stack as the name. */ - parent::assignVariable($this->getStackerInstance()->getNamed('announcement_answer'), $characters); + parent::assignVariable($this->getStackerInstance()->getNamed('node_announcement_answer'), $characters); } /** @@ -127,7 +127,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startAnnouncementAnswer () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', 'announcement-answer'); + $this->getStackerInstance()->pushNamed('node_announcement_answer', 'announcement-answer'); } /** @@ -137,7 +137,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startMyData () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', 'my-data'); + $this->getStackerInstance()->pushNamed('node_announcement_answer', 'my-data'); } /** @@ -147,7 +147,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startMyExternalIp () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_EXTERNAL_IP); + $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_EXTERNAL_IP); } /** @@ -157,7 +157,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startMyInternalIp () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_INTERNAL_IP); + $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_INTERNAL_IP); } /** @@ -167,7 +167,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startMyTcpPort () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_TCP_PORT); + $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_TCP_PORT); } /** @@ -177,7 +177,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startMyUdpPort () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_UDP_PORT); + $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_UDP_PORT); } /** @@ -187,7 +187,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startMySessionId () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_SESSION_ID); + $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_SESSION_ID); } /** @@ -197,7 +197,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startMyStatus () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_NODE_STATUS); + $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_NODE_STATUS); } /** @@ -207,7 +207,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishMyStatus () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -217,7 +217,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishMySessionId () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -227,7 +227,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishMyUdpPort () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -237,7 +237,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishMyTcpPort () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -247,7 +247,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishMyInternalIp () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -257,7 +257,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishMyExternalIp () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -267,7 +267,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishMyData () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -277,7 +277,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startYourData () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', 'your-data'); + $this->getStackerInstance()->pushNamed('node_announcement_answer', 'your-data'); } /** @@ -287,7 +287,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startYourExternalIp () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', 'your-external-ip'); + $this->getStackerInstance()->pushNamed('node_announcement_answer', 'your-external-ip'); } /** @@ -297,7 +297,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startYourInternalIp () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', 'your-internal-ip'); + $this->getStackerInstance()->pushNamed('node_announcement_answer', 'your-internal-ip'); } /** @@ -307,7 +307,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startYourSessionId () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', 'your-session-id'); + $this->getStackerInstance()->pushNamed('node_announcement_answer', 'your-session-id'); } /** @@ -317,7 +317,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishYourSessionId () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -327,7 +327,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishYourInternalIp () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -337,7 +337,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishYourExternalIp () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -347,7 +347,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishYourData () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -357,7 +357,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function startAnswerStatus () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('announcement_answer', self::ANNOUNCEMENT_DATA_ANSWER_STATUS); + $this->getStackerInstance()->pushNamed('node_announcement_answer', self::ANNOUNCEMENT_DATA_ANSWER_STATUS); } /** @@ -367,7 +367,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishAnswerStatus () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } /** @@ -377,7 +377,7 @@ class XmlAnnouncementAnswerTemplateEngine extends BaseXmlTemplateEngine implemen */ protected function finishAnnouncementAnswer () { // Pop the last entry - $this->getStackerInstance()->popNamed('announcement_answer'); + $this->getStackerInstance()->popNamed('node_announcement_answer'); } } diff --git a/application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php b/application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php index b58d883d3..0f3373647 100644 --- a/application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php +++ b/application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php @@ -83,7 +83,7 @@ class XmlRequestNodeListAnswerTemplateEngine extends BaseXmlTemplateEngine imple * Assign the found characters to variable and use the last entry from * stack as the name. */ - parent::assignVariable($this->getStackerInstance()->getNamed('request_node_list_answer'), $characters); + parent::assignVariable($this->getStackerInstance()->getNamed('node_request_node_list_answer'), $characters); } /** @@ -96,23 +96,23 @@ class XmlRequestNodeListAnswerTemplateEngine extends BaseXmlTemplateEngine imple } /** - * Starts the announcement-answer + * Starts the 'request-node-list-answer' * * @return void */ protected function startRequestNodeListAnswer () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('request_node_list_answer', 'announcement-answer'); + $this->getStackerInstance()->pushNamed('node_request_node_list_answer', 'request-node-list-answer'); } /** - * Finishes the announcement-answer + * Finishes the 'request-node-list-answer' * * @return void */ protected function finishRequestNodeListAnswer () { // Pop the last entry - $this->getStackerInstance()->popNamed('request_node_list_answer'); + $this->getStackerInstance()->popNamed('node_request_node_list_answer'); } } diff --git a/application/hub/main/template/class_BaseXmlTemplateEngine.php b/application/hub/main/template/class_BaseXmlTemplateEngine.php index 761dd62b5..ba1b9b8b8 100644 --- a/application/hub/main/template/class_BaseXmlTemplateEngine.php +++ b/application/hub/main/template/class_BaseXmlTemplateEngine.php @@ -113,7 +113,7 @@ class BaseXmlTemplateEngine extends BaseTemplateEngine { $stackerInstance = ObjectFactory::createObjectByConfiguredName($typePrefix . '_' . $xmlTemplateType . '_stacker_class'); // Init stacker - $stackerInstance->initStacker($xmlTemplateType); + $stackerInstance->initStacker($typePrefix . '_' . $xmlTemplateType); // Set it $this->setStackerInstance($stackerInstance); diff --git a/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php b/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php index 8396117cf..6afba47d8 100644 --- a/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php +++ b/application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php @@ -90,7 +90,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp * Assign the found characters to variable and use the last entry from * stack as the name */ - parent::assignVariable($this->getStackerInstance()->getNamed('self_connect'), $characters); + parent::assignVariable($this->getStackerInstance()->getNamed('node_self_connect'), $characters); } /** @@ -109,7 +109,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp */ protected function startSelfConnect () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('self_connect', 'self-connect'); + $this->getStackerInstance()->pushNamed('node_self_connect', 'self-connect'); } /** @@ -119,7 +119,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp */ protected function startSelfConnectData () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('self_connect', 'self-connect-data'); + $this->getStackerInstance()->pushNamed('node_self_connect', 'self-connect-data'); } /** @@ -129,7 +129,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp */ protected function startNodeId () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('self_connect', self::SELF_CONNECT_DATA_NODE_ID); + $this->getStackerInstance()->pushNamed('node_self_connect', self::SELF_CONNECT_DATA_NODE_ID); } /** @@ -139,7 +139,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp */ protected function startSessionId () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('self_connect', self::SELF_CONNECT_DATA_SESSION_ID); + $this->getStackerInstance()->pushNamed('node_self_connect', self::SELF_CONNECT_DATA_SESSION_ID); } /** @@ -149,7 +149,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp */ protected function finishSessionId () { // Pop the last entry - $this->getStackerInstance()->popNamed('self_connect'); + $this->getStackerInstance()->popNamed('node_self_connect'); } /** @@ -159,7 +159,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp */ protected function finishNodeId () { // Pop the last entry - $this->getStackerInstance()->popNamed('self_connect'); + $this->getStackerInstance()->popNamed('node_self_connect'); } /** @@ -169,7 +169,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp */ protected function finishSelfConnectData () { // Pop the last entry - $this->getStackerInstance()->popNamed('self_connect'); + $this->getStackerInstance()->popNamed('node_self_connect'); } /** @@ -179,7 +179,7 @@ class XmlSelfConnectTemplateEngine extends BaseXmlTemplateEngine implements Comp */ protected function finishSelfConnect () { // Pop the last entry - $this->getStackerInstance()->popNamed('self_connect'); + $this->getStackerInstance()->popNamed('node_self_connect'); } } diff --git a/application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php b/application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php index d6284a895..751e9f8ab 100644 --- a/application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php +++ b/application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php @@ -100,7 +100,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C } // END - if // Get current XML node name as an array index - $nodeName = $this->getStackerInstance()->getNamed('object_registry'); + $nodeName = $this->getStackerInstance()->getNamed('node_object_registry'); // Is the node name self::OBJECT_TYPE_DATA_NAME? if ($nodeName == self::OBJECT_TYPE_DATA_NAME) { @@ -128,7 +128,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function startObjectRegistry () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('object_registry', 'object-registry'); + $this->getStackerInstance()->pushNamed('node_object_registry', 'object-registry'); } /** @@ -140,7 +140,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function startObjectList ($objectCount) { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('object_registry', 'object-list'); + $this->getStackerInstance()->pushNamed('node_object_registry', 'object-list'); } /** @@ -150,7 +150,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function startObjectListEntry () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('object_registry', 'object-list'); + $this->getStackerInstance()->pushNamed('node_object_registry', 'object-list'); } /** @@ -160,7 +160,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function startObjectName () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('object_registry', self::OBJECT_TYPE_DATA_NAME); + $this->getStackerInstance()->pushNamed('node_object_registry', self::OBJECT_TYPE_DATA_NAME); } /** @@ -170,7 +170,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function startObjectRecipientLimitation () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('object_registry', self::OBJECT_TYPE_DATA_RECIPIENT_LIMITATION); + $this->getStackerInstance()->pushNamed('node_object_registry', self::OBJECT_TYPE_DATA_RECIPIENT_LIMITATION); } /** @@ -180,7 +180,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function startObjectMaxSpread () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('object_registry', self::OBJECT_TYPE_DATA_MAX_SPREAD); + $this->getStackerInstance()->pushNamed('node_object_registry', self::OBJECT_TYPE_DATA_MAX_SPREAD); } /** @@ -190,7 +190,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function startObjectProtocol () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('object_registry', self::OBJECT_TYPE_DATA_PROTOCOL); + $this->getStackerInstance()->pushNamed('node_object_registry', self::OBJECT_TYPE_DATA_PROTOCOL); } /** @@ -200,7 +200,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function startObjectRecipientType () { // Push the node name on the stacker - $this->getStackerInstance()->pushNamed('object_registry', self::OBJECT_TYPE_DATA_RECIPIENT_TYPE); + $this->getStackerInstance()->pushNamed('node_object_registry', self::OBJECT_TYPE_DATA_RECIPIENT_TYPE); } /** @@ -210,7 +210,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function finishObjectRecipientType () { // Pop the last entry - $this->getStackerInstance()->popNamed('object_registry'); + $this->getStackerInstance()->popNamed('node_object_registry'); } /** @@ -220,7 +220,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function finishObjectProtocol () { // Pop the last entry - $this->getStackerInstance()->popNamed('object_registry'); + $this->getStackerInstance()->popNamed('node_object_registry'); } /** @@ -230,7 +230,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function finishObjectMaxSpread () { // Pop the last entry - $this->getStackerInstance()->popNamed('object_registry'); + $this->getStackerInstance()->popNamed('node_object_registry'); } /** @@ -240,7 +240,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function finishObjectRecipientLimitation () { // Pop the last entry - $this->getStackerInstance()->popNamed('object_registry'); + $this->getStackerInstance()->popNamed('node_object_registry'); } /** @@ -250,7 +250,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function finishObjectName () { // Pop the last entry - $this->getStackerInstance()->popNamed('object_registry'); + $this->getStackerInstance()->popNamed('node_object_registry'); } /** @@ -260,7 +260,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function finishObjectListEntry () { // Pop the last entry - $this->getStackerInstance()->popNamed('object_registry'); + $this->getStackerInstance()->popNamed('node_object_registry'); } /** @@ -270,7 +270,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function finishObjectList () { // Pop the last entry - $this->getStackerInstance()->popNamed('object_registry'); + $this->getStackerInstance()->popNamed('node_object_registry'); } /** @@ -280,7 +280,7 @@ class XmlObjectRegistryTemplateEngine extends BaseXmlTemplateEngine implements C */ protected function finishObjectRegistry () { // Pop the last entry - $this->getStackerInstance()->popNamed('object_registry'); + $this->getStackerInstance()->popNamed('node_object_registry'); } } diff --git a/application/hub/main/template/producer/work_units/.htaccess b/application/hub/main/template/producer/work_units/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/main/template/producer/work_units/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/templates/xml/.xml b/application/hub/templates/xml/.xml index 2c43e5c66..329bedd5a 100644 --- a/application/hub/templates/xml/.xml +++ b/application/hub/templates/xml/.xml @@ -4,7 +4,7 @@ @author Roland Haeder @version 0.0.0 -@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team +@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team @license GNU GPL 3.0 or any newer version @link http://www.ship-simu.org diff --git a/application/hub/templates/xml/answer/announcement/announcement_answer.xml b/application/hub/templates/xml/answer/announcement/announcement_answer.xml index 647ad9825..706869311 100644 --- a/application/hub/templates/xml/answer/announcement/announcement_answer.xml +++ b/application/hub/templates/xml/answer/announcement/announcement_answer.xml @@ -5,7 +5,7 @@ be used to indicate that this node does not want to receive announcements. @author Roland Haeder @version 0.0.0 -@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team +@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team @license GNU GPL 3.0 or any newer version @link http://www.ship-simu.org diff --git a/application/hub/templates/xml/answer/requests/request_node_list_answer.xml b/application/hub/templates/xml/answer/requests/request_node_list_answer.xml index 128244482..b7e0bd2f4 100644 --- a/application/hub/templates/xml/answer/requests/request_node_list_answer.xml +++ b/application/hub/templates/xml/answer/requests/request_node_list_answer.xml @@ -4,7 +4,7 @@ An XML template for answering node-list requests @author Roland Haeder @version 0.0.0 -@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team +@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team @license GNU GPL 3.0 or any newer version @link http://www.ship-simu.org diff --git a/application/hub/templates/xml/cruncher/producer/test_unit.xml b/application/hub/templates/xml/cruncher/producer/test_unit.xml index 0b446d3c5..5342f2914 100644 --- a/application/hub/templates/xml/cruncher/producer/test_unit.xml +++ b/application/hub/templates/xml/cruncher/producer/test_unit.xml @@ -21,7 +21,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see //--> - + @@ -66,4 +66,4 @@ along with this program. If not, see - + diff --git a/application/hub/templates/xml/cruncher/producer/work_unit.xml b/application/hub/templates/xml/cruncher/producer/work_unit.xml index 6beb20beb..7268d6dfc 100644 --- a/application/hub/templates/xml/cruncher/producer/work_unit.xml +++ b/application/hub/templates/xml/cruncher/producer/work_unit.xml @@ -21,7 +21,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see //--> - + @@ -70,4 +70,4 @@ along with this program. If not, see - + diff --git a/application/hub/templates/xml/requests/request_node_list.xml b/application/hub/templates/xml/requests/request_node_list.xml index bb9031423..b778d99f7 100644 --- a/application/hub/templates/xml/requests/request_node_list.xml +++ b/application/hub/templates/xml/requests/request_node_list.xml @@ -5,7 +5,7 @@ transmitted. @author Roland Haeder @version 0.0.0 -@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team +@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team @license GNU GPL 3.0 or any newer version @link http://www.ship-simu.org -- 2.39.5