org.alfresco.repo.remote
Class LoaderRemoteServer

java.lang.Object
  extended by org.alfresco.repo.remote.LoaderRemoteServer
All Implemented Interfaces:
LoaderRemote

public class LoaderRemoteServer
extends java.lang.Object
implements LoaderRemote

Server side implementation of the LoaderServiceTransport transport layer. This is the class that gets exported remotely as it contains the explicit ticket arguments.

Since:
2.2

Field Summary
 
Fields inherited from interface org.alfresco.service.cmr.remote.LoaderRemote
SERVICE_NAME
 
Constructor Summary
LoaderRemoteServer()
           
 
Method Summary
 java.lang.String authenticate(java.lang.String username, java.lang.String password)
          Authenticate on the server using the given username and password
 org.alfresco.service.cmr.repository.NodeRef[] checkin(java.lang.String ticket, org.alfresco.service.cmr.repository.NodeRef[] workingCopyNodeRef, java.util.List versionProperties)
          Check in files.
 org.alfresco.service.cmr.repository.NodeRef checkin(java.lang.String ticket, org.alfresco.service.cmr.repository.NodeRef workingCopyNodeRef, java.util.Map versionProperties)
          
 org.alfresco.service.cmr.repository.NodeRef checkout(java.lang.String ticket, org.alfresco.service.cmr.repository.NodeRef nodeRef)
          
 FileInfo[] checkout(java.lang.String ticket, org.alfresco.service.cmr.repository.NodeRef[] nodeRef)
          Check out files.
 void coci(java.lang.String ticket, org.alfresco.service.cmr.repository.NodeRef[] nodeRef, byte[][] bytes, java.util.List versionProperties)
          Check in Check out files.
 int getNodeCount(java.lang.String ticket)
          
 int getNodeCount(java.lang.String ticket, org.alfresco.service.cmr.repository.StoreRef storeRef)
          
 org.alfresco.service.cmr.repository.NodeRef getOrCreateWorkingRoot(java.lang.String ticket, org.alfresco.service.cmr.repository.StoreRef storeRef)
          Get the working cm:folder node for the given store.
 void setAuthenticationService(AuthenticationService authenticationService)
           
 void setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
           
 void setFileFolderRemote(FileFolderRemote fileFolderRemote)
           
 void setFileFolderService(FileFolderService fileFolderService)
           
 void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
          Deprecated. The mimetype service is no longer needed.
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setTransactionService(TransactionService transactionService)
           
 FileInfo[] uploadContent(java.lang.String ticket, org.alfresco.service.cmr.repository.NodeRef folderNodeRef, java.lang.String[] filenames, byte[][] bytes)
          Upload multiple files to a folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoaderRemoteServer

public LoaderRemoteServer()
Method Detail

setTransactionService

public void setTransactionService(TransactionService transactionService)
Parameters:
transactionService - provides transactional support and retrying

setAuthenticationService

public void setAuthenticationService(AuthenticationService authenticationService)
Parameters:
authenticationService - the service that will validate the tickets

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Parameters:
nodeService - the service that will do the work

setFileFolderService

public void setFileFolderService(FileFolderService fileFolderService)
Parameters:
fileFolderService - the file-specific service

setFileFolderRemote

public void setFileFolderRemote(FileFolderRemote fileFolderRemote)

setMimetypeService

@Deprecated
public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Deprecated. The mimetype service is no longer needed.


setCheckOutCheckInService

public void setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)

authenticate

public java.lang.String authenticate(java.lang.String username,
                                     java.lang.String password)
Authenticate on the server using the given username and password

Specified by:
authenticate in interface LoaderRemote
Returns:
the authentication ticket

getOrCreateWorkingRoot

public org.alfresco.service.cmr.repository.NodeRef getOrCreateWorkingRoot(java.lang.String ticket,
                                                                          org.alfresco.service.cmr.repository.StoreRef storeRef)
Get the working cm:folder node for the given store. If there is no working root node, then one is created.

Specified by:
getOrCreateWorkingRoot in interface LoaderRemote
Parameters:
ticket - the authentication ticket
storeRef - the store reference
Returns:
a working cm:folder to use as the root for loading, or null if it is not available.

getNodeCount

public int getNodeCount(java.lang.String ticket)

Specified by:
getNodeCount in interface LoaderRemote
Parameters:
ticket - the authentication ticket
Returns:
Returns the total number of ADM nodes

getNodeCount

public int getNodeCount(java.lang.String ticket,
                        org.alfresco.service.cmr.repository.StoreRef storeRef)

Specified by:
getNodeCount in interface LoaderRemote
Parameters:
ticket - the authentication ticket
storeRef - the store to query against
Returns:
Returns the total number of nodes for the given ADM store

uploadContent

public FileInfo[] uploadContent(java.lang.String ticket,
                                org.alfresco.service.cmr.repository.NodeRef folderNodeRef,
                                java.lang.String[] filenames,
                                byte[][] bytes)
Description copied from interface: LoaderRemote
Upload multiple files to a folder.

Specified by:
uploadContent in interface LoaderRemote
Parameters:
ticket - the authentication ticket
folderNodeRef - the folder to upload to
filenames - the names of the files to upload
bytes - the contents of the files
Returns:
Returns the details of each file created

coci

public void coci(java.lang.String ticket,
                 org.alfresco.service.cmr.repository.NodeRef[] nodeRef,
                 byte[][] bytes,
                 java.util.List versionProperties)
Check in Check out files.

Specified by:
coci in interface LoaderRemote
Parameters:
ticket - the authentication ticket
nodeRef - a reference to the node to checkout
bytes - the contents of the files
versionProperties - the version properties. If null is passed then the original node is NOT versioned during the checkin operation.

checkout

public org.alfresco.service.cmr.repository.NodeRef checkout(java.lang.String ticket,
                                                            org.alfresco.service.cmr.repository.NodeRef nodeRef)


checkout

public FileInfo[] checkout(java.lang.String ticket,
                           org.alfresco.service.cmr.repository.NodeRef[] nodeRef)
Check out files.

Specified by:
checkout in interface LoaderRemote
Parameters:
ticket - the authentication ticket
nodeRef - a reference to the node to checkout
Returns:
a node reference to the created working copy

checkin

public org.alfresco.service.cmr.repository.NodeRef checkin(java.lang.String ticket,
                                                           org.alfresco.service.cmr.repository.NodeRef workingCopyNodeRef,
                                                           java.util.Map versionProperties)


checkin

public org.alfresco.service.cmr.repository.NodeRef[] checkin(java.lang.String ticket,
                                                             org.alfresco.service.cmr.repository.NodeRef[] workingCopyNodeRef,
                                                             java.util.List versionProperties)
Check in files.

Specified by:
checkin in interface LoaderRemote
Parameters:
ticket - the authentication ticket
workingCopyNodeRef - the working copy node reference
versionProperties - the version properties. If null is passed then the original node is NOT versioned during the checkin operation.
Returns:
the node reference to the original node, updated with the checked in state


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