org.tigris.subversion.javahl.tests

Class 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

Method Summary

WC.Item
addItem(String path, String content)
Add a new item to the working copy
WC
copy()
Copy an expected working copy state
WC.Item
getItem(String path)
Returns the item at a path
String
getItemContent(String path)
Returns the file content of the item at a path
void
materialize(File root)
Generate from the expected state of the working copy a new working copy
void
removeItem(String path)
Remove the item at a path
void
setItemCheckContent(String path, boolean check)
set the flag to check the content of item at a path during next check.
void
setItemContent(String path, String content)
Set the file content of the item at a path
void
setItemIsLocked(String path, boolean isLocked)
Set the expected lock state at a path
void
setItemIsSwitched(String path, boolean isSwitched)
Set the expected switched flag at a path
void
setItemNodeKind(String path, int nodeKind)
Set the expected node kind at a path
void
setItemPropStatus(String path, int status)
Set property status of the item at a path
void
setItemTextStatus(String path, int status)
Set text (content) status of the item at a path
void
setItemWorkingCopyRevision(String path, long revision)
Set the revision number of the item at a path

Method Details

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)
            throws IOException
Generate from the expected state of the working copy a new working copy
Parameters:
root - the working copy directory

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