com.buildforge.services.client.dbo
Class SelectorProperty

java.lang.Object
  extended by com.buildforge.services.client.dbo.SelectorProperty

public class SelectorProperty
extends java.lang.Object

A SelectorProperty is a specific test (i.e.: free memory is greater than 1gb, system load is less than 2, java version equals 1.4, etc.) used by parent Selector objects at runtime to determine the suitability of a particular Server to be used as an execution platform for a certain Project.


Field Summary
static java.lang.Class<SelectorProperty> CLASS
           
 
Constructor Summary
SelectorProperty(APIClientConnection conn, Selector newParent)
          Defines a new SelectorProperty but neither adds it to the specified parent or creates it in the database.
 
Method Summary
 SelectorProperty clone()
           
 void delete()
          Removes this SelectorProperty from both its parent and from the database
 boolean equals(java.lang.Object obj)
           
 SelectorPropertyDBO.Operator getOperator()
          Returns the current comparator for the test, i.e.: greater than ,less than, equals, etc.
 Selector getParent()
          Returns the parent Selector object to which this SelectorProperty is associated
 java.lang.String getPropertyName()
          Returns the name of the property to be tested, i.e.: NUM_CPU, MyCustomCollectorName, etc.
 java.lang.String getPropertyValue()
          Returns the value
 boolean getRequired()
           
 java.lang.String getSelectorId()
           
 void setOperator(SelectorPropertyDBO.Operator newOperator)
           
 void setPropertyName(java.lang.String newPropertyName)
           
 void setPropertyValue(java.lang.String newPropertyValue)
           
 void setRequired(boolean newRequired)
           
 java.lang.String toString()
           
 SelectorProperty update()
          Commits any modifications to the state of this object to the database
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS

public static final java.lang.Class<SelectorProperty> CLASS
Constructor Detail

SelectorProperty

public SelectorProperty(APIClientConnection conn,
                        Selector newParent)
Defines a new SelectorProperty but neither adds it to the specified parent or creates it in the database. The new SelectorProperty should be explicitly added to its parent when creation is desired, in the case of a live parent, or prior to calling .create() on the parent Selector in the case of a Selector that has not yet itself been created in the database.

Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

update

public SelectorProperty update()
                        throws java.io.IOException,
                               ServiceException
Commits any modifications to the state of this object to the database

Returns:
Throws:
java.io.IOException
ServiceException

delete

public void delete()
            throws java.io.IOException,
                   ServiceException
Removes this SelectorProperty from both its parent and from the database

Throws:
java.io.IOException
ServiceException

getParent

public Selector getParent()
Returns the parent Selector object to which this SelectorProperty is associated


clone

public SelectorProperty clone()
Overrides:
clone in class java.lang.Object

getOperator

public SelectorPropertyDBO.Operator getOperator()
Returns the current comparator for the test, i.e.: greater than ,less than, equals, etc.


getPropertyName

public java.lang.String getPropertyName()
Returns the name of the property to be tested, i.e.: NUM_CPU, MyCustomCollectorName, etc. This property will be located in the manifest for the Server being evaluated and the stored value of that property will be used as the left hand side of the comparison for the SelectorProperty test.


getPropertyValue

public java.lang.String getPropertyValue()
Returns the value


getRequired

public boolean getRequired()

getSelectorId

public java.lang.String getSelectorId()

setOperator

public void setOperator(SelectorPropertyDBO.Operator newOperator)

setPropertyName

public void setPropertyName(java.lang.String newPropertyName)

setPropertyValue

public void setPropertyValue(java.lang.String newPropertyValue)

setRequired

public void setRequired(boolean newRequired)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object