jetbrains.buildServer
Class TeamServerSummary

java.lang.Object
  extended by jetbrains.buildServer.TeamServerSummary

public class TeamServerSummary
extends java.lang.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
TeamServerSummary(java.util.List<BuildProject> projects, java.util.List<BuildProject> filteredOutProjectsWithInvestigations, java.util.Collection<java.lang.String> visibleProjectIds, java.util.List<UserChangeInfo> changes, java.util.List<UserChangeInfo> personalChanges, java.util.Set<java.lang.String> watchedConfigurationIds, Status watchedBuildsStatus, java.util.Map<java.lang.String,Status> projectStatuses, java.util.Map<java.lang.String,java.util.List<TestData>> testsWithInvestigation, boolean responsibleExists, Status changesStatus, int filteredOutProjectsCount, int filteredOutChangesCount, int counter)
           
 
Method Summary
 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 server
 BuildType findConfigurationById(java.lang.String id)
          Returns configuration with specified id.
 BuildProject findProjectById(java.lang.String id, boolean findInFilteredOutProjectsWithInvestigations)
          Returns project with specified id.
 java.util.List<UserChangeInfo> getChanges()
          Returns changes calculated according to policy.
 Status getChangesStatus()
          Returns status of user changes within watched configurations.
 java.util.Date getCreatedDate()
          Returns the date when summary was built.
 int getFilteredOutChangesCount()
           
 int getFilteredOutProjectsCount()
           
 java.util.List<BuildProject> getFilteredOutProjectsWithInvestigations()
           
 java.util.List<UserChangeInfo> getPersonalChanges()
          Returns list of all user personal changes.
 java.util.List<BuildProject> getProjects()
          Returns all projects registered on server.
 java.util.List<BuildProject> getProjectsIncludingFilteredOutWithInvestigations()
          Returns all projects registered on server including filtered out with investigations.
 java.util.Map<java.lang.String,Status> getProjectStatusMap()
           
 BuildProject getRootProject()
          Returns root project
 Status 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 or Status.UNKNOWN otherwise.
 int getSummaryCounter()
          Returns event counter on the moment of this summary creation
 java.util.Map<java.lang.String,java.util.List<TestData>> getTestsWithInvestigation()
          Returns list of the tests user is responsible for grouped by project id.
 java.util.Collection<java.lang.String> getVisibleProjectIds()
           
 java.util.Set<java.lang.String> getWatchedConfigurationIds()
           
 boolean projectIsVisible(BuildProject project)
          Returns true if the project is watched by the user.
 boolean responsibleExists()
          Returns true if all watched configurations have responsible person.
 void setSummaryCounter(int summaryCounter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeamServerSummary

public TeamServerSummary(java.util.List<BuildProject> projects,
                         java.util.List<BuildProject> filteredOutProjectsWithInvestigations,
                         java.util.Collection<java.lang.String> visibleProjectIds,
                         java.util.List<UserChangeInfo> changes,
                         java.util.List<UserChangeInfo> personalChanges,
                         java.util.Set<java.lang.String> watchedConfigurationIds,
                         Status watchedBuildsStatus,
                         java.util.Map<java.lang.String,Status> projectStatuses,
                         java.util.Map<java.lang.String,java.util.List<TestData>> testsWithInvestigation,
                         boolean responsibleExists,
                         Status changesStatus,
                         int filteredOutProjectsCount,
                         int filteredOutChangesCount,
                         int counter)
Method Detail

getProjects

public java.util.List<BuildProject> getProjects()
Returns all projects registered on server.

Returns:
all projects.

getRootProject

@NotNull
public BuildProject getRootProject()
Returns root project

Returns:
see above

getProjectsIncludingFilteredOutWithInvestigations

public java.util.List<BuildProject> getProjectsIncludingFilteredOutWithInvestigations()
Returns all projects registered on server including filtered out with investigations.

Returns:
all projects including filtered out with investigations.

getChanges

public java.util.List<UserChangeInfo> getChanges()
Returns changes calculated according to policy.

Returns:
changes calculated according to policy.

getPersonalChanges

public java.util.List<UserChangeInfo> getPersonalChanges()
Returns list of all user personal changes.

Returns:
list of all user personal changes.

getCreatedDate

public java.util.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 or Status.UNKNOWN otherwise.

Returns:
status of the configuration if it is watched. UNKNOWN otherwise

responsibleExists

public boolean responsibleExists()
Returns true 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)
Returns true if the project is watched by the user.

Parameters:
project -
Returns:
true is project is significant

getWatchedConfigurationIds

public java.util.Set<java.lang.String> getWatchedConfigurationIds()

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(java.lang.String id)
Returns configuration with specified id.

Parameters:
id -
Returns:
configuration with specified id.

findProjectById

public BuildProject findProjectById(java.lang.String id,
                                    boolean findInFilteredOutProjectsWithInvestigations)
Returns project with specified id.

Parameters:
id -
Returns:
project with specified id.

getVisibleProjectIds

public java.util.Collection<java.lang.String> getVisibleProjectIds()

getProjectStatusMap

public java.util.Map<java.lang.String,Status> getProjectStatusMap()

getFilteredOutProjectsWithInvestigations

public java.util.List<BuildProject> getFilteredOutProjectsWithInvestigations()

getTestsWithInvestigation

public java.util.Map<java.lang.String,java.util.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: