Class RelativeWebLinks

  • Direct Known Subclasses:
    WebLinks

    public class RelativeWebLinks
    extends Object
    Same as WebLinks but provides links relative to server host + context.
    Since:
    10.0
    • Constructor Detail

      • RelativeWebLinks

        public RelativeWebLinks()
    • Method Detail

      • getViewResultsUrl

        @NotNull
        public String getViewResultsUrl​(@NotNull
                                        Build build)
        Parameters:
        build - specified build
        Returns:
        URL to view results page of the specified build
      • getViewChangesUrl

        @NotNull
        public String getViewChangesUrl​(@NotNull
                                        Build build)
        Parameters:
        build - specified build
        Returns:
        URL to view changes page of the specified build
      • getViewQueuedChangesUrl

        @NotNull
        public String getViewQueuedChangesUrl​(@NotNull
                                              QueuedBuild queuedBuild)
        Parameters:
        queuedBuild - specified queuedBuild
        Returns:
        URL to view changes page of the specified queuedBuild
      • getViewLogUrl

        @NotNull
        public String getViewLogUrl​(@NotNull
                                    Build build)
        Parameters:
        build - specified build
        Returns:
        URL to view log page of the specified build
      • getViewArtifactsUrl

        @NotNull
        public String getViewArtifactsUrl​(@NotNull
                                          Build build)
        Parameters:
        build - specified build
        Returns:
        URL to view artifacts page of the specified build
      • getBuildParametersUrl

        @NotNull
        public String getBuildParametersUrl​(@NotNull
                                            Build build)
        Parameters:
        build - specified build
        Returns:
        URL to view build parameters page of the specified build
        Since:
        2020.2
      • getBuildDependenciesUrl

        @NotNull
        public String getBuildDependenciesUrl​(@NotNull
                                              Build build)
        Parameters:
        build - specified build
        Returns:
        URL to view build dependencies page of the specified build
        Since:
        2020.2
      • getBuildDependenciesForQueuedBuildUrl

        @NotNull
        public String getBuildDependenciesForQueuedBuildUrl​(@NotNull
                                                            QueuedBuild queuedBuild)
        Parameters:
        queuedBuild - specified queuedBuild
        Returns:
        URL to view build dependencies page of the specified queuedBuild
      • getUserSettingsUrl

        @NotNull
        public String getUserSettingsUrl()
        Returns:
        URL of the current (for the current session) user general settings page
      • getUserNotificationsUrl

        @NotNull
        public String getUserNotificationsUrl()
        Returns:
        URL of the current (for the current session) user notification settings page
      • getDownloadArtefactUrl

        @NotNull
        public String getDownloadArtefactUrl​(@NotNull
                                             String buildTypeExternalId,
                                             long buildId,
                                             @NotNull
                                             String path)
      • getDownloadArtefactUrl

        @NotNull
        public String getDownloadArtefactUrl​(@NotNull
                                             String buildTypeExternalId,
                                             @NotNull
                                             String buildNumber,
                                             @NotNull
                                             String path)
      • getDownloadAllArtefactsUrl

        @NotNull
        public String getDownloadAllArtefactsUrl​(@NotNull
                                                 Build build)
      • getChangeUrl

        @NotNull
        public String getChangeUrl​(long modificationId,
                                   boolean isPersonal)
        Parameters:
        modificationId - id of modification
        isPersonal - true if this modification refers to personal change
        Returns:
        URL of modification
      • getChangeFilesUrl

        @NotNull
        public String getChangeFilesUrl​(long modificationId,
                                        boolean isPersonal)
        Returns the URL of change details page (files tab)
        Parameters:
        modificationId - id of the modification
        isPersonal - true if the modification is personal
        Returns:
        URL of modification
      • getQueuedBuildUrl

        @NotNull
        public String getQueuedBuildUrl​(@NotNull
                                        QueuedBuild queuedBuild)
        URL of the specified queued build.
        Parameters:
        queuedBuild - queued build
        Returns:
        see above
        Since:
        8.0
      • getBuildUrl

        @NotNull
        public String getBuildUrl​(@NotNull
                                  QueuedBuild queuedBuild)
        URL of the specified build.
        Parameters:
        queuedBuild - build
        Returns:
        see above
        Since:
        8.0
      • getPersonalQueuedBuildUrl

        @NotNull
        public String getPersonalQueuedBuildUrl​(long personalChangeId,
                                                @NotNull
                                                BuildType buildType)
        URL of the specified personal queued build.
        Parameters:
        personalChangeId - personal change id
        buildType - specified build configuration
        Returns:
        see above
        Since:
        8.0
      • addParameterQuestionmark

        public static String addParameterQuestionmark​(String input)
      • formatBuildTab

        public static String formatBuildTab​(String buildTab)
      • getConfigurationHomePageUrl

        @NotNull
        public String getConfigurationHomePageUrl​(@NotNull
                                                  BuildType buildType)
        Parameters:
        buildType - specified build configuration
        Returns:
        URL of the specified configuration home page
      • getProjectPageUrl

        @NotNull
        public String getProjectPageUrl​(@NotNull
                                        String projectExternalId)
        Parameters:
        projectExternalId - specified project external id
        Returns:
        URL of the specified project page
      • getEditProjectPageUrl

        @NotNull
        public String getEditProjectPageUrl​(@NotNull
                                            String projectExternalId)
        Parameters:
        projectExternalId - specified project external id
        Returns:
        URL of the edit project page
        Since:
        10.0
      • getEditConfigurationPageUrl

        @NotNull
        public String getEditConfigurationPageUrl​(@NotNull
                                                  String buildTypeExternalId)
        Parameters:
        buildTypeExternalId - external id of a build configuration
        Returns:
        URL of the edit build configuration page
        Since:
        10.0
      • getEditTemplatePageUrl

        @NotNull
        public String getEditTemplatePageUrl​(@NotNull
                                             String templateExternalId)
        Parameters:
        templateExternalId - external id of a build configuration template
        Returns:
        URL of the edit build configuration template page
        Since:
        10.0
      • getEditVcsRootPageUrl

        @Deprecated
        @NotNull
        public String getEditVcsRootPageUrl​(@NotNull
                                            String vcsRootExternalId)
        Deprecated.
        use a version with extProjectId argument instead.
        Parameters:
        vcsRootExternalId - external id of a VCS root
        Returns:
        URL of the edit VCS root page
        Since:
        10.0
      • getEditVcsRootPageUrl

        @NotNull
        public String getEditVcsRootPageUrl​(@Nullable
                                            String extProjectId,
                                            @NotNull
                                            String vcsRootExternalId)
      • getCreateConfigurationPageUrl

        @NotNull
        public String getCreateConfigurationPageUrl​(@NotNull
                                                    String projectExtId)
        Parameters:
        projectExtId - external id of a project
        Returns:
        URL of the create build configuration page
        Since:
        2017.1
      • getCreateProjectPageUrl

        @NotNull
        public String getCreateProjectPageUrl​(@NotNull
                                              String parentExtId)
        Parameters:
        parentExtId - external id of a parent project
        Returns:
        URL of the create project page
        Since:
        2017.1
      • getOverviewUrl

        @NotNull
        public String getOverviewUrl()
        Returns:
        main overview page URL.
      • getEditNotificationsUrl

        @NotNull
        public String getEditNotificationsUrl​(@NotNull
                                              String notificatorType)
        Parameters:
        notificatorType - specified notificator buildType.
        Returns:
        URL to edit specified notificator settings
      • getEditBuildFeaturesUrl

        @NotNull
        public String getEditBuildFeaturesUrl​(@NotNull
                                              BuildType buildType)
      • getPluginUrl

        @NotNull
        public String getPluginUrl()
        Returns:
        URL to download IDEA plugin
      • getTestDetailsUrl

        @NotNull
        public String getTestDetailsUrl​(@NotNull
                                        String projectExternalId,
                                        long testNameId)
        Parameters:
        projectExternalId - the project id
        testNameId - test name id
        Returns:
        URL of the test details page
      • getTestDetailsUrl

        @NotNull
        public String getTestDetailsUrl​(@NotNull
                                        String projectExternalId,
                                        long testNameId,
                                        @Nullable
                                        String buildTypeId)
        Parameters:
        projectExternalId - the project id
        testNameId - test name id
        Returns:
        URL of the test details page
        Since:
        7.1
      • getResponsibilitiesUrl

        @NotNull
        public String getResponsibilitiesUrl​(@NotNull
                                             String projectExternalId,
                                             @NotNull
                                             String username)
        Returns the URL of the responsibilities (investigations) page for the specified user.
        Parameters:
        projectExternalId - the project id
        username - the username or empty string (i.e. for all users)
        Returns:
        responsibilities page URL
      • getMutedProblemsUrl

        @NotNull
        public String getMutedProblemsUrl​(@NotNull
                                          String projectExternalId)
        Returns the URL of the muted problems page.
        Parameters:
        projectExternalId - the project id
        Returns:
        muted problems page URL
      • getAgentUrl

        @Nullable
        public String getAgentUrl​(@NotNull
                                  BuildAgent agent,
                                  @Nullable
                                  Integer agentTypeId)
        Returns:
        URL of the agent details page or null if there is no page to display details of the agent
        Since:
        2017.2
      • getCloudImageUrl

        @NotNull
        public String getCloudImageUrl​(@NotNull
                                       Integer agentTypeId)
        Return url of the cloud image using given agentTypeId.
        Parameters:
        agentTypeId -
        Returns:
        url of the cloud image page.
      • prepareUrl

        @NotNull
        protected String prepareUrl​(@NotNull
                                    String relativeUrl)
      • prepareProjectUrl

        @NotNull
        protected String prepareProjectUrl​(@NotNull
                                           String relativeUrl,
                                           @Nullable
                                           String externalProjectID)
        Returns URL for the particular project. Can be overloaded in children.
      • prepareProjectUrlByExternalBuildTypeId

        @NotNull
        protected String prepareProjectUrlByExternalBuildTypeId​(@NotNull
                                                                String relativeUrl,
                                                                @Nullable
                                                                String extBuildTypeId)
        Returns URL by external BuildType id. Can be overloaded in children.
      • prepareProjectUrlByInternalBuildTypeId

        @NotNull
        protected String prepareProjectUrlByInternalBuildTypeId​(@NotNull
                                                                String relativeUrl,
                                                                @Nullable
                                                                String intBuildTypeId)
        Returns URL by internal BuildType id. Can be overloaded in children.
      • prepareProjectUrlByBuildTypeTemplateExternalId

        @NotNull
        protected String prepareProjectUrlByBuildTypeTemplateExternalId​(@NotNull
                                                                        String relativeUrl,
                                                                        @Nullable
                                                                        String extTemplateId)
        Returns URL by external build template id. Can be overloaded in children.