| |
|
| java.lang.Object com.ibm.webdav.Precondition
Constructor Summary | |
public | Precondition() Construct an empty Precondition. | public | Precondition(String ifHeader) Construct a Precondition by parsing the given If header as defined by
section 8.4 in the WebDAV spec. |
Method Summary | |
public void | addCondition(Condition condition) Add a Condition to this Precondition. | public void | addStateTokenCondition(String resourceURI, String stateToken) Add a condition created from the given URI and state token. | public static Precondition | create(String ifHeader) Construct a Precondition by parsing the given If header as defined by
section 9.4 in the WebDAV spec. | public Enumeration | getConditions() Get the Conditions contained in this Precondition. | public boolean | matches(Condition condition) See if this Precondition contains a matching Condition. | public String | toString() Return a String representation of this Precondition as defined by section 9.4
of the WebDAV Spec. |
Precondition | public Precondition()(Code) | | Construct an empty Precondition. The client must add Conditions.
|
Precondition | public Precondition(String ifHeader) throws WebDAVException(Code) | | Construct a Precondition by parsing the given If header as defined by
section 8.4 in the WebDAV spec.
Parameters: ifHeader - the contents of a WebDAV If header |
addCondition | public void addCondition(Condition condition) throws WebDAVException(Code) | | Add a Condition to this Precondition. Conditions are OR'd together to
check for a matching resource.
Parameters: condition - the Condition to add exception: com.ibm.webdav.WebDAVException - thrown if the precondition already contains this condition |
addStateTokenCondition | public void addStateTokenCondition(String resourceURI, String stateToken) throws WebDAVException(Code) | | Add a condition created from the given URI and state token. This is a
convenience method used primarily to create preconditions for lock tokens
that must be provided in the resource context for methods that update
the resource.
Parameters: resourceURI - the URI of the resource the state token applies to. Nullimplicitly specifies the resource processing the request Parameters: stateToken - the state token to match |
create | public static Precondition create(String ifHeader) throws WebDAVException(Code) | | Construct a Precondition by parsing the given If header as defined by
section 9.4 in the WebDAV spec.
Parameters: ifHeader - the contents of a WebDAV If header the parser If header exception: com.ibm.webdav.WebDAVException - thrown if there is a syntax error in the If header |
getConditions | public Enumeration getConditions()(Code) | | Get the Conditions contained in this Precondition. At least one must match
in order for a valid match to occur.
an Enumeration of Conditions |
matches | public boolean matches(Condition condition)(Code) | | See if this Precondition contains a matching Condition.
Parameters: condition - the condition to match true if this precondition contains atleast one condition matching the given condition |
toString | public String toString()(Code) | | Return a String representation of this Precondition as defined by section 9.4
of the WebDAV Spec. The string is the value of an If header.
a string representation of this precondition |
|
|
|