Class RepositoryUri

java.lang.Object
com.linecorp.centraldogma.server.mirror.RepositoryUri

public final class RepositoryUri extends Object
A parsed representation of a repository URI used for mirroring.
  • Method Details

    • parse

      public static RepositoryUri parse(URI remoteUri, String suffix)
      Parses the specified 'remoteUri' into: - the actual remote repository URI - the path in the remote repository - the branch name.

      e.g. git+ssh://foo.com/bar.git/some-path#master is split into: - remoteRepoUri: git+ssh://foo.com/bar.git - remotePath: /some-path/ - remoteBranch: master

      e.g. dogma://foo.com/bar/qux.dogma is split into: - remoteRepoUri: dogma://foo.com/bar/qux.dogma - remotePath: / (default) - remoteBranch: defaultBranch

    • uri

      public URI uri()
      Returns the URI of the repository.
    • path

      public String path()
      Returns the path in the repository.
    • branch

      public String branch()
      Returns the branch name in the repository.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object