org.alfresco.service.cmr.remote
Interface RepoRemote

All Known Implementing Classes:
RepoRemoteImpl, RepoRemoteService

public interface RepoRemote

A highly simplified remote interface for the repo.


Method Summary
 org.alfresco.service.cmr.repository.NodeRef createDirectory(org.alfresco.service.cmr.repository.NodeRef base, java.lang.String path)
          Create a new directory.
 java.io.OutputStream createFile(org.alfresco.service.cmr.repository.NodeRef base, java.lang.String path)
          Create a file relative to a base node.
 java.util.Map getListing(org.alfresco.service.cmr.repository.NodeRef dir)
          Get a listing of a directory.
 org.alfresco.service.cmr.repository.NodeRef getRoot()
          Get the root node of the SpacesStore repo.
 org.alfresco.util.Pair lookup(org.alfresco.service.cmr.repository.NodeRef base, java.lang.String path)
          Lookup a node by path relative to a node.
 java.io.InputStream readFile(org.alfresco.service.cmr.repository.NodeRef fileRef)
          Read a file directly.
 java.io.InputStream readFile(org.alfresco.service.cmr.repository.NodeRef base, java.lang.String path)
          Read a file from a relative path.
 void removeNode(org.alfresco.service.cmr.repository.NodeRef toRemove)
          Remove a node directly.
 void removeNode(org.alfresco.service.cmr.repository.NodeRef base, java.lang.String path)
          Remove a node via a relative path.
 void rename(org.alfresco.service.cmr.repository.NodeRef base, java.lang.String src, java.lang.String dst)
          Rename a node
 java.io.OutputStream writeFile(org.alfresco.service.cmr.repository.NodeRef base, java.lang.String path)
          Write to an already existing file.
 

Method Detail

getRoot

org.alfresco.service.cmr.repository.NodeRef getRoot()
Get the root node of the SpacesStore repo.

Returns:
The root node ref.

getListing

java.util.Map getListing(org.alfresco.service.cmr.repository.NodeRef dir)
Get a listing of a directory.

Parameters:
dir - The node ref of the directory.
Returns:
A Map of names to node refs.

lookup

org.alfresco.util.Pair lookup(org.alfresco.service.cmr.repository.NodeRef base,
                              java.lang.String path)
Lookup a node by path relative to a node.

Parameters:
base - The base node ref.
path - The relative path.
Returns:
The node ref or null.

createFile

java.io.OutputStream createFile(org.alfresco.service.cmr.repository.NodeRef base,
                                java.lang.String path)
Create a file relative to a base node.

Parameters:
base - The base node ref.
path - The relative path.
Returns:
An OutputStream.

writeFile

java.io.OutputStream writeFile(org.alfresco.service.cmr.repository.NodeRef base,
                               java.lang.String path)
Write to an already existing file.

Parameters:
base - The base node ref.
path - The relative path.
Returns:
An OutputStream

createDirectory

org.alfresco.service.cmr.repository.NodeRef createDirectory(org.alfresco.service.cmr.repository.NodeRef base,
                                                            java.lang.String path)
Create a new directory.

Parameters:
base - The base node ref.
path - The relative path.
Returns:
The node ref to the newly created directory.

removeNode

void removeNode(org.alfresco.service.cmr.repository.NodeRef toRemove)
Remove a node directly.

Parameters:
toRemove - The node ref to remove.

removeNode

void removeNode(org.alfresco.service.cmr.repository.NodeRef base,
                java.lang.String path)
Remove a node via a relative path.

Parameters:
base - The base node ref.
path - The relative path.

rename

void rename(org.alfresco.service.cmr.repository.NodeRef base,
            java.lang.String src,
            java.lang.String dst)
Rename a node

Parameters:
base - The base node ref.
src - The relative source path.
dst - The relative target path.

readFile

java.io.InputStream readFile(org.alfresco.service.cmr.repository.NodeRef fileRef)
Read a file directly.

Parameters:
fileRef - The node ref of the file.
Returns:
An InputStream.

readFile

java.io.InputStream readFile(org.alfresco.service.cmr.repository.NodeRef base,
                             java.lang.String path)
Read a file from a relative path.

Parameters:
base - The base node ref.
path - The relative path to the file.
Returns:
An InputStream.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.