Coverage Report - org.mule.module.json.transformers.AbstractJsonTransformer
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractJsonTransformer
0%
0/15
0%
0/2
0
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.module.json.transformers;
 8  
 
 9  
 import org.mule.api.lifecycle.InitialisationException;
 10  
 import org.mule.api.transformer.DiscoverableTransformer;
 11  
 import org.mule.transformer.AbstractMessageTransformer;
 12  
 
 13  
 import org.codehaus.jackson.map.ObjectMapper;
 14  
 
 15  
 import java.util.HashMap;
 16  
 import java.util.Map;
 17  
 
 18  
 /**
 19  
  * TODO
 20  
  */
 21  0
 public abstract class AbstractJsonTransformer extends AbstractMessageTransformer implements DiscoverableTransformer
 22  
 {
 23  0
     protected int weighting = DiscoverableTransformer.MAX_PRIORITY_WEIGHTING;
 24  
 
 25  
     private ObjectMapper mapper;
 26  
 
 27  0
     private Map<Class<?>, Class<?>> sharedMixins = new HashMap<Class<?>, Class<?>>();
 28  
 
 29  
     @Override
 30  
     public void initialise() throws InitialisationException
 31  
     {
 32  0
         if (mapper == null)
 33  
         {
 34  0
             mapper = new ObjectMapper();
 35  
         }
 36  0
     }
 37  
 
 38  
     public ObjectMapper getMapper()
 39  
     {
 40  0
         return mapper;
 41  
     }
 42  
 
 43  
     public void setMapper(ObjectMapper mapper)
 44  
     {
 45  0
         this.mapper = mapper;
 46  0
     }
 47  
 
 48  
     public int getPriorityWeighting()
 49  
     {
 50  0
         return weighting;
 51  
     }
 52  
 
 53  
     public void setPriorityWeighting(int weighting)
 54  
     {
 55  0
         this.weighting = weighting;
 56  0
     }
 57  
 
 58  
     public Map<Class<?>, Class<?>> getMixins()
 59  
     {
 60  0
         return sharedMixins;
 61  
     }
 62  
 
 63  
     public void setMixins(Map<Class<?>, Class<?>> mixins)
 64  
     {
 65  0
         this.sharedMixins = mixins;
 66  0
     }
 67  
 }