JavaSVN Home

## org.tmatesoft.svn.core.io
Interface ISVNWorkspaceMediator

public interface ISVNWorkspaceMediator

The ISVNWorkspaceMediator interface is used for temporary data storage (mainly instructions and new text data for deltas) as well as for caching and getting some kind of wcprops.

Version:
  1.0
Author:
  TMate Software Ltd.
See Also:
  `SVNRepository.getCommitEditor(String, Map, boolean, ISVNWorkspaceMediator)`, Examples

Method Summary
`OutputStream` `createTemporaryLocation(String path, Object id)` Creates a temporary data storage for writing and maps the given `id` object to this storage, so that later the storage will be available for reading through a call to `getTemporaryLocation(Object)`, which receives the `id`.
`void` `deleteTemporaryLocation(Object id)` Disposes a temporary data storage mapped against the given `id`.
`long` `getLength(Object id)` Gets the size of a temporary data storage mapped against the given `id`.
`InputStream` `getTemporaryLocation(Object id)` Retrieves an input stream to read data from the temporary storage mapped against the `id` object.
`String` `getWorkspaceProperty(String path, String name)` Retrieves an item's WC property from a `".svn/wcprops"` administrative subdirectory.
`void` `setWorkspaceProperty(String path, String name, String value)` Sets a new value for an item's WC property in a `".svn/wcprops"` administrative subdirectory.

Method Detail

### getWorkspaceProperty

    public String getWorkspaceProperty(String path,
                                       String name)
                                throws SVNException

  Retrieves an item's WC property from a `".svn/wcprops"` administrative subdirectory.

  Parameters:
    `path` - a WC item's path
    `name` - a propery name
  Returns:
    the value for the property
  Throws:
    `SVNException`
  See Also:
    `setWorkspaceProperty(String, String, String)`

### setWorkspaceProperty

    public void setWorkspaceProperty(String path,
                                     String name,
                                     String value)
                              throws SVNException

  Sets a new value for an item's WC property in a `".svn/wcprops"` administrative subdirectory.

  Parameters:
    `path` - a WC item's path
    `name` - a propery name
    `value` - a value for the property
  Throws:
    `SVNException`
  See Also:
    `getWorkspaceProperty(String, String)`

### createTemporaryLocation

    public OutputStream createTemporaryLocation(String path,
                                                Object id)
                                         throws IOException

  Creates a temporary data storage for writing and maps the given `id` object to this storage, so that later the storage will be available for reading through a call to `getTemporaryLocation(Object)`, which receives the `id`.

  This is used for constructing diff windows and mapping them to temporary storages that contain instructions and new text data for the windows.

  Parameters:
    `path` - an item's relative path
    `id` - an id for the created temporary
  Returns:
    an output stream to write data to the allocated storage
  Throws:
    `IOException` - if an output stream can not be created
  See Also:
    `getTemporaryLocation(Object)`

### getTemporaryLocation

    public InputStream getTemporaryLocation(Object id)
                                     throws IOException

  Retrieves an input stream to read data from the temporary storage mapped against the `id` object.

  Parameters:
    `id` - an id as a key to the temporary storage
  Returns:
    an input stream to read data from the temporary storage
  Throws:
    `IOException` - if an input stream can not be created
  See Also:
    `createTemporaryLocation(String, Object)`

### getLength

    public long getLength(Object id)
                   throws IOException

  Gets the size of a temporary data storage mapped against the given `id`.

  Parameters:
    `id` - an id as a key to a data storage
  Returns:
    the data storage size in bytes
  Throws:
    `IOException`
  See Also:
    `createTemporaryLocation(String, Object)`, `getTemporaryLocation(Object)`

### deleteTemporaryLocation

    public void deleteTemporaryLocation(Object id)

  Disposes a temporary data storage mapped against the given `id`.

  Parameters:
    `id` - an id as a key to a temporary data storage
  See Also:
    `createTemporaryLocation(String, Object)`, `getTemporaryLocation(Object)`

JavaSVN Home

Copyright © 2004-2006 TMate Software Ltd. All Rights Reserved.