You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cr...@apache.org on 2006/03/23 06:17:19 UTC
svn commit: r388041 [1/10] - in /cocoon/trunk: ./
cocoon-ajax/cocoon-ajax-impl/src/main/java/org/apache/cocoon/ajax/resources/macros/
cocoon-ajax/cocoon-ajax-impl/src/main/java/org/apache/cocoon/ajax/resources/xslt/
cocoon-ajax/cocoon-ajax-sample/src/m...
Author: crossley
Date: Wed Mar 22 21:16:59 2006
New Revision: 388041
URL: http://svn.apache.org/viewcvs?rev=388041&view=rev
Log:
Fix missing 'svn propset svn:eol-style native' for text files.
Remove dos line-endings for some files.
Modified:
cocoon/trunk/README.blocksmode.txt (props changed)
cocoon/trunk/README.m10n.txt (props changed)
cocoon/trunk/README.osgi.txt (contents, props changed)
cocoon/trunk/cocoon-ajax/cocoon-ajax-impl/src/main/java/org/apache/cocoon/ajax/resources/macros/timedbrowserupdater.xml (props changed)
cocoon/trunk/cocoon-ajax/cocoon-ajax-impl/src/main/java/org/apache/cocoon/ajax/resources/xslt/ajax-styling.xsl (props changed)
cocoon/trunk/cocoon-ajax/cocoon-ajax-sample/src/main/resources/samples/ajax.xsamples (props changed)
cocoon/trunk/cocoon-archetypes/pom.xml (props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/MonolithicCocoonDeployer.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer23.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/MonolithicServer23.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/FileAlreadyDeployedException.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/FileDeployer.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/NoRuleFoundException.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/SingleFileDeployer.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/util/WildcardHelper.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/cob-schema-1.0.xsd (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/deploy-schema-1.0.xsd (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/sample-block.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/sample-deploy.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/resources/xsd/sample-wiring.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/applicationserver/MonoliticServerTest.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/monolithic/SingleFileDeployerTest.java (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validBlock-02/blockRoot/META-INF/block.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validBlock-03/blockRoot/META-INF/block.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validBlock-04/blockRoot/META-INF/block.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validBlock-05/blockRoot/META-INF/block.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validBlock-06/blockRoot/META-INF/block.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validBlock-07/blockRoot/META-INF/block.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validDeploy-02/deploy.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validDeploy-03/deploy.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validDeploy-04/deploy.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validMonolithicBlock-02/blockRoot/COB-INF/block-sitemap.xmap (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validMonolithicBlock-02/blockRoot/COB-INF/test.xml (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validMonolithicBlock-02/blockRoot/META-INF/legacy/sitemap-additions/sa.xmap (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/test/mocks/validMonolithicBlock-02/blockRoot/META-INF/legacy/xconf/my-webdav-server.xconf (contents, props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-plugin-demo/src/main/resources/META-INF/legacy/xconf/test.xconf (props changed)
cocoon/trunk/cocoon-block-deployer/cocoon-deployer-webapp-sample/pom.xml (contents, props changed)
cocoon/trunk/cocoon-blocks-fw/cocoon-blocks-fw-ecm-impl/src/main/java/org/apache/cocoon/core/container/handler/PoolableComponentHandlerMBean.java (props changed)
cocoon/trunk/cocoon-blocks-fw/cocoon-blocks-fw-ecm-impl/src/main/java/org/apache/cocoon/core/container/handler/PoolableComponentHandlerObserver.java (props changed)
cocoon/trunk/cocoon-blocks-fw/cocoon-blocks-fw-ecm-impl/src/main/java/org/apache/cocoon/core/container/handler/SingleThreadedComponentHandlerMBean.java (props changed)
cocoon/trunk/cocoon-blocks-fw/cocoon-blocks-fw-ecm-impl/src/main/java/org/apache/cocoon/core/container/handler/mbean.properties (props changed)
cocoon/trunk/cocoon-blocks-fw/cocoon-blocks-fw-ecm-impl/src/main/java/org/apache/cocoon/util/JMXUtils.java (props changed)
cocoon/trunk/cocoon-blocks-fw/cocoon-blocks-fw-servlet-impl/src/test/java/org/apache/cocoon/blocks/servlet/BlocksManagerTestCase.java (contents, props changed)
cocoon/trunk/cocoon-captcha/cocoon-captcha-impl/src/main/java/org/apache/cocoon/reading/CaptchaReader.java (props changed)
cocoon/trunk/cocoon-captcha/cocoon-captcha-sample/src/main/resources/samples/captcha.js (props changed)
cocoon/trunk/cocoon-captcha/cocoon-captcha-sample/src/main/resources/samples/captcha.xsamples (props changed)
cocoon/trunk/cocoon-captcha/cocoon-captcha-sample/src/main/resources/samples/custom.xhtml (props changed)
cocoon/trunk/cocoon-captcha/cocoon-captcha-sample/src/main/resources/samples/simple-failure.jx (props changed)
cocoon/trunk/cocoon-captcha/cocoon-captcha-sample/src/main/resources/samples/simple-success.jx (props changed)
cocoon/trunk/cocoon-captcha/cocoon-captcha-sample/src/main/resources/samples/simple.jx (props changed)
cocoon/trunk/cocoon-captcha/cocoon-captcha-sample/src/main/resources/samples/sitemap.xmap (props changed)
cocoon/trunk/cocoon-captcha/cocoon-captcha-sample/src/main/resources/samples/welcome.xml (props changed)
cocoon/trunk/cocoon-core-components/pom.xml (contents, props changed)
cocoon/trunk/cocoon-core-components/src/main/resources/META-INF/block.xml (contents, props changed)
cocoon/trunk/cocoon-core-components/src/main/resources/META-INF/core-components.xconf (contents, props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/flow/ContinuationsManagerImplMBean.java (props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/flow/mbean.properties (props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/http/ContextURLException.java (contents, props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/http/RequestEncodingException.java (contents, props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/internal/EnvironmentHelperException.java (contents, props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/internal/UnableToPopEnvironmentException.java (contents, props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/internal/UnableToPushEnvironmentException.java (contents, props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/generation/RequestParseException.java (contents, props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/util/jmx/ModelMBeanImpl.java (props changed)
cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/util/jmx/TypeUtil.java (props changed)
cocoon/trunk/cocoon-core/src/main/resources/org/apache/cocoon/components/flow/mbean.properties (props changed)
cocoon/trunk/cocoon-core/src/main/resources/org/apache/cocoon/components/store/impl/ehcache.xml (contents, props changed)
cocoon/trunk/cocoon-core/src/main/resources/org/apache/cocoon/core/container/handler/mbean.properties (props changed)
cocoon/trunk/cocoon-core/src/test/java/org/apache/cocoon/acting/LocaleActionTestCase.java (props changed)
cocoon/trunk/cocoon-core/src/test/resources/org/apache/cocoon/acting/LocaleActionTestCase.xtest (contents, props changed)
cocoon/trunk/cocoon-core/src/test/resources/org/apache/cocoon/selection/RegexpHeaderSelectorTestCase.xtest (props changed)
cocoon/trunk/cocoon-databases/cocoon-databases-impl/src/main/resources/org/apache/cocoon/components/database/database.roles (props changed)
cocoon/trunk/cocoon-default/pom.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/convertor/BeanConvertor.java (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/datatype/convertor/BeanConvertorBuilder.java (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Team.java (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/samples/dreamteam/TeamMember.java (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/system/i18n/messages_el.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/forms.roles (contents, props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/test/java/org/apache/cocoon/forms/datatype/validationruleimpl/EmailValidationRuleTest.java (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/test/java/org/apache/cocoon/forms/formmodel/FieldTestCase.xtest (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/test/java/org/apache/cocoon/forms/formmodel/GroupTestCase.xtest (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/content/main.jx (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/content/showTeam.jx (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/content/soccer.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/content/teamBind.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/content/teamDef.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/content/teamTemplate.jx (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/flow/team.js (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/messages/DreamTeamMessages.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/messages/DreamTeamMessages_de.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/messages/DreamTeamMessages_it.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/messages/FormsMessages.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/messages/FormsMessages_nl_NL.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/resources/styles/dreamteam.css (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/dreamteam/sitemap.xmap (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/forms/binding/01value-template.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/forms/binding/02lenient-template.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/forms/binding/05custom-template.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/forms/binding/06namespaced-data.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/forms/form1_template_action_jx-macro.xml (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/swan/resources/css/swan_sections.css (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/swan/resources/swan.xsl (props changed)
cocoon/trunk/cocoon-forms/cocoon-forms-sample/src/main/resources/samples/xsl/xhr_carfilter.xsl (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/jaas.config (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/repository/meta/rep.properties (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/repository/meta/rootUUID (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/repository/namespaces/ns_reg.properties (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/versions/data/dead/beef/facebabecafebabecafebabe/.node.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/versions/data/dead/beef/facebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/.node.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/data/cafe/babe/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/.node.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/data/dead/beef/cafebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/.node.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/data/dead/beef/cafecafecafebabecafebabe/672388333465d36a71297afb5d46001f.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/.node.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/data/dead/beef/facebabecafebabecafebabe/672388333465d36a71297afb5d46001f.xml (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/index/ns_mappings.properties (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/index/redo.log (props changed)
cocoon/trunk/cocoon-jcr/cocoon-jcr-sample/src/main/resources/samples/repotest/workspaces/default/workspace.xml (props changed)
cocoon/trunk/cocoon-mocks/src/main/java/com/sun/tools/javac/Main.java (props changed)
cocoon/trunk/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/tools/service/UserRightsService.java (props changed)
cocoon/trunk/cocoon-portal/cocoon-portal-sample/src/main/resources/WEB-INF/xconf/cocoon-portal-sample.xconf (contents, props changed)
cocoon/trunk/cocoon-portal/cocoon-portal-sample/src/main/resources/samples/conf/cocoon-portal-sample.xconf (contents, props changed)
cocoon/trunk/cocoon-portal/cocoon-portal-sample/src/main/resources/samples/portal-sample.xsamples (contents, props changed)
cocoon/trunk/cocoon-session-fw/cocoon-session-fw-sample/src/main/webapp/samples/blocks/session-fw/session-fw.xsamples
cocoon/trunk/cocoon-session-fw/cocoon-session-fw-sample/src/main/webapp/samples/blocks/session-fw/sitemap.xmap
cocoon/trunk/cocoon-template/cocoon-template-impl/src/main/resources/Manifest.mf (contents, props changed)
cocoon/trunk/cocoon-template/cocoon-template-impl/src/main/resources/WEB-INF/xconf/cocoon-template-expression.xconf (contents, props changed)
cocoon/trunk/cocoon-template/cocoon-template-impl/src/main/resources/org/apache/cocoon/components/accessor/accessor.roles (props changed)
cocoon/trunk/cocoon-template/cocoon-template-impl/src/main/resources/org/apache/cocoon/components/expression/expression.roles (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/Schema.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/SchemaParser.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/ValidationHandler.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/Validator.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/ValidatorException.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/impl/AbstractSchema.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/impl/AbstractSchemaParser.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/impl/AbstractValidator.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/impl/CachingValidator.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/impl/DefaultValidationHandler.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/impl/DefaultValidator.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/impl/DraconianErrorHandler.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/impl/ValidationResolver.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/jaxp/JaxpInput.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/jaxp/JaxpResolver.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/jaxp/JaxpSchema.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/jaxp/JaxpSchemaParser.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/jing/JingReader.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/jing/JingResolver.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/jing/JingSchema.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/components/validation/jing/JingSchemaParser.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/transformation/ValidatingTransformer.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/transformation/ValidationReportTransformer.java (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-impl/src/main/resources/WEB-INF/sitemap-additions/cocoon-validation.xconf (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/schema-no.rng (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/schema-no.xsd (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/schema-ok.rng (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/schema-ok.xsd (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/sitemap.xmap (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/source-no.xml (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/source-ok.xml (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/validation.xsamples (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/validation.xslt (props changed)
cocoon/trunk/cocoon-validation/cocoon-validation-sample/src/main/resources/samples/welcome.xml (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/Manifest.mf (contents, props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/resources/scripts/prettycontent.js (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/resources/styles/prettycontent.css (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/blocks/filter-blocks.xsl (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/blocks/samples-pages.xml (contents, props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/common/style/xsl/html/adding-header.xsl (contents, props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/common/style/xsl/html/simple-header.xsl (contents, props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/spring/spring-app.xsamples (contents, props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/test/flowscript-dom-dump/dom-dump.js (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/test/flowscript-dom-dump/dom-dumper.jx.xml (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/test/flowscript-dom-dump/explain-test.xml (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/test/flowscript-dom-dump/sitemap.xmap (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/test/flowscript-dom-dump/test-transform.xsl (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/test/sitemap-annotations/explain-test.xml (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/test/sitemap-annotations/get-annotations.xsl (props changed)
cocoon/trunk/cocoon-webapp/src/main/webapp/samples/test/sitemap-annotations/sitemap.xmap (props changed)
cocoon/trunk/legal/batik-all-1.6.jar.license.txt (props changed)
cocoon/trunk/legal/jetty-5.1.8.jar.license.txt (props changed)
cocoon/trunk/legal/jetty-jmx-5.1.8.jar.license.txt (props changed)
cocoon/trunk/legal/knopflerfish-cm_api-1.0.0.jar.license.txt (contents, props changed)
cocoon/trunk/legal/knopflerfish-console_all-1.0.0.jar.license.txt (contents, props changed)
cocoon/trunk/legal/knopflerfish-consoletty-1.0.0.jar.license.txt (contents, props changed)
cocoon/trunk/legal/knopflerfish-framework-1.3.3.jar.txt (contents, props changed)
cocoon/trunk/legal/knopflerfish-frameworkcommands-1.0.0.jar.license.txt (contents, props changed)
cocoon/trunk/legal/knopflerfish-http_all-1.1.0.jar.license.txt (contents, props changed)
cocoon/trunk/legal/knopflerfish-log_all-1.0.0.jar.license.txt (contents, props changed)
cocoon/trunk/legal/knopflerfish-logcommands-1.0.0.jar.license.txt (contents, props changed)
cocoon/trunk/legal/knopflerfish.license.txt (contents, props changed)
cocoon/trunk/legal/mx4j-jmx-3.0.1.jar.license.txt (props changed)
cocoon/trunk/legal/osgi_copyright.txt (contents, props changed)
cocoon/trunk/legal/spring-1.2.6.jar.license.txt (contents, props changed)
cocoon/trunk/legal/xercesImpl-2.7.1.jar.license.txt (props changed)
cocoon/trunk/misc/graphics/cocoon2-naked.svg (contents, props changed)
cocoon/trunk/settings.xml (props changed)
cocoon/trunk/src/schema/cob-schema-1.0.xsd (contents, props changed)
cocoon/trunk/src/schema/deploy-schema-1.0.xsd (contents, props changed)
cocoon/trunk/src/schema/test-block.xml (contents, props changed)
cocoon/trunk/src/schema/test-deploy.xml (contents, props changed)
cocoon/trunk/src/schema/test-wiring.xml (contents, props changed)
cocoon/trunk/src/schema/wiring-schema-1.0.xsd (contents, props changed)
cocoon/trunk/src/test/anteater/flowscript-dom-dump.xml (props changed)
cocoon/trunk/src/test/anteater/sitemapAnnotationsFilter.xml (props changed)
cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Block.java (contents, props changed)
cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Cocoon.java (contents, props changed)
cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Descriptor.java (contents, props changed)
cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/EclipseClasspathBuilderTask.java (contents, props changed)
cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Library.java (contents, props changed)
cocoon/trunk/tools/block-builder/java/org/apache/cocoon/blockbuilder/ant/Source.java (contents, props changed)
cocoon/trunk/tools/block-builder/targets/block-descriptor2ant-script.xsl (props changed)
cocoon/trunk/tools/block-builder/targets/block-descriptor2eclipse-project.xsl (contents, props changed)
cocoon/trunk/tools/block-builder/targets/global.build.properties (contents, props changed)
cocoon/trunk/tools/external-project-build/generic-build.xml (props changed)
cocoon/trunk/tools/jetty/conf/admin-jmx.xml (props changed)
cocoon/trunk/tools/jetty/conf/jetty-start.config (props changed)
cocoon/trunk/tools/jetty/conf/main-jmx.xml (props changed)
cocoon/trunk/tools/jmeter/CalculatorFlow.jmx (contents, props changed)
cocoon/trunk/tools/jmeter/CocoonForms.jmx (contents, props changed)
cocoon/trunk/tools/jmeter/CocoonForms_JXTemplate.jmx (contents, props changed)
Propchange: cocoon/trunk/README.blocksmode.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/README.m10n.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/README.osgi.txt
URL: http://svn.apache.org/viewcvs/cocoon/trunk/README.osgi.txt?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/README.osgi.txt (original)
+++ cocoon/trunk/README.osgi.txt Wed Mar 22 21:16:59 2006
@@ -1,47 +1,47 @@
-# Copyright 1999-2005 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License
-
-Cocoon can be run based on OSGi. You have to build Cocoon, start the OSGI
-framework and finally you should be able to access Cocoon from within your
-favorite webbrowser.
-
-*****************************************************************************
-This is experimental, see http://wiki.apache.org/cocoon/osgi for more info.
-*****************************************************************************
-
-To build and start under OSGI do:
-
- build osgi
- cocoon osgi or ./cocoon.sh osgi
- http://localhost:8888 and http://localhost:8888/samples/
-
-Note that once the (Knopflerfish) OSGI framework starts, you can press
-enter on the console to access the framework command line:
-
- ./cocoon.sh osgi
- ...
- Knopflerfish OSGi framework, version 3.3.6
- ...
- Started: file:build/osgi/org.apache.cocoon_servlet_1.0.0.jar (id#10)
-
-now type enter to get the prompt:
-
- > help
- Available command groups (type 'enter' to enter a group):
- session - Session commands built into the console
- logconfig - Configuration commands for the log.
- ...
-
-To stop the framework use the "shutdown" command.
-
+# Copyright 1999-2005 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
+
+Cocoon can be run based on OSGi. You have to build Cocoon, start the OSGI
+framework and finally you should be able to access Cocoon from within your
+favorite webbrowser.
+
+*****************************************************************************
+This is experimental, see http://wiki.apache.org/cocoon/osgi for more info.
+*****************************************************************************
+
+To build and start under OSGI do:
+
+ build osgi
+ cocoon osgi or ./cocoon.sh osgi
+ http://localhost:8888 and http://localhost:8888/samples/
+
+Note that once the (Knopflerfish) OSGI framework starts, you can press
+enter on the console to access the framework command line:
+
+ ./cocoon.sh osgi
+ ...
+ Knopflerfish OSGi framework, version 3.3.6
+ ...
+ Started: file:build/osgi/org.apache.cocoon_servlet_1.0.0.jar (id#10)
+
+now type enter to get the prompt:
+
+ > help
+ Available command groups (type 'enter' to enter a group):
+ session - Session commands built into the console
+ logconfig - Configuration commands for the log.
+ ...
+
+To stop the framework use the "shutdown" command.
+
Propchange: cocoon/trunk/README.osgi.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/cocoon-ajax/cocoon-ajax-impl/src/main/java/org/apache/cocoon/ajax/resources/macros/timedbrowserupdater.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/cocoon-ajax/cocoon-ajax-impl/src/main/java/org/apache/cocoon/ajax/resources/xslt/ajax-styling.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/cocoon-ajax/cocoon-ajax-sample/src/main/resources/samples/ajax.xsamples
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cocoon/trunk/cocoon-archetypes/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/MonolithicCocoonDeployer.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/MonolithicCocoonDeployer.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/MonolithicCocoonDeployer.java (original)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/MonolithicCocoonDeployer.java Wed Mar 22 21:16:59 2006
@@ -1,49 +1,49 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.deployer;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.cocoon.deployer.applicationserver.MonolithicServer23;
-import org.apache.cocoon.deployer.logger.Logger;
-import org.apache.cocoon.deployer.monolithic.SingleFileDeployer;
-
-/**
- * Deploy blocks to a monolithic Cocoon web application.
- */
-public class MonolithicCocoonDeployer {
-
- public static void deploy(Map libraries, File basedir, Logger logger) {
-
- MonolithicServer23 zipExtractor = new MonolithicServer23(basedir, logger);
- zipExtractor.addRule("**legacy**.xconf", new SingleFileDeployer("WEB-INF/xconf"));
- zipExtractor.addRule("**legacy**.xmap", new SingleFileDeployer("WEB-INF/sitemap-additions"));
-
- for(Iterator it = libraries.keySet().iterator(); it.hasNext();) {
- File lib = (File) libraries.get(it.next());
- try {
- // extract all configurations files
- zipExtractor.extract(lib);
- } catch (IOException e) {
- throw new DeploymentException("Can't deploy '" + lib.getAbsolutePath() + "'.", e);
- }
- }
- }
-
-}
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.deployer;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.cocoon.deployer.applicationserver.MonolithicServer23;
+import org.apache.cocoon.deployer.logger.Logger;
+import org.apache.cocoon.deployer.monolithic.SingleFileDeployer;
+
+/**
+ * Deploy blocks to a monolithic Cocoon web application.
+ */
+public class MonolithicCocoonDeployer {
+
+ public static void deploy(Map libraries, File basedir, Logger logger) {
+
+ MonolithicServer23 zipExtractor = new MonolithicServer23(basedir, logger);
+ zipExtractor.addRule("**legacy**.xconf", new SingleFileDeployer("WEB-INF/xconf"));
+ zipExtractor.addRule("**legacy**.xmap", new SingleFileDeployer("WEB-INF/sitemap-additions"));
+
+ for(Iterator it = libraries.keySet().iterator(); it.hasNext();) {
+ File lib = (File) libraries.get(it.next());
+ try {
+ // extract all configurations files
+ zipExtractor.extract(lib);
+ } catch (IOException e) {
+ throw new DeploymentException("Can't deploy '" + lib.getAbsolutePath() + "'.", e);
+ }
+ }
+ }
+
+}
Propchange: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/MonolithicCocoonDeployer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer23.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer23.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer23.java (original)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer23.java Wed Mar 22 21:16:59 2006
@@ -1,454 +1,454 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.deployer.applicationserver;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.ZipInputStream;
-
-import org.apache.cocoon.deployer.ArtifactProvider;
-import org.apache.cocoon.deployer.DeploymentException;
-import org.apache.cocoon.deployer.block.BinaryBlock;
-import org.apache.cocoon.deployer.block.Block;
-import org.apache.cocoon.deployer.block.LocalBlock;
-import org.apache.cocoon.deployer.filemanager.FileManager;
-import org.apache.cocoon.deployer.filemanager.FileManagerException;
-import org.apache.cocoon.deployer.generated.block.x10.Property;
-import org.apache.cocoon.deployer.generated.wiring.x10.Mount;
-import org.apache.cocoon.deployer.generated.wiring.x10.Wiring;
-import org.apache.cocoon.deployer.logger.Logger;
-import org.apache.cocoon.deployer.resolver.VariableResolver;
-import org.apache.cocoon.deployer.util.FileUtils;
-import org.apache.cocoon.deployer.util.XMLUtils;
-import org.apache.cocoon.deployer.util.ZipUtils;
-import org.apache.commons.lang.Validate;
-import org.exolab.castor.xml.MarshalException;
-import org.exolab.castor.xml.ValidationException;
-import org.xml.sax.SAXException;
-
-public class BlocksFrameworkServer23 implements BlocksFrameworkServer {
-
- public static final String WIRING_10_NAMESPACE = "http://apache.org/cocoon/blocks/wiring/1.0";
- public static final String WIRING_FILE = "WEB-INF/wiring.xml";
- public static final String WEB_INF_LIBS_DIR = "WEB-INF/lib";
- public static final String BLOCKS_DIR = "/blocks/";
-
- private boolean exclusive = false;
- private URI baseDirectory;
- private VariableResolver variableResolver;
- private ArtifactProvider artifactProvider;
- private int lastDir = 0;
-
- /**
- * Deploy an array of blocks. This operation wrapped by a filesystem transaction so that either
- * all or any blocks get deployed. Note that the used filesystem transaction implementation only
- * supports transactions within a single thread. Therefore this method is synchronized.
- */
- public synchronized boolean deploy(Block[] blocks, String serverArtifact, File[] libraries, Logger log, boolean transactional) {
- Validate.notNull(blocks, "A blocks object (Block[]) has to be passed to this method!");
- Validate.notNull(libraries, "A libraries object (File[]) has to passed to this method!");
-
- // create transaction context
- FileManager frm = FileUtils.createFileManager(this.baseDirectory, transactional);
-
- try {
- File baseDirectoryFile = new File(this.baseDirectory);
-
- // install the Cocoon server if necessary
- if(baseDirectoryFile.list().length == 0 && serverArtifact != null) {
- deployCocoonServer(frm, "", serverArtifact);
- }
-
- // get the wiring, in exclusive mode from scratch, else take the existing one
- Wiring wiring = getWiring(log, frm);
-
- // install all passed blocks
- installBlocks(blocks, wiring, frm, baseDirectoryFile);
-
- // install libraries
- installLibraries(libraries, log, frm);
-
- // write the wiring
- writeWiring(wiring, frm);
-
- // committ transaction
- frm.commitTransaction();
-
- } catch(Exception ex) {
- try {
- frm.rollbackTransaction(ex);
- String msg = "Filesystem changes have been rolled back. No block has been installed!";
- throw new DeploymentException(msg, ex);
- } catch (FileManagerException e) {
- throw new DeploymentException("A problem occurred when roling back the filesystem changes.");
- }
- }
-
- return false;
- }
-
- /**
- * Write the wiring by marshalling the <code>Wiring</code> object.
- */
- protected void writeWiring(Wiring wiring, FileManager frm)
- throws FileManagerException, MarshalException, ValidationException, IOException {
-
- OutputStream out = frm.writeResource(WIRING_FILE);
- wiring.marshal(new OutputStreamWriter(out));
- out.close();
- }
-
- /**
- * Install all blocks and adapt wiring.xml. Installing either means copying or just referencing the location
- * in wiring.xml.
- */
- protected void installBlocks(Block[] blocks, Wiring wiring, FileManager frm, File baseDirectoryFile) {
- Map installedBlocks = new HashMap();
-
- for(int i = 0; i < blocks.length; i++) {
- Block block = blocks[i];
-
- org.apache.cocoon.deployer.generated.deploy.x10.Block deployBlock =
- (org.apache.cocoon.deployer.generated.deploy.x10.Block) block.getDeployDescriptor();
- org.apache.cocoon.deployer.generated.block.x10.Block blockDesc =
- (org.apache.cocoon.deployer.generated.block.x10.Block) block.getBlockDescriptor();
-
- // create the wiring object
- org.apache.cocoon.deployer.generated.wiring.x10.Block wiringBlock =
- createWiring10BlockInstance(deployBlock, blockDesc);
-
- // in the case of a binary block, unpack it into the blocks directory
- if (block instanceof BinaryBlock) {
- BinaryBlock binaryBlock = (BinaryBlock) block;
- // check if the block has already been unpacked
- if(!installedBlocks.containsKey(block.getId())) {
- String nextDirectory = intDirToStringDirConvert(
- getNextDirectory(new File(baseDirectoryFile, BLOCKS_DIR), this.lastDir));
- this.lastDir = Integer.parseInt(nextDirectory);
- String installDirectory = BLOCKS_DIR + nextDirectory + "/";
- wiringBlock.setLocation(installDirectory);
- deployBlock(binaryBlock, frm, BLOCKS_DIR + nextDirectory);
- installedBlocks.put(block.getId(), installDirectory);
- } else {
- wiringBlock.setLocation((String) installedBlocks.get(block.getId()));
- }
- }
- else if(block instanceof LocalBlock) {
- LocalBlock localBlock = (LocalBlock) block;
- wiringBlock.setLocation(localBlock.getBaseDirectory());
- }
- wiring.addBlock(wiringBlock);
- }
- }
-
- /**
- * Get the wiring object. Depending on the mode (exclusive/non-exclusive) either a new one is created
- * or the existing one is returned.
- */
- protected Wiring getWiring(Logger log, FileManager frm) throws SAXException, IOException, FileManagerException, MarshalException, ValidationException {
- Wiring wiring = null;
- if(this.isExclusive()) {
- wiring = new Wiring();
- } else {
- // check wiring version
- String wiringVersion = XMLUtils.getDocumentNamespace(frm.readResource(WIRING_FILE));
- if(!WIRING_10_NAMESPACE.equals(wiringVersion)) {
- String msg = "The deployer only supports " + WIRING_10_NAMESPACE + " files.";
- log.error(msg);
- throw new DeploymentException(msg);
- }
- wiring = (Wiring) Wiring.unmarshal(new InputStreamReader(frm.readResource(WIRING_FILE)));
- }
- return wiring;
- }
-
- /*
- * TODO What happens if two libraries have the same filename by chance ...?
- */
- protected void installLibraries(File[] libraries, Logger log, FileManager frm)
- throws IOException, FileNotFoundException, FileManagerException {
-
- for(int i = 0; i < libraries.length; i++) {
- File lib = libraries[i];
-
- // check if a library is a block, if yes, don't add it to WEB_INF_LIBS_DIR
- boolean isBlock = true;
- try {
- ZipUtils.getBlockDescriptorIs(lib);
- } catch(FileNotFoundException fnfe) {
- isBlock = false;
- }
-
- if(!isBlock) {
- String libName = WEB_INF_LIBS_DIR + "/" + lib.getName();
- log.info("Installing library " + libName);
- FileUtils.copy(new FileInputStream(lib), frm.writeResource(libName));
- }
- }
- }
-
- /**
- * Create the wired block information.
- *
- * @return a wired block descriptor
- */
- protected org.apache.cocoon.deployer.generated.wiring.x10.Block createWiring10BlockInstance(
- org.apache.cocoon.deployer.generated.deploy.x10.Block deployBlock,
- org.apache.cocoon.deployer.generated.block.x10.Block blockDesc) {
-
- org.apache.cocoon.deployer.generated.wiring.x10.Block wiringBlock =
- new org.apache.cocoon.deployer.generated.wiring.x10.Block();
-
- // id
- wiringBlock.setId(deployBlock.getId());
-
- // location
- wiringBlock.setLocation(deployBlock.getLocation());
-
- // mount
- Mount wiringMount = new Mount();
- org.apache.cocoon.deployer.generated.deploy.x10.Mount deployMount = deployBlock.getMount();
- if(deployMount != null) {
- wiringMount.setPath(deployMount.getPath());
- wiringBlock.setMount(wiringMount);
- }
-
-
- // connections
- org.apache.cocoon.deployer.generated.wiring.x10.Connections wiringConnections =
- new org.apache.cocoon.deployer.generated.wiring.x10.Connections();
-
- if(deployBlock.getConnections() != null) {
- org.apache.cocoon.deployer.generated.deploy.x10.Connection[] deployConnections =
- deployBlock.getConnections().getConnection();
-
- for(int i = 0; i < deployConnections.length; i++) {
- org.apache.cocoon.deployer.generated.deploy.x10.Connection deployConnection = deployConnections[i];
- org.apache.cocoon.deployer.generated.wiring.x10.Connection wiringConnection =
- new org.apache.cocoon.deployer.generated.wiring.x10.Connection();
- wiringConnection.setBlock(deployConnection.getBlock());
- wiringConnection.setName(deployConnection.getName());
- wiringConnections.addConnection(wiringConnection);
- }
- wiringBlock.setConnections(wiringConnections);
- }
-
- // properties
- if(blockDesc.getProperties() != null) {
- Property[] properties = blockDesc.getProperties().getProperty();
- org.apache.cocoon.deployer.generated.wiring.x10.Properties wiringProperties =
- new org.apache.cocoon.deployer.generated.wiring.x10.Properties();
-
- for(int i = 0; i < properties.length; i++) {
- Property property = properties[i];
- String name = property.getName();
-
- org.apache.cocoon.deployer.generated.wiring.x10.Property wiringProperty =
- new org.apache.cocoon.deployer.generated.wiring.x10.Property();
- wiringProperty.setName(name);
-
- // investigate deploy properties if the default value has been overwritten
- String deployValue = null;
- if(deployBlock.getProperties() != null) {
- deployValue = getDeployDescPropertyValue(deployBlock.getProperties().getProperty(), name);
- }
- if(deployValue == null) {
- // wiringProperty.setValue(variableResolver.resolve(property.getDefault()));
- wiringProperty.setValue(property.getDefault());
- } else {
- wiringProperty.setValue(deployValue);
- }
- wiringProperties.addProperty(wiringProperty);
- }
-
- if(wiringProperties.getPropertyCount() > 0) {
- wiringBlock.setProperties(wiringProperties);
- }
- }
-
- return wiringBlock;
- }
-
- /**
- * Get the value of a deployment descriptor property
- *
- * @param deployProperties
- * @param name of the propertiy
- * @return the value of the property or null if not available
- */
- protected String getDeployDescPropertyValue(org.apache.cocoon.deployer.generated.deploy.x10.Property[] deployProperties, String name) {
- for(int i = 0; i < deployProperties.length; i++) {
- String curName = deployProperties[i].getName();
- if(name.equals(curName)) {
- return deployProperties[i].getValue();
- }
- }
- return null;
- }
-
- /**
- * Extract a block to the filesystem using the FileResourceManager
- */
- protected void deployBlock(BinaryBlock binaryBlock, FileManager frm, String relativeOutputDir) {
- try {
- ZipUtils.extractZip(new ZipInputStream(binaryBlock.getInputStream()), frm, relativeOutputDir);
- } catch (IOException e) {
- throw new DeploymentException("A problem while extracting a block occurred");
- } catch (FileManagerException e) {
- throw new DeploymentException("A problem while extracting a block occurred");
- }
- }
-
- /**
- * Extract the Cocoon server to the filesystem using the FileResourceManager
- */
- protected void deployCocoonServer(FileManager frm, String relativeOutputDir, String serverArtifact) {
- File zip = this.artifactProvider.getArtifact(serverArtifact);
- try {
- ZipUtils.extractZip(new ZipInputStream(new FileInputStream(zip)), frm, relativeOutputDir);
- } catch (FileNotFoundException e) {
- throw new DeploymentException("Can't get the Cocoon server artifact.");
- } catch (IOException e) {
- throw new DeploymentException("A problem while extracting the Cocoon server occurred");
- } catch (FileManagerException e) {
- throw new DeploymentException("A problem while extracting the Cocoon server occured");
- }
- }
-
- /**
- * Create a directory following the naming scheme: 00000001, 00000002, 00000003, 00000004, ...
- * This method is synchronized.
- *
- * @param file - the base directory where the new directory should be created
- * @return the new directory as @link File.
- */
- public static synchronized int getNextDirectory(File dir, int lastDir) {
- if(lastDir == 0) {
- return getHighestDirectoryNumber(dir);
- }
- return lastDir++;
- }
-
- /**
- * Convert an int to a string with leading "0" so that the output is a string containing 8 characters.
- * @param intDir
- * @return
- */
- public static String intDirToStringDirConvert(int intDir) {
- // maximum length of direcotries
- int maxDirLength = 8;
-
- // create a string representation of the next available directory
- String nextDir = Integer.toString(intDir + 1);
- StringBuffer nextDirSB = new StringBuffer();
- for(int i = nextDir.length(); i < maxDirLength; i++) {
- nextDirSB.append("0");
- }
- return nextDirSB.append(nextDir).toString();
- }
-
- /**
- * Scan a directory for directories that only consist of numbers, find the higest and return it.
- * @param dir
- * @return the highest number of an "int"-directory
- */
- public static int getHighestDirectoryNumber(File dir) {
- if(!dir.exists()) {
- return 0;
- }
- File[] dirContent = dir.listFiles();
- List allDirectories = new ArrayList();
- // filter all directories
- for(int i = 0; i < dirContent.length; i++ ) {
- if(dirContent[i].isDirectory()) {
- allDirectories.add(dirContent[i]);
- }
- }
- int highestDirNumber = 0;
- // iterate over all directories and get highest number
- Iterator fileIterator = allDirectories.iterator();
- while(fileIterator.hasNext()) {
- String fileName = ((File) fileIterator.next()).getName();
- int fileNameAsInteger;
- try {
- fileNameAsInteger = (new Integer(fileName)).intValue();
- if(fileNameAsInteger > highestDirNumber) {
- highestDirNumber = fileNameAsInteger;
- }
- } catch(NumberFormatException nfe) {
- // ignore it because directories with alpha characters are no problem
- // as they don't conflict with the namespace
- }
- }
- return highestDirNumber;
- }
-
- // ----------------------------------------- setters and getters ------------------------------------------
-
- public boolean isExclusive() {
- return this.exclusive;
- }
-
- public void setExclusive(boolean exclusive) {
- this.exclusive = exclusive;
- }
-
- public void setBaseDirectory(URI baseDirectory) {
- if(!baseDirectory.isAbsolute()) {
- try {
- this.baseDirectory = new URI(new File("").toURI().toString()).resolve(baseDirectory);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("The passed root directory can't be resolved correctly.");
- }
- } else {
- this.baseDirectory = baseDirectory;
- }
-
- }
-
- public URI getBaseDirectory() {
- return this.baseDirectory;
- }
-
- public void setVariableResolver(VariableResolver resolver) {
- this.variableResolver = resolver;
- }
-
- public VariableResolver getVariableResolver() {
- return variableResolver;
- }
-
- public void setArtifactProvider(ArtifactProvider artifactProvider) {
- this.artifactProvider = artifactProvider;
- }
-
- public ArtifactProvider getArtifactProvider() {
- return this.artifactProvider;
- }
-
-}
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.deployer.applicationserver;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.ZipInputStream;
+
+import org.apache.cocoon.deployer.ArtifactProvider;
+import org.apache.cocoon.deployer.DeploymentException;
+import org.apache.cocoon.deployer.block.BinaryBlock;
+import org.apache.cocoon.deployer.block.Block;
+import org.apache.cocoon.deployer.block.LocalBlock;
+import org.apache.cocoon.deployer.filemanager.FileManager;
+import org.apache.cocoon.deployer.filemanager.FileManagerException;
+import org.apache.cocoon.deployer.generated.block.x10.Property;
+import org.apache.cocoon.deployer.generated.wiring.x10.Mount;
+import org.apache.cocoon.deployer.generated.wiring.x10.Wiring;
+import org.apache.cocoon.deployer.logger.Logger;
+import org.apache.cocoon.deployer.resolver.VariableResolver;
+import org.apache.cocoon.deployer.util.FileUtils;
+import org.apache.cocoon.deployer.util.XMLUtils;
+import org.apache.cocoon.deployer.util.ZipUtils;
+import org.apache.commons.lang.Validate;
+import org.exolab.castor.xml.MarshalException;
+import org.exolab.castor.xml.ValidationException;
+import org.xml.sax.SAXException;
+
+public class BlocksFrameworkServer23 implements BlocksFrameworkServer {
+
+ public static final String WIRING_10_NAMESPACE = "http://apache.org/cocoon/blocks/wiring/1.0";
+ public static final String WIRING_FILE = "WEB-INF/wiring.xml";
+ public static final String WEB_INF_LIBS_DIR = "WEB-INF/lib";
+ public static final String BLOCKS_DIR = "/blocks/";
+
+ private boolean exclusive = false;
+ private URI baseDirectory;
+ private VariableResolver variableResolver;
+ private ArtifactProvider artifactProvider;
+ private int lastDir = 0;
+
+ /**
+ * Deploy an array of blocks. This operation wrapped by a filesystem transaction so that either
+ * all or any blocks get deployed. Note that the used filesystem transaction implementation only
+ * supports transactions within a single thread. Therefore this method is synchronized.
+ */
+ public synchronized boolean deploy(Block[] blocks, String serverArtifact, File[] libraries, Logger log, boolean transactional) {
+ Validate.notNull(blocks, "A blocks object (Block[]) has to be passed to this method!");
+ Validate.notNull(libraries, "A libraries object (File[]) has to passed to this method!");
+
+ // create transaction context
+ FileManager frm = FileUtils.createFileManager(this.baseDirectory, transactional);
+
+ try {
+ File baseDirectoryFile = new File(this.baseDirectory);
+
+ // install the Cocoon server if necessary
+ if(baseDirectoryFile.list().length == 0 && serverArtifact != null) {
+ deployCocoonServer(frm, "", serverArtifact);
+ }
+
+ // get the wiring, in exclusive mode from scratch, else take the existing one
+ Wiring wiring = getWiring(log, frm);
+
+ // install all passed blocks
+ installBlocks(blocks, wiring, frm, baseDirectoryFile);
+
+ // install libraries
+ installLibraries(libraries, log, frm);
+
+ // write the wiring
+ writeWiring(wiring, frm);
+
+ // committ transaction
+ frm.commitTransaction();
+
+ } catch(Exception ex) {
+ try {
+ frm.rollbackTransaction(ex);
+ String msg = "Filesystem changes have been rolled back. No block has been installed!";
+ throw new DeploymentException(msg, ex);
+ } catch (FileManagerException e) {
+ throw new DeploymentException("A problem occurred when roling back the filesystem changes.");
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Write the wiring by marshalling the <code>Wiring</code> object.
+ */
+ protected void writeWiring(Wiring wiring, FileManager frm)
+ throws FileManagerException, MarshalException, ValidationException, IOException {
+
+ OutputStream out = frm.writeResource(WIRING_FILE);
+ wiring.marshal(new OutputStreamWriter(out));
+ out.close();
+ }
+
+ /**
+ * Install all blocks and adapt wiring.xml. Installing either means copying or just referencing the location
+ * in wiring.xml.
+ */
+ protected void installBlocks(Block[] blocks, Wiring wiring, FileManager frm, File baseDirectoryFile) {
+ Map installedBlocks = new HashMap();
+
+ for(int i = 0; i < blocks.length; i++) {
+ Block block = blocks[i];
+
+ org.apache.cocoon.deployer.generated.deploy.x10.Block deployBlock =
+ (org.apache.cocoon.deployer.generated.deploy.x10.Block) block.getDeployDescriptor();
+ org.apache.cocoon.deployer.generated.block.x10.Block blockDesc =
+ (org.apache.cocoon.deployer.generated.block.x10.Block) block.getBlockDescriptor();
+
+ // create the wiring object
+ org.apache.cocoon.deployer.generated.wiring.x10.Block wiringBlock =
+ createWiring10BlockInstance(deployBlock, blockDesc);
+
+ // in the case of a binary block, unpack it into the blocks directory
+ if (block instanceof BinaryBlock) {
+ BinaryBlock binaryBlock = (BinaryBlock) block;
+ // check if the block has already been unpacked
+ if(!installedBlocks.containsKey(block.getId())) {
+ String nextDirectory = intDirToStringDirConvert(
+ getNextDirectory(new File(baseDirectoryFile, BLOCKS_DIR), this.lastDir));
+ this.lastDir = Integer.parseInt(nextDirectory);
+ String installDirectory = BLOCKS_DIR + nextDirectory + "/";
+ wiringBlock.setLocation(installDirectory);
+ deployBlock(binaryBlock, frm, BLOCKS_DIR + nextDirectory);
+ installedBlocks.put(block.getId(), installDirectory);
+ } else {
+ wiringBlock.setLocation((String) installedBlocks.get(block.getId()));
+ }
+ }
+ else if(block instanceof LocalBlock) {
+ LocalBlock localBlock = (LocalBlock) block;
+ wiringBlock.setLocation(localBlock.getBaseDirectory());
+ }
+ wiring.addBlock(wiringBlock);
+ }
+ }
+
+ /**
+ * Get the wiring object. Depending on the mode (exclusive/non-exclusive) either a new one is created
+ * or the existing one is returned.
+ */
+ protected Wiring getWiring(Logger log, FileManager frm) throws SAXException, IOException, FileManagerException, MarshalException, ValidationException {
+ Wiring wiring = null;
+ if(this.isExclusive()) {
+ wiring = new Wiring();
+ } else {
+ // check wiring version
+ String wiringVersion = XMLUtils.getDocumentNamespace(frm.readResource(WIRING_FILE));
+ if(!WIRING_10_NAMESPACE.equals(wiringVersion)) {
+ String msg = "The deployer only supports " + WIRING_10_NAMESPACE + " files.";
+ log.error(msg);
+ throw new DeploymentException(msg);
+ }
+ wiring = (Wiring) Wiring.unmarshal(new InputStreamReader(frm.readResource(WIRING_FILE)));
+ }
+ return wiring;
+ }
+
+ /*
+ * TODO What happens if two libraries have the same filename by chance ...?
+ */
+ protected void installLibraries(File[] libraries, Logger log, FileManager frm)
+ throws IOException, FileNotFoundException, FileManagerException {
+
+ for(int i = 0; i < libraries.length; i++) {
+ File lib = libraries[i];
+
+ // check if a library is a block, if yes, don't add it to WEB_INF_LIBS_DIR
+ boolean isBlock = true;
+ try {
+ ZipUtils.getBlockDescriptorIs(lib);
+ } catch(FileNotFoundException fnfe) {
+ isBlock = false;
+ }
+
+ if(!isBlock) {
+ String libName = WEB_INF_LIBS_DIR + "/" + lib.getName();
+ log.info("Installing library " + libName);
+ FileUtils.copy(new FileInputStream(lib), frm.writeResource(libName));
+ }
+ }
+ }
+
+ /**
+ * Create the wired block information.
+ *
+ * @return a wired block descriptor
+ */
+ protected org.apache.cocoon.deployer.generated.wiring.x10.Block createWiring10BlockInstance(
+ org.apache.cocoon.deployer.generated.deploy.x10.Block deployBlock,
+ org.apache.cocoon.deployer.generated.block.x10.Block blockDesc) {
+
+ org.apache.cocoon.deployer.generated.wiring.x10.Block wiringBlock =
+ new org.apache.cocoon.deployer.generated.wiring.x10.Block();
+
+ // id
+ wiringBlock.setId(deployBlock.getId());
+
+ // location
+ wiringBlock.setLocation(deployBlock.getLocation());
+
+ // mount
+ Mount wiringMount = new Mount();
+ org.apache.cocoon.deployer.generated.deploy.x10.Mount deployMount = deployBlock.getMount();
+ if(deployMount != null) {
+ wiringMount.setPath(deployMount.getPath());
+ wiringBlock.setMount(wiringMount);
+ }
+
+
+ // connections
+ org.apache.cocoon.deployer.generated.wiring.x10.Connections wiringConnections =
+ new org.apache.cocoon.deployer.generated.wiring.x10.Connections();
+
+ if(deployBlock.getConnections() != null) {
+ org.apache.cocoon.deployer.generated.deploy.x10.Connection[] deployConnections =
+ deployBlock.getConnections().getConnection();
+
+ for(int i = 0; i < deployConnections.length; i++) {
+ org.apache.cocoon.deployer.generated.deploy.x10.Connection deployConnection = deployConnections[i];
+ org.apache.cocoon.deployer.generated.wiring.x10.Connection wiringConnection =
+ new org.apache.cocoon.deployer.generated.wiring.x10.Connection();
+ wiringConnection.setBlock(deployConnection.getBlock());
+ wiringConnection.setName(deployConnection.getName());
+ wiringConnections.addConnection(wiringConnection);
+ }
+ wiringBlock.setConnections(wiringConnections);
+ }
+
+ // properties
+ if(blockDesc.getProperties() != null) {
+ Property[] properties = blockDesc.getProperties().getProperty();
+ org.apache.cocoon.deployer.generated.wiring.x10.Properties wiringProperties =
+ new org.apache.cocoon.deployer.generated.wiring.x10.Properties();
+
+ for(int i = 0; i < properties.length; i++) {
+ Property property = properties[i];
+ String name = property.getName();
+
+ org.apache.cocoon.deployer.generated.wiring.x10.Property wiringProperty =
+ new org.apache.cocoon.deployer.generated.wiring.x10.Property();
+ wiringProperty.setName(name);
+
+ // investigate deploy properties if the default value has been overwritten
+ String deployValue = null;
+ if(deployBlock.getProperties() != null) {
+ deployValue = getDeployDescPropertyValue(deployBlock.getProperties().getProperty(), name);
+ }
+ if(deployValue == null) {
+ // wiringProperty.setValue(variableResolver.resolve(property.getDefault()));
+ wiringProperty.setValue(property.getDefault());
+ } else {
+ wiringProperty.setValue(deployValue);
+ }
+ wiringProperties.addProperty(wiringProperty);
+ }
+
+ if(wiringProperties.getPropertyCount() > 0) {
+ wiringBlock.setProperties(wiringProperties);
+ }
+ }
+
+ return wiringBlock;
+ }
+
+ /**
+ * Get the value of a deployment descriptor property
+ *
+ * @param deployProperties
+ * @param name of the propertiy
+ * @return the value of the property or null if not available
+ */
+ protected String getDeployDescPropertyValue(org.apache.cocoon.deployer.generated.deploy.x10.Property[] deployProperties, String name) {
+ for(int i = 0; i < deployProperties.length; i++) {
+ String curName = deployProperties[i].getName();
+ if(name.equals(curName)) {
+ return deployProperties[i].getValue();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Extract a block to the filesystem using the FileResourceManager
+ */
+ protected void deployBlock(BinaryBlock binaryBlock, FileManager frm, String relativeOutputDir) {
+ try {
+ ZipUtils.extractZip(new ZipInputStream(binaryBlock.getInputStream()), frm, relativeOutputDir);
+ } catch (IOException e) {
+ throw new DeploymentException("A problem while extracting a block occurred");
+ } catch (FileManagerException e) {
+ throw new DeploymentException("A problem while extracting a block occurred");
+ }
+ }
+
+ /**
+ * Extract the Cocoon server to the filesystem using the FileResourceManager
+ */
+ protected void deployCocoonServer(FileManager frm, String relativeOutputDir, String serverArtifact) {
+ File zip = this.artifactProvider.getArtifact(serverArtifact);
+ try {
+ ZipUtils.extractZip(new ZipInputStream(new FileInputStream(zip)), frm, relativeOutputDir);
+ } catch (FileNotFoundException e) {
+ throw new DeploymentException("Can't get the Cocoon server artifact.");
+ } catch (IOException e) {
+ throw new DeploymentException("A problem while extracting the Cocoon server occurred");
+ } catch (FileManagerException e) {
+ throw new DeploymentException("A problem while extracting the Cocoon server occured");
+ }
+ }
+
+ /**
+ * Create a directory following the naming scheme: 00000001, 00000002, 00000003, 00000004, ...
+ * This method is synchronized.
+ *
+ * @param file - the base directory where the new directory should be created
+ * @return the new directory as @link File.
+ */
+ public static synchronized int getNextDirectory(File dir, int lastDir) {
+ if(lastDir == 0) {
+ return getHighestDirectoryNumber(dir);
+ }
+ return lastDir++;
+ }
+
+ /**
+ * Convert an int to a string with leading "0" so that the output is a string containing 8 characters.
+ * @param intDir
+ * @return
+ */
+ public static String intDirToStringDirConvert(int intDir) {
+ // maximum length of direcotries
+ int maxDirLength = 8;
+
+ // create a string representation of the next available directory
+ String nextDir = Integer.toString(intDir + 1);
+ StringBuffer nextDirSB = new StringBuffer();
+ for(int i = nextDir.length(); i < maxDirLength; i++) {
+ nextDirSB.append("0");
+ }
+ return nextDirSB.append(nextDir).toString();
+ }
+
+ /**
+ * Scan a directory for directories that only consist of numbers, find the higest and return it.
+ * @param dir
+ * @return the highest number of an "int"-directory
+ */
+ public static int getHighestDirectoryNumber(File dir) {
+ if(!dir.exists()) {
+ return 0;
+ }
+ File[] dirContent = dir.listFiles();
+ List allDirectories = new ArrayList();
+ // filter all directories
+ for(int i = 0; i < dirContent.length; i++ ) {
+ if(dirContent[i].isDirectory()) {
+ allDirectories.add(dirContent[i]);
+ }
+ }
+ int highestDirNumber = 0;
+ // iterate over all directories and get highest number
+ Iterator fileIterator = allDirectories.iterator();
+ while(fileIterator.hasNext()) {
+ String fileName = ((File) fileIterator.next()).getName();
+ int fileNameAsInteger;
+ try {
+ fileNameAsInteger = (new Integer(fileName)).intValue();
+ if(fileNameAsInteger > highestDirNumber) {
+ highestDirNumber = fileNameAsInteger;
+ }
+ } catch(NumberFormatException nfe) {
+ // ignore it because directories with alpha characters are no problem
+ // as they don't conflict with the namespace
+ }
+ }
+ return highestDirNumber;
+ }
+
+ // ----------------------------------------- setters and getters ------------------------------------------
+
+ public boolean isExclusive() {
+ return this.exclusive;
+ }
+
+ public void setExclusive(boolean exclusive) {
+ this.exclusive = exclusive;
+ }
+
+ public void setBaseDirectory(URI baseDirectory) {
+ if(!baseDirectory.isAbsolute()) {
+ try {
+ this.baseDirectory = new URI(new File("").toURI().toString()).resolve(baseDirectory);
+ } catch (URISyntaxException e) {
+ throw new IllegalArgumentException("The passed root directory can't be resolved correctly.");
+ }
+ } else {
+ this.baseDirectory = baseDirectory;
+ }
+
+ }
+
+ public URI getBaseDirectory() {
+ return this.baseDirectory;
+ }
+
+ public void setVariableResolver(VariableResolver resolver) {
+ this.variableResolver = resolver;
+ }
+
+ public VariableResolver getVariableResolver() {
+ return variableResolver;
+ }
+
+ public void setArtifactProvider(ArtifactProvider artifactProvider) {
+ this.artifactProvider = artifactProvider;
+ }
+
+ public ArtifactProvider getArtifactProvider() {
+ return this.artifactProvider;
+ }
+
+}
Propchange: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer23.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/MonolithicServer23.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/MonolithicServer23.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/MonolithicServer23.java (original)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/MonolithicServer23.java Wed Mar 22 21:16:59 2006
@@ -1,128 +1,128 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.deployer.applicationserver;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-import org.apache.cocoon.deployer.logger.Logger;
-import org.apache.cocoon.deployer.monolithic.FileDeployer;
-import org.apache.cocoon.deployer.util.WildcardHelper;
-import org.apache.commons.lang.Validate;
-
-public class MonolithicServer23 {
-
- private Logger logger;
- private File basedir;
- private List rules = new ArrayList();
-
- public MonolithicServer23(File basedir, Logger logger) {
- Validate.notNull(basedir, "The basedir of the server mustn't be null.");
- Validate.notNull(logger, "A logger must be set.");
- this.basedir = basedir;
- this.logger = logger;
- this.logger.verbose("Basedir: " + basedir.getAbsolutePath());
- }
-
- public void addRule(String pattern, FileDeployer fileDeployer) {
- fileDeployer.setBasedir(this.basedir);
- fileDeployer.setLogger(this.logger);
- rules.add(new Rule(pattern, fileDeployer));
- }
-
- public void extract(File zipFile) throws IOException {
- ZipInputStream zipStream = new ZipInputStream(new FileInputStream(zipFile));
- ZipEntry document = null;
- try {
- do {
- document = zipStream.getNextEntry();
- if (document != null) {
- // skip directories (only files have to be written)
- if (document.isDirectory()) {
- zipStream.closeEntry();
- continue;
- }
- OutputStream out = null;
- try {
- FileDeployer fileDeployer = findFileDeployer(document.getName());
- if(fileDeployer == null) {
- continue;
- }
-
- out = fileDeployer.writeResource(document.getName());
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- // loop over ZIP entry stream
- byte[] buffer = new byte[8192];
- int length = -1;
- while (zipStream.available() > 0) {
- length = zipStream.read(buffer, 0, 8192);
- if (length > 0) {
- baos.write(buffer, 0, length);
- }
- }
- // write it to the output stream provided by the file resource manager
- out.write(baos.toByteArray());
- } finally {
- if(out != null) {
- out.close();
- }
- }
- // go to next entry
- zipStream.closeEntry();
- }
- } while (document != null);
- } finally {
- zipStream.close();
- }
- }
-
- /**
- * Loop over all rules and if one matches, the corresponding @link FileDeployer is returned.
- */
- protected FileDeployer findFileDeployer(String name) {
- for(Iterator it = this.rules.iterator(); it.hasNext();) {
- Rule rule = (Rule) it.next();
- HashMap resultMap = new HashMap();
- if(WildcardHelper.match(resultMap, name, rule.compiledPattern)) {
- logger.verbose("findFileDeployer: " + name + " matched with pattern '" + rule.patternString);
- return rule.fileDeployer;
- }
- }
- return null;
- }
-
- private static class Rule {
- String patternString;
- int[] compiledPattern;
- FileDeployer fileDeployer;
-
- public Rule(String pattern, FileDeployer fileDeployer) {
- this.patternString = pattern;
- this.compiledPattern = WildcardHelper.compilePattern(pattern);
- this.fileDeployer = fileDeployer;
- }
- }
-
-}
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.deployer.applicationserver;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.apache.cocoon.deployer.logger.Logger;
+import org.apache.cocoon.deployer.monolithic.FileDeployer;
+import org.apache.cocoon.deployer.util.WildcardHelper;
+import org.apache.commons.lang.Validate;
+
+public class MonolithicServer23 {
+
+ private Logger logger;
+ private File basedir;
+ private List rules = new ArrayList();
+
+ public MonolithicServer23(File basedir, Logger logger) {
+ Validate.notNull(basedir, "The basedir of the server mustn't be null.");
+ Validate.notNull(logger, "A logger must be set.");
+ this.basedir = basedir;
+ this.logger = logger;
+ this.logger.verbose("Basedir: " + basedir.getAbsolutePath());
+ }
+
+ public void addRule(String pattern, FileDeployer fileDeployer) {
+ fileDeployer.setBasedir(this.basedir);
+ fileDeployer.setLogger(this.logger);
+ rules.add(new Rule(pattern, fileDeployer));
+ }
+
+ public void extract(File zipFile) throws IOException {
+ ZipInputStream zipStream = new ZipInputStream(new FileInputStream(zipFile));
+ ZipEntry document = null;
+ try {
+ do {
+ document = zipStream.getNextEntry();
+ if (document != null) {
+ // skip directories (only files have to be written)
+ if (document.isDirectory()) {
+ zipStream.closeEntry();
+ continue;
+ }
+ OutputStream out = null;
+ try {
+ FileDeployer fileDeployer = findFileDeployer(document.getName());
+ if(fileDeployer == null) {
+ continue;
+ }
+
+ out = fileDeployer.writeResource(document.getName());
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ // loop over ZIP entry stream
+ byte[] buffer = new byte[8192];
+ int length = -1;
+ while (zipStream.available() > 0) {
+ length = zipStream.read(buffer, 0, 8192);
+ if (length > 0) {
+ baos.write(buffer, 0, length);
+ }
+ }
+ // write it to the output stream provided by the file resource manager
+ out.write(baos.toByteArray());
+ } finally {
+ if(out != null) {
+ out.close();
+ }
+ }
+ // go to next entry
+ zipStream.closeEntry();
+ }
+ } while (document != null);
+ } finally {
+ zipStream.close();
+ }
+ }
+
+ /**
+ * Loop over all rules and if one matches, the corresponding @link FileDeployer is returned.
+ */
+ protected FileDeployer findFileDeployer(String name) {
+ for(Iterator it = this.rules.iterator(); it.hasNext();) {
+ Rule rule = (Rule) it.next();
+ HashMap resultMap = new HashMap();
+ if(WildcardHelper.match(resultMap, name, rule.compiledPattern)) {
+ logger.verbose("findFileDeployer: " + name + " matched with pattern '" + rule.patternString);
+ return rule.fileDeployer;
+ }
+ }
+ return null;
+ }
+
+ private static class Rule {
+ String patternString;
+ int[] compiledPattern;
+ FileDeployer fileDeployer;
+
+ public Rule(String pattern, FileDeployer fileDeployer) {
+ this.patternString = pattern;
+ this.compiledPattern = WildcardHelper.compilePattern(pattern);
+ this.fileDeployer = fileDeployer;
+ }
+ }
+
+}
Propchange: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/MonolithicServer23.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/FileAlreadyDeployedException.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/FileAlreadyDeployedException.java?rev=388041&r1=388040&r2=388041&view=diff
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/FileAlreadyDeployedException.java (original)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/FileAlreadyDeployedException.java Wed Mar 22 21:16:59 2006
@@ -1,26 +1,26 @@
-/*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.cocoon.deployer.monolithic;
-
-import org.apache.cocoon.deployer.DeploymentException;
-
-public class FileAlreadyDeployedException extends DeploymentException {
-
- public FileAlreadyDeployedException(String message) {
- super(message);
- }
-
-}
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.deployer.monolithic;
+
+import org.apache.cocoon.deployer.DeploymentException;
+
+public class FileAlreadyDeployedException extends DeploymentException {
+
+ public FileAlreadyDeployedException(String message) {
+ super(message);
+ }
+
+}
Propchange: cocoon/trunk/cocoon-block-deployer/cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/FileAlreadyDeployedException.java
------------------------------------------------------------------------------
svn:eol-style = native