Skip to content
Browse files

[maven-scm] copy for tag cocoon-deployer-core-1.0.0-M1

  • Loading branch information...
2 parents 9665327 + b75a9bf commit caa62fd049dc753b80b0fb5a790e536485e21c51 Jorg Heymans committed Jul 31, 2006
Showing with 1 addition and 5,192 deletions.
  1. +0 −296 cocoon-deployer-core/.settings/org.eclipse.jdt.core.prefs
  2. +0 −12 cocoon-deployer-core/.settings/org.eclipse.jdt.ui.prefs
  3. +0 −113 cocoon-deployer-core/pom.xml
  4. +0 −5 cocoon-deployer-core/src/main/castor/castorbuilder.properties
  5. +0 −34 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/ArtifactProvider.java
  6. +0 −137 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/AutoWiringResolver.java
  7. +0 −155 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/BlockDeployer.java
  8. +0 −31 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/DeploymentException.java
  9. +0 −53 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/MonolithicCocoonDeployer.java
  10. +0 −45 ...yer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/ApplicationServerFactory.java
  11. +0 −43 ...ployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer.java
  12. +0 −454 ...oyer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer23.java
  13. +0 −132 ...-deployer-core/src/main/java/org/apache/cocoon/deployer/applicationserver/MonolithicServer22.java
  14. +0 −33 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/BinaryBlock.java
  15. +0 −47 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/Block.java
  16. +0 −186 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/BlockFactory.java
  17. +0 −29 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/LocalBlock.java
  18. +0 −75 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/impl/Block10.java
  19. +0 −72 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/impl/LocalBlock10.java
  20. +0 −35 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/filemanager/FileManager.java
  21. +0 −24 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/filemanager/FileManagerException.java
  22. +0 −99 ...ployer-core/src/main/java/org/apache/cocoon/deployer/filemanager/NontransactionalFileManager.java
  23. +0 −131 ...-deployer-core/src/main/java/org/apache/cocoon/deployer/filemanager/TransactionalFileManager.java
  24. +0 −31 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/logger/Logger.java
  25. +0 −26 ...ployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/FileAlreadyDeployedException.java
  26. +0 −41 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/FileDeployer.java
  27. +0 −24 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/NoRuleFoundException.java
  28. +0 −112 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/monolithic/SingleFileDeployer.java
  29. +0 −28 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/resolver/NullVariableResolver.java
  30. +0 −25 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/resolver/VariableResolver.java
  31. +0 −98 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/util/FileUtils.java
  32. +0 −380 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/util/WildcardHelper.java
  33. +0 −42 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/util/XMLUtils.java
  34. +0 −136 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/util/ZipUtils.java
  35. +0 −6 cocoon-deployer-core/src/main/resources/castor.properties
  36. +0 −96 cocoon-deployer-core/src/main/resources/xsd/cob-schema-1.0.xsd
  37. +0 −89 cocoon-deployer-core/src/main/resources/xsd/deploy-schema-1.0.xsd
  38. +0 −52 cocoon-deployer-core/src/main/resources/xsd/sample-block.xml
  39. +0 −42 cocoon-deployer-core/src/main/resources/xsd/sample-deploy.xml
  40. +0 −37 cocoon-deployer-core/src/main/resources/xsd/sample-wiring.xml
  41. +0 −69 cocoon-deployer-core/src/main/resources/xsd/wiring-schema-1.0.xsd
  42. +0 −134 cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/AbstractDeployerTestCase.java
  43. +0 −63 cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/AutoWiringResolverTest.java
  44. +0 −98 cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/BlockDeployerTest.java
  45. +0 −149 ...ployer-core/src/test/java/org/apache/cocoon/deployer/applicationserver/BlocksFramework23Test.java
  46. +0 −53 ...deployer-core/src/test/java/org/apache/cocoon/deployer/applicationserver/MonoliticServerTest.java
  47. +0 −132 cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/block/BlockFactoryTest.java
  48. +0 −68 ...er-core/src/test/java/org/apache/cocoon/deployer/filemanager/NontransactionalFileManagerTest.java
  49. +0 −35 cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/logger/ConsoleLogger.java
  50. +0 −27 cocoon-deployer-core/src/test/java/org/apache/cocoon/deployer/monolithic/SingleFileDeployerTest.java
  51. +0 −41 cocoon-deployer-core/src/test/mocks/build.xml
  52. BIN cocoon-deployer-core/src/test/mocks/lib-01/lib-01.jar
  53. +0 −17 cocoon-deployer-core/src/test/mocks/lib-01/root/content.txt
  54. BIN cocoon-deployer-core/src/test/mocks/lib-02/lib-02.jar
  55. +0 −17 cocoon-deployer-core/src/test/mocks/lib-02/root/content.txt
  56. +0 −26 cocoon-deployer-core/src/test/mocks/validBlock-01/blockRoot/COB-INF/block-sitemap.xmap
  57. +0 −17 cocoon-deployer-core/src/test/mocks/validBlock-01/blockRoot/COB-INF/test.xml
  58. +0 −18 cocoon-deployer-core/src/test/mocks/validBlock-01/blockRoot/META-INF/block.xml
  59. BIN cocoon-deployer-core/src/test/mocks/validBlock-01/valid-block-1.0.jar
  60. +0 −26 cocoon-deployer-core/src/test/mocks/validBlock-02/blockRoot/COB-INF/block-sitemap.xmap
  61. +0 −17 cocoon-deployer-core/src/test/mocks/validBlock-02/blockRoot/COB-INF/test02.xml
  62. +0 −29 cocoon-deployer-core/src/test/mocks/validBlock-02/blockRoot/META-INF/block.xml
  63. BIN cocoon-deployer-core/src/test/mocks/validBlock-02/valid-block-1.0.jar
  64. +0 −26 cocoon-deployer-core/src/test/mocks/validBlock-03/blockRoot/COB-INF/block-sitemap.xmap
  65. +0 −17 cocoon-deployer-core/src/test/mocks/validBlock-03/blockRoot/COB-INF/test03.xml
  66. +0 −28 cocoon-deployer-core/src/test/mocks/validBlock-03/blockRoot/META-INF/block.xml
  67. BIN cocoon-deployer-core/src/test/mocks/validBlock-03/valid-block-1.0.jar
  68. +0 −26 cocoon-deployer-core/src/test/mocks/validBlock-04/blockRoot/COB-INF/block-sitemap.xmap
  69. +0 −17 cocoon-deployer-core/src/test/mocks/validBlock-04/blockRoot/COB-INF/test04.xml
  70. +0 −29 cocoon-deployer-core/src/test/mocks/validBlock-04/blockRoot/META-INF/block.xml
  71. BIN cocoon-deployer-core/src/test/mocks/validBlock-04/valid-block-1.0.jar
  72. +0 −26 cocoon-deployer-core/src/test/mocks/validBlock-05/blockRoot/COB-INF/block-sitemap.xmap
  73. +0 −17 cocoon-deployer-core/src/test/mocks/validBlock-05/blockRoot/COB-INF/test04.xml
  74. +0 −24 cocoon-deployer-core/src/test/mocks/validBlock-05/blockRoot/META-INF/block.xml
  75. BIN cocoon-deployer-core/src/test/mocks/validBlock-05/valid-block-1.0.jar
  76. +0 −26 cocoon-deployer-core/src/test/mocks/validBlock-06/blockRoot/COB-INF/block-sitemap.xmap
  77. +0 −17 cocoon-deployer-core/src/test/mocks/validBlock-06/blockRoot/COB-INF/test04.xml
  78. +0 −28 cocoon-deployer-core/src/test/mocks/validBlock-06/blockRoot/META-INF/block.xml
  79. BIN cocoon-deployer-core/src/test/mocks/validBlock-06/valid-block-1.0.jar
  80. +0 −26 cocoon-deployer-core/src/test/mocks/validBlock-07/blockRoot/COB-INF/block-sitemap.xmap
  81. +0 −17 cocoon-deployer-core/src/test/mocks/validBlock-07/blockRoot/COB-INF/test04.xml
  82. +0 −24 cocoon-deployer-core/src/test/mocks/validBlock-07/blockRoot/META-INF/block.xml
  83. BIN cocoon-deployer-core/src/test/mocks/validBlock-07/valid-block-1.0.jar
  84. +0 −36 cocoon-deployer-core/src/test/mocks/validDeploy-01/deploy.xml
  85. +0 −28 cocoon-deployer-core/src/test/mocks/validDeploy-02/deploy.xml
  86. +0 −35 cocoon-deployer-core/src/test/mocks/validDeploy-03/deploy.xml
  87. +0 −36 cocoon-deployer-core/src/test/mocks/validDeploy-04/deploy.xml
  88. +0 −24 cocoon-deployer-core/src/test/mocks/validDeploy-05/deploy.xml
  89. +0 −24 cocoon-deployer-core/src/test/mocks/validDeploy-06/deploy.xml
  90. +0 −26 cocoon-deployer-core/src/test/mocks/validMonolithicBlock-02/blockRoot/COB-INF/block-sitemap.xmap
  91. +0 −17 cocoon-deployer-core/src/test/mocks/validMonolithicBlock-02/blockRoot/COB-INF/subDir/test.xml
  92. +0 −17 cocoon-deployer-core/src/test/mocks/validMonolithicBlock-02/blockRoot/COB-INF/test.xml
  93. +0 −17 ...r-core/src/test/mocks/validMonolithicBlock-02/blockRoot/META-INF/legacy/sitemap-additions/sa.xmap
  94. +0 −17 ...ore/src/test/mocks/validMonolithicBlock-02/blockRoot/META-INF/legacy/xconf/my-webdav-server.xconf
  95. BIN cocoon-deployer-core/src/test/mocks/validMonolithicBlock-02/valid-block-1.0.jar
  96. BIN cocoon-deployer-core/src/test/mocks/validVanillaCocoon22App/appRoot.zip
  97. +0 −24 cocoon-deployer-core/src/test/mocks/validVanillaCocoon22App/appRoot/WEB-INF/wiring.xml
  98. +1 −1 pom.xml
View
296 cocoon-deployer-core/.settings/org.eclipse.jdt.core.prefs
@@ -1,296 +0,0 @@
-#Tue Jan 31 17:03:01 GMT+01:00 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=1
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
-org.eclipse.jdt.core.formatter.comment.format_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
View
12 cocoon-deployer-core/.settings/org.eclipse.jdt.ui.prefs
@@ -1,12 +0,0 @@
-#Mon Jan 02 22:38:07 GMT+01:00 2006
-eclipse.preferences.version=1
-formatter_settings_version=8
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.javadoc=false
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates><template id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment" description\="Comment for getter method" context\="gettercomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment" description\="Comment for setter method" context\="settercomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment" description\="Comment for created constructors" context\="constructorcomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * ${tags}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment" description\="Comment for created Java files" context\="filecomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * \r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment" description\="Comment for created types" context\="typecomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment" description\="Comment for fields" context\="fieldcomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * \r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment" description\="Comment for non-overriding methods" context\="methodcomment_context" enabled\="true" deleted\="false" autoinsert\="true">/**\r\n * ${tags}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment" description\="Comment for overriding methods" context\="overridecomment_context" enabled\="true" deleted\="false" autoinsert\="true">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype" description\="Newly created files" context\="newtype_context" enabled\="true" deleted\="false" autoinsert\="false">/*\r\n * Copyright 2006 The Apache Software Foundation.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n * \r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock" description\="Code in new catch blocks" context\="catchblock_context" enabled\="true" deleted\="false" autoinsert\="true">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody" description\="Code in created method stubs" context\="methodbody_context" enabled\="true" deleted\="false" autoinsert\="true">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody" description\="Code in created constructor stubs" context\="constructorbody_context" enabled\="true" deleted\="false" autoinsert\="true">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody" description\="Code in created getters" context\="getterbody_context" enabled\="true" deleted\="false" autoinsert\="true">return ${field};</template><template id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody" description\="Code in created setters" context\="setterbody_context" enabled\="true" deleted\="false" autoinsert\="true">${field} \= ${param};</template></templates>
View
113 cocoon-deployer-core/pom.xml
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <packaging>jar</packaging>
-
- <parent>
- <groupId>org.apache.cocoon</groupId>
- <artifactId>cocoon-deployer-modules</artifactId>
- <version>1</version>
- </parent>
-
- <artifactId>cocoon-deployer-core</artifactId>
- <version>1.0.0-M1</version>
-
- <name>Cocoon Deployer - Core</name>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>castor</groupId>
- <artifactId>castor</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <version>2.8.0</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.1</version>
- </dependency>
- <dependency>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- <version>1.3.02</version>
- </dependency>
- <dependency>
- <groupId>oro</groupId>
- <artifactId>oro</artifactId>
- <version>2.0.8</version>
- </dependency>
- <dependency>
- <groupId>commons-transaction</groupId>
- <artifactId>commons-transaction</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>geronimo-spec</groupId>
- <artifactId>geronimo-spec-j2ee</artifactId>
- <version>1.0-M1</version>
- </dependency>
- <dependency>
- <groupId>easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>1.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>castor-maven-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <properties>${basedir}/src/main/castor/castorbuilder.properties</properties>
- <schemaDirectory>${basedir}/src/main/resources/xsd</schemaDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <scm>
- <connection>scm:svn:https://svn.apache.org/repos/asf/cocoon/tags/cocoon-deployer-core-1.0.0-M1</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/cocoon/tags/cocoon-deployer-core-1.0.0-M1</developerConnection>
- <url>https://svn.apache.org/repos/asf/cocoon/tags/cocoon-deployer-core-1.0.0-M1</url>
- </scm>
-</project>
View
5 cocoon-deployer-core/src/main/castor/castorbuilder.properties
@@ -1,5 +0,0 @@
-org.exolab.castor.builder.nspackages=\
- http://apache.org/cocoon/blocks/cob/1.0=org.apache.cocoon.deployer.generated.block.x10,\
- http://apache.org/cocoon/blocks/deploy/1.0=org.apache.cocoon.deployer.generated.deploy.x10,\
- http://apache.org/cocoon/blocks/wiring/1.0=org.apache.cocoon.deployer.generated.wiring.x10
-
View
34 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/ArtifactProvider.java
@@ -1,34 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-
-/**
- * The ArtifactProvider is an abstraction of getting access to the actual block. A client using
- * this library can make use of it to plugin its own library mechanism.
- */
-public interface ArtifactProvider {
-
- public File getArtifact(String artifact);
-
- /**
- * This method is used to resolve all dependencies of the passed artifact ids. It supports
- * transitive dependencies and makes sure that only one version of an artifact is returned.
- */
- public File[] getArtifact(String[] artifactIds);
-
-}
View
137 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/AutoWiringResolver.java
@@ -1,137 +0,0 @@
-/*
- * 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.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.cocoon.deployer.block.Block;
-import org.apache.cocoon.deployer.block.BlockFactory;
-import org.apache.cocoon.deployer.generated.block.x10.Requires;
-import org.apache.cocoon.deployer.generated.deploy.x10.Connection;
-import org.apache.cocoon.deployer.logger.Logger;
-import org.apache.commons.lang.Validate;
-
-/**
- * The AutoWiringResolver analyzes a block and resolves all connections that are
- * not explizitly declared in the deploy script.
- */
-public class AutoWiringResolver {
-
- public static final String DEPLOY_BLOCK_ID_PREFIX = "auto_wired_";
-
- private ArtifactProvider artifactProvider;
- private Logger log;
- private int autoCreatedBlockCounter = 0;
- List autowiredBlockList = new ArrayList();
-
- public AutoWiringResolver(final ArtifactProvider artifactProvider, final Logger log) {
- Validate.notNull(artifactProvider, "artifactProvider mustn't be null.");
- Validate.notNull(log, "log mustn't be null ");
- this.artifactProvider = artifactProvider;
- this.log = log;
- }
-
- public void resolve(final List blockList) {
- Validate.notNull(blockList, "The list of blocks mustn't be null.");
- Validate.allElementsOfType(blockList, Block.class);
-
- // iterator over all blocks
- for(Iterator it = blockList.iterator(); it.hasNext();) {
- Block block = (Block) it.next();
- analyzeBlock(block);
- }
-
- blockList.addAll(this.autowiredBlockList);
-
- }
-
- /**
- * Analyze a block and find all unset connections. If an unset connection is found, the default
- * connection is read out and autowired by creating a new block.
- *
- * @param block to be analyzed
- * @return a list of all blocks that have to be installed
- */
- protected void analyzeBlock(Block block) {
- Validate.notNull(block, "Null value is not allowed for block.");
-
- Set allExplicitConnections = getAllExplicitConnections(block);
-
- // if the block has no requirements, the block is an endpoint
- if(block.getBlockDescriptor().getRequirements() == null) {
- return;
- }
-
- // iterate over all requirements and find out if connections are set in the deployment script
- Requires[] requires = block.getBlockDescriptor().getRequirements().getRequires();
- for(int i = 0; i < requires.length; i++) {
-
- // if no explicit connection is set in the deployment script --> autowire
- if(!allExplicitConnections.contains(requires[i].getName())){
-
- // create a new block
- String newBlockDeployId = getNextDeployBlockId();
- Block autoWiredBlock = BlockFactory.createAutowiredBlock(
- artifactProvider.getArtifact(requires[i].getDefault()), newBlockDeployId);
- this.log.info("auto-wiring: create new block [" + newBlockDeployId + "].");
-
- // add the connection to the deployer
- Connection newConnection = new Connection();
- newConnection.setBlock(newBlockDeployId);
- newConnection.setName(requires[i].getName());
- if(block.getDeployDescriptor().getConnections() == null) {
- block.getDeployDescriptor().setConnections(new org.apache.cocoon.deployer.generated.deploy.x10.Connections());
- }
- block.getDeployDescriptor().getConnections().addConnection(newConnection);
-
- // analyze the new block too
- analyzeBlock(autoWiredBlock);
-
- // add block to the list
- this.autowiredBlockList.add(autoWiredBlock);
- }
- }
- }
-
- /**
- * Get a set of names of all connections of the block.
- *
- * @param the block to be analyzed
- * @return a set of names
- */
- protected Set getAllExplicitConnections(Block block) {
- Set allExplicitConnections = new HashSet();
- if(block.getDeployDescriptor().getConnections() != null) {
- Connection[] connections = block.getDeployDescriptor().getConnections().getConnection();
- for(int i = 0; i < connections.length; i++) {
- allExplicitConnections.add(connections[i].getName());
- }
- }
- return allExplicitConnections;
- }
-
- /**
- * @return the next available name
- */
- protected String getNextDeployBlockId() {
- return DEPLOY_BLOCK_ID_PREFIX + this.autoCreatedBlockCounter++;
- }
-
-}
View
155 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/BlockDeployer.java
@@ -1,155 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.cocoon.deployer.applicationserver.BlocksFrameworkServer;
-import org.apache.cocoon.deployer.applicationserver.ApplicationServerFactory;
-import org.apache.cocoon.deployer.block.Block;
-import org.apache.cocoon.deployer.block.BlockFactory;
-import org.apache.cocoon.deployer.generated.deploy.x10.Deploy;
-import org.apache.cocoon.deployer.logger.Logger;
-import org.apache.cocoon.deployer.resolver.VariableResolver;
-import org.apache.commons.lang.Validate;
-import org.apache.commons.lang.time.StopWatch;
-
-/**
- * This class provides the services to deploy a block.
- */
-public class BlockDeployer {
-
- private final VariableResolver variableResolver;
- private final Logger log;
- private final ArtifactProvider artifactProvider;
-
- /**
- * Creates the BlockDeployer object. Pass the artifact provider (How to get access to the binaries
- * and blocks?), the variable resolver (If you want to use variable resolving in deployment descriptors)
- * and the logger.
- *
- * @param artifactProvider - provide your implementation how to access the block binaries
- * @param variableResolver - if you use variables in your deployment descriptor, you have to provide an implementation that resolves them
- * @param log - a logger for user-orientated messages about the deployment process.
- */
- public BlockDeployer( final ArtifactProvider artifactProvider,
- final VariableResolver variableResolver, final Logger log) {
-
- Validate.notNull(artifactProvider, "An artifact provider object has to be passed.");
- Validate.notNull(variableResolver, "A variable resolver object has to be passed.");
-
- this.artifactProvider = artifactProvider;
- this.variableResolver = variableResolver;
- this.log = log;
- }
-
- /**
- * <p>Use this service method to deploy Cocoon blocks. The deployment descriptor has to describe which blocks
- * should be deployed and how they are weired.</p>
- *
- * <p>If any error occurres, the unchecked @link DeploymentException is thrown.</p>
- *
- * @param deploymentDescriptor - the descriptor that contains all blocks that should be deployed
- * @param transactional - set it 'true' if you want the deployment process being transactional (all or nothing)
- * @param exclusive - set it 'true' if you want to deploy a complete Cocoon application from scratch. If set to 'false', then the blocks of the descriptor are only added to the application. Currently only 'true' is supported.
- */
- public void deploy(final Deploy deploymentDescriptor, final boolean transactional, final boolean exclusive) {
- StopWatch stopWatch = new StopWatch();
- stopWatch.start();
-
- // validations
- if(!exclusive) {
- throw new DeploymentException("The block deployer only supports the exclusive mode at the moment.");
- }
- Validate.notNull(deploymentDescriptor, "A deployment descriptor object has to be passed.");
-
- // variable resolving
- // TODO implement resolving of variables
-
- // read the deploy script and get a list of all Block objects to be installed
- List blockList = createBlockList(deploymentDescriptor);
-
- // auto-wiring: if a connection is not specified, use the default implementation and add the "new" blocks to the list
- new AutoWiringResolver(this.artifactProvider, this.log).resolve(blockList);
-
- // validate deployment descriptor
- // TODO (correct dependencies, mount path only used once in exclusive mode, set only available properties)
-
- // get the Cocoon urn
- String cocoonWebappUrn = deploymentDescriptor.getCocoon().getWebappUrn();
- String cocoonBlockFwWebappUrn = deploymentDescriptor.getCocoon().getBlockFwUrn();
-
- // get all dependant libraries transitivly
- File[] libraries = artifactProvider.getArtifact(
- this.getAllBlockUrns(blockList, cocoonBlockFwWebappUrn));
-
- // deploy the blocks
- BlocksFrameworkServer cocoonServer = ApplicationServerFactory.createServer(
- deploymentDescriptor.getCocoon(), this.variableResolver, this.artifactProvider, exclusive);
-
- Collections.reverse(blockList);
-
- cocoonServer.deploy((Block[]) blockList.toArray(new Block[blockList.size()]),
- cocoonWebappUrn, libraries, this.log, transactional);
-
- stopWatch.stop();
- this.log.info("SUCESSFULLY deployed in " + stopWatch);
- }
-
- /**
- * Reads a deployment descriptor and creates a list of <code>Block</code> objects to be installed.
- *
- * @param deploymentDescriptor
- * @return a list of <code>Block</code> objects
- */
- protected List createBlockList(final Deploy deploymentDescriptor) {
- List blockList = new ArrayList();
- org.apache.cocoon.deployer.generated.deploy.x10.Block[] installBlocks = deploymentDescriptor.getBlock();
- for(int i = 0; i < installBlocks.length; i++) {
- org.apache.cocoon.deployer.generated.deploy.x10.Block installBlock = installBlocks[i];
- log.verbose("Block urn: " + installBlock.getUrn());
- String blockUrn = installBlock.getUrn();
- File blockArchive = null;
- if(installBlock.getLocation() == null) {
- blockArchive = this.artifactProvider.getArtifact(blockUrn);
- blockList.add(BlockFactory.createBinaryBlock(blockArchive, installBlock));
- } else {
- blockList.add(BlockFactory.createLocalBlock(installBlock,
- deploymentDescriptor.getCocoon().getTargetUrl()));
- }
- }
- return blockList;
- }
-
- /**
- * @return a list of all urns to be installed
- */
- protected String[] getAllBlockUrns(List blocks, String urn) {
- List urnList = new ArrayList();
- urnList.add(urn);
- for(Iterator it = blocks.iterator(); it.hasNext();) {
- String blockUrn = ((Block) it.next()).getId();
- urnList.add(blockUrn);
- }
- return (String[]) urnList.toArray(new String[urnList.size()]);
- }
-
-
-}
View
31 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/DeploymentException.java
@@ -1,31 +0,0 @@
-/*
- * 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;
-
-/**
- * Unchecked exception that signals a problem at block deployment.
- */
-public class DeploymentException extends RuntimeException {
-
- public DeploymentException(String message) {
- super(message);
- }
-
- public DeploymentException(String message, Exception ex) {
- super(message, ex);
- }
-
-}
View
53 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/MonolithicCocoonDeployer.java
@@ -1,53 +0,0 @@
-/*
- * 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.MonolithicServer22;
-import org.apache.cocoon.deployer.logger.Logger;
-import org.apache.cocoon.deployer.monolithic.SingleFileDeployer;
-
-/**
- * Deploy blocks to a monolithic Cocoon web application. The files contained by a block are copied to the right places.
- * based on rules.
- */
-public class MonolithicCocoonDeployer {
-
- public static void deploy(final Map libraries, final File basedir, final String blocksdir, final Logger logger) {
-
- for(Iterator it = libraries.keySet().iterator(); it.hasNext();) {
- Object id = it.next();
- File lib = (File) libraries.get(id);
- try {
- MonolithicServer22 zipExtractor = new MonolithicServer22(basedir, logger);
- zipExtractor.addRule("**legacy/cocoon.xconf", new SingleFileDeployer("WEB-INF/cocoon"));
- zipExtractor.addRule("**legacy**.xconf", new SingleFileDeployer("WEB-INF/cocoon/xconf"));
- zipExtractor.addRule("**legacy**.xmap", new SingleFileDeployer("WEB-INF/cocoon/sitemap-additions"));
- zipExtractor.addRule("**spring/**.xml", new SingleFileDeployer("WEB-INF/cocoon/spring"));
- zipExtractor.addRule("COB-INF**", new SingleFileDeployer(blocksdir + "/" + (String) id, true));
- // extract all configurations files
- zipExtractor.extract(lib);
- } catch (IOException e) {
- throw new DeploymentException("Can't deploy '" + lib.getAbsolutePath() + "'.", e);
- }
- }
- }
-
-}
View
45 .../src/main/java/org/apache/cocoon/deployer/applicationserver/ApplicationServerFactory.java
@@ -1,45 +0,0 @@
-/*
- * 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.net.URI;
-import java.net.URISyntaxException;
-
-import org.apache.cocoon.deployer.ArtifactProvider;
-import org.apache.cocoon.deployer.DeploymentException;
-import org.apache.cocoon.deployer.generated.deploy.x10.Cocoon;
-import org.apache.cocoon.deployer.resolver.VariableResolver;
-
-public class ApplicationServerFactory {
-
- public static BlocksFrameworkServer createServer(Cocoon cocoon, VariableResolver variableResolver,
- ArtifactProvider artifactProvider, boolean exclusive) {
-
- BlocksFrameworkServer cocoonServer = new BlocksFrameworkServer23();
- cocoonServer.setExclusive(exclusive);
- cocoonServer.setVariableResolver(variableResolver);
- cocoonServer.setArtifactProvider(artifactProvider);
-
- try {
- cocoonServer.setBaseDirectory(new URI(cocoon.getTargetUrl()));
- } catch (URISyntaxException e) {
- throw new DeploymentException("Invalid Cocoon server URL");
- }
-
- return cocoonServer;
- }
-
-}
View
43 ...ore/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer.java
@@ -1,43 +0,0 @@
-/*
- * 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.net.URI;
-
-import org.apache.cocoon.deployer.ArtifactProvider;
-import org.apache.cocoon.deployer.block.Block;
-import org.apache.cocoon.deployer.logger.Logger;
-import org.apache.cocoon.deployer.resolver.VariableResolver;
-
-public interface BlocksFrameworkServer {
-
- public boolean deploy(Block[] blocks, String serverArtifact, File[] libraries, Logger log, boolean transactional);
-
- public boolean isExclusive();
-
- public void setExclusive(boolean exclusive);
-
- public void setBaseDirectory(URI uri);
-
- public void setVariableResolver(VariableResolver resolver);
-
- public void setArtifactProvider(ArtifactProvider artifactProvider);
-
-}
View
454 ...e/src/main/java/org/apache/cocoon/deployer/applicationserver/BlocksFrameworkServer23.java
@@ -1,454 +0,0 @@
-/*
- * 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;
- }
-
-}
View
132 ...r-core/src/main/java/org/apache/cocoon/deployer/applicationserver/MonolithicServer22.java
@@ -1,132 +0,0 @@
-/*
- * 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.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-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 MonolithicServer22 {
-
- private Logger logger;
- private File basedir;
- private List rules = new ArrayList();
- private Set alreadyDeployedFilesSet = new HashSet();
-
- public MonolithicServer22(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);
- fileDeployer.setAlreadyDeployedFilesSet(alreadyDeployedFilesSet);
- 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;
- }
- }
-
-}
View
33 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/BinaryBlock.java
@@ -1,33 +0,0 @@
-/*
- * 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.block;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-
-/**
- * A block that is available as zipped archive.
- */
-public interface BinaryBlock extends Block {
-
- /**
- * @return the InputStream to get access to the blocks binaries
- */
- public InputStream getInputStream() throws IOException;
-
-
-}
View
47 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/Block.java
@@ -1,47 +0,0 @@
-/*
- * 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.block;
-
-
-/**
- * @version $Id:$
- */
-public interface Block {
-
- public static final String BLOCK_NS_10 = "http://apache.org/cocoon/blocks/cob/1.0";
- String BLOCK_DESCRIPTOR_LOCATION = "META-INF/block.xml";
-
- /**
- * @return the block namespace
- */
- public String getNamespace();
-
- /**
- * @ return the block id (from the block descriptor and NOT from the deployment descriptor)
- */
- public String getId();
-
- /**
- * @return the block descriptor (contains informatin like version, author, dependencies, ...)
- */
- public org.apache.cocoon.deployer.generated.block.x10.Block getBlockDescriptor();
-
- /**
- * @return the deployment information for the block
- */
- public org.apache.cocoon.deployer.generated.deploy.x10.Block getDeployDescriptor();
-
-}
View
186 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/BlockFactory.java
@@ -1,186 +0,0 @@
-/*
- * 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.block;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.StringTokenizer;
-
-import org.apache.cocoon.deployer.DeploymentException;
-import org.apache.cocoon.deployer.block.impl.Block10;
-import org.apache.cocoon.deployer.block.impl.LocalBlock10;
-import org.apache.cocoon.deployer.generated.block.x10.Block;
-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.Unmarshaller;
-import org.exolab.castor.xml.ValidationException;
-import org.xml.sax.SAXException;
-
-public class BlockFactory {
-
- public static BinaryBlock createBinaryBlock(File blockArchive, org.apache.cocoon.deployer.generated.deploy.x10.Block deploymentDescriptor) {
- Validate.notNull(blockArchive, "You have to pass a block");
- Validate.isTrue(blockArchive.exists(), "The block must exist as file (" + blockArchive.getAbsolutePath() + ").");
- Validate.notNull(deploymentDescriptor, "You have to provide a deployment descriptor.");
-
- Block10 block = new Block10();
-
- // set the install descriptor
- block.setDeployDescriptor(deploymentDescriptor);
-
- // get and set the descriptor
- Block blockDescriptor = null;
- try {
- Unmarshaller unmarshaller = new Unmarshaller(Block.class);
- // unmarshaller.setDebug(true);
- blockDescriptor = (Block) unmarshaller.unmarshal(new InputStreamReader(ZipUtils.getBlockDescriptorIs(blockArchive)));
-
- block.setBlockDescriptor(blockDescriptor);
- block.setInputStream(new FileInputStream(blockArchive));
- block.setNameSpace(XMLUtils.getDocumentNamespace(ZipUtils.getBlockDescriptorIs(blockArchive)));
- block.setId(blockDescriptor.getId());
-
- } catch (FileNotFoundException e) {
- throw new DeploymentException("The block archive file '" + blockArchive.getAbsolutePath() + "' can't be found.");
- } catch (IOException e) {
- throw new DeploymentException("The block archive or the block descriptor '" + blockArchive.getAbsolutePath() + "' can't be read correctly.");
- } catch (MarshalException e) {
- throw new DeploymentException("The block descriptor of the archive '" + blockArchive.getAbsolutePath() + "' can't be read correctly.");
- } catch (ValidationException e) {
- throw new DeploymentException("The block descriptor of the archive '" + blockArchive.getAbsolutePath() + "' can't be read correctly.");
- } catch (SAXException e) {
- throw new DeploymentException("The block descriptor of the archive '" + blockArchive.getAbsolutePath() + "' can't be read correctly.");
- }
-
- return block;
- }
-
- public static BinaryBlock createAutowiredBlock(File artifact, String deployBlockId) {
- Validate.notNull(deployBlockId, "You have to pass the deployBlockId.");
-
- org.apache.cocoon.deployer.generated.deploy.x10.Block deployBlock = new org.apache.cocoon.deployer.generated.deploy.x10.Block();
- deployBlock.setId(deployBlockId);
-
- BinaryBlock block = BlockFactory.createBinaryBlock(artifact, deployBlock);
- deployBlock.setUrn(block.getBlockDescriptor().getId());
-
- return block;
- }
-
- public static LocalBlock createLocalBlock(org.apache.cocoon.deployer.generated.deploy.x10.Block installBlock,
- String cocoonTargetUrl) {
-
- Validate.notNull(installBlock, "You have to pass a block deployment configuration.");
-
- LocalBlock10 localBlock = new LocalBlock10();
- localBlock.setDeployDescriptor(installBlock);
-
- // get and set the descriptor
- Block blockDescriptor = null;
-
- try {
- String location = installBlock.getLocation();
- Validate.notNull(location, "The location (attribute 'location' of the element 'block') of the block mustn't be null");
-
- File blockDescriptorFile = new File(location + File.separator +
- org.apache.cocoon.deployer.block.Block.BLOCK_DESCRIPTOR_LOCATION);
-
- System.out.println("blockDescriptorFile: " + blockDescriptorFile.getAbsolutePath());
-
- if(!blockDescriptorFile.exists()) {
- throw new DeploymentException("The block descriptor file can't be found: " +
- blockDescriptorFile.getAbsolutePath());
- }
-
- Unmarshaller unmarshaller = new Unmarshaller(Block.class);
- // unmarshaller.setDebug(true);
- blockDescriptor = (Block) unmarshaller.unmarshal(new FileReader(blockDescriptorFile));
-
- localBlock.setBlockDescriptor(blockDescriptor);
- localBlock.setId(blockDescriptor.getId());
- localBlock.setNameSpace(XMLUtils.getDocumentNamespace(new FileInputStream(blockDescriptorFile)));
-
- // calculate the location relative to the server root directory in the case that the
- // location is relative itself
- String blockPath = new File(location).getCanonicalPath();
- String cocoonPath = new File(cocoonTargetUrl).getCanonicalPath();
- localBlock.setBaseDirectory(createRelativeLocation(cocoonPath, blockPath));
-
- } catch (MarshalException e) {
- throw new DeploymentException("The block descriptor can't be read correctly.");
- } catch (ValidationException e) {
- throw new DeploymentException("The block descriptor can't be read correctly because of validation problems (XML schema).");
- } catch (FileNotFoundException e) {
- throw new DeploymentException("The block descriptor file can't be found.");
- } catch (SAXException e) {
- throw new DeploymentException("The block descriptor can't be read correctly.");
- } catch (IOException e) {
- throw new DeploymentException("The block descriptor can't be read correctly.");
- }
-
- return localBlock;
- }
-
- protected static String createRelativeLocation(final String cocoonLocation, final String blockLocation) {
-
- String cleanedCocoonLocation = cocoonLocation.replaceAll("\\\\", "/");
- String cleanedBlockLocation = blockLocation.replaceAll("\\\\", "/");
- String commonBaseDir = "";
-
- for(int i = 0; i < cleanedBlockLocation.length(); i++) {
- String reducedBlockLocation = cleanedBlockLocation.substring(0, cleanedBlockLocation.length() - i);
- if(cleanedCocoonLocation.indexOf(reducedBlockLocation) > -1) {
- commonBaseDir = reducedBlockLocation.substring(0, reducedBlockLocation.lastIndexOf("/") + 1);
- break;
- }
- }
-
- String relativeCocoonLocation = cleanedCocoonLocation.substring(commonBaseDir.length());
- relativeCocoonLocation = relativeCocoonLocation.endsWith("/") ? relativeCocoonLocation : relativeCocoonLocation + "/";
-
- String relativeBlockLocation = cleanedBlockLocation.substring(commonBaseDir.length());
- relativeBlockLocation = relativeBlockLocation.endsWith("/") ? relativeBlockLocation : relativeBlockLocation + "/";
-
- // if there is no common basedir, the relativeBlockLocation has to be absolute
- if(commonBaseDir.equals("")) {
- return relativeBlockLocation;
- }
- return relativizePath(relativeCocoonLocation) + relativeBlockLocation;
- }
-
- /**
- * Use it to get ../../ out of e.g. x/y/
- *
- * @param path The path to be relativized
- * @return the relativzed path
- */
- protected static String relativizePath(final String path) {
- StringTokenizer tokenizer = new StringTokenizer(path, "/");
- StringBuffer relativizedPathSb = new StringBuffer();
- while(tokenizer.hasMoreElements()) {
- tokenizer.nextElement();
- relativizedPathSb.append("../");
- }
- return relativizedPathSb.toString();
- }
-
-}
View
29 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/LocalBlock.java
@@ -1,29 +0,0 @@
-/*
- * 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.block;
-
-/**
- * A block that is under development and available from within the filesystem
- * of the server it is deployed to.
- */
-public interface LocalBlock extends Block {
-
- /**
- * @return the root directory of the block
- */
- public String getBaseDirectory();
-
-}
View
75 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/impl/Block10.java
@@ -1,75 +0,0 @@
-/*
- * 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.block.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.cocoon.deployer.block.BinaryBlock;
-import org.apache.cocoon.deployer.generated.block.x10.Block;
-
-public class Block10 implements BinaryBlock {
-
- private String id;
- private String namespace;
- private InputStream inputStream;
- private Block blockDescriptor;
- private org.apache.cocoon.deployer.generated.deploy.x10.Block deployDescriptor;
-
- public void setNameSpace(String namespace) {
- this.namespace = namespace;
- }
-
- public String getNamespace() {
- return this.namespace;
- }
-
- public void setInputStream(InputStream inputStream) {
- this.inputStream = inputStream;
- }
-
- public InputStream getInputStream() throws IOException {
- return this.inputStream;
- }
-
- public void setBlockDescriptor(Block blockDescriptor) {
- this.blockDescriptor = blockDescriptor;
- }
-
- public Block getBlockDescriptor() {
- return this.blockDescriptor;
- }
-
- public void setDeployDescriptor(org.apache.cocoon.deployer.generated.deploy.x10.Block deployDescriptor) {
- this.deployDescriptor = deployDescriptor;
- }
-
- public org.apache.cocoon.deployer.generated.deploy.x10.Block getDeployDescriptor() {
- return this.deployDescriptor;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getId() {
- return this.id;
- }
-
-}
View
72 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/block/impl/LocalBlock10.java
@@ -1,72 +0,0 @@
-/*
- * 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.block.impl;
-
-import org.apache.cocoon.deployer.block.LocalBlock;
-import org.apache.cocoon.deployer.generated.block.x10.Block;
-
-public class LocalBlock10 implements LocalBlock {
-
- private String id;
- private String namespace;
- private String baseDirectory;
- private Block blockDescriptor;
- private org.apache.cocoon.deployer.generated.deploy.x10.Block deployDescriptor;
-
- public void setNameSpace(String namespace) {
- this.namespace = namespace;
- }
-
- public String getNamespace() {
- return this.namespace;
- }
-
- public void setBlockDescriptor(Block blockDescriptor) {
- this.blockDescriptor = blockDescriptor;
- }
-
- public Block getBlockDescriptor() {
- return this.blockDescriptor;
- }
-
- public void setDeployDescriptor(org.apache.cocoon.deployer.generated.deploy.x10.Block deployDescriptor) {
- this.deployDescriptor = deployDescriptor;
- }
-
- public org.apache.cocoon.deployer.generated.deploy.x10.Block getDeployDescriptor() {
- return this.deployDescriptor;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getId() {
- return this.id;
- }
-
- public void setBaseDirectory(String baseDirectory) {
- this.baseDirectory = baseDirectory;
- }
-
- public String getBaseDirectory() {
- return baseDirectory;
- }
-
-}
View
35 cocoon-deployer-core/src/main/java/org/apache/cocoon/deployer/filemanager/FileManager.java
@@ -1,35 +0,0 @@
-/*
- * 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.filemanager;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * A simple interface that makes it possible to implement different ways of doing filesystem operations,
- * may it be transaction or non-transaction.
- */
-public interface FileManager {
-
- public InputStream readResource(String resource) throws FileManagerException;
-
- public OutputStream writeResource(String string) throws FileManagerException;
-
- public void rollbackTransaction(Exception ex) throws FileManagerException;
-
- public void commitTransaction() throws FileManagerException;
-
-}
View
24 ...loyer-core/src/main/java/org/apache/cocoon/deployer/filemanager/FileManagerException.java
@@ -1,24 +0,0 @@
-/*
- * 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.filemanager;
-
-public class FileManagerException extends Exception {
-
- public FileManagerException(Throwable e) {
- super(e);
- }
-
-}
View
99 ...ore/src/main/java/org/apache/cocoon/deployer/filemanager/NontransactionalFileManager.java
@@ -1,99 +0,0 @@
-/*
- * 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.filemanager;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.cocoon.deployer.DeploymentException;
-import org.apache.cocoon.deployer.util.FileUtils;
-import org.apache.commons.lang.Validate;
-
-/**
- * This implementation provides non-transaction file system operations.
- */
-public class NontransactionalFileManager implements FileManager {
-
- private File basedir;
- private List fosList = new ArrayList();
-
- public NontransactionalFileManager(URI basedir) {
- Validate.notNull(basedir, "basedir mustn't be null.");
- this.basedir = new File(basedir);
- if(!this.basedir.exists()) {
- if(!this.basedir.mkdirs()) {
- throw new DeploymentException("Can't create the base directory '" + this.basedir + "'.");
- }
- }
- }
-
- public InputStream readResource(String resource) throws FileManagerException {
- Validate.notNull(resource, "resource mustn't be null.");
- try {
- return new FileInputStream(new File(this.basedir, cleanResource(resource)));
- } catch (FileNotFoundException e) {
- throw new FileManagerException(e);
- }
- }
-
- public OutputStream writeResource(String resource) throws FileManagerException {
- Validate.notNull(resource, "resource mustn't be null.");
- try {
- FileOutputStream fos = new FileOutputStream(FileUtils.createDirectory(new File(this.basedir, resource)));
- fosList.add(fos);
- return fos;
- } catch (FileNotFoundException e) {
- throw new FileManagerException(e);
- } catch (IOException e) {
- throw new FileManagerException(e);
- }
- }
-
- public void rollbackTransaction(Exception ex) throws FileManagerException {
- closeFileOutputStreams();
- throw new DeploymentException("Can't rollback when using a nontransactional implementation.", ex);
- }
-
- public void commitTransaction() throws FileManagerException {
- closeFileOutputStreams();
- }
-
- private void closeFileOutputStreams() throws FileManagerException {
- for(int i = 0; i < fosList.size(); i++) {
- try {
- ((FileOutputStream) fosList.get(i)).close();
- } catch (IOException e) {
- throw new FileManagerException(e);
- }
- }
- }
-
- protected String cleanResource(String resource) {
- if(resource.startsWith("\\") || resource.startsWith("/")) {