org.abstracthorizon.danube.webdav.util
Class IF

java.lang.Object
  extended by org.abstracthorizon.danube.webdav.util.IF

public class IF
extends Object

This object represents "If" header of WebDAV specification.

Author:
Daniel Sendula

Field Summary
 Set<Object> clearedResources
          Collection of resource that was cleared.
 boolean error
          true if header parsing wasn't successful
 String parentToken
          Collected token of a parent resource.
 String token
          Collected token of a main resource.
 
Constructor Summary
IF()
           
 
Method Summary
 boolean parse(HTTPConnection httpConnection, ResourceAdapter adapter, Object mainResource, Object parentResource)
          Parses "if" header and checks if values correspond to given resource.
 boolean parse(HTTPConnection httpConnection, ResourceAdapter adapter, Object mainResource, Object parentResource, char[] buf)
          Parses "if" header and checks if values correspond to given resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token

public String token
Collected token of a main resource. May be null


parentToken

public String parentToken
Collected token of a parent resource. May be null


clearedResources

public Set<Object> clearedResources
Collection of resource that was cleared. May be null


error

public boolean error
true if header parsing wasn't successful

Constructor Detail

IF

public IF()
Method Detail

parse

public boolean parse(HTTPConnection httpConnection,
                     ResourceAdapter adapter,
                     Object mainResource,
                     Object parentResource)
Parses "if" header and checks if values correspond to given resource. It returns lock token of supplied main resource. If it failed null will be returned.

Parameters:
httpConnection - http connection
adapter - resource adapter
mainResource - main resource
parentResource - parent resource. May be null.
header - if header
Returns:
lock token of supplied main resource or null

parse

public boolean parse(HTTPConnection httpConnection,
                     ResourceAdapter adapter,
                     Object mainResource,
                     Object parentResource,
                     char[] buf)
Parses "if" header and checks if values correspond to given resource. It returns lock token of supplied main resource. If it failed null will be returned.

Parameters:
httpConnection - http connection
adapter - resource adapter
mainResource - main resource
parentResource - parent resource. May be null.
header - if header
Returns:
lock token of supplied main resource or null


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.