org.tigris.subversion.javahl.tests
Class WC

java.lang.Object
  extended by org.tigris.subversion.javahl.tests.WC

public class WC
extends java.lang.Object

This class describe the expected state of the working copy


Nested Class Summary
 class WC.Item
          internal class to discribe a single working copy item
 
Constructor Summary
WC()
           
 
Method Summary
 WC.Item addItem(java.lang.String path, java.lang.String content)
          Add a new item to the working copy
 WC copy()
          Copy an expected working copy state
 WC.Item getItem(java.lang.String path)
          Returns the item at a path
 java.lang.String getItemContent(java.lang.String path)
          Returns the file content of the item at a path
 void materialize(java.io.File root)
          Generate from the expected state of the working copy a new working copy
 void removeItem(java.lang.String path)
          Remove the item at a path
 void setItemCheckContent(java.lang.String path, boolean check)
          set the flag to check the content of item at a path during next check.
 void setItemContent(java.lang.String path, java.lang.String content)
          Set the file content of the item at a path
 void setItemIsLocked(java.lang.String path, boolean isLocked)
          Set the expected lock state at a path
 void setItemIsSwitched(java.lang.String path, boolean isSwitched)
          Set the expected switched flag at a path
 void setItemNodeKind(java.lang.String path, int nodeKind)
          Set the expected node kind at a path
 void setItemPropStatus(java.lang.String path, int status)
          Set property status of the item at a path
 void setItemTextStatus(java.lang.String path, int status)
          Set text (content) status of the item at a path
 void setItemWorkingCopyRevision(java.lang.String path, long revision)
          Set the revision number of the item at a path
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WC

public WC()
Method Detail

materialize

public void materialize(java.io.File root)
                 throws java.io.IOException
Generate from the expected state of the working copy a new working copy

Parameters:
root - the working copy directory
Throws:
java.io.IOException

addItem

public WC.Item addItem(java.lang.String path,
                       java.lang.String content)
Add a new item to the working copy

Parameters:
path - the path of the item
content - the content of the item. A null content signifies a directory
Returns:
the new Item object

getItem

public WC.Item getItem(java.lang.String path)
Returns the item at a path

Parameters:
path - the path, where the item is searched
Returns:
the found item

removeItem

public void removeItem(java.lang.String path)
Remove the item at a path

Parameters:
path - the path, where the item is removed

setItemTextStatus

public void setItemTextStatus(java.lang.String path,
                              int status)
Set text (content) status of the item at a path

Parameters:
path - the path, where the status is set
status - the new text status

setItemPropStatus

public void setItemPropStatus(java.lang.String path,
                              int status)
Set property status of the item at a path

Parameters:
path - the path, where the status is set
status - the new property status

setItemWorkingCopyRevision

public void setItemWorkingCopyRevision(java.lang.String path,
                                       long revision)
Set the revision number of the item at a path

Parameters:
path - the path, where the revision number is set
revision - the new revision number

getItemContent

public java.lang.String getItemContent(java.lang.String path)
Returns the file content of the item at a path

Parameters:
path - the path, where the content is retrieved
Returns:
the content of the file

setItemContent

public void setItemContent(java.lang.String path,
                           java.lang.String content)
Set the file content of the item at a path

Parameters:
path - the path, where the content is set
content - the new content

setItemCheckContent

public void setItemCheckContent(java.lang.String path,
                                boolean check)
set the flag to check the content of item at a path during next check.

Parameters:
path - the path, where the flag is set
check - the flag

setItemNodeKind

public void setItemNodeKind(java.lang.String path,
                            int nodeKind)
Set the expected node kind at a path

Parameters:
path - the path, where the node kind is set
nodeKind - the expected node kind

setItemIsLocked

public void setItemIsLocked(java.lang.String path,
                            boolean isLocked)
Set the expected lock state at a path

Parameters:
path - the path, where the lock state is set
isLocked - the flag

setItemIsSwitched

public void setItemIsSwitched(java.lang.String path,
                              boolean isSwitched)
Set the expected switched flag at a path

Parameters:
path - the path, where the switch flag is set
isSwitched - the flag

copy

public WC copy()
Copy an expected working copy state

Returns:
the copy of the exiting object