Package org.apache.jackrabbit.webdav
Interface DavResourceLocator
-
public interface DavResourceLocatorDavResourceLocator...
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DavLocatorFactorygetFactory()Return the locator factory that created this locator.StringgetHref(boolean isCollection)Return the 'href' representation of this locator object.StringgetPrefix()Return the prefix used to build the complete href of the resource as required for thehref Xmlelement.StringgetRepositoryPath()An implementation may choose to circumvent the incompatibility of a repository path with the URI path by applying an appropriate conversion.StringgetResourcePath()Return the resource path.StringgetWorkspaceName()Return the name of the workspace the resource identified by this locator is member of.StringgetWorkspacePath()Return the path of the workspace the resource identified by this locator is member of.booleanisRootLocation()Returns true if thisDavResourceLocatorrepresents the root locator that would be requested with 'hrefPrefix'+'pathPrefix' with or without a trailing '/'.booleanisSameWorkspace(String workspaceName)Returns true if the specified workspace name equals to the workspace name defined with this locator.booleanisSameWorkspace(DavResourceLocator locator)Returns true if the specified locator refers to a resource within the same workspace.
-
-
-
Method Detail
-
getPrefix
String getPrefix()
Return the prefix used to build the complete href of the resource as required for thehref Xmlelement. This includes scheme and host information as well as constant prefixes. However, this must not include workspace prefix.- Returns:
- prefix needed in order to build the href from a resource path.
- See Also:
getResourcePath()
-
getResourcePath
String getResourcePath()
Return the resource path.- Returns:
- resource path
-
getWorkspacePath
String getWorkspacePath()
Return the path of the workspace the resource identified by this locator is member of.- Returns:
- path of the workspace
-
getWorkspaceName
String getWorkspaceName()
Return the name of the workspace the resource identified by this locator is member of.- Returns:
- workspace name
-
isSameWorkspace
boolean isSameWorkspace(DavResourceLocator locator)
Returns true if the specified locator refers to a resource within the same workspace.- Parameters:
locator-- Returns:
- true if both paths are in the same workspace.
-
isSameWorkspace
boolean isSameWorkspace(String workspaceName)
Returns true if the specified workspace name equals to the workspace name defined with this locator.- Parameters:
workspaceName-- Returns:
- true if workspace names are equal.
-
getHref
String getHref(boolean isCollection)
Return the 'href' representation of this locator object. The implementation should perform an URL encoding of the resource path.- Parameters:
isCollection-- Returns:
- 'href' representation of this path
- See Also:
DavConstants.XML_HREF,DavResource.getHref()
-
isRootLocation
boolean isRootLocation()
Returns true if thisDavResourceLocatorrepresents the root locator that would be requested with 'hrefPrefix'+'pathPrefix' with or without a trailing '/'.- Returns:
- true if this locator object belongs to the root resource.
-
getFactory
DavLocatorFactory getFactory()
Return the locator factory that created this locator.- Returns:
- the locator factory
-
getRepositoryPath
String getRepositoryPath()
An implementation may choose to circumvent the incompatibility of a repository path with the URI path by applying an appropriate conversion. This utility method allows to retrieve this transformed repository path. By default this method should return the same asgetResourcePath()- Returns:
- a repository compatible form if the resource path.
- See Also:
that allows to build a valid DavResourceLocator from a given repository path.
-
-