org.mule.common.metadata
Class MetaDataPropertyManager<C extends MetaDataProperty>

java.lang.Object
  extended by org.mule.common.metadata.MetaDataPropertyManager<C>

public class MetaDataPropertyManager<C extends MetaDataProperty>
extends Object

Contains a group of properties, while ensures that any of those properties will ever collide. Also, it has some helper methods to access the different properties in it


Constructor Summary
MetaDataPropertyManager()
           
MetaDataPropertyManager(List<C> properties)
           
 
Method Summary
 boolean addProperty(C property)
          Adds a property, if the class of metaDataFieldProperty was already used in the current manager, the manager erases the previous one
 List<C> getProperties()
           
<T extends MetaDataProperty>
T
getProperty(Class<T> propertyClass)
           
 boolean hasProperty(Class<? extends MetaDataProperty> fieldProperty)
           
 boolean removeProperty(C property)
          Removes a property if exists in the current manager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaDataPropertyManager

public MetaDataPropertyManager(List<C> properties)

MetaDataPropertyManager

public MetaDataPropertyManager()
Method Detail

hasProperty

public boolean hasProperty(Class<? extends MetaDataProperty> fieldProperty)

getProperty

public <T extends MetaDataProperty> T getProperty(Class<T> propertyClass)
Parameters:
propertyClass - class to look for
Returns:
a MetaDataFieldProperty if the current manager has a propertyClass, null otherwise

addProperty

public boolean addProperty(C property)
Adds a property, if the class of metaDataFieldProperty was already used in the current manager, the manager erases the previous one

Parameters:
property - new property to be added
Returns:
true if it was added successfully, false otherwise

removeProperty

public boolean removeProperty(C property)
Removes a property if exists in the current manager

Parameters:
property -
Returns:
true if it was removed successfully, false otherwise

getProperties

public List<C> getProperties()
Returns:
a unmodifiable list of properties


Copyright © 2014. All rights reserved.