Interface RepoPath

  • All Superinterfaces:
    Info, java.io.Serializable
    All Known Subinterfaces:
    RemoteRepoPath

    public interface RepoPath
    extends Info
    Holds a compound path of a repository key and a path within that repository, separated by a ':'
    Author:
    Fred Simon
    • Method Detail

      • getRepoKey

        @Nonnull
        java.lang.String getRepoKey()
        Returns:
        The repository key
      • getPath

        java.lang.String getPath()
        Returns:
        The path inside the repository. Empty string if repo path points to the root repo path
      • getId

        java.lang.String getId()
        Returns:
        The full repository path, like "repoKey:path/to"
      • toPath

        java.lang.String toPath()
        A path composed of the repository key and path.
         repoKey = "key", path = "path/to" returns "key/path/to"
         repoKey = "key", name = "" returns "key/"
         
        Returns:
        A path composed of the repository key and path
      • getName

        java.lang.String getName()
        Returns:
        The name of the path as if it were a file (the string after the last '/' or '\')
      • getParent

        @Nullable
        RepoPath getParent()
        Returns:
        The repo path of the parent folder to this path. Null if this is the root path of the repository.
      • isRoot

        boolean isRoot()
        Returns:
        True if this repo path is the root path of the repository (i.e., the path part is empty)
      • isFile

        boolean isFile()
        Whether this repo path is a path to a file, rather than a folder. Note that this function does not query Artifactory for this information, but will usually instead just look at the way the path is formatted: if path ends with a '/' character, it is considered a folder, and if not, it is considered a file.
        Returns:
        True if this repo path represents a file
      • isFolder

        boolean isFolder()
        Whether this repo path is a path to a folder, rather than a file. Note that this function does not query Artifactory for this information, but will usually instead just look at the way the path is formatted: if path ends with a '/' character, it is considered a folder, and if not, it is considered a file.
        Returns:
        True if this repo path represents a folder