org.apache.archiva.webdav
Class ArchivaDavResourceLocator

java.lang.Object
  extended by org.apache.archiva.webdav.ArchivaDavResourceLocator
All Implemented Interfaces:
RepositoryLocator, org.apache.jackrabbit.webdav.DavResourceLocator

public class ArchivaDavResourceLocator
extends Object
implements org.apache.jackrabbit.webdav.DavResourceLocator, RepositoryLocator


Field Summary
private  org.apache.jackrabbit.webdav.DavLocatorFactory davLocatorFactory
           
private  String href
           
private  String origResourcePath
           
private  String prefix
           
private  String repositoryId
           
private  String resourcePath
           
 
Constructor Summary
ArchivaDavResourceLocator(String prefix, String resourcePath, String repositoryId, org.apache.jackrabbit.webdav.DavLocatorFactory davLocatorFactory)
           
 
Method Summary
 boolean equals(Object obj)
          Equality of path is achieved if the specified object is a DavResourceLocator object with the same hash code.
 org.apache.jackrabbit.webdav.DavLocatorFactory getFactory()
           
 String getHref(boolean isCollection)
           
 String getOrigResourcePath()
           
 String getPrefix()
           
 String getRepositoryId()
           
 String getRepositoryPath()
           
 String getResourcePath()
           
 String getWorkspaceName()
           
 String getWorkspacePath()
           
 int hashCode()
          Computes the hash code from the href, which is built using the final fields prefix and resourcePath.
 boolean isRootLocation()
           
 boolean isSameWorkspace(org.apache.jackrabbit.webdav.DavResourceLocator locator)
           
 boolean isSameWorkspace(String workspaceName)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefix

private final String prefix

resourcePath

private final String resourcePath

href

private final String href

repositoryId

private final String repositoryId

davLocatorFactory

private final org.apache.jackrabbit.webdav.DavLocatorFactory davLocatorFactory

origResourcePath

private final String origResourcePath
Constructor Detail

ArchivaDavResourceLocator

public ArchivaDavResourceLocator(String prefix,
                                 String resourcePath,
                                 String repositoryId,
                                 org.apache.jackrabbit.webdav.DavLocatorFactory davLocatorFactory)
Method Detail

getRepositoryId

public String getRepositoryId()
Specified by:
getRepositoryId in interface RepositoryLocator

getPrefix

public String getPrefix()
Specified by:
getPrefix in interface org.apache.jackrabbit.webdav.DavResourceLocator

getResourcePath

public String getResourcePath()
Specified by:
getResourcePath in interface org.apache.jackrabbit.webdav.DavResourceLocator

getWorkspacePath

public String getWorkspacePath()
Specified by:
getWorkspacePath in interface org.apache.jackrabbit.webdav.DavResourceLocator

getWorkspaceName

public String getWorkspaceName()
Specified by:
getWorkspaceName in interface org.apache.jackrabbit.webdav.DavResourceLocator

isSameWorkspace

public boolean isSameWorkspace(org.apache.jackrabbit.webdav.DavResourceLocator locator)
Specified by:
isSameWorkspace in interface org.apache.jackrabbit.webdav.DavResourceLocator

isSameWorkspace

public boolean isSameWorkspace(String workspaceName)
Specified by:
isSameWorkspace in interface org.apache.jackrabbit.webdav.DavResourceLocator

getHref

public String getHref(boolean isCollection)
Specified by:
getHref in interface org.apache.jackrabbit.webdav.DavResourceLocator

isRootLocation

public boolean isRootLocation()
Specified by:
isRootLocation in interface org.apache.jackrabbit.webdav.DavResourceLocator

getFactory

public org.apache.jackrabbit.webdav.DavLocatorFactory getFactory()
Specified by:
getFactory in interface org.apache.jackrabbit.webdav.DavResourceLocator

getRepositoryPath

public String getRepositoryPath()
Specified by:
getRepositoryPath in interface org.apache.jackrabbit.webdav.DavResourceLocator

hashCode

public int hashCode()
Computes the hash code from the href, which is built using the final fields prefix and resourcePath.

Overrides:
hashCode in class Object
Returns:
the hash code

equals

public boolean equals(Object obj)
Equality of path is achieved if the specified object is a DavResourceLocator object with the same hash code.

Overrides:
equals in class Object
Parameters:
obj - the object to compare to
Returns:
true if the 2 objects are equal; false otherwise

getOrigResourcePath

public String getOrigResourcePath()


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.