Package jetbrains.buildServer
Class TeamServerSummary
- java.lang.Object
-
- jetbrains.buildServer.TeamServerSummary
-
public class TeamServerSummary extends Object
Summary data for specified user. A bit of terminology: significant configuration (project, change) means configuration (project, change) that adds to the user "status".
-
-
Constructor Summary
Constructors Constructor Description TeamServerSummary(List<BuildProject> projects, List<BuildProject> additionalProjects, Collection<String> visibleProjectIds, List<UserChangeInfo> changes, List<UserChangeInfo> personalChanges, Set<String> watchedConfigurationIds, Status watchedBuildsStatus, Map<String,Status> projectStatuses, Map<String,List<TestData>> testsWithInvestigation, boolean responsibleExists, Status changesStatus, int filteredOutProjectsCount, int filteredOutChangesCount, int counter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
configurationIsVisible(BuildType buildConfiguration)
Returns if the configuration is watched by the user.SubscriptionsCollection
createSubscription(User user)
Creates new subscription corresponding to this summary to request new counter from the serverBuildType
findConfigurationById(String id)
Returns configuration with specified id.BuildProject
findProjectById(String id, boolean findInAdditionalProjects)
Returns project with specified id.Collection<BuildProject>
getAdditionalProjects()
List<BuildProject>
getAllProjects()
Returns all projects registered on server including filtered out with investigations.List<UserChangeInfo>
getChanges()
Returns changes calculated according to policy.Status
getChangesStatus()
Returns status of user changes within watched configurations.Date
getCreatedDate()
Returns the date when summary was built.int
getFilteredOutChangesCount()
int
getFilteredOutProjectsCount()
List<BuildProject>
getOwnProjects(String projectId)
List<UserChangeInfo>
getPersonalChanges()
Returns list of all user personal changes.Collection<BuildProject>
getProjects()
Returns all projects registered on server.Map<String,Status>
getProjectStatusMap()
BuildProject
getRootProject()
Returns root projectStatus
getStatus()
Returns status of the watched configurations for the user.Status
getStatus(BuildProject project)
Returns project status calculated as cumulative status of the watched configurations in this project.Status
getStatus(BuildType configuration)
Returns specified configuration status it is watched orStatus.UNKNOWN
otherwise.int
getSummaryCounter()
Returns event counter on the moment of this summary creationMap<String,List<TestData>>
getTestsWithInvestigation()
Returns list of the tests user is responsible for grouped by project id.Collection<String>
getVisibleProjectIds()
Set<String>
getWatchedConfigurationIds()
boolean
projectIsVisible(BuildProject project)
Returnstrue
if the project is watched by the user.boolean
responsibleExists()
Returnstrue
if all watched configurations have responsible person.void
setSummaryCounter(int summaryCounter)
-
-
-
Constructor Detail
-
TeamServerSummary
public TeamServerSummary(List<BuildProject> projects, List<BuildProject> additionalProjects, Collection<String> visibleProjectIds, List<UserChangeInfo> changes, List<UserChangeInfo> personalChanges, Set<String> watchedConfigurationIds, Status watchedBuildsStatus, Map<String,Status> projectStatuses, Map<String,List<TestData>> testsWithInvestigation, boolean responsibleExists, Status changesStatus, int filteredOutProjectsCount, int filteredOutChangesCount, int counter)
-
-
Method Detail
-
getProjects
public Collection<BuildProject> getProjects()
Returns all projects registered on server.- Returns:
- all projects.
-
getRootProject
@NotNull public BuildProject getRootProject()
Returns root project- Returns:
- see above
-
getAllProjects
public List<BuildProject> getAllProjects()
Returns all projects registered on server including filtered out with investigations.- Returns:
- all projects including filtered out with investigations.
-
getOwnProjects
@Nullable public List<BuildProject> getOwnProjects(@NotNull String projectId)
-
getChanges
public List<UserChangeInfo> getChanges()
Returns changes calculated according to policy.- Returns:
- changes calculated according to policy.
-
getPersonalChanges
public List<UserChangeInfo> getPersonalChanges()
Returns list of all user personal changes.- Returns:
- list of all user personal changes.
-
getCreatedDate
public Date getCreatedDate()
Returns the date when summary was built.- Returns:
- the date when summary was built.
-
getStatus
public Status getStatus(BuildProject project)
Returns project status calculated as cumulative status of the watched configurations in this project.- Parameters:
project
-- Returns:
- complex status of specified project, calculated according to the set of watched configurations.
-
getStatus
public Status getStatus(BuildType configuration)
Returns specified configuration status it is watched orStatus.UNKNOWN
otherwise.- Returns:
- status of the configuration if it is watched. UNKNOWN otherwise
-
responsibleExists
public boolean responsibleExists()
Returnstrue
if all watched configurations have responsible person.- Returns:
- true if all watched configurations have responsible person.
-
getStatus
public Status getStatus()
Returns status of the watched configurations for the user.- Returns:
- complex status, calculated according to all watched configurations.
-
projectIsVisible
public boolean projectIsVisible(BuildProject project)
Returnstrue
if the project is watched by the user.- Parameters:
project
-- Returns:
- true is project is significant
-
configurationIsVisible
public boolean configurationIsVisible(BuildType buildConfiguration)
Returns if the configuration is watched by the user.- Parameters:
buildConfiguration
-- Returns:
- true if configuration is significant.
-
getChangesStatus
public Status getChangesStatus()
Returns status of user changes within watched configurations.- Returns:
- complex status of changes, made by specified user.
-
findConfigurationById
public BuildType findConfigurationById(String id)
Returns configuration with specified id.- Parameters:
id
-- Returns:
- configuration with specified id.
-
findProjectById
public BuildProject findProjectById(String id, boolean findInAdditionalProjects)
Returns project with specified id.- Parameters:
id
-- Returns:
- project with specified id.
-
getVisibleProjectIds
public Collection<String> getVisibleProjectIds()
-
getAdditionalProjects
public Collection<BuildProject> getAdditionalProjects()
-
getTestsWithInvestigation
public Map<String,List<TestData>> getTestsWithInvestigation()
Returns list of the tests user is responsible for grouped by project id.- Returns:
- list of the tests user is responsible for grouped by project id
-
getFilteredOutProjectsCount
public int getFilteredOutProjectsCount()
-
getFilteredOutChangesCount
public int getFilteredOutChangesCount()
-
setSummaryCounter
public void setSummaryCounter(int summaryCounter)
-
getSummaryCounter
public int getSummaryCounter()
Returns event counter on the moment of this summary creation- Returns:
-
createSubscription
public SubscriptionsCollection createSubscription(@NotNull User user)
Creates new subscription corresponding to this summary to request new counter from the server- Parameters:
user
-- Returns:
-
-