org.apache.jackrabbit.webdav.simple
Class LocatorFactoryImpl

java.lang.Object
  extended by org.apache.jackrabbit.webdav.simple.LocatorFactoryImpl
All Implemented Interfaces:
DavLocatorFactory

public class LocatorFactoryImpl
extends Object
implements DavLocatorFactory

ResourceFactoryImpl implements a simple DavLocatorFactory


Constructor Summary
LocatorFactoryImpl(String repositoryPrefix)
           
 
Method Summary
 DavResourceLocator createResourceLocator(String prefix, String href)
          Create a new DavResourceLocator.
 DavResourceLocator createResourceLocator(String prefix, String workspacePath, String resourcePath)
          Create a new DavResourceLocator.
 DavResourceLocator createResourceLocator(String prefix, String workspacePath, String path, boolean isResourcePath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocatorFactoryImpl

public LocatorFactoryImpl(String repositoryPrefix)
Method Detail

createResourceLocator

public DavResourceLocator createResourceLocator(String prefix,
                                                String href)
Description copied from interface: DavLocatorFactory
Create a new DavResourceLocator.

Specified by:
createResourceLocator in interface DavLocatorFactory
Parameters:
prefix - String consisting of [scheme:][//authority][path] where path defines the (imaginary) path to the root location.
href - of the resource to be created. The given string may start with the 'prefix'. Please note, that in contrast to DavLocatorFactory.createResourceLocator(String, String, String) the href is expected to be URL encoded.
Returns:
a new resource locator.

createResourceLocator

public DavResourceLocator createResourceLocator(String prefix,
                                                String workspacePath,
                                                String resourcePath)
Description copied from interface: DavLocatorFactory
Create a new DavResourceLocator. This methods corresponds to DavLocatorFactory.createResourceLocator(String, String, String, boolean) with the flag set to true.

Specified by:
createResourceLocator in interface DavLocatorFactory
Parameters:
prefix - String consisting of [scheme:][//authority][path] where path defines the path to the root location.
workspacePath - the first segment of the URIs path indicating the workspace. The implementation may allow a empty String if workspaces are not supported.
resourcePath - the URL decoded resource path.
Returns:
a new resource locator.

createResourceLocator

public DavResourceLocator createResourceLocator(String prefix,
                                                String workspacePath,
                                                String path,
                                                boolean isResourcePath)
Specified by:
createResourceLocator in interface DavLocatorFactory
Parameters:
prefix - String consisting of [scheme:][//authority][path] where path defines the path to the root location.
workspacePath - the first segment of the URIs path indicating the workspace. The implementation may allow a empty String if workspaces are not supported.
path - the URL decoded path.
isResourcePath - If true this method returns the same as DavLocatorFactory.createResourceLocator(String, String, String), otherwise the given path is treated as internal repository path. The implementation may choose to implement a conversion of the repository path to a valid resource path, e.g. (un)escaping of certain characters, due to incompatibility with the URI definition (or vice versa). Note that DavResourceLocator.getRepositoryPath() should in this case implement the reverse operation.
Returns:
a new resource locator.
See Also:
DavResourceLocator.getRepositoryPath()


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.