usc.cse.desi.rasdsmodel
Class ComponentDataModel

java.lang.Object
  extended byusc.cse.desi.rasdsmodel.AbstractDESIModel
      extended byusc.cse.desi.rasdsmodel.AbstractNodeModel
          extended byusc.cse.desi.rasdsmodel.ComponentDataModel

public class ComponentDataModel
extends AbstractNodeModel

This class represents a software component

Author:
Kari A. Nies (kari@ics.uci.edu)

Field Summary
protected  HostDataModel host
           
 
Fields inherited from class usc.cse.desi.rasdsmodel.AbstractNodeModel
children, connectedList, connectionsTo, desiModel, nodeRef
 
Fields inherited from class usc.cse.desi.rasdsmodel.AbstractDESIModel
associatedObject
 
Constructor Summary
ComponentDataModel(edu.uci.ics.xarchutils.ObjRef node, DeSiDataModel model)
           
 
Method Summary
 void addComponent(ComponentDataModel component)
           
 void addConnection(LogicalLinkDataModel link)
           
 void addForbiddenCoLocationConstraint(ComponentDataModel comp)
          Add a component with which this component must be co-located
 void addForbiddenLocationConstraint(HostDataModel host)
          Add a host on which this component must not be deployed
 void addRequiredCoLocationConstraint(ComponentDataModel comp)
          Add a component with which this component must be co-located
 java.util.List getForbiddenCoLocationComponents()
          Return a list of components with which this component must not be co-located, or rather which must not be deployed on the same host as this component Returns null if there are no such constraints.
 java.util.List getForbiddenLocationHosts()
          Return a list of hosts on which this component cannot be deployed.
 float getMySize()
           
 java.util.List getRequiredCoLocationComponents()
          Return a list of components with which this component must be co-located, or rather which must be deployed on the same host as this component Returns null if there are no such constraints.
 HostDataModel getRequiredLocationHost()
          Return a host on which this component must be deployed.
 void printComponentDataModel(java.lang.String indent)
          Prints a ComponentDataModel to standard out
 void removeComponent(ComponentDataModel component)
           
 void removeConnection(LogicalLinkDataModel link)
           
 void removeForbiddenCoLocationConstraint(ComponentDataModel comp)
          Remove a required co-location constraint on this component
 void removeForbiddenLocationConstraint(HostDataModel host)
          Remove a forbidden location constraint on this component
 void removeRequiredCoLocationConstraint(ComponentDataModel comp)
          Remove a required co-location constraint on this component
 void removeRequiredLocationConstraint()
          Remove the required location constraint on this component
 void setMySize(float size)
           
 void setRequiredLocationConstraint(HostDataModel host)
          Set a host on which this component must be deployed
 
Methods inherited from class usc.cse.desi.rasdsmodel.AbstractNodeModel
getChildren, getConnectedList, getConnections, getId, getMyNodeID, getMyNodeName, reinitialize, setId, setMyNodeID, setMyNodeName
 
Methods inherited from class usc.cse.desi.rasdsmodel.AbstractDESIModel
addPropertyChangeListener, getMyAssociatedObject, propertyChange, removePropertyChangeListener, setMyAssociatedObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

protected HostDataModel host
Constructor Detail

ComponentDataModel

public ComponentDataModel(edu.uci.ics.xarchutils.ObjRef node,
                          DeSiDataModel model)
Method Detail

addConnection

public void addConnection(LogicalLinkDataModel link)

removeConnection

public void removeConnection(LogicalLinkDataModel link)

addComponent

public void addComponent(ComponentDataModel component)

removeComponent

public void removeComponent(ComponentDataModel component)

setMySize

public void setMySize(float size)

getMySize

public float getMySize()
                throws NoSuchAttributeException,
                       java.lang.NumberFormatException
Throws:
NoSuchAttributeException
java.lang.NumberFormatException

getRequiredLocationHost

public HostDataModel getRequiredLocationHost()
Return a host on which this component must be deployed. Returns null if there is no such constraint.

Returns:
HostDataModel on which component must be deployed, or null.

setRequiredLocationConstraint

public void setRequiredLocationConstraint(HostDataModel host)
Set a host on which this component must be deployed


removeRequiredLocationConstraint

public void removeRequiredLocationConstraint()
Remove the required location constraint on this component


getForbiddenLocationHosts

public java.util.List getForbiddenLocationHosts()
Return a list of hosts on which this component cannot be deployed. Returns null if there are no such constraints.

Returns:
List of HostDataModel on which component connot be deplyed, or null.

addForbiddenLocationConstraint

public void addForbiddenLocationConstraint(HostDataModel host)
Add a host on which this component must not be deployed


removeForbiddenLocationConstraint

public void removeForbiddenLocationConstraint(HostDataModel host)
Remove a forbidden location constraint on this component


getRequiredCoLocationComponents

public java.util.List getRequiredCoLocationComponents()
Return a list of components with which this component must be co-located, or rather which must be deployed on the same host as this component Returns null if there are no such constraints.

Returns:
List of ComponentDataModel indicating components that must be co-located with this one, or null.

addRequiredCoLocationConstraint

public void addRequiredCoLocationConstraint(ComponentDataModel comp)
Add a component with which this component must be co-located


removeRequiredCoLocationConstraint

public void removeRequiredCoLocationConstraint(ComponentDataModel comp)
Remove a required co-location constraint on this component


getForbiddenCoLocationComponents

public java.util.List getForbiddenCoLocationComponents()
Return a list of components with which this component must not be co-located, or rather which must not be deployed on the same host as this component Returns null if there are no such constraints.

Returns:
List of ComponentDataModel indicating components that must not be co-located with this one, or null.

addForbiddenCoLocationConstraint

public void addForbiddenCoLocationConstraint(ComponentDataModel comp)
Add a component with which this component must be co-located


removeForbiddenCoLocationConstraint

public void removeForbiddenCoLocationConstraint(ComponentDataModel comp)
Remove a required co-location constraint on this component


printComponentDataModel

public void printComponentDataModel(java.lang.String indent)
                             throws java.lang.Exception
Prints a ComponentDataModel to standard out

Parameters:
indent - number of spaces to indent output
Throws:
java.lang.Exception