com.buildforge.services.client.dbo
Class TagVar

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

public class TagVar
extends java.lang.Object

A TagVar is a named variable used by build tags. For instance, a TagVar may be used to connote sequential build numbers in the case of an auto-incrementing variable. TagVars are refereced by build tags using a '$' prefix notation before the name of the TagVar, i.e.: $FOO references the TagVar named FOO.


Field Summary
static java.lang.Class<TagVar> CLASS
           
 
Constructor Summary
TagVar(APIClientConnection conn)
           
 
Method Summary
 TagVar create()
          Creates this TagVar in the database
 void delete()
          Removes this TagVar from the database
static java.util.List<TagVar> findByPid(APIClientConnection conn, int projectId)
          Retrieves all tag variables by Project identifier
static TagVar findByPidName(APIClientConnection conn, int projectId, java.lang.String tagName)
          Retrieves a named tag variable by Project identifier
static TagVar findByPidTid(APIClientConnection conn, int projectId, int tagId)
          Retrives a single tag variable by Project identifier and TagVar identifier
 boolean getAutoInc()
          Returns whether (true) or not (false) a variable will be automatically incremented on each build.
 java.lang.String getName()
          Returns the unique (project-wide) name of this tag variable
 int getPadding()
           
 int getProjectId()
          Returns the identifier of the Project to which this tag variable belongs
 int getTagId()
          Returns the unique (project-wide) identifier of this tag variable
 int getValue()
          Returns the current value of this tag variable
 void setAutoInc(boolean autoInc)
          Sets whether (true) or not (false) a variable will be automatically incremented on each build.
 void setName(java.lang.String name)
          Sets the unique (project-wide) name of this tag variable
 void setPadding(int padding)
           
 void setProjectId(int projectId)
          Sets the identifier of the Project to which this tag variable belongs
 void setTagId(int tagId)
          Deprecated. 
 void setValue(int value)
          Sets the current value of this tag variable
 java.lang.String toString()
           
 TagVar update()
          Commits the latest state of this object to the database
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS

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

TagVar

public TagVar(APIClientConnection conn)
Method Detail

findByPid

public static java.util.List<TagVar> findByPid(APIClientConnection conn,
                                               int projectId)
                                        throws java.io.IOException,
                                               ServiceException
Retrieves all tag variables by Project identifier

Parameters:
conn -
projectId - The integer identifier of the Project whose tags will be returned
Returns:
Throws:
java.io.IOException
ServiceException

findByPidName

public static TagVar findByPidName(APIClientConnection conn,
                                   int projectId,
                                   java.lang.String tagName)
                            throws java.io.IOException,
                                   ServiceException
Retrieves a named tag variable by Project identifier

Parameters:
conn -
projectId - The integer identifier of the Project whose tag will be returned
tagName - The name of the TagVar to return
Returns:
Throws:
java.io.IOException
ServiceException

findByPidTid

public static TagVar findByPidTid(APIClientConnection conn,
                                  int projectId,
                                  int tagId)
                           throws java.io.IOException,
                                  ServiceException
Retrives a single tag variable by Project identifier and TagVar identifier

Parameters:
conn -
projectId - The integer identifier of the Project whose tag will be returned
tagId - The integer identifier of the TagVar to be returned
Returns:
Throws:
java.io.IOException
ServiceException

update

public TagVar update()
              throws java.io.IOException,
                     ServiceException
Commits the latest state of this object to the database

Returns:
Throws:
java.io.IOException
ServiceException

create

public TagVar create()
              throws java.io.IOException,
                     ServiceException
Creates this TagVar in the database

Returns:
Throws:
java.io.IOException
ServiceException

delete

public void delete()
            throws java.io.IOException,
                   ServiceException
Removes this TagVar from the database

Throws:
java.io.IOException
ServiceException

getAutoInc

public boolean getAutoInc()
Returns whether (true) or not (false) a variable will be automatically incremented on each build.


getName

public java.lang.String getName()
Returns the unique (project-wide) name of this tag variable


getPadding

public int getPadding()

getProjectId

public int getProjectId()
Returns the identifier of the Project to which this tag variable belongs


getTagId

public int getTagId()
Returns the unique (project-wide) identifier of this tag variable


getValue

public int getValue()
Returns the current value of this tag variable


setAutoInc

public void setAutoInc(boolean autoInc)
Sets whether (true) or not (false) a variable will be automatically incremented on each build.

Parameters:
autoInc -

setName

public void setName(java.lang.String name)
Sets the unique (project-wide) name of this tag variable


setPadding

public void setPadding(int padding)
                throws APIException
Throws:
APIException

setProjectId

public void setProjectId(int projectId)
Sets the identifier of the Project to which this tag variable belongs


setTagId

@Deprecated
public void setTagId(int tagId)
Deprecated. 

Sets the unique (project-wide) identifier of this tag variable


setValue

public void setValue(int value)
              throws APIException
Sets the current value of this tag variable

Throws:
APIException

toString

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