Class PropertyFileBean


  • public class PropertyFileBean
    extends java.lang.Object
    This bean configures the PropertyFileService itself. An implementation of this bean can be added directly to the Hub, or the utility method PropertyFileService.addPropertyFileBean(PropertyFileBean) can be used to add this bean to the Hub
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String INSTANCE_NAME
      The name of the single instance of this bean
      private java.util.HashMap<java.lang.String,​java.lang.Class<?>> mapping  
      static java.lang.String TYPE_NAME
      The name of the type under which this bean should be placed
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyFileBean()
      A null constructor for creating an empty PropertyFileBean
      PropertyFileBean​(PropertyFileBean copyMe)
      This method will create a deep copy of the passed in PropertyFileBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTypeMapping​(java.lang.String typeName, java.lang.Class<?> beanClass)
      Adds a type mapping to the set of type mappings
      java.util.Map<java.lang.String,​java.lang.Class<?>> getTypeMapping()
      Gets the mapping from type name to bean class
      java.lang.Class<?> getTypeMapping​(java.lang.String typeName)
      Gets the type mapping with the given name
      java.lang.Class<?> removeTypeMapping​(java.lang.String typeName)
      Removes the type mapping with the given name
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TYPE_NAME

        public static final java.lang.String TYPE_NAME
        The name of the type under which this bean should be placed
        See Also:
        Constant Field Values
      • INSTANCE_NAME

        public static final java.lang.String INSTANCE_NAME
        The name of the single instance of this bean
        See Also:
        Constant Field Values
      • mapping

        private final java.util.HashMap<java.lang.String,​java.lang.Class<?>> mapping
    • Constructor Detail

      • PropertyFileBean

        public PropertyFileBean()
        A null constructor for creating an empty PropertyFileBean
      • PropertyFileBean

        public PropertyFileBean​(PropertyFileBean copyMe)
        This method will create a deep copy of the passed in PropertyFileBean
        Parameters:
        copyMe - The non-null bean to copy
    • Method Detail

      • getTypeMapping

        public java.util.Map<java.lang.String,​java.lang.Class<?>> getTypeMapping()
        Gets the mapping from type name to bean class
        Returns:
        A copy of the type name to bean class mapping
      • addTypeMapping

        public void addTypeMapping​(java.lang.String typeName,
                                   java.lang.Class<?> beanClass)
        Adds a type mapping to the set of type mappings
        Parameters:
        typeName - The name of the type. May not be null
        beanClass - The bean class to which this type should be mapped. May not be null
      • removeTypeMapping

        public java.lang.Class<?> removeTypeMapping​(java.lang.String typeName)
        Removes the type mapping with the given name
        Parameters:
        typeName - removes the type mapping of the given name. May not be null
        Returns:
        The class associated with the type name, or null if there was no type mapping with the given name
      • getTypeMapping

        public java.lang.Class<?> getTypeMapping​(java.lang.String typeName)
        Gets the type mapping with the given name
        Parameters:
        typeName - the type mapping to search for. May not be null
        Returns:
        The class associated with the type name, or null if there was no type mapping with the given name