Class RepositoryAddress
- java.lang.Object
-
- org.apache.jackrabbit.vault.fs.api.RepositoryAddress
-
public class RepositoryAddress extends Object
The repository address locates a jcr repository in with a URI representation. It is composed out of a uri and accepts the following formats:- scheme://host:port/
- scheme://host:port/prefix
- scheme://host:port/prefix/workspace
- scheme://host:port/prefix/workspace/jcr_root/path
-
-
Constructor Summary
Constructors Constructor Description RepositoryAddress(@NotNull String uri)
Creates a new default repository address.RepositoryAddress(@NotNull URI uri)
Creates a new default repository address.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
@Nullable Credentials
getCredentials()
Returns JCR credentials from the URI ornull
if no user info is specified.@NotNull String
getPath()
Returns the path to a repository item.@NotNull URI
getSpecificURI()
Returns the specific part of the uri, i.e.@NotNull URI
getURI()
Returns the uri of this address@Nullable String
getWorkspace()
Returns the name of the workspace ornull
if the default workspace is used.int
hashCode()
@NotNull RepositoryAddress
resolve(@Nullable String path)
Returns a new repository address with the given path.@NotNull String
toString()
-
-
-
Field Detail
-
JCR_ROOT
public static final String JCR_ROOT
the (virtual) jcr root.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RepositoryAddress
public RepositoryAddress(@NotNull @NotNull String uri) throws URISyntaxException
Creates a new default repository address.- Parameters:
uri
- the uri- Throws:
URISyntaxException
- if the uri is not valid
-
RepositoryAddress
public RepositoryAddress(@NotNull @NotNull URI uri) throws URISyntaxException
Creates a new default repository address.- Parameters:
uri
- the uri- Throws:
URISyntaxException
- if the uri is not valid
-
-
Method Detail
-
getURI
@NotNull public @NotNull URI getURI()
Returns the uri of this address- Returns:
- the uri of this address
-
resolve
@NotNull public @NotNull RepositoryAddress resolve(@Nullable @Nullable String path)
Returns a new repository address with the given path.- Parameters:
path
- the path to include in the new address- Returns:
- a new repository address
-
getWorkspace
@Nullable public @Nullable String getWorkspace()
Returns the name of the workspace ornull
if the default workspace is used.- Returns:
- the name of the workspace or
null
-
getSpecificURI
@NotNull public @NotNull URI getSpecificURI()
Returns the specific part of the uri, i.e. the part that is used to actually connect to the repository- Returns:
- the specific part
-
getPath
@NotNull public @NotNull String getPath()
Returns the path to a repository item. If not explicit path is specified by this address the root path '/' is returned.- Returns:
- the path to a repository item.
-
getCredentials
@Nullable public @Nullable Credentials getCredentials()
Returns JCR credentials from the URI ornull
if no user info is specified.- Returns:
- the creds
-
toString
@NotNull public @NotNull String toString()
- Overrides:
toString
in classObject
- Returns:
- same as
getURI().toString()
with obfuscated user info
-
-