|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.webdav.internal.kernel.Precondition
public class Precondition
A Precondition represents some condition or collection of conditions representing states of a resource. If the state of the resource does not match any of the specified states in any of the conditions, then the method must fail. Conditions in a Precondition are OR'd together while ConditionFactors in a ConditionTerm are AND'ed.
Constructor Summary | |
---|---|
Precondition()
Construct an empty Precondition. |
|
Precondition(String ifHeader)
Construct a Precondition by parsing the given If header as defined by section 8.4 in the WebDAV spec. |
Method Summary | |
---|---|
void |
addCondition(Condition condition)
Add a Condition to this Precondition. |
void |
addStateTokenCondition(String resourceURI,
String stateToken)
Add a condition created from the given URI and state token. |
static Precondition |
create(String ifHeader)
Construct a Precondition by parsing the given If header as defined by section 9.4 in the WebDAV spec. |
Enumeration |
getConditions()
Get the Conditions contained in this Precondition. |
boolean |
matches(Condition condition)
See if this Precondition contains a matching Condition. |
String |
toString()
Return a String representation of this Precondition 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 Precondition()
public Precondition(String ifHeader) throws WebDAVException
ifHeader
- the contents of a WebDAV If header
WebDAVException
Method Detail |
---|
public void addCondition(Condition condition) throws WebDAVException
condition
- the Condition to add
WebDAVException
- thrown if the precondition already contains this conditionpublic void addStateTokenCondition(String resourceURI, String stateToken) throws WebDAVException
resourceURI
- the URI of the resource the state token applies to. Null
implicitly specifies the resource processing the requeststateToken
- the state token to match
WebDAVException
public static Precondition create(String ifHeader) throws WebDAVException
ifHeader
- the contents of a WebDAV If header
WebDAVException
- thrown if there is a syntax error in the If headerpublic Enumeration getConditions()
public boolean matches(Condition condition)
condition
- the condition to match
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |