Coverage Report - com.aurea.maven.plugins.sonic.sdm.container.impl.DefaultESBContainer
 
Classes in this File Line Coverage Branch Coverage Complexity
DefaultESBContainer
0%
0/41
0%
0/10
1.417
 
 1  
 package com.aurea.maven.plugins.sonic.sdm.container.impl;
 2  
 
 3  
 import com.aurea.maven.plugins.sonic.sdm.container.IESBContainer;
 4  
 import com.aurea.maven.plugins.sonic.sdo.AbstractDataObjectInstance;
 5  
 import commonj.sdo.DataObject;
 6  
 
 7  
 public class DefaultESBContainer extends AbstractDataObjectInstance implements IESBContainer {
 8  
 
 9  
 
 10  
   @Override
 11  
   protected String getNamespace() {
 12  
 
 13  0
     return "http://www.sonicsw.com/sonicxq";
 14  
   }
 15  
 
 16  
   @Override
 17  
   protected String getXSDType() {
 18  
 
 19  0
     return "XQ_CONTAINER";
 20  
   }
 21  
 
 22  
   @Override
 23  
   protected String getResourceLocation() {
 24  
 
 25  
     //TODO remove hard coded schema version number
 26  
     //return "ESB/schema/2013/xqContainer.xsd";
 27  
           
 28  
             //ATTENTION: XSD Changed in order to allow Instances Tailoring ...
 29  
                 //Copy the original xqContainer.xsd and change the integer schema definitions to String
 30  
                 //Needs to be checked with every iteration!
 31  
           
 32  0
           return "schema/ChangedxqContainer2015.xsd";
 33  
   }
 34  
 
 35  
   /**
 36  
    * 
 37  
    */
 38  0
   public DefaultESBContainer() {
 39  
 
 40  0
   }
 41  
 
 42  
 
 43  
   /**
 44  
    * @param _busConnection _busConnection
 45  
    */
 46  
   public void setBusConnection(final String _busConnection) {
 47  
 
 48  0
     DataObject dobj = getDataObject();
 49  0
     dobj.set("busConnection_", _busConnection);
 50  0
   }
 51  
 
 52  
   /**
 53  
    * @param _routingHttpConnection _routingHttpConnection
 54  
    */
 55  
   public void setRoutingHttpConnection(final String _routingHttpConnection) {
 56  
 
 57  0
     DataObject dobj = getDataObject();
 58  0
     dobj.set("routingHttpConnection_", _routingHttpConnection);
 59  0
   }
 60  
 
 61  
   /**
 62  
    * @param _enablePayloadCapture _enablePayloadCapture
 63  
    */
 64  
   public void setEnablePayloadCapture(final String _enablePayloadCapture) {
 65  
 
 66  0
     DataObject dobj = getDataObject();
 67  0
     dobj.set("enablePayloadCapture_", new Boolean(_enablePayloadCapture));
 68  0
   }
 69  
 
 70  
   /**
 71  
    * @param _useForLookingGlass _useForLookingGlass
 72  
    */
 73  
   public void setUseForLookingGlass(final String _useForLookingGlass) {
 74  
 
 75  0
     DataObject dobj = getDataObject();
 76  0
     dobj.set("useForLookingGlass_", new Boolean(_useForLookingGlass));
 77  0
   }
 78  
 
 79  
   /**
 80  
    * @param _useIntraContainerMessaging _useIntraContainerMessaging
 81  
    */
 82  
   public void setUseIntraContainerMessaging(final String _useIntraContainerMessaging) {
 83  0
     DataObject dobj = getDataObject();
 84  0
     dobj.set("useIntraContainerMessaging_", new Boolean(_useIntraContainerMessaging));
 85  0
   }
 86  
 
 87  
   /**
 88  
    * {@inheritDoc}
 89  
    */
 90  
   public void setName(final String _name) {
 91  
 
 92  0
     DataObject dobj = getDataObject();
 93  0
     dobj.set("name", _name);
 94  0
   }
 95  
 
 96  
   /**
 97  
    * {@inheritDoc}
 98  
    */
 99  
   public String getName() {
 100  
 
 101  0
     return getDataObject().getString("name");
 102  
   }
 103  
 
 104  
   /**
 105  
    * {@inheritDoc}
 106  
    */
 107  
   public void addServiceInstance(final String _serviceName, final String _listeners, final String _reference, final int _startupPrio, final int _concurrentCalls, boolean inLine) {
 108  
 
 109  0
     DataObject dObj = getDataObject();
 110  
 
 111  0
     if (dObj != null) {
 112  
 
 113  0
       DataObject services = dObj.getDataObject("services");
 114  0
       if (services == null) {
 115  0
         services = dObj.createDataObject("services");
 116  
       }
 117  
       
 118  
      
 119  
       
 120  0
       String svcName = (_reference != null ? _reference : _serviceName);
 121  0
       DataObject instance = services.createDataObject("serviceApplication");
 122  0
       instance.set("name", svcName);
 123  0
       instance.set("Instances", _listeners);
 124  0
       if(inLine){
 125  0
               String process = (_reference != null ? "PROCESS" : "INSTANCE");
 126  0
               instance.set("service_ref", process);
 127  0
       }
 128  
       else{              
 129  0
               instance.set("service_ref", svcName);
 130  
       }
 131  0
       instance.set("startupPriorityLevel", java.math.BigInteger.valueOf(_startupPrio));
 132  0
       instance.set("ConcurrentCalls", java.math.BigInteger.valueOf(_concurrentCalls));
 133  
       //instance.set("Process", Boolean.valueOf(process));
 134  
     }
 135  0
   }
 136  
 
 137  
 }