com.ibm.portal.resolver.webdav.commands
Interface WebdavCommand.IfHandler

Enclosing interface:
WebdavCommand

public static interface WebdavCommand.IfHandler

Callback handler to test the assertions made by the If header. This interface is implemented by the resource provider.


Method Summary
 boolean containsETags(java.net.URI resource, java.util.List<java.lang.String> eTags)
          Checks if the resource contains the ETag
 boolean containsLockTokens(java.net.URI resource, java.util.List<java.net.URI> lockTokens)
          Checks if the resource contains the lock tokens
 void filterResources(java.util.Set<java.net.URI> aDst, java.util.Set<java.net.URI> aSrc)
          Populates the destination sets with the URIs of all resources that need to be tested against the If header.
 

Method Detail

containsETags

boolean containsETags(java.net.URI resource,
                      java.util.List<java.lang.String> eTags)
                      throws java.io.IOException
Checks if the resource contains the ETag

Parameters:
resource - resource URI, not null
eTags - the ETags, not null nor empty
Returns:
true if all eTags are contained, else false
Throws:
java.io.IOException

containsLockTokens

boolean containsLockTokens(java.net.URI resource,
                           java.util.List<java.net.URI> lockTokens)
                           throws java.io.IOException
Checks if the resource contains the lock tokens

Parameters:
resource - resource URI, not null
lockTokens - the lock tokens, not null nor empty
Returns:
true if all lock tokens are contained, else false
Throws:
java.io.IOException

filterResources

void filterResources(java.util.Set<java.net.URI> aDst,
                     java.util.Set<java.net.URI> aSrc)
                     throws java.io.IOException
Populates the destination sets with the URIs of all resources that need to be tested against the If header. Implementors may use the source set as a starting point, this set contains all resources explicitly listed in the If header

Parameters:
aDst - target set, not null
aSrc - read-only source set, not null but may be empty
Throws:
java.io.IOException