Coverage Report - org.mule.registry.ComponentType
 
Classes in this File Line Coverage Branch Coverage Complexity
ComponentType
0%
0/23
0%
0/4
2
 
 1  
 /*
 2  
  * $Id: ComponentType.java 7976 2007-08-21 14:26:13Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.registry;
 12  
 
 13  
 /**
 14  
  * Represents a Component type in the registry
 15  
  * 
 16  
  * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
 17  
  * @version $Revision: 7976 $
 18  
  */
 19  
 public class ComponentType
 20  
 {
 21  
 
 22  0
     public static final ComponentType MULE_COMPONENT = new ComponentType("mule.engine",
 23  
         "A Mule component type");
 24  0
     public static final ComponentType MULE_CONNECTOR_COMPONENT = new ComponentType("mule.binding",
 25  
         "A Mule connector type");
 26  0
     public static final ComponentType MULE_TRANSFORMER_COMPONENT = new ComponentType("mule.transformer",
 27  
         "A Mule transformer type");
 28  0
     public static final ComponentType MULE_AGENT_COMPONENT = new ComponentType("mule.agent",
 29  
         "A Mule Agent type");
 30  0
     public static final ComponentType JBI_ENGINE_COMPONENT = new ComponentType("jbi.engine",
 31  
         "A JBI engine component type");
 32  0
     public static final ComponentType JBI_BINDING_COMPONENT = new ComponentType("jbi.binding",
 33  
         "A JBI binding component type");
 34  
 
 35  0
     public static final ComponentType[] COMPONENT_TYPES = new ComponentType[]{MULE_COMPONENT, MULE_COMPONENT,
 36  
         MULE_TRANSFORMER_COMPONENT, MULE_AGENT_COMPONENT, JBI_ENGINE_COMPONENT, JBI_BINDING_COMPONENT};
 37  
 
 38  
     private String name;
 39  
     private String description;
 40  
 
 41  
     public ComponentType(String name, String description)
 42  0
     {
 43  0
         this.name = name;
 44  0
         this.description = description;
 45  0
     }
 46  
 
 47  
     public String getName()
 48  
     {
 49  0
         return name;
 50  
     }
 51  
 
 52  
     public String getDescription()
 53  
     {
 54  0
         return description;
 55  
     }
 56  
 
 57  
     public boolean equals(Object o)
 58  
     {
 59  0
         if (this == o)
 60  
         {
 61  0
             return true;
 62  
         }
 63  0
         if (!(o instanceof ComponentType))
 64  
         {
 65  0
             return false;
 66  
         }
 67  
 
 68  0
         final ComponentType componentType = (ComponentType)o;
 69  
 
 70  0
         if (name != null ? !name.equals(componentType.name) : componentType.name != null)
 71  
         {
 72  0
             return false;
 73  
         }
 74  
 
 75  0
         return true;
 76  
     }
 77  
 
 78  
     public int hashCode()
 79  
     {
 80  0
         return (name != null ? name.hashCode() : 0);
 81  
     }
 82  
 
 83  
     public String toString()
 84  
     {
 85  0
         return name;
 86  
     }
 87  
 }