org.eclipse.webdav.internal.kernel
Class Locator

java.lang.Object
  extended by org.eclipse.webdav.internal.kernel.Locator
All Implemented Interfaces:
ILocator

public class Locator
extends Object
implements ILocator

A LocatorImpl uniquely identifies a DAV a resource.

This class implements the Locator interface.

See Also:
Locator

Field Summary
protected  boolean isStable
           
protected  String label
           
protected  String resourceURL
           
 
Constructor Summary
Locator(String resourceURL, String label)
           
 
Method Summary
 boolean equals(Object obj)
          Return a boolean value indicating whether or not this locator and the given object are equal.
 String getLabel()
          Returns the label selector value of this locator, or null if there is no label selector.
 String getResourceURL()
          Returns a resource URL.
 int hashCode()
           
 boolean isStable()
          Returns whether the resource URL of this locator is stable.
 void markStable()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

resourceURL

protected String resourceURL

label

protected String label

isStable

protected boolean isStable
Constructor Detail

Locator

public Locator(String resourceURL,
               String label)
Method Detail

equals

public boolean equals(Object obj)
Return a boolean value indicating whether or not this locator and the given object are equal.

Overrides:
equals in class Object
Parameters:
obj - the object to compare against
Returns:
equality indicator

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getLabel

public String getLabel()
Description copied from interface: ILocator
Returns the label selector value of this locator, or null if there is no label selector.

For certain methods (e.g. GET, PROPFIND), if the request-URL identifies a version-controlled resource, a label can be specified in a Label request header to cause the method to be applied to the version selected by that label from the version history of that version-controlled resource.

Note that a stable URL must not have a locator label.

Specified by:
getLabel in interface ILocator
Returns:
the label as a String or null if there is no label specified.

getResourceURL

public String getResourceURL()
Description copied from interface: ILocator
Returns a resource URL.

If there is no label specified, the URL properly identifies the resource. However, if there is a label, the resource URL identiifes a version-controlled resource whose history contains the version whose label is the target of this locator.

In typical usage, and with no label header, this URL may be the HTTP request URI or the destination header URI.

Specified by:
getResourceURL in interface ILocator
Returns:
the String representation of the resource URL.

isStable

public boolean isStable()
Description copied from interface: ILocator
Returns whether the resource URL of this locator is stable.

A stable URL is a server-generated URL that cannot be moved and do not mecessarily conform to the DAV namespace. For example, version URLs are server generated and do not have to appear in any DAV collection. Version URLs and version history URLs are stable URLs.

Specified by:
isStable in interface ILocator
Returns:
true if the resource URL is stable, and false otherwise.

markStable

public void markStable()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.