Added getContentReader and createContentWriter to AVMService. Also added convenience

getDirectoryListingArray() calls which return listings as arrays instead of Maps.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4377 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-11-16 19:53:42 +00:00
parent b5f3167443
commit 4287b291d4
6 changed files with 187 additions and 8 deletions

View File

@@ -26,6 +26,8 @@ import java.util.SortedMap;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
@@ -59,6 +61,21 @@ public interface AVMService
*/
public OutputStream getFileOutputStream(String path);
/**
* Get a content reader from a file node.
* @param version The version of the file.
* @param path The path to the file.
* @return A ContentReader.
*/
public ContentReader getContentReader(int version, String path);
/**
* Get a ContentWriter to a file node.
* @param path The path to the file.
* @return A ContentWriter.
*/
public ContentWriter createContentWriter(String path);
/**
* Get a listing of a Folder by name.
* @param version The version id to look in.
@@ -116,6 +133,16 @@ public interface AVMService
public SortedMap<String, AVMNodeDescriptor>
getDirectoryListingDirect(int version, String path, boolean includeDeleted);
/**
* Get a directory listing as an Array of AVMNodeDescriptors.
* @param version The version to look under.
* @param path The path to the directory to be listed.
* @param includeDeleted Whether to include ghosts.
* @return An array of AVMNodeDescriptors.
*/
public AVMNodeDescriptor [] getDirectoryListingArray(int version, String path,
boolean includeDeleted);
/**
* Get a listing of all the directly contained children of a directory.
* @param dir The directory descriptor.
@@ -145,7 +172,16 @@ public interface AVMService
* @throws AVMWrongTypeException If the descriptor does not point at a directory.
*/
public SortedMap<String, AVMNodeDescriptor> getDirectoryListing(AVMNodeDescriptor dir,
boolean includeDeleted);
boolean includeDeleted);
/**
* Get a directory listing as an Array of node descriptors.
* @param dir The descriptor pointing at the directory to list.
* @param includeDeleted Whether to show ghosts.
* @return An array of AVMNodeDescriptors.
*/
public AVMNodeDescriptor [] getDirectoryListingArray(AVMNodeDescriptor dir,
boolean includeDeleted);
/**
* Get the names of nodes that have been deleted in a directory.