org.tigris.subversion.javahl.tests

Class WC

public class WC extends Object

This class describe the expected state of the working copy
Nested Class Summary
classWC.Item
internal class to discribe a single working copy item
Method Summary
WC.ItemaddItem(String path, String content)
Add a new item to the working copy
WCcopy()
Copy an expected working copy state
WC.ItemgetItem(String path)
Returns the item at a path
StringgetItemContent(String path)
Returns the file content of the item at a path
voidmaterialize(File root)
Generate from the expected state of the working copy a new working copy
voidremoveItem(String path)
Remove the item at a path
voidsetItemCheckContent(String path, boolean check)
set the flag to check the content of item at a path during next check.
voidsetItemContent(String path, String content)
Set the file content of the item at a path
voidsetItemIsLocked(String path, boolean isLocked)
Set the expected lock state at a path
voidsetItemIsSwitched(String path, boolean isSwitched)
Set the expected switched flag at a path
voidsetItemNodeKind(String path, int nodeKind)
Set the expected node kind at a path
voidsetItemPropStatus(String path, int status)
Set property status of the item at a path
voidsetItemTextStatus(String path, int status)
Set text (content) status of the item at a path
voidsetItemWorkingCopyRevision(String path, long revision)
Set the revision number of the item at a path

Method Detail

addItem

public WC.Item addItem(String path, 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

copy

public WC copy()
Copy an expected working copy state

Returns: the copy of the exiting object

getItem

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

Parameters: path the path, where the item is searched

Returns: the found item

getItemContent

public String getItemContent(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

materialize

public void materialize(File root)
Generate from the expected state of the working copy a new working copy

Parameters: root the working copy directory

Throws: IOException

removeItem

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

Parameters: path the path, where the item is removed

setItemCheckContent

public void setItemCheckContent(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

setItemContent

public void setItemContent(String path, 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

setItemIsLocked

public void setItemIsLocked(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(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

setItemNodeKind

public void setItemNodeKind(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

setItemPropStatus

public void setItemPropStatus(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

setItemTextStatus

public void setItemTextStatus(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

setItemWorkingCopyRevision

public void setItemWorkingCopyRevision(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