com.metamatrix.common.config.model
Class BasicComponentObject

java.lang.Object
  extended by com.metamatrix.common.namedobject.BasicObject
      extended by com.metamatrix.common.config.model.BasicComponentObject
All Implemented Interfaces:
ComponentObject, BaseObject, PropertiedObject, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
BasicComponentDefn, BasicConfiguration, BasicDeployedComponent, BasicSharedResource

public abstract class BasicComponentObject
extends BasicObject
implements ComponentObject, PropertiedObject, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
  BasicComponentObject(BaseID componentID, ComponentTypeID typeID)
           
protected BasicComponentObject(BasicComponentObject component)
           
 
Method Summary
 void accept(ConfigurationVisitor visitor)
           
 void addProperties(java.util.Properties newProperties)
          Add a the newProperties to the current properties settings.
 void addProperty(java.lang.String name, java.lang.String value)
          Add a name/value pair as a new property setting for the current Configuration.
 ComponentTypeID getComponentTypeID()
          Returns the component type
 java.lang.String getCreatedBy()
          Returns the principal who created this type
 java.util.Date getCreatedDate()
          Returns the Date this type was created
 java.lang.String getCreatedDateString()
           
 java.lang.String getDescription()
          Returns the description of this component definition
 java.util.Properties getEditableProperties()
          Helper method to enable building the property hierarchy for deployed Components
 java.lang.String getLastChangedBy()
          Returns the principal who last modified this type
 java.util.Date getLastChangedDate()
          Returns the Date this type was last changed
 java.lang.String getLastChangedDateString()
           
 java.util.Properties getProperties()
          Returns the current unmodifiable properties for the component
 java.lang.String getProperty(java.lang.String name)
          Returns a property value for the given property name
 boolean isDependentUpon(BaseID componentObjectId)
          Returns true if this object is dependent upon the specified ComponentObjectID
 void removeProperties(java.util.Collection propertyNames)
          Remove the Collection of propertyNames from tthe current properties settings.
 void removeProperty(java.lang.String name)
          Remove a property setting based on the name
 void setCreatedBy(java.lang.String createdBy)
           
 void setCreatedDate(java.lang.String createdDate)
           
 void setDescription(java.lang.String description)
           
 void setLastChangedBy(java.lang.String lastChangedBy)
           
 void setLastChangedDate(java.lang.String lastChangedDate)
           
 void setProperties(java.util.Properties properties)
          Set the properties for this object.
 java.lang.String toString()
          Returns a string representing the name of the object.
 
Methods inherited from class com.metamatrix.common.namedobject.BasicObject
clone, compareTo, equals, getFullName, getID, getName, hashCode, setID
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.metamatrix.common.config.api.ComponentObject
getName
 
Methods inherited from interface com.metamatrix.common.namedobject.BaseObject
clone, getFullName, getID
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

BasicComponentObject

public BasicComponentObject(BaseID componentID,
                            ComponentTypeID typeID)

BasicComponentObject

protected BasicComponentObject(BasicComponentObject component)
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String name)
Description copied from interface: ComponentObject
Returns a property value for the given property name

Specified by:
getProperty in interface ComponentObject
Parameters:
name - of the property value to obtain
Returns:
String property value

getComponentTypeID

public ComponentTypeID getComponentTypeID()
Description copied from interface: ComponentObject
Returns the component type

Specified by:
getComponentTypeID in interface ComponentObject
Returns:
ComponentType of this component

getProperties

public java.util.Properties getProperties()
Description copied from interface: ComponentObject
Returns the current unmodifiable properties for the component

Specified by:
getProperties in interface ComponentObject
Returns:
Properties

isDependentUpon

public boolean isDependentUpon(BaseID componentObjectId)
Description copied from interface: ComponentObject
Returns true if this object is dependent upon the specified ComponentObjectID

Specified by:
isDependentUpon in interface ComponentObject
Parameters:
componentObjectId - is the id to check for dependencies for
Returns:
boolean true if this object is dependent

setProperties

public void setProperties(java.util.Properties properties)
Set the properties for this object. If the argument is null, an empty Properties object is created.

Parameters:
properties - the set of properties for this service; a reference to this Properties instance should not be maintained by the caller

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)
Add a name/value pair as a new property setting for the current Configuration.


addProperties

public void addProperties(java.util.Properties newProperties)
Add a the newProperties to the current properties settings.


removeProperty

public void removeProperty(java.lang.String name)
Remove a property setting based on the name


removeProperties

public void removeProperties(java.util.Collection propertyNames)
Remove the Collection of propertyNames from tthe current properties settings.


getDescription

public java.lang.String getDescription()
Returns the description of this component definition

Specified by:
getDescription in interface ComponentObject
Returns:
String description of this component definition

setDescription

public void setDescription(java.lang.String description)

getCreatedBy

public java.lang.String getCreatedBy()
Returns the principal who created this type

Specified by:
getCreatedBy in interface ComponentObject
Returns:
String principal name

setCreatedBy

public void setCreatedBy(java.lang.String createdBy)

getCreatedDate

public java.util.Date getCreatedDate()
Returns the Date this type was created

Specified by:
getCreatedDate in interface ComponentObject
Returns:
Date this type was created

getCreatedDateString

public java.lang.String getCreatedDateString()

setCreatedDate

public void setCreatedDate(java.lang.String createdDate)

getLastChangedBy

public java.lang.String getLastChangedBy()
Returns the principal who last modified this type

Specified by:
getLastChangedBy in interface ComponentObject
Returns:
String principal name

setLastChangedBy

public void setLastChangedBy(java.lang.String lastChangedBy)

getLastChangedDate

public java.util.Date getLastChangedDate()
Returns the Date this type was last changed

Specified by:
getLastChangedDate in interface ComponentObject
Returns:
Date this type was last changed

getLastChangedDateString

public java.lang.String getLastChangedDateString()

setLastChangedDate

public void setLastChangedDate(java.lang.String lastChangedDate)

getEditableProperties

public java.util.Properties getEditableProperties()
Helper method to enable building the property hierarchy for deployed Components


toString

public java.lang.String toString()
Returns a string representing the name of the object. This has been overriden for GUI display purposes - the Console only wants to display the "name" (not the "fullname") of a component object.Me

Overrides:
toString in class BasicObject
Returns:
the string representation of this instance.

accept

public void accept(ConfigurationVisitor visitor)
Specified by:
accept in interface ComponentObject


Copyright © 2009. All Rights Reserved.