Dozer and Hivemind Integration - injecting a list of string

View: New views
2 Messages — Rating Filter:   Alert me  

Dozer and Hivemind Integration - injecting a list of string

by alina2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
         i am new to hivemind and i wanted to integrate Dozer (a "Java Bean to Java Bean mapper") to the application i am working at.
I spent some time trying to figure out how to do this, so i post the solution i found in case it turns out to be useful for someone else too (or so it can be improved by others).

   <service-point id="mapperService" interface="net.sf.dozer.util.mapping.MapperIF" />

   <configuration-point id="mappingFiles">
          <schema>
              <element name="mappingFile">          
                  <attribute name="value" required="true"/>
                  <rules>
                    <push-attribute attribute="value"/>
                    <invoke-parent method="addElement"/>
                  </rules>
                </element>
          </schema>
    </configuration-point>
   
    <contribution configuration-id="mappingFiles">
         <mappingFile value="dozerBeanMapping.xml" />
    </contribution>

      <implementation service-id="mapperService">
        <invoke-factory>            
            <construct class="net.sf.dozer.util.mapping.DozerBeanMapper">
              <set-configuration property="mappingFiles" configuration-id="mappingFiles"/>
            </construct>
          </invoke-factory>
      </implementation>  

Cheers,
alina.    

Re: Dozer and Hivemind Integration - injecting a list of string

by Ed Ross :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

unsubscribe

On Fri, Oct 3, 2008 at 8:07 AM, alina2 <aquereilhac@...> wrote:

Hello,
        i am new to hivemind and i wanted to integrate
http://dozer.sourceforge.net/ Dozer  (a "Java Bean to Java Bean mapper") to
the application i am working at.
I spent some time trying to figure out how to do this, so i post the
solution i found in case it turns out to be useful for someone else too (or
so it can be improved by others).

  <service-point id="mapperService"
interface="net.sf.dozer.util.mapping.MapperIF" />

  <configuration-point id="mappingFiles">
         <schema>
             <element name="mappingFile">
                 <attribute name="value" required="true"/>
                 <rules>
                   <push-attribute attribute="value"/>
                   <invoke-parent method="addElement"/>
                 </rules>
               </element>
         </schema>
   </configuration-point>

   <contribution configuration-id="mappingFiles">
        <mappingFile value="dozerBeanMapping.xml" />
   </contribution>

     <implementation service-id="mapperService">
       <invoke-factory>
           <construct class="net.sf.dozer.util.mapping.DozerBeanMapper">
             <set-configuration property="mappingFiles"
configuration-id="mappingFiles"/>
           </construct>
         </invoke-factory>
     </implementation>

Cheers,
alina.
--
View this message in context: http://www.nabble.com/Dozer-and-Hivemind-Integration---injecting-a-list-of-string-tp19796513p19796513.html
Sent from the Hivemind - User mailing list archive at Nabble.com.




--
Ed Ross
edross15057@...