com.pmease.quickbuild.model
Class Build

java.lang.Object
  extended bycom.pmease.quickbuild.model.Persistent
      extended bycom.pmease.quickbuild.model.Build
All Implemented Interfaces:
org.apache.velocity.runtime.log.LogSystem

public class Build
extends Persistent
implements org.apache.velocity.runtime.log.LogSystem

Build is generated through running of a build configuration. The purpose of QuickBuild is to define different build configurations and generate desired builds.

Author:
robin shine

Field Summary
static java.lang.String ARTIFACTS_DIR
           
static java.lang.String BUILD_LOG
           
static java.lang.String CHANGES_DIR
           
static java.lang.String CHECKIN_USERS_SUFFIX
           
static java.lang.String CLOVER_HTML_REPORT_DIR
           
static java.lang.String JUNIT_HTML_REPORT_DIR
           
static java.lang.String NCOVER_HTML_REPORT_DIR
           
static java.lang.String NUNIT_HTML_REPORT_DIR
           
static java.lang.String REVISION_LOG
           
static java.lang.String REVISIONS_SUFFIX
           
 
Fields inherited from interface org.apache.velocity.runtime.log.LogSystem
DEBUG_ID, DEBUG_ON, ERROR_ID, INFO_ID, WARN_ID
 
Constructor Summary
Build()
           
 
Method Summary
 void detachLogs()
           
 java.lang.String getArtifactsDir()
          OGNL: Get artifacts directory where hold artifacts for this build
 java.lang.String getArtifactsDirUrl()
          OGNL: Get artifacts directory web url for this build.
 java.lang.String getBuildLogPath()
          OGNL: Get build log path of this build
 java.lang.String getBuildLogUrl()
          OGNL: Get build log url of this build
 java.lang.String getChangesDir()
          OGNL: Get change log directory path
 java.lang.String getCloverHtmlReportDir()
          OGNL: Get the directory where to hold Clover html report.
 java.lang.String getCloverHtmlReportUrl()
          OGNL: Get clover html report url.
 Configuration getConfiguration()
          OGNL: Get build configuration which this build belongs to..
 java.lang.String getCostTime()
          OGNL: Get build cost time in seconds.
 java.util.Set getDependentGuidRelations()
           
 java.util.Date getEndDate()
          OGNL: Get the date when this build is finished
 java.lang.String getFormattedEndDate()
          OGNL: Get formatted end date.
 java.lang.String getFormattedStartDate()
          OGNL: Get formatted start date.
 java.lang.String getJunitHtmlReportDir()
          OGNL: Get the directory which is used to hold Junit html report.
 java.lang.String getJunitHtmlReportUrl()
          OGNL: Get junit html report url.
 java.lang.String getLabel()
          OGNL: Get label for this build.
 java.util.Set getLabelRelations()
           
 java.lang.String getNcoverHtmlReportDir()
          OGNL: Get the directory which is used to hold Ncover html report.
 java.lang.String getNcoverHtmlReportUrl()
          OGNL: Get ncover html report url.
 java.lang.String getNunitHtmlReportDir()
          OGNL: Get the directory which is used to hold Nunit html report.
 java.lang.String getNunitHtmlReportUrl()
          OGNL: Get nunit html report url.
 Configuration getPromotedFrom()
           
 java.lang.String getPublishDir()
          OGNL: Get the publish directory for current build.
 java.lang.String getPublishDirUrl()
          OGNL: Get publish directory web url for this build.
 java.lang.String getRevisionLogPath()
          OGNL: Get revision log path of this build
 java.lang.String getRevisionLogUrl()
          OGNL: Get revision log url of this build
 org.apache.log4j.Logger getRuntimeLogger()
           
 java.util.Date getStartDate()
          OGNL: Get the date when this build is started
 BuildStatusEnum getStatus()
          OGNL: Get status of this build
 java.lang.String getUrl()
          OGNL: Get url of this build
 java.lang.String getVersion()
          OGNL: Get version of this build configuration.
 void init(org.apache.velocity.runtime.RuntimeServices runtimeServices)
           
 boolean isFailed()
          OGNL: Whether or not this build is failed.
 boolean isRevisionMerged()
           
 boolean isRunning()
          OGNL: Wheter or not this build is running
 boolean isSelected()
           
 boolean isSuccessful()
          OGNL: Whether or not this build is successful.
 void logVelocityMessage(int level, java.lang.String message)
           
 void mergeRevisions()
           
 java.lang.String resolveAbsolutePath(java.lang.String filePath)
          Resolves the absolute path for specified file path.
 void setConfiguration(Configuration configuration)
           
 void setDependentGuidRelations(java.util.Set dependentGuidRelations)
           
 void setEndDate(java.util.Date endDate)
           
 void setLabel(java.lang.String label)
           
 void setLabelRelations(java.util.Set labelRelations)
           
 void setPromotedFrom(Configuration promotedFrom)
           
 void setRevisionMerged(boolean revisionMerged)
           
 void setSelected(boolean selected)
           
 void setStartDate(java.util.Date startDate)
           
 void setStatus(BuildStatusEnum status)
           
 void setVersion(java.lang.String version)
           
 
Methods inherited from class com.pmease.quickbuild.model.Persistent
equals, getEntityVersion, getId, hashCode, setEntityVersion, setId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARTIFACTS_DIR

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

JUNIT_HTML_REPORT_DIR

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

CLOVER_HTML_REPORT_DIR

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

NUNIT_HTML_REPORT_DIR

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

NCOVER_HTML_REPORT_DIR

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

CHANGES_DIR

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

REVISIONS_SUFFIX

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

CHECKIN_USERS_SUFFIX

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

BUILD_LOG

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

REVISION_LOG

public static final java.lang.String REVISION_LOG
See Also:
Constant Field Values
Constructor Detail

Build

public Build()
Method Detail

getVersion

public java.lang.String getVersion()
OGNL: Get version of this build configuration.

Returns:

setVersion

public void setVersion(java.lang.String version)

getConfiguration

public Configuration getConfiguration()
OGNL: Get build configuration which this build belongs to..

Returns:

setConfiguration

public void setConfiguration(Configuration configuration)

getPromotedFrom

public Configuration getPromotedFrom()

setPromotedFrom

public void setPromotedFrom(Configuration promotedFrom)

getStatus

public BuildStatusEnum getStatus()
OGNL: Get status of this build

Returns:

setStatus

public void setStatus(BuildStatusEnum status)

getStartDate

public java.util.Date getStartDate()
OGNL: Get the date when this build is started

Returns:

setStartDate

public void setStartDate(java.util.Date startDate)

getEndDate

public java.util.Date getEndDate()
OGNL: Get the date when this build is finished

Returns:

setEndDate

public void setEndDate(java.util.Date endDate)

getRuntimeLogger

public org.apache.log4j.Logger getRuntimeLogger()

getBuildLogPath

public java.lang.String getBuildLogPath()
OGNL: Get build log path of this build

Returns:

getRevisionLogPath

public java.lang.String getRevisionLogPath()
OGNL: Get revision log path of this build

Returns:

detachLogs

public void detachLogs()

getLabel

public java.lang.String getLabel()
OGNL: Get label for this build. If blank, repositories are not labeled for this build.


setLabel

public void setLabel(java.lang.String label)

getPublishDir

public java.lang.String getPublishDir()
OGNL: Get the publish directory for current build. Publish directory is used to hold output of this build, including build log and build artifacts, etc.

Returns:

getArtifactsDir

public java.lang.String getArtifactsDir()
OGNL: Get artifacts directory where hold artifacts for this build

Returns:

getChangesDir

public java.lang.String getChangesDir()
OGNL: Get change log directory path

Returns:

getJunitHtmlReportDir

public java.lang.String getJunitHtmlReportDir()
OGNL: Get the directory which is used to hold Junit html report. The report should be named as index.html or junit-noframes.html.

Returns:

getCloverHtmlReportDir

public java.lang.String getCloverHtmlReportDir()
OGNL: Get the directory where to hold Clover html report. The report should be named as index.html.

Returns:

getNunitHtmlReportDir

public java.lang.String getNunitHtmlReportDir()
OGNL: Get the directory which is used to hold Nunit html report. The report should be named as index.html or index.htm.

Returns:

getNcoverHtmlReportDir

public java.lang.String getNcoverHtmlReportDir()
OGNL: Get the directory which is used to hold Ncover html report. The report should be named as index.html or index.htm.

Returns:

resolveAbsolutePath

public java.lang.String resolveAbsolutePath(java.lang.String filePath)
Resolves the absolute path for specified file path. If this file path already denotes a absolute file path, it will just return this path. Otherwise it will prefix the file path with this build's publish directory and return the result.

Parameters:
filePath -
Returns:
absolute path

isRevisionMerged

public boolean isRevisionMerged()

setRevisionMerged

public void setRevisionMerged(boolean revisionMerged)

mergeRevisions

public void mergeRevisions()

isSelected

public boolean isSelected()

setSelected

public void setSelected(boolean selected)

getUrl

public java.lang.String getUrl()
OGNL: Get url of this build


getBuildLogUrl

public java.lang.String getBuildLogUrl()
OGNL: Get build log url of this build


getRevisionLogUrl

public java.lang.String getRevisionLogUrl()
OGNL: Get revision log url of this build


isSuccessful

public boolean isSuccessful()
OGNL: Whether or not this build is successful.

Returns:

isFailed

public boolean isFailed()
OGNL: Whether or not this build is failed.

Returns:

isRunning

public boolean isRunning()
OGNL: Wheter or not this build is running

Returns:

getJunitHtmlReportUrl

public java.lang.String getJunitHtmlReportUrl()
OGNL: Get junit html report url.

Returns:
null if the report does not exist

getCloverHtmlReportUrl

public java.lang.String getCloverHtmlReportUrl()
OGNL: Get clover html report url.

Returns:
null if the report does not exist

getNunitHtmlReportUrl

public java.lang.String getNunitHtmlReportUrl()
OGNL: Get nunit html report url.

Returns:
null if the report does not exist

getNcoverHtmlReportUrl

public java.lang.String getNcoverHtmlReportUrl()
OGNL: Get ncover html report url.

Returns:
null if the report does not exist

getPublishDirUrl

public java.lang.String getPublishDirUrl()
OGNL: Get publish directory web url for this build.

Returns:

getArtifactsDirUrl

public java.lang.String getArtifactsDirUrl()
OGNL: Get artifacts directory web url for this build.

Returns:

getFormattedStartDate

public java.lang.String getFormattedStartDate()
OGNL: Get formatted start date.

Returns:

getFormattedEndDate

public java.lang.String getFormattedEndDate()
OGNL: Get formatted end date.

Returns:

getCostTime

public java.lang.String getCostTime()
OGNL: Get build cost time in seconds.

Returns:

getLabelRelations

public java.util.Set getLabelRelations()

setLabelRelations

public void setLabelRelations(java.util.Set labelRelations)

getDependentGuidRelations

public java.util.Set getDependentGuidRelations()

setDependentGuidRelations

public void setDependentGuidRelations(java.util.Set dependentGuidRelations)

init

public void init(org.apache.velocity.runtime.RuntimeServices runtimeServices)
          throws java.lang.Exception
Specified by:
init in interface org.apache.velocity.runtime.log.LogSystem
Throws:
java.lang.Exception

logVelocityMessage

public void logVelocityMessage(int level,
                               java.lang.String message)
Specified by:
logVelocityMessage in interface org.apache.velocity.runtime.log.LogSystem


Copyright © 2005 PMEase Inc. All Rights Reserved.