org.eclipse.webdav.internal.kernel
Class StateToken

java.lang.Object
  extended by org.eclipse.webdav.internal.kernel.ConditionFactor
      extended by org.eclipse.webdav.internal.kernel.StateToken

public class StateToken
extends ConditionFactor

A StateToken is a ConditionFactor describing some state of a resource represented as a URI. A typical example would be the WebDAV lock token.


Constructor Summary
StateToken(String uri)
          Construct a StateToken with the given URI.
 
Method Summary
static ConditionFactor create(StreamTokenizer tokenizer)
          Create a StateToken by parsing the given If header as defined by section 9.4 in the WebDAV spec.
 boolean equals(Object factor)
          Compare with another StateToken.
 String getURI()
          Get the URI of this StateToken.
 void setURI(String value)
          Set the URI of this StateToken.
 String toString()
          Return a String representation of this StateToken as defined by the If header in section 9.4 of the WebDAV spec.
 
Methods inherited from class org.eclipse.webdav.internal.kernel.ConditionFactor
not, setNot
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateToken

public StateToken(String uri)
Construct a StateToken with the given URI.

Parameters:
uri - the URI of the state token
Method Detail

create

public static ConditionFactor create(StreamTokenizer tokenizer)
                              throws WebDAVException
Create a StateToken by parsing the given If header as defined by section 9.4 in the WebDAV spec.

Parameters:
tokenizer - a StreamTokenizer on the contents of a WebDAV If header
Returns:
the parsed ConditionFactor (StateToken)
Throws:
WebDAVException

equals

public boolean equals(Object factor)
Compare with another StateToken.

Overrides:
equals in class Object
Parameters:
factor - the state token to compare with
Returns:
true if this state token has the same URI as the factor

getURI

public String getURI()
Get the URI of this StateToken. The URI represents some state of the resource in the containing Condition, for example, the lock token.

Returns:
the URI for this state token

setURI

public void setURI(String value)
Set the URI of this StateToken. The URI represents some state of the resource in the containing Condition, for example, the lock token.

Parameters:
value - the URI for this state token

toString

public String toString()
Return a String representation of this StateToken as defined by the If header in section 9.4 of the WebDAV spec.

Specified by:
toString in class ConditionFactor
Returns:
a string representation of this state token


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