com.buildforge.services.common.dbo
Class ServerDBO

java.lang.Object
  extended by com.buildforge.services.common.dbo.DBObject
      extended by com.buildforge.services.common.dbo.ServerDBO

public class ServerDBO
extends DBObject

Database information representing the definition of a logical server.


Nested Class Summary
static class ServerDBO.Error
          Specifies whether or not an error was encountered while testing the connection to this server.
static class ServerDBO.Publish
          Specifies what types of file publishing are permitted for the server.
static class ServerDBO.Upstate
          Specifies whether or not the server's readiness is currently in flux.
 
Field Summary
static java.lang.Class<ServerDBO> CLASS
           
static java.lang.String TYPE_KEY
           
 
Constructor Summary
ServerDBO()
           
 
Method Summary
 ServerDBO fromArray(java.lang.Object[] data)
          Deserialize the database object's settings from a request array.
 boolean getActive()
           
 java.lang.String getAuthId()
           
 java.lang.String getCollectorId()
           
 int getEnvironmentId()
           
 ServerDBO.Error getError()
           
 java.lang.String getHost()
           
 int getLevel()
           
 java.lang.String getName()
           
 java.lang.String getPath()
           
 ServerDBO.Publish getPublish()
           
 int getServerId()
           
 java.lang.String getTestKey()
           
 java.lang.String getTestText()
           
 java.lang.String getTypeKey()
          Retrieve the key that should be used to look up the display name for a data type.
 ServerDBO.Upstate getUpstate()
           
 boolean isLive()
          Checks whether or not the object is live.
static void sanityCheckId(int serverId)
           
static void sanityCheckName(java.lang.String serverName)
           
 void setActive(boolean active)
           
 void setAuthId(java.lang.String authId)
           
 void setCollectorId(java.lang.String collectorId)
           
 void setEnvironmentId(int environmentId)
           
 void setError(ServerDBO.Error error)
           
 void setHost(java.lang.String host)
           
 void setLevel(int level)
           
 void setName(java.lang.String name)
           
 void setPath(java.lang.String path)
           
 void setPublish(ServerDBO.Publish publish)
           
 void setServerId(int serverId)
           
 void setTestKey(java.lang.String testKey)
           
 void setTestText(java.lang.String testText)
           
 void setUpstate(ServerDBO.Upstate upstate)
           
 java.lang.Object[] toArray()
          Serializes this database object as an array of objects.
 java.lang.String toString()
           
 
Methods inherited from class com.buildforge.services.common.dbo.DBObject
badId, badName, checkDead, checkLive, collision, collision
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_KEY

public static final java.lang.String TYPE_KEY
See Also:
Constant Field Values

CLASS

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

ServerDBO

public ServerDBO()
Method Detail

getTypeKey

public java.lang.String getTypeKey()
Description copied from class: DBObject
Retrieve the key that should be used to look up the display name for a data type.

Specified by:
getTypeKey in class DBObject
Returns:
the type key for this object's class

isLive

public boolean isLive()
Description copied from class: DBObject
Checks whether or not the object is live. Note that this is not valid for object types that do not have a unique identifier. Those for which no reasonable implementation exists should always return false.

Specified by:
isLive in class DBObject
Returns:
true iff liveness is a valid concept for this object, and the object is live; otherwise, false is returned.

getActive

public boolean getActive()

getAuthId

public java.lang.String getAuthId()

getCollectorId

public java.lang.String getCollectorId()

getEnvironmentId

public int getEnvironmentId()

getError

public ServerDBO.Error getError()

getHost

public java.lang.String getHost()

getLevel

public int getLevel()

getName

public java.lang.String getName()

getPath

public java.lang.String getPath()

getPublish

public ServerDBO.Publish getPublish()

getServerId

public int getServerId()

getTestKey

public java.lang.String getTestKey()

getTestText

public java.lang.String getTestText()

getUpstate

public ServerDBO.Upstate getUpstate()

setActive

public void setActive(boolean active)

setAuthId

public void setAuthId(java.lang.String authId)

setCollectorId

public void setCollectorId(java.lang.String collectorId)

setEnvironmentId

public void setEnvironmentId(int environmentId)

setError

public void setError(ServerDBO.Error error)

setHost

public void setHost(java.lang.String host)

setLevel

public void setLevel(int level)

setName

public void setName(java.lang.String name)

setPath

public void setPath(java.lang.String path)

setPublish

public void setPublish(ServerDBO.Publish publish)

setServerId

public void setServerId(int serverId)

setTestKey

public void setTestKey(java.lang.String testKey)

setTestText

public void setTestText(java.lang.String testText)

setUpstate

public void setUpstate(ServerDBO.Upstate upstate)

sanityCheckId

public static void sanityCheckId(int serverId)
                          throws APIException
Throws:
APIException

sanityCheckName

public static void sanityCheckName(java.lang.String serverName)
                            throws APIException
Throws:
APIException

toString

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

fromArray

public ServerDBO fromArray(java.lang.Object[] data)
                    throws APIException
Description copied from class: DBObject
Deserialize the database object's settings from a request array. This method is used to reconstruct a database object from the array that was created by DBObject.toArray().

Specified by:
fromArray in class DBObject
Parameters:
data - the object list that renders this object
Returns:
this object, for convenience
Throws:
APIException - if there is something wrong with the serialized data that interferes with the reconstruction of the object. The most obvious reason for this would be if the serialized array contains the wrong number of fields or otherwise does not match the serialized form for this type of database object.

toArray

public java.lang.Object[] toArray()
Description copied from class: DBObject
Serializes this database object as an array of objects. As specified in the description for Protocol, all supported protocols transfer database objects in this form.

Specified by:
toArray in class DBObject