edu.usc.cse.desi.model
Class ComponentDataModel

java.lang.Object
  extended byedu.usc.cse.desi.model.AbstractDESIModel
      extended byedu.usc.cse.desi.model.AbstractDataModel
          extended byedu.usc.cse.desi.model.AbstractNodeDataModel
              extended byedu.usc.cse.desi.model.ComponentDataModel
All Implemented Interfaces:
java.util.EventListener, IObjectWithProperties, java.beans.PropertyChangeListener, java.io.Serializable

public class ComponentDataModel
extends AbstractNodeDataModel

This class represents a software component. It contains links to other components and also sub-components which may not be used.

Author:
Nels Started Feb 15, 2004
See Also:
Serialized Form

Field Summary
protected  java.util.List myForbiddenCoLocationConstraints
           
protected  java.util.List myForbiddenLocationConstraints
           
protected  HostDataModel myParent
           
protected  java.util.List myRequiredCoLocationConstraints
           
protected  HostDataModel myRequiredLocationConstraint
           
 
Fields inherited from class edu.usc.cse.desi.model.AbstractNodeDataModel
myChildren, myConnections
 
Fields inherited from class edu.usc.cse.desi.model.AbstractDataModel
myPropertyHolder, myPropetyInitializer
 
Fields inherited from class edu.usc.cse.desi.model.AbstractDESIModel
listeners
 
Constructor Summary
ComponentDataModel()
           
ComponentDataModel(PropertyInitializer prop_init)
           
 
Method Summary
 void addComponent(ComponentDataModel component)
          Adds a sub-component to this component, if it has not already been added.
 void addConnection(LogicalLinkDataModel link)
          Adds a new logical link to this component.
 void addForbiddenCoLocationContraint(ComponentDataModel comp)
          This method sets a component that this component cannot be collocated with.
 void addForbiddenLocationConstraint(HostDataModel host)
          This method sets as a constraint another host that this component can't be deployed onto.
 void addRequiredCoLocationConstraint(ComponentDataModel comp)
          This method sets a component that this component MUST be collocated with.
 java.util.List getForbiddenCoLocationComponents()
          Returns a list of all the Components that this component cannot be collocated with.
 java.util.List getForbiddenLocationHosts()
          Returns a list of the Hosts onto which this component cannot be deployed.
 HostDataModel getMyParent()
           
 java.util.List getRequiredCoLocationComponents()
          This method returns a list of components with which this component must be collocated.
 HostDataModel getRequiredLocationHost()
          Returns the host onto which this component must be deployed.
 void removeComponent(ComponentDataModel component)
          Removes a sub-component from this component, if sub-component has not already been added.
 void removeConnection(LogicalLinkDataModel link)
          Removes a connection from this component, if connection has already been added.
 void removeForbiddenCoLocationConstraint(ComponentDataModel comp)
          Removes a constraint on this component regarding which other components it cannot be collocated with.
 void removeForbiddenLocationConstraint(HostDataModel host)
          Removed a constraint from this component as to where it cannot be deployed.
 void removeRequiredCoLocationConstraint(ComponentDataModel comp)
          Removes a constraint on this component regarding which other components it must be collocated with.
 void removeRequiredLocationConstraint()
          Removes the constrain on this component as to where it must be deployed.
 void setMyParent(HostDataModel my_parent)
           
 void setRequiredLocationConstraint(HostDataModel host)
          Sets the host onto which this component must be deployed.
 
Methods inherited from class edu.usc.cse.desi.model.AbstractNodeDataModel
getChildren, getConnections, reinitialize
 
Methods inherited from class edu.usc.cse.desi.model.AbstractDataModel
getMyPropertyInitializer, getProperties, getPropertyDisplayName, getPropertyValue, hasProperty, setPropertyValue
 
Methods inherited from class edu.usc.cse.desi.model.AbstractDESIModel
addPropertyChangeListener, firePropertyChange, propertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myParent

protected HostDataModel myParent

myForbiddenCoLocationConstraints

protected java.util.List myForbiddenCoLocationConstraints

myRequiredCoLocationConstraints

protected java.util.List myRequiredCoLocationConstraints

myForbiddenLocationConstraints

protected java.util.List myForbiddenLocationConstraints

myRequiredLocationConstraint

protected HostDataModel myRequiredLocationConstraint
Constructor Detail

ComponentDataModel

public ComponentDataModel()

ComponentDataModel

public ComponentDataModel(PropertyInitializer prop_init)
Method Detail

addConnection

public void addConnection(LogicalLinkDataModel link)
Adds a new logical link to this component. The add will only take place if this link is not currently added to this component.

Parameters:
link - LogicalLinkDataModel

removeConnection

public void removeConnection(LogicalLinkDataModel link)
Removes a connection from this component, if connection has already been added.

Parameters:
link - LogicalLinkDataModel

addComponent

public void addComponent(ComponentDataModel component)
Adds a sub-component to this component, if it has not already been added.

Parameters:
component - ComponentDataModel

removeComponent

public void removeComponent(ComponentDataModel component)
Removes a sub-component from this component, if sub-component has not already been added.

Parameters:
component - ComponentDataModel

getMyParent

public HostDataModel getMyParent()
Returns:
Returns the myParent.

setMyParent

public void setMyParent(HostDataModel my_parent)

addForbiddenCoLocationContraint

public void addForbiddenCoLocationContraint(ComponentDataModel comp)
This method sets a component that this component cannot be collocated with.


addRequiredCoLocationConstraint

public void addRequiredCoLocationConstraint(ComponentDataModel comp)
This method sets a component that this component MUST be collocated with.

Parameters:
comp -

addForbiddenLocationConstraint

public void addForbiddenLocationConstraint(HostDataModel host)
This method sets as a constraint another host that this component can't be deployed onto.

Parameters:
host - HostDataModel

getForbiddenCoLocationComponents

public java.util.List getForbiddenCoLocationComponents()
Returns a list of all the Components that this component cannot be collocated with.

Returns:

getForbiddenLocationHosts

public java.util.List getForbiddenLocationHosts()
Returns a list of the Hosts onto which this component cannot be deployed.

Returns:

getRequiredCoLocationComponents

public java.util.List getRequiredCoLocationComponents()
This method returns a list of components with which this component must be collocated.

Returns:

getRequiredLocationHost

public HostDataModel getRequiredLocationHost()
Returns the host onto which this component must be deployed.

Returns:
Returns the myRequiredLocationConstraint.

setRequiredLocationConstraint

public void setRequiredLocationConstraint(HostDataModel host)
Sets the host onto which this component must be deployed.


removeForbiddenCoLocationConstraint

public void removeForbiddenCoLocationConstraint(ComponentDataModel comp)
Removes a constraint on this component regarding which other components it cannot be collocated with.

Parameters:
comp -

removeRequiredCoLocationConstraint

public void removeRequiredCoLocationConstraint(ComponentDataModel comp)
Removes a constraint on this component regarding which other components it must be collocated with.

Parameters:
comp -

removeForbiddenLocationConstraint

public void removeForbiddenLocationConstraint(HostDataModel host)
Removed a constraint from this component as to where it cannot be deployed.

Parameters:
host -

removeRequiredLocationConstraint

public void removeRequiredLocationConstraint()
Removes the constrain on this component as to where it must be deployed.