Class XmlRpcBasedRemoteServer

    • Method Detail

      • getRegisteredAgents

        public Vector getRegisteredAgents()
        Description copied from interface: RemoteBuildServer
        Returns all agents registered on the server
        Specified by:
        getRegisteredAgents in interface RemoteBuildServer
        Returns:
        Vector of strings. Each string is serialized with XStream object of class BuildAgentData
      • getRegisteredProjects

        public Vector getRegisteredProjects​(boolean loadInstances)
        Description copied from interface: RemoteBuildServer
        Returns snapshots for all projects registered on the server
        Specified by:
        getRegisteredProjects in interface RemoteBuildServer
        Parameters:
        loadInstances - should returned data contain running and last finished builds data or not
        Returns:
        Vector of strings. Each string is serialized with XStream object of class ProjectData @param loadInstances
      • getRelatedProjects

        public Vector getRelatedProjects​(Vector buildTypeIds)
        Description copied from interface: RemoteBuildServer
        Returns projects of specified build configurations and all their parents in project hierarchy.
        Specified by:
        getRelatedProjects in interface RemoteBuildServer
        Parameters:
        buildTypeIds - Ids of build configuration
        Returns:
        Vector of strings. Each string is serialized with XStream object of class ProjectData. No running and last finished builds data is provided.
      • getBuildInstanceLogMessages

        public Vector getBuildInstanceLogMessages​(String buildId,
                                                  int skipMessages)
        Description copied from interface: RemoteBuildServer
        Returns messages logged for the specified build instance
        Specified by:
        getBuildInstanceLogMessages in interface RemoteBuildServer
        Parameters:
        buildId - build instance id
        skipMessages - how many messages should be skipped
        Returns:
        Vector of strings.
      • getBuildInstanceLogMessages

        public Vector getBuildInstanceLogMessages​(String buildId,
                                                  int skipMessages,
                                                  int maxCount)
        Description copied from interface: RemoteBuildServer
        Returns limited number of messages logged for the specified build instance
        Specified by:
        getBuildInstanceLogMessages in interface RemoteBuildServer
        Parameters:
        buildId - build instance id
        skipMessages - how many messages should be skipped
        maxCount - returns no more messages than this parameter value
        Returns:
        Vector of strings.
      • getRunningBuilds

        public Vector getRunningBuilds​(String id)
        Description copied from interface: RemoteBuildServer
        Returns all running build for the specified configuration
        Specified by:
        getRunningBuilds in interface RemoteBuildServer
        Parameters:
        id - configuration id
        Returns:
        Vector of strings. Each string is serialized with XStream object of class BuildInstanceData
      • getFinishedBuilds

        public Vector getFinishedBuilds​(String id)
        Description copied from interface: RemoteBuildServer
        Returns all finished build instances in the specified configuration
        Specified by:
        getFinishedBuilds in interface RemoteBuildServer
        Parameters:
        id - configuration id
        Returns:
        Vector of strings. Each string is serialized with XStream object of class BuildInstanceData
      • getBuildFailedTests

        public Vector getBuildFailedTests​(String buildId,
                                          int startFromIdx,
                                          int maxTestsToLoad)
        Description copied from interface: RemoteBuildServer
        Returns failed tests in the specified build instance, for running build currently executing test will be added to the list too.
        Specified by:
        getBuildFailedTests in interface RemoteBuildServer
        Parameters:
        buildId - build instance id
        startFromIdx - how many tests should be skipped
        maxTestsToLoad - how many tests to load, -1 to load all tests
        Returns:
        Vector of strings.
      • getBuildInstanceModifications

        public Vector getBuildInstanceModifications​(String buildId,
                                                    int policyId,
                                                    boolean includeModificationsIfPreviousBuildIsAbsent)
        Description copied from interface: RemoteBuildServer
        Returns modifications detected between the specified build instance and previous build, selected according to the specified policy
        Specified by:
        getBuildInstanceModifications in interface RemoteBuildServer
        Parameters:
        buildId - build instance id
        policyId - policy id, see jetbrains.buildServer.vcs.SelectPrevBuildPolicy
        includeModificationsIfPreviousBuildIsAbsent - - should method return something if build, selected according to policy, is absent
        Returns:
        Vector of strings. Each string is serialized with XStream object of class VcsModificationData
      • getContentAfter

        @NotNull
        public byte[] getContentAfter​(String modificationId,
                                      String fileName)
                               throws VcsException
        Description copied from interface: RemoteBuildServer
        Returns file content, specified by the VcsChange, at the moment right after specified modification has been made
        Specified by:
        getContentAfter in interface RemoteBuildServer
        Parameters:
        modificationId - modification id
        fileName - file name, from VcsChange
        Returns:
        byte content of a specific file version after modification
        Throws:
        VcsException - error while receiving content from the vcs server.
      • getPersonalContentAfter

        @NotNull
        public byte[] getPersonalContentAfter​(String modificationId,
                                              String fileName)
                                       throws VcsException
        Description copied from interface: RemoteBuildServer
        Returns file content, specified by the VcsChange, at the moment right after specified modification has been made for personal change
        Specified by:
        getPersonalContentAfter in interface RemoteBuildServer
        Parameters:
        modificationId - modification id
        fileName - file name, from VcsChange
        Returns:
        byte content of a specific file version after modification
        Throws:
        VcsException - error while receiving content from the vcs server.
      • getPersonalContentBefore

        @NotNull
        public byte[] getPersonalContentBefore​(String modificationId,
                                               String fileName)
                                        throws VcsException
        Description copied from interface: RemoteBuildServer
        Returns file content, which corresponded to file before specified modification has been made for personal change
        Specified by:
        getPersonalContentBefore in interface RemoteBuildServer
        Parameters:
        modificationId - modification id
        fileName - file name, from VcsChange
        Returns:
        byte content of a specific file version before modification
        Throws:
        VcsException - error while receiving content from the vcs server.
      • getContentBefore

        public byte[] getContentBefore​(String modificationId,
                                       String fileName)
                                throws VcsException
        Description copied from interface: RemoteBuildServer
        Returns file content, which corresponded to file before specified modification has been made
        Specified by:
        getContentBefore in interface RemoteBuildServer
        Parameters:
        modificationId - modification id
        fileName - file name, from VcsChange
        Returns:
        byte content of a specific file version before modification
        Throws:
        VcsException - error while receiving content from the vcs server.
      • getLastFinished

        public String getLastFinished​(String buildTypeId)
        Description copied from interface: RemoteBuildServer
        Returns last finished build in the specified configuration
        Specified by:
        getLastFinished in interface RemoteBuildServer
        Parameters:
        buildTypeId - configuration id
        Returns:
        serialized with XStream object of class BuildInstanceData
      • getNewFinishedBuilds

        public String getNewFinishedBuilds​(Vector buildIds,
                                           Vector buildTypeIds)
        Description copied from interface: RemoteBuildServer
        Returns newly finished builds
        Specified by:
        getNewFinishedBuilds in interface RemoteBuildServer
        Parameters:
        buildIds - For each build from this list this method will find later last finished build in the same build type. If it exists it will be added to result.
        buildTypeIds - Last finished build from each of these build types will be added to the result (if exists).
        Returns:
        Serialized with XStream List of BuildInstanceData
      • getPendingChanges

        public Vector getPendingChanges​(String buildTypeId)
        Description copied from interface: RemoteBuildServer
        Returns all changes detected but not run for the specified configuration
        Specified by:
        getPendingChanges in interface RemoteBuildServer
        Parameters:
        buildTypeId - configuration id
        Returns:
        Vector of strings. Each string is serialized with XStream object of class VcsModificationData
      • getModificationsSinceLastSuccessful

        public Vector getModificationsSinceLastSuccessful​(String buildTypeId)
        Description copied from interface: RemoteBuildServer
        Returns all modifications detected since last successfully finished build has been run
        Specified by:
        getModificationsSinceLastSuccessful in interface RemoteBuildServer
        Parameters:
        buildTypeId - configuration id
        Returns:
        Vector of strings. Each string is serialized with XStream object of class VcsModificationData
      • findBuildInstanceById

        public String findBuildInstanceById​(String id)
        Description copied from interface: RemoteBuildServer
        Returns build instance data for the specified id
        Specified by:
        findBuildInstanceById in interface RemoteBuildServer
        Parameters:
        id - buildId build instance id
        Returns:
        serialized with XStream object of class BuildInstanceData
      • findFailedTests

        @NotNull
        public String findFailedTests​(String fileFullPath,
                                      Vector _testNames)
        WARNING!!! If you rename this method, make sure you handled its usage in jetbrains.buildServer.usageStatistics.impl.providers.IDEFeaturesUsageStatisticsProvider
        Specified by:
        findFailedTests in interface RemoteBuildServer
        Parameters:
        fileFullPath - full VCS file path
        _testNames - test names
        Returns:
        serialized with XStream object of Map<String, List<BuildTestsData>> (build type id -> list of build tests datas)
      • findTests

        @NotNull
        public String findTests​(String fileFullPath,
                                Vector _testNames)
        WARNING!!! If you rename this method, make sure you handled its usage in jetbrains.buildServer.usageStatistics.impl.providers.IDEFeaturesUsageStatisticsProvider
        Specified by:
        findTests in interface RemoteBuildServer
        Parameters:
        fileFullPath - full VCS file path
        _testNames - test names
        Returns:
        serialized with XStream object of Map<String, List<BuildTestsData>> (build type id -> list of build tests datas)
      • isSequenceBuildType

        public Boolean isSequenceBuildType​(String buildTypeId)
        Description copied from interface: RemoteBuildServer
        Returns whether the build type is a sequence one (has snapshot dependencies)
        Specified by:
        isSequenceBuildType in interface RemoteBuildServer
        Parameters:
        buildTypeId - the build type id
        Returns:
        true iff build type is a sequence one
      • muteProblems

        public Boolean muteProblems​(@NotNull
                                    Vector itemIdsVector,
                                    boolean unmuteWhenFixed,
                                    @NotNull
                                    String unmuteTimestampStr,
                                    @NotNull
                                    Vector buildTypeIdsVector,
                                    @NotNull
                                    Vector buildIdsVector,
                                    @NotNull
                                    String userId,
                                    @NotNull
                                    String comment)
        Description copied from interface: RemoteBuildServer
        Mutes the specified items. If both buildTypeIds and buildIds are empty, mutes items in projects.
        Specified by:
        muteProblems in interface RemoteBuildServer
        Parameters:
        itemIdsVector - list of the item ids
        unmuteWhenFixed - true, if items must be unmuted automatically when fixed
        unmuteTimestampStr - date of unmute in milliseconds, "-1" to not unmute by date
        buildTypeIdsVector - build type ids to mute items in
        buildIdsVector - build ids to mute items in
        userId - id of the user
        comment - comment
        Returns:
        fake
      • unmuteProblems

        public Boolean unmuteProblems​(@NotNull
                                      Vector itemIdsVector,
                                      @NotNull
                                      String userId,
                                      @NotNull
                                      String comment)
        Description copied from interface: RemoteBuildServer
        Unmutes the specified items.
        Specified by:
        unmuteProblems in interface RemoteBuildServer
        Parameters:
        itemIdsVector - list of the item ids
        userId - id of the user
        comment - comment
        Returns:
        fake
      • updateResponsibility

        public Boolean updateResponsibility​(@NotNull
                                            Vector itemIdsVector,
                                            @NotNull
                                            String newStateName,
                                            @NotNull
                                            String responsibleUserId,
                                            @NotNull
                                            String reporterUserId,
                                            @NotNull
                                            String comment,
                                            @NotNull
                                            String removeMethodName)
        Description copied from interface: RemoteBuildServer
        Updates responsibility for the specified items.
        Specified by:
        updateResponsibility in interface RemoteBuildServer
        Parameters:
        itemIdsVector - list of the item ids
        newStateName - name of the new responsibility state
        responsibleUserId - id of the responsible user
        reporterUserId - id of the reporter user
        comment - comment
        removeMethodName - remove method name
        Returns:
        fake
      • getResponsibilityIds

        public Vector getResponsibilityIds​(String userId)
        Description copied from interface: RemoteBuildServer
        Returns id list of all the configuration which are under specified user responsibility
        Specified by:
        getResponsibilityIds in interface RemoteBuildServer
        Parameters:
        userId - TeamCity user id
        Returns:
        Vector of strings. Each string is serialized with XStream object of class ResponsibilityInfoData
      • findUserById

        public String findUserById​(String userId)
        Description copied from interface: RemoteBuildServer
        Returns user for the specified id
        Specified by:
        findUserById in interface RemoteBuildServer
        Parameters:
        userId - TeamCity user id
        Returns:
        serialized with XStream object of class User
      • getProjectCommitters

        public Vector getProjectCommitters​(String projectId)
        Description copied from interface: RemoteBuildServer
        Returns list of project committers
        Specified by:
        getProjectCommitters in interface RemoteBuildServer
        Parameters:
        projectId - TeamCity project id
        Returns:
        serialized with XStream vector of UserData
      • getResolvedArtifactDependencies

        @NotNull
        public String getResolvedArtifactDependencies​(@NotNull
                                                      Vector buildTypeIds)
        Description copied from interface: RemoteBuildServer
        Resolves artifact dependencies for the specified build types.
        Specified by:
        getResolvedArtifactDependencies in interface RemoteBuildServer
        Parameters:
        buildTypeIds - Ids of build types to resolve artifact dependencies for.
        Returns:
        serialized Map<String, List<ArtifactDependencyInfo>> (build type id -> list of resolved dependencies).
      • getBuildTypesWithArtifactDependencies

        @NotNull
        public Vector getBuildTypesWithArtifactDependencies​(@NotNull
                                                            Vector buildTypeIds)
        Description copied from interface: RemoteBuildServer
        Returns the list of build types that have artifact dependencies.
        Specified by:
        getBuildTypesWithArtifactDependencies in interface RemoteBuildServer
        Parameters:
        buildTypeIds - Ids of build types to check. Pass empty vector to check all build types.
        Returns:
        vector of build type ids.
      • getBuildTypesWithTests

        @NotNull
        public Vector getBuildTypesWithTests​(@NotNull
                                             Vector buildTypeIds)
        Description copied from interface: RemoteBuildServer
        Returns the list of build types those have tests.
        Specified by:
        getBuildTypesWithTests in interface RemoteBuildServer
        Parameters:
        buildTypeIds - Ids of build types to check. Pass empty vector to check all build types.
        Returns:
        vector of build type ids.
      • getBuildsWithArtifacts

        @NotNull
        public String getBuildsWithArtifacts​(@NotNull
                                             Vector paths,
                                             @NotNull
                                             Vector buildTypeIds)
        Description copied from interface: RemoteBuildServer
        Returns last finished builds those contain given artifact files. This method only checks last finished builds. No history lookup is performed to find older build that may have contained the path.
        Specified by:
        getBuildsWithArtifacts in interface RemoteBuildServer
        Parameters:
        paths - vector of artifact paths that should be in the finished build.
        buildTypeIds - Ids of build types to check builds in. Pass empty vector to check all build types.
        Returns:
        List<BuildInstanceData>.
      • lookUpBuildsWithArtifacts

        @NotNull
        public String lookUpBuildsWithArtifacts​(@NotNull
                                                Vector paths,
                                                @NotNull
                                                Vector buildTypeIds)
        Description copied from interface: RemoteBuildServer
        Returns last finished builds those contain given artifact files. Performs history lookup to find older build that may have contained the path.
        Specified by:
        lookUpBuildsWithArtifacts in interface RemoteBuildServer
        Parameters:
        paths - vector of artifact paths that should be in the finished build.
        buildTypeIds - Ids of build types to check builds in. Pass empty vector to check all build types.
        Returns:
        List<BuildInstanceData>.
      • stopBuild

        public Boolean stopBuild​(String buildId,
                                 String userId,
                                 String reason)
        Description copied from interface: RemoteBuildServer
        Schedules specified build to be stopped
        Specified by:
        stopBuild in interface RemoteBuildServer
        Parameters:
        buildId - build instance id
        userId - current used id.
        reason - reason why build is stopped.
        Returns:
        fake return value.
      • stopPendingPersonalBuild

        public Boolean stopPendingPersonalBuild​(String personalChangeId,
                                                String buildTypeId,
                                                String userId,
                                                String reason)
        Description copied from interface: RemoteBuildServer
        Removes the specified personal build from the queue
        Specified by:
        stopPendingPersonalBuild in interface RemoteBuildServer
        Parameters:
        personalChangeId - personal change id
        buildTypeId - build type id
        userId - current used id
        reason - reason why build is stopped
        Returns:
        fake return value
      • repeatRemoteDebugSession

        public Boolean repeatRemoteDebugSession​(String personalChangeId,
                                                String buildTypeId)
        Description copied from interface: RemoteBuildServer
        Repeats the current remote debug session on the certain agent, which is determined by personal change id and build type id
        Specified by:
        repeatRemoteDebugSession in interface RemoteBuildServer
        Parameters:
        personalChangeId - personal change id
        buildTypeId - build type id
        Returns:
        fake return value
      • repeatRemoteDebugSessionWithNewChanges

        public Boolean repeatRemoteDebugSessionWithNewChanges​(String personalChangeId,
                                                              String buildTypeId,
                                                              String newChangesPersonalPatchId)
        Description copied from interface: RemoteBuildServer
        Applies new personal patch and repeats the current remote debug session on the certain agent, which is determined by personal change id and build type id
        Specified by:
        repeatRemoteDebugSessionWithNewChanges in interface RemoteBuildServer
        Parameters:
        personalChangeId - personal change id
        buildTypeId - build type id
        Returns:
        fake return value
      • finishRemoteDebugSession

        public Boolean finishRemoteDebugSession​(String personalChangeId,
                                                String buildTypeId)
        Description copied from interface: RemoteBuildServer
        Finishes the current remote debug session on the certain agent, which is determined by personal change id and build type id
        Specified by:
        finishRemoteDebugSession in interface RemoteBuildServer
        Parameters:
        personalChangeId - personal change id
        buildTypeId - build type id
        Returns:
        fake return value
      • fetchData

        public byte[] fetchData​(String userId,
                                String buildId,
                                String sourceId,
                                String whatToFetch)
        Description copied from interface: RemoteBuildServer
        Fetches binary data from the server.
        Specified by:
        fetchData in interface RemoteBuildServer
        Parameters:
        userId - current user id.
        buildId - build id to fetch data for.
        sourceId - data provider id ("Inspection", "Duplicator" e.t.c)
        whatToFetch - specified path to fetch data for.
        Returns:
        data binary array.
      • getFileContent

        public byte[] getFileContent​(String relativePath,
                                     String buildId)
        Description copied from interface: RemoteBuildServer
        Returns specified file content at the moment when specified build has been run
        Specified by:
        getFileContent in interface RemoteBuildServer
        Parameters:
        relativePath - file path relative to project root
        buildId - build instance id
        Returns:
        byte content of specific file in specific build
      • getCommitters

        public Vector getCommitters​(String buildId,
                                    int selectPrevBuildPolicy)
        Description copied from interface: RemoteBuildServer
        Returns list of committers who made changes between the previous build selected according to the policy, and the specified one
        Specified by:
        getCommitters in interface RemoteBuildServer
        Parameters:
        buildId - build instance id
        selectPrevBuildPolicy - - SelectPrevBuildPolicy enum element id
        Returns:
        Vector of strings. Each string is serialized with XStream object of class User
      • getLastSuccessfullyFinished

        public String getLastSuccessfullyFinished​(String buildTypeId)
        Description copied from interface: RemoteBuildServer
        Returns last successful finished build instance for the specified configuration
        Specified by:
        getLastSuccessfullyFinished in interface RemoteBuildServer
        Parameters:
        buildTypeId - build instance id
        Returns:
        serialized object of type BuildInstanceData
      • getBuildParameter

        public String getBuildParameter​(String buildTypeId,
                                        String key)
        Description copied from interface: RemoteBuildServer
        Returns build parameter by parameter name.
        Specified by:
        getBuildParameter in interface RemoteBuildServer
        Parameters:
        buildTypeId - configuration id.
        key - param name.
        Returns:
        serialized with XStream object of class String
      • setPersonalChangeStatus

        public Boolean setPersonalChangeStatus​(String changeId,
                                               int statusPriority)
        Description copied from interface: RemoteBuildServer
        sets status of personal change
        Specified by:
        setPersonalChangeStatus in interface RemoteBuildServer
        Parameters:
        changeId - personal change id
        statusPriority - status priority (see Status.getPriority())
        Returns:
        Ignored. Used for XmlRpc
      • getCanRunAndCompatibleAgents

        public Vector getCanRunAndCompatibleAgents​(String builtTypeId,
                                                   boolean includeDisabled)
        Description copied from interface: RemoteBuildServer
        Returns the agents those are compatible with the specified build type, and on those specified build type can be run
        Specified by:
        getCanRunAndCompatibleAgents in interface RemoteBuildServer
        Parameters:
        builtTypeId - Build type id
        includeDisabled - includeDisabled
        Returns:
        Vector of serialized BuildAgentData objects
      • getGroupedByPoolCanRunAndCompatibleAgents

        public Vector getGroupedByPoolCanRunAndCompatibleAgents​(String builtTypeId,
                                                                boolean includeDisabled)
        Description copied from interface: RemoteBuildServer
        Returns the grouped by pool agents those are compatible with the specified build type, and on those specified build type can be run. If there is only one pool in the system, then result contains only one pair, and the pool data in that pair is null.
        Specified by:
        getGroupedByPoolCanRunAndCompatibleAgents in interface RemoteBuildServer
        Parameters:
        builtTypeId - Build type id
        includeDisabled - includeDisabled
        Returns:
        Vector of serialized Pair<AgentPoolData, List<BuildAgentData>> objects
      • haveCommitDecision

        public Boolean haveCommitDecision​(Vector personalChangeIds)
        Description copied from interface: RemoteBuildServer
        Returns true if at least one of the specified personal changes has non-UNKNOWN commit decision
        Specified by:
        haveCommitDecision in interface RemoteBuildServer
        Parameters:
        personalChangeIds - personal change ids
        Returns:
        see above
      • getModificationFiles

        public Vector getModificationFiles​(String modIdStr,
                                           boolean personal)
        Description copied from interface: RemoteBuildServer
        Returns list of VcsChange structures (changed files) corresponding to modification with specified id.
        Specified by:
        getModificationFiles in interface RemoteBuildServer
        Parameters:
        modIdStr - id of VCS modification
        personal - if true then files from personal change will be returned
        Returns:
        see above
      • findBuildRunnerByType

        public String findBuildRunnerByType​(String buildTypeId,
                                            String runnerType)
        Description copied from interface: RemoteBuildServer
        Returns the first found build runner of the specified type in the specified build configuration.
        Specified by:
        findBuildRunnerByType in interface RemoteBuildServer
        Parameters:
        buildTypeId - build configuration id
        runnerType - type of the runner
        Returns:
        the first found runner
      • getBuildRunners

        public String getBuildRunners​(Vector buildTypeIds)
        Description copied from interface: RemoteBuildServer
        Returns map from build type ids to lists of enabled build runners for the specified build types.
        Specified by:
        getBuildRunners in interface RemoteBuildServer
        Parameters:
        buildTypeIds - build configuration ids
        Returns:
        serialized object of type Map<String, List<BuildRunnerData>>
      • getProblemRelatedEventCounters

        public String getProblemRelatedEventCounters​(@NotNull
                                                     Vector projectIds)
        Description copied from interface: RemoteBuildServer
        Returns problem related event counters for specified projects.
        Specified by:
        getProblemRelatedEventCounters in interface RemoteBuildServer
        Parameters:
        projectIds - project ids
        Returns:
        serialized map (project id -> counter)