org.teiid.adminapi.impl
Class AdminObjectImpl

java.lang.Object
  extended by org.teiid.adminapi.impl.AdminObjectImpl
All Implemented Interfaces:
Serializable, AdminObject
Direct Known Subclasses:
CacheStatisticsMetadata, ModelMetaData, PropertyDefinitionMetadata, RequestMetadata, SessionMetadata, TransactionMetadata, VDBMetaData, VDBTranslatorMetaData, WorkerPoolStatisticsMetadata

public abstract class AdminObjectImpl
extends Object
implements AdminObject, Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.teiid.adminapi.AdminObject
DELIMITER, DELIMITER_CHAR, ESCAPED_DELIMITER, ESCAPED_WILDCARD, WILDCARD
 
Constructor Summary
AdminObjectImpl()
           
 
Method Summary
<T> T
addAttchment(Class<T> type, T attachment)
          Add attachment
 Object addAttchment(String key, Object attachment)
           
 void addProperty(String key, String value)
           
<T> T
getAttachment(Class<T> type)
          Get attachment
 Object getAttachment(String key)
           
 List<PropertyMetadata> getJAXBProperties()
           
 String getName()
          Get the name for this AdminObject, usually the last component of the identifier.
 Properties getProperties()
          Get the Configuration Properties that defines this process
 String getPropertyValue(String name)
          Searches for the property with the specified key in this Admin Object.
<T> T
removeAttachment(Class<T> type)
          Remove attachment
 Object removeAttachment(String key)
           
 void setJAXBProperties(List<PropertyMetadata> props)
           
 void setName(String name)
           
 void setProperties(Properties props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminObjectImpl

public AdminObjectImpl()
Method Detail

getName

public String getName()
Description copied from interface: AdminObject
Get the name for this AdminObject, usually the last component of the identifier.

Specified by:
getName in interface AdminObject
Returns:
String Name

setName

public void setName(String name)

getProperties

public Properties getProperties()
Description copied from interface: AdminObject
Get the Configuration Properties that defines this process

Specified by:
getProperties in interface AdminObject
Returns:
Properties

setProperties

public void setProperties(Properties props)

getJAXBProperties

public List<PropertyMetadata> getJAXBProperties()

setJAXBProperties

public void setJAXBProperties(List<PropertyMetadata> props)

getPropertyValue

public String getPropertyValue(String name)
Description copied from interface: AdminObject
Searches for the property with the specified key in this Admin Object. If the key is not found the method returns null.

Specified by:
getPropertyValue in interface AdminObject
Parameters:
name - the property key.
Returns:
the value in this Admin Object with the specified key value.

addProperty

public void addProperty(String key,
                        String value)

addAttchment

public <T> T addAttchment(Class<T> type,
                          T attachment)
Add attachment

Type Parameters:
T - the expected type
Parameters:
attachment - the attachment
type - the type
Returns:
any previous attachment
Throws:
IllegalArgumentException - for a null name, attachment or type
UnsupportedOperationException - when not supported by the implementation

addAttchment

public Object addAttchment(String key,
                           Object attachment)

removeAttachment

public <T> T removeAttachment(Class<T> type)
Remove attachment

Type Parameters:
T - the expected type
Parameters:
type - the type
Returns:
the attachment or null if not present
Throws:
IllegalArgumentException - for a null name or type

removeAttachment

public Object removeAttachment(String key)

getAttachment

public <T> T getAttachment(Class<T> type)
Get attachment

Type Parameters:
T - the expected type
Parameters:
type - the type
Returns:
the attachment or null if not present
Throws:
IllegalArgumentException - for a null name or type

getAttachment

public Object getAttachment(String key)


Copyright © 2012. All Rights Reserved.