org.mule.common.metadata
Class DefaultMetaDataKey

java.lang.Object
  extended by org.mule.common.metadata.DefaultMetaDataKey
All Implemented Interfaces:
Comparable<MetaDataKey>, MetaDataKey, TypeMetaDataModel

public class DefaultMetaDataKey
extends Object
implements MetaDataKey, TypeMetaDataModel

MetaDataKey default implementation. This should be used to describe the service entities/types names and display name.


Constructor Summary
DefaultMetaDataKey(String id, String displayName)
          Simple DefaultMetaDataKey constructor.
DefaultMetaDataKey(String id, String displayName, boolean isFromCapable)
          Deprecated. 
DefaultMetaDataKey(String id, String displayName, List<MetaDataKeyProperty> keyProperties)
          This is an advanced constructor.
 
Method Summary
 boolean addProperty(MetaDataKeyProperty metaDataKeyProperty)
           
 int compareTo(MetaDataKey otherMetadataKey)
          For keys comparison, the first criteria to match will be the category of both keys, where, if it's not possible to discriminate the order, the id will take place.
 boolean equals(Object obj)
           
 String getCategory()
           
 String getDisplayName()
           
 String getId()
           
 List<MetaDataKeyProperty> getProperties()
           
<T extends MetaDataKeyProperty>
T
getProperty(Class<T> metaDataKeyProperty)
           
 int hashCode()
           
 boolean hasProperty(Class<? extends MetaDataKeyProperty> metaDataKeyProperty)
           
 boolean isFromCapable()
          Deprecated. use hasProperty(Class) instead
 boolean removeProperty(MetaDataKeyProperty metaDataKeyProperty)
           
 void setCategory(String category)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultMetaDataKey

public DefaultMetaDataKey(String id,
                          String displayName)
Simple DefaultMetaDataKey constructor. You should use this for most use cases.

Parameters:
id - The XML name for the entity.
displayName - The name that will be displayed on Studio UI.

DefaultMetaDataKey

public DefaultMetaDataKey(String id,
                          String displayName,
                          List<MetaDataKeyProperty> keyProperties)

This is an advanced constructor. You should use the DefaultMetaDataKey(String id, String displayName) for most use cases.

This is intended for advanced scenarios like DSQL or Grouping types.

Parameters:
id - The XML name for the entity.
displayName - The name that will be displayed on Studio UI.
keyProperties - Properties used for advanced scenarios. Some of them are DsqlFromMetaDataKeyProperty or TypeDescribingProperty.

DefaultMetaDataKey

@Deprecated
public DefaultMetaDataKey(String id,
                                     String displayName,
                                     boolean isFromCapable)
Deprecated. 

Method Detail

getId

public String getId()
Specified by:
getId in interface MetaDataKey

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface MetaDataKey

getCategory

public String getCategory()
Specified by:
getCategory in interface MetaDataKey

setCategory

public void setCategory(String category)

getProperties

public List<MetaDataKeyProperty> getProperties()
Specified by:
getProperties in interface MetaDataKey

addProperty

public boolean addProperty(MetaDataKeyProperty metaDataKeyProperty)
Specified by:
addProperty in interface MetaDataKey

removeProperty

public boolean removeProperty(MetaDataKeyProperty metaDataKeyProperty)
Specified by:
removeProperty in interface MetaDataKey

hasProperty

public boolean hasProperty(Class<? extends MetaDataKeyProperty> metaDataKeyProperty)
Specified by:
hasProperty in interface MetaDataKey

getProperty

public <T extends MetaDataKeyProperty> T getProperty(Class<T> metaDataKeyProperty)
Specified by:
getProperty in interface MetaDataKey

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public int compareTo(MetaDataKey otherMetadataKey)
For keys comparison, the first criteria to match will be the category of both keys, where, if it's not possible to discriminate the order, the id will take place.

Specified by:
compareTo in interface Comparable<MetaDataKey>
Parameters:
otherMetadataKey - the key to be compared with
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

isFromCapable

@Deprecated
public boolean isFromCapable()
Deprecated. use hasProperty(Class) instead

Specified by:
isFromCapable in interface TypeMetaDataModel


Copyright © 2015 MuleSoft, Inc.. All rights reserved.