| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Copyright 2004, 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. |
| --> |
| |
| <module id="tapestry.data" version="4.0.0" package="org.apache.tapestry.util.io"> |
| |
| Module used to define the DataSqueezer service and related. |
| |
| <service-point id="DataSqueezer" interface="org.apache.tapestry.services.DataSqueezer"> |
| |
| Converts back and forth between primitive and object types and encoded strings. |
| <invoke-factory service-id="hivemind.lib.PipelineFactory"> |
| <create-pipeline filter-interface="org.apache.tapestry.services.DataSqueezerFilter" |
| configuration-id="DataSqueezerFilters" |
| terminator="service:DataSqueezerTerminator" /> |
| </invoke-factory> |
| |
| |
| </service-point> |
| |
| <configuration-point id="DataSqueezerFilters" schema-id="hivemind.lib.Pipeline"> |
| Allows you to plug in your own custom data squeezers in front of the default Tapestry |
| data squeezer. |
| </configuration-point> |
| |
| <contribution configuration-id="DataSqueezerFilters"> |
| <filter name="NullDataSqueezerFilter" before="*" object="instance:org.apache.tapestry.data.NullDataSqueezerFilter" /> |
| </contribution> |
| |
| <service-point id="DataSqueezerTerminator" |
| visibility="private" |
| interface="org.apache.tapestry.services.DataSqueezer"> |
| <invoke-factory> |
| <construct class="DataSqueezerImpl"> |
| <set-configuration property="squeezeAdaptors" |
| configuration-id="SqueezeAdaptors"/> |
| </construct> |
| </invoke-factory> |
| </service-point> |
| |
| <configuration-point id="SqueezeAdaptors" occurs="1..n"> |
| |
| Defines the available set of adaptors. Each adaptor provides its own |
| prefix (via its getPrefix() method), so all that's needed is |
| the set of objects. |
| |
| <schema> |
| <element name="adaptor"> |
| <attribute name="object" required="true" translator="object"/> |
| <rules> |
| <push-attribute attribute="object"/> |
| <invoke-parent method="addElement"/> |
| </rules> |
| </element> |
| </schema> |
| </configuration-point> |
| |
| <contribution configuration-id="tapestry.Infrastructure"> |
| <property name="dataSqueezer" object="service:DataSqueezer"/> |
| </contribution> |
| |
| <service-point id="SerializableAdaptor" interface="SqueezeAdaptor"> |
| |
| Converts an object down to a compressed byte stream, and then to a MIME-like string representation. |
| |
| <invoke-factory> |
| <construct class="SerializableAdaptor" class-resolver-property="resolver"/> |
| </invoke-factory> |
| </service-point> |
| |
| |
| <contribution configuration-id="SqueezeAdaptors"> |
| <adaptor object="instance:BooleanAdaptor"/> |
| <adaptor object="instance:ByteAdaptor"/> |
| <adaptor object="instance:CharacterAdaptor"/> |
| <adaptor object="instance:ComponentAddressAdaptor"/> |
| <adaptor object="instance:DoubleAdaptor"/> |
| <adaptor object="instance:FloatAdaptor"/> |
| <adaptor object="instance:IntegerAdaptor"/> |
| <adaptor object="instance:LongAdaptor"/> |
| <adaptor object="service:SerializableAdaptor"/> |
| <adaptor object="instance:ShortAdaptor"/> |
| <adaptor object="instance:StringAdaptor"/> |
| </contribution> |
| |
| </module> |