Dear Wiki user, You have subscribed to a wiki page or wiki category on "Turbine Wiki" for change notification.
The "Turbine4/Turbine4.0M1/Migrate233" page has been changed by ThomasVandahl: http://wiki.apache.org/turbine/Turbine4/Turbine4.0M1/Migrate233?action=diff&rev1=9&rev2=10 Comment: Added ParserService == Contents == <<TableOfContents(3)>> - == Migrating Turbine Services to Fulcrum Services == + == Migrating Turbine Services to Fulcrum Components == The Turbine services configuration used to live in `WEB-INF/conf/TurbineResources.properties`. The Avalon container uses two files to achieve the same function, namely `WEB-INF/conf/roleConfiguration.xml` to define which component is implemented by which class and `WEB-INF/conf/componentConfiguration.xml` to define the detailed configuration of each component. @@ -13, +13 @@ === AvalonComponentService === - The !AvalonComponentService is the main service container for all Fulcrum Services. We replaced the deprecated Excalibur container with the Fulcrum YAAFI container by default. See [[http://turbine.apache.org/fulcrum/fulcrum-yaafi/|YAAFI site]] for a description of the differences if you use other than the provided Avalon Services with Turbine. + The !AvalonComponentService is the main service container for all Fulcrum Components. We replaced the deprecated Excalibur container with the Fulcrum YAAFI container by default. See [[http://turbine.apache.org/fulcrum/fulcrum-yaafi/|YAAFI site]] for a description of the differences if you use other than the provided Avalon Services with Turbine. Replace entry in `TurbineResources.properties` for the ''!AvalonComponentService'' {{{#!properties @@ -329, +329 @@ === UploadService === - The !TurbineUploadService has been replaced with the [[http://turbine.apache.org/fulcrum/fulcrum-upload/|Fulcrum Upload]] counterpart. The following example shows the default configuration of the ''!UploadService'' before and after the migration. For details of the configuration options available see the [[http://turbine.apache.org/fulcrum/fulcrum-upload/|Fulcrum Upload Site]]. + The !TurbineUploadService has been replaced with the [[http://turbine.apache.org/fulcrum/fulcrum-upload/|Fulcrum Upload]] counterpart. The following example shows the default configuration of the ''!UploadService'' before and after the migration. For details of the configuration options available see the [[http://turbine.apache.org/fulcrum/fulcrum-upload/|Fulcrum Upload Site]]. The `automatic` option has been moved to the !ParserService. `TurbineResources.properties`: @@ -435, +435 @@ </intake> }}} + == Added Components == + + === ParserService === + + The different parser types (!ParameterParser, !CookieParser etc) as used in Turbine 2.3.3 are now being managed by a separate component called ''!ParserService''. The component provides initialized parser objects and manages them in a pool. The following example shows the default configuration of the parsers before and after the migration. For details of the configuration options available see the [[http://turbine.apache.org/fulcrum/fulcrum-parser/|Fulcrum Parser Site]]. + + '''Note:''' One of the main changes in the code of your Turbine modules probably is the replacement of `org.apache.turbine.util.parser.ParameterParser` with `org.apache.fulcrum.parser.ParameterParser`. + + `TurbineResources.properties`: + + {{{ + services.RunDataService.default.parameter.parser=org.apache.turbine.util.parser.DefaultParameterParser + services.RunDataService.default.cookie.parser=org.apache.turbine.util.parser.DefaultCookieParser + + #-------------------------------------------------------------------- + # + # P A R A M E T E R P A R S E R + # + #-------------------------------------------------------------------- + # + # This variable controls the case folding applied to URL variable + # names. + # + # Allowed values: none, lower, upper + # Default: lower + # + + url.case.folding=lower + }}} + + New `TurbineResources.properties`: + + {{{ + services.RunDataService.default.parameter.parser=org.apache.fulcrum.parser.DefaultParameterParser + services.RunDataService.default.cookie.parser=org.apache.fulcrum.parser.DefaultCookieParser + }}} + + `roleConfiguration.xml`: + + {{{#!xml + <role + name="org.apache.fulcrum.parser.ParserService" + shorthand="parser" + default-class="org.apache.fulcrum.parser.DefaultParserService"/> + }}} + + `componentConfiguration.xml`: + + {{{#!xml + <parser> + <urlCaseFolding>lower</urlCaseFolding> + <parameterEncoding>utf-8</parameterEncoding> + <automaticUpload>true</automaticUpload> + </parser> + }}} + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@turbine.apache.org For additional commands, e-mail: dev-h...@turbine.apache.org