|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.webdav.internal.kernel.Condition
public class Condition
A Condition represents some state configuration of a particular resource that must be satisfied in order for the associated request to be valid. At least one of the ConditionTerms in a Condition must match with states of the resource, i.e., they are OR'd together. Conditions are contained in a Precondition which is used in a WebDAV If header.
Constructor Summary | |
---|---|
Condition()
Construct a Condition on the default resource. |
|
Condition(String uri)
Construct a Condition with the given URI. |
Method Summary | |
---|---|
void |
addConditionTerm(ConditionTerm term)
Add a ConditionTerm to a Condition. |
boolean |
contains(ConditionTerm term)
Does this Condition contain the given ConditionTerm? |
static Condition |
create(StreamTokenizer tokenizer)
Create a Condition by parsing the given If header as defined by section 9.4 in the WebDAV spec. |
static Condition |
create(String ifHeader)
Create a Condition by parsing the given If header as defined by section 9.4 in the WebDAV spec. |
Enumeration |
getConditionTerms()
Get all the ConditionTerms for this Condition. |
String |
getResourceURI()
Get the URI of the associated Resource. |
boolean |
matches(Condition condition)
See if this Condition matches the given Condition. |
void |
setResourceURI(String value)
Set the URI of the associated Resource. |
String |
toString()
Return a String representation of this Condition as defined by section 9.4 of the WebDAV Spec. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Condition()
public Condition(String uri)
uri
- the URI of the resource associated with this conditionMethod Detail |
---|
public void addConditionTerm(ConditionTerm term) throws WebDAVException
term
- the term to add
WebDAVException
public boolean contains(ConditionTerm term)
term
- the term to check for
public static Condition create(StreamTokenizer tokenizer) throws WebDAVException
tokenizer
- a StreamTokenizer on the contents of a WebDAV If header
WebDAVException
public static Condition create(String ifHeader) throws WebDAVException
ifHeader
- the contents of a WebDAV If header
WebDAVException
- thrown if there is a syntax error in the headerpublic Enumeration getConditionTerms()
public String getResourceURI()
public boolean matches(Condition condition)
condition
- the condition to match against
public void setResourceURI(String value)
value
- the resource URI whose state is described by this Condition.
value can be null if the condition applies to the resource executing
the method.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |