jetbrains.buildServer.serverSide
Interface PersonalBuildManager


public interface PersonalBuildManager

Provides information about personal builds.


Method Summary
 SQueuedBuild addRemoteRunToQueue(BuildType buildType, BuildAgent agent, long changeListId, java.lang.String comment)
          Schedules configuration to run specified personal changes on specified agent.
 SQueuedBuild addRemoteRunToQueue(BuildType buildType, long changeListId, java.lang.String comment)
          Schedules configuration to run specified personal changes.
 java.util.List<jetbrains.buildServer.RemoteBuildData> collectRemoteBuildDataForUser(long userId)
          Returns collection RemoteBuildData for all personal builds ran by the given user.
 jetbrains.buildServer.RemoteBuildData findRemoteBuildDataByBuildId(long id)
          Finds personal run information by build instance id.
 java.util.List<jetbrains.buildServer.RemoteBuildData> findRemoteBuildDataByChangesId(long id)
          Finds personal build run information objects by change id.
 SBuildType findRemoteBuildType(java.lang.String sourceId, long changeId)
          Finds personal configuration by source configuration id and perosnal change id.
 RemoteBuildType findRemoteBuildTypeByInstanceId(long buildId)
          Returns personal configuration related to the given build instance id.
 byte[] getContent(VcsModification modification, VcsChangeInfo change)
          Returns sent content of the specified file.
 byte[] getCurrentRepositoryContentForPersonallyChangedFile(VcsModification modification, java.lang.String fileName, SBuildType buildType)
          Returns last vcs repository content of the file specified.
 SVcsModification getModification(long changesId)
          Returns SVcsModification object for the personal modification with the given id.
 java.util.List<SVcsModification> getModifications(long userId)
          Returns collection of SVcsModification modifications ran by the given user.
 PersonalChangeInfo getPersonalChangeInfo(long id)
          returns information about personal change by the change id (the same as modification id)
 java.lang.String getPersonalChangeRelativeFilePath(java.lang.String original, long startedBuildId)
          Returns relative personal change path mapped when personal patch was built to send it to an agent.
 boolean isApplicable(long personalChangeId, java.util.List<VcsRootInstanceEntry> vcsRootEntries)
          Returns true if personal change files can be applied to VCS roots of the specified build configuration.
 boolean isApplicable(SBuildType buildType, java.util.Collection<java.lang.String> personalChangeFilePaths, boolean searchThroughDependencies)
          Returns true if personal change files can be applied to VCS roots of the specified build configuration.
 boolean isApplicable(VcsRootInstanceEntry vcsRootEntry, java.util.Collection<java.lang.String> personalChangeFilePaths)
          Returns true if personal change files can be applied to specified VCS root entry
 long publishChangeList(PersonalChangeInfo changeInfo, java.io.InputStream input)
          Publishes personal changes.
 void saveRemoteRunInstanceId(jetbrains.buildServer.RemoteBuildData remoteBuildData, long buildId)
          Attaches new build id the the given remote run.
 void schedulePersonalChangeForDeletion(long changeId, User user)
          Schedules personal change for deletion.
 void setPersonalChangeStatus(long changeId, Status status)
          Changes personal change commit status (if the change was committed successfully).
 

Method Detail

collectRemoteBuildDataForUser

java.util.List<jetbrains.buildServer.RemoteBuildData> collectRemoteBuildDataForUser(long userId)
Returns collection RemoteBuildData for all personal builds ran by the given user.

Parameters:
userId - specified user.
Returns:
all data related to personal builds ran by the user.

getModifications

java.util.List<SVcsModification> getModifications(long userId)
Returns collection of SVcsModification modifications ran by the given user.

Parameters:
userId - specified user.
Returns:
all personal changes run by the user, resent first
Since:
5.0

getModification

@Nullable
SVcsModification getModification(long changesId)
Returns SVcsModification object for the personal modification with the given id.

Parameters:
changesId - personal change id.
Returns:
modification object for the personal change.

saveRemoteRunInstanceId

void saveRemoteRunInstanceId(jetbrains.buildServer.RemoteBuildData remoteBuildData,
                             long buildId)
Attaches new build id the the given remote run.

Parameters:
remoteBuildData - specified remote run data.
buildId - given build id.

findRemoteBuildTypeByInstanceId

@Nullable
RemoteBuildType findRemoteBuildTypeByInstanceId(long buildId)
Returns personal configuration related to the given build instance id.

Parameters:
buildId - specified build id.
Returns:
personal configuration related to the given build instance id.

addRemoteRunToQueue

@Nullable
SQueuedBuild addRemoteRunToQueue(@NotNull
                                          BuildType buildType,
                                          long changeListId,
                                          java.lang.String comment)
Schedules configuration to run specified personal changes.

Parameters:
buildType - specified build configuration.
changeListId - specified personal change id.
comment - user comment.
Returns:
temporary created configuration id.

addRemoteRunToQueue

@Nullable
SQueuedBuild addRemoteRunToQueue(@NotNull
                                          BuildType buildType,
                                          @NotNull
                                          BuildAgent agent,
                                          long changeListId,
                                          java.lang.String comment)
Schedules configuration to run specified personal changes on specified agent.

Parameters:
buildType - specified build configuration.
agent - specified agent.
changeListId - specified personal change id.
comment - user comment.
Returns:
temporary created configuration id.

publishChangeList

long publishChangeList(PersonalChangeInfo changeInfo,
                       java.io.InputStream input)
                       throws java.io.IOException
Publishes personal changes.

Parameters:
changeInfo - personal changes information object.
input - input stream containing personal changes.
Returns:
newly created personal change id.
Throws:
java.io.IOException - exception if the publishing process failes.

findRemoteBuildDataByChangesId

java.util.List<jetbrains.buildServer.RemoteBuildData> findRemoteBuildDataByChangesId(long id)
Finds personal build run information objects by change id.

Parameters:
id - specified change id.
Returns:
list of all personal runs with the specified changes.

findRemoteBuildType

@Nullable
SBuildType findRemoteBuildType(java.lang.String sourceId,
                                        long changeId)
Finds personal configuration by source configuration id and perosnal change id.

Parameters:
sourceId - specified source configuration id.
changeId - specofied personal change id.
Returns:
temporary build configuration.

findRemoteBuildDataByBuildId

jetbrains.buildServer.RemoteBuildData findRemoteBuildDataByBuildId(long id)
Finds personal run information by build instance id.

Parameters:
id - specified build id.
Returns:
RemoteBuildData information object for the build intance.

setPersonalChangeStatus

void setPersonalChangeStatus(long changeId,
                             Status status)
Changes personal change commit status (if the change was committed successfully).

Parameters:
changeId - specified change id.
status - commit status.

getPersonalChangeInfo

@Nullable
PersonalChangeInfo getPersonalChangeInfo(long id)
returns information about personal change by the change id (the same as modification id)

Parameters:
id - personal change id
Returns:
data object containing information about personal change

schedulePersonalChangeForDeletion

void schedulePersonalChangeForDeletion(long changeId,
                                       User user)
Schedules personal change for deletion. If some build is in queue or finished it will be deleted immediatelly. If build is being ran it cancel request will be sent to the agent. Change will be marked as scheduled for deletion and will be excluded from user changes.

Parameters:
changeId - specified change id.
user - specified user. Only user who ran the change can delete it.

getContent

byte[] getContent(VcsModification modification,
                  VcsChangeInfo change)
                  throws VcsException
Returns sent content of the specified file.

Parameters:
modification - specified personal modification.
change - specified file change.
Returns:
file content.
Throws:
VcsException - throws exception if file content cannot be read.

getCurrentRepositoryContentForPersonallyChangedFile

byte[] getCurrentRepositoryContentForPersonallyChangedFile(VcsModification modification,
                                                           java.lang.String fileName,
                                                           SBuildType buildType)
                                                           throws VcsException
Returns last vcs repository content of the file specified.

Parameters:
modification - specified modification.
fileName - specified file relative name.
buildType - specified configuration.
Returns:
file content from the repository.
Throws:
VcsException - throws exception if content cannot be loaded from the repository.

getPersonalChangeRelativeFilePath

java.lang.String getPersonalChangeRelativeFilePath(java.lang.String original,
                                                   long startedBuildId)
Returns relative personal change path mapped when personal patch was built to send it to an agent.

Parameters:
original - - original change full file path.
startedBuildId - - build id when change was used.
Returns:
relative personal change path built for the specified build, null is change was not built yet.

isApplicable

boolean isApplicable(long personalChangeId,
                     @NotNull
                     java.util.List<VcsRootInstanceEntry> vcsRootEntries)
Returns true if personal change files can be applied to VCS roots of the specified build configuration.

Parameters:
personalChangeId - personal change id
vcsRootEntries - vcs root entries
Returns:
see above

isApplicable

boolean isApplicable(@NotNull
                     SBuildType buildType,
                     @NotNull
                     java.util.Collection<java.lang.String> personalChangeFilePaths,
                     boolean searchThroughDependencies)
Returns true if personal change files can be applied to VCS roots of the specified build configuration.

Parameters:
buildType - build configuration
personalChangeFilePaths - paths from the personal change
searchThroughDependencies - whether to search through build configuration dependencies or not
Returns:
see above

isApplicable

boolean isApplicable(@NotNull
                     VcsRootInstanceEntry vcsRootEntry,
                     @NotNull
                     java.util.Collection<java.lang.String> personalChangeFilePaths)
Returns true if personal change files can be applied to specified VCS root entry

Parameters:
vcsRootEntriy - VCS root entry
personalChangeFilePaths - paths to check
Returns:
see above
Since:
6.5