Class ServerURI


  • public class ServerURI
    extends Object
    This class parses URI in formats using by TeamCity in defining VCS Root URL http(s) url format: http(s)://[user@]host[:port]{/path}[/] scp url formats (https://man.openbsd.org/scp): [user@]host:[path]{/path}[/] or scheme://[user@]host[:port]{/path}[/] also acceptable: scheme://[user@]host[:port](:)[path]{/path}[/] So in ssh://git@my.company.com:8111/owner/repo 8111 will be considered as port but in git@my.company.com:8111/owner/repo 8111 will be considered as part of the path
    • Method Detail

      • getScheme

        @NotNull
        public String getScheme()
      • getUsername

        @Nullable
        public String getUsername()
      • getHost

        @NotNull
        public String getHost()
      • getPort

        @Nullable
        public String getPort()
      • getPathFragments

        @NotNull
        public List<String> getPathFragments()
      • getClearPathFragmentsFromQueryAndSuffix

        public List<String> getClearPathFragmentsFromQueryAndSuffix​(@Nullable
                                                                    String suffix)
      • compareByPathTo

        public boolean compareByPathTo​(@Nullable
                                       ServerURI uri)
      • compareByPathTo

        public boolean compareByPathTo​(@Nullable
                                       ServerURI uri,
                                       @Nullable
                                       String acceptableSuffix)
      • compareByHostAndPortTo

        public boolean compareByHostAndPortTo​(@Nullable
                                              ServerURI uri)
      • getHttpBaseURL

        @NotNull
        public String getHttpBaseURL()