org.alfresco.repo.remote
Class RepoRemoteService

java.lang.Object
  extended by org.alfresco.repo.remote.RepoRemoteService
All Implemented Interfaces:
RepoRemote

public class RepoRemoteService
extends java.lang.Object
implements RepoRemote

Server side implementation of RepoRemote.


Constructor Summary
RepoRemoteService()
          Default constructor.
 
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
 void setContentService(ContentService service)
          Set the ContentService instance.
 void setFileFolderService(FileFolderService service)
          Set the FileFolderService instance.
 void setNodeService(org.alfresco.service.cmr.repository.NodeService service)
          Set the NodeService instance.
 java.io.OutputStream writeFile(org.alfresco.service.cmr.repository.NodeRef base, java.lang.String path)
          Write to an already existing file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepoRemoteService

public RepoRemoteService()
Default constructor.

Method Detail

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService service)
Set the NodeService instance.


setContentService

public void setContentService(ContentService service)
Set the ContentService instance.


setFileFolderService

public void setFileFolderService(FileFolderService service)
Set the FileFolderService instance.


createDirectory

public org.alfresco.service.cmr.repository.NodeRef createDirectory(org.alfresco.service.cmr.repository.NodeRef base,
                                                                   java.lang.String path)
Description copied from interface: RepoRemote
Create a new directory.

Specified by:
createDirectory in interface RepoRemote
Parameters:
base - The base node ref.
path - The relative path.
Returns:
The node ref to the newly created directory.

createFile

public java.io.OutputStream createFile(org.alfresco.service.cmr.repository.NodeRef base,
                                       java.lang.String path)
Description copied from interface: RepoRemote
Create a file relative to a base node.

Specified by:
createFile in interface RepoRemote
Parameters:
base - The base node ref.
path - The relative path.
Returns:
An OutputStream.

getListing

public java.util.Map getListing(org.alfresco.service.cmr.repository.NodeRef dir)
Description copied from interface: RepoRemote
Get a listing of a directory.

Specified by:
getListing in interface RepoRemote
Parameters:
dir - The node ref of the directory.
Returns:
A Map of names to node refs.

getRoot

public org.alfresco.service.cmr.repository.NodeRef getRoot()
Description copied from interface: RepoRemote
Get the root node of the SpacesStore repo.

Specified by:
getRoot in interface RepoRemote
Returns:
The root node ref.

lookup

public org.alfresco.util.Pair lookup(org.alfresco.service.cmr.repository.NodeRef base,
                                     java.lang.String path)
Description copied from interface: RepoRemote
Lookup a node by path relative to a node.

Specified by:
lookup in interface RepoRemote
Parameters:
base - The base node ref.
path - The relative path.
Returns:
The node ref or null.

readFile

public java.io.InputStream readFile(org.alfresco.service.cmr.repository.NodeRef fileRef)
Description copied from interface: RepoRemote
Read a file directly.

Specified by:
readFile in interface RepoRemote
Parameters:
fileRef - The node ref of the file.
Returns:
An InputStream.

readFile

public java.io.InputStream readFile(org.alfresco.service.cmr.repository.NodeRef base,
                                    java.lang.String path)
Description copied from interface: RepoRemote
Read a file from a relative path.

Specified by:
readFile in interface RepoRemote
Parameters:
base - The base node ref.
path - The relative path to the file.
Returns:
An InputStream.

removeNode

public void removeNode(org.alfresco.service.cmr.repository.NodeRef toRemove)
Description copied from interface: RepoRemote
Remove a node directly.

Specified by:
removeNode in interface RepoRemote
Parameters:
toRemove - The node ref to remove.

removeNode

public void removeNode(org.alfresco.service.cmr.repository.NodeRef base,
                       java.lang.String path)
Description copied from interface: RepoRemote
Remove a node via a relative path.

Specified by:
removeNode in interface RepoRemote
Parameters:
base - The base node ref.
path - The relative path.

rename

public void rename(org.alfresco.service.cmr.repository.NodeRef base,
                   java.lang.String src,
                   java.lang.String dst)
Description copied from interface: RepoRemote
Rename a node

Specified by:
rename in interface RepoRemote
Parameters:
base - The base node ref.
src - The relative source path.
dst - The relative target path.

writeFile

public java.io.OutputStream writeFile(org.alfresco.service.cmr.repository.NodeRef base,
                                      java.lang.String path)
Description copied from interface: RepoRemote
Write to an already existing file.

Specified by:
writeFile in interface RepoRemote
Parameters:
base - The base node ref.
path - The relative path.
Returns:
An OutputStream


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