org.nees.data.service
Class NFMSTranslationLayer

java.lang.Object
  extended byorg.nees.data.service.NFMSTranslationLayer
All Implemented Interfaces:
FileManagementServiceInterface, InstantiationContractInterface

public class NFMSTranslationLayer
extends java.lang.Object
implements FileManagementServiceInterface

This class will translate every NFMS call into a corresponding command and run it.

Author:
USER

Field Summary
 
Fields inherited from interface org.nees.data.service.FileManagementServiceInterface
__CLASS_KEY, __IO_KEY
 
Constructor Summary
NFMSTranslationLayer(NFMSSession session)
          Creates a new instance of NFMSTranslationLayer
 
Method Summary
 void abortDownload(int transferToken)
           
 void abortUpload(int transferToken)
           
 void append(LogicalName tailLogicalName, int tailVersion, LogicalName headLogicalName, boolean makeNewHeadVersion)
           
 void copy(LogicalName sourceLogicalName, int sourceVersion, LogicalName targetLogicalName, boolean overwrite, boolean makeNewVersion)
           
 void delete(LogicalName sourceLogicalName, int sourceVersion)
           
 void downloadComplete(int transferToken)
           
 Identifier getID(LogicalName logicalName)
           
 int getLatestAvailableVersion(LogicalName logicalName)
           
 void initialize(java.util.Properties p, InitializationObjectInterface io)
           
 boolean isDeleted(LogicalName logicalName, int version)
           
 TransferReturnBean requestDownload(LogicalName logicalName, DownloadOptions downloadOptions)
           
 TransferReturnBean requestDownloadWithOptions(LogicalName logicalName, DownloadOptions[] downloadOptions)
           
 TransferReturnBean requestUpload(LogicalName logicalName, UploadOptions uploadOptions)
           
 TransferReturnBean requestUploadWithOptions(LogicalName logicalName, UploadOptions[] uploadOptions)
           
protected  Result runIt(NFMSCommand command, java.lang.String errorMessage)
          Utility to wrap up a single command, execute it and check the result is ok.
 void uploadComplete(int transferToken)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NFMSTranslationLayer

public NFMSTranslationLayer(NFMSSession session)
Creates a new instance of NFMSTranslationLayer

Method Detail

abortDownload

public void abortDownload(int transferToken)
                   throws NFMSException
Specified by:
abortDownload in interface FileManagementServiceInterface
Throws:
NFMSException

abortUpload

public void abortUpload(int transferToken)
                 throws NFMSException
Specified by:
abortUpload in interface FileManagementServiceInterface
Throws:
NFMSException

append

public void append(LogicalName tailLogicalName,
                   int tailVersion,
                   LogicalName headLogicalName,
                   boolean makeNewHeadVersion)
            throws NFMSException
Specified by:
append in interface FileManagementServiceInterface
Throws:
NFMSException

copy

public void copy(LogicalName sourceLogicalName,
                 int sourceVersion,
                 LogicalName targetLogicalName,
                 boolean overwrite,
                 boolean makeNewVersion)
          throws NFMSException
Specified by:
copy in interface FileManagementServiceInterface
Throws:
NFMSException

delete

public void delete(LogicalName sourceLogicalName,
                   int sourceVersion)
            throws NFMSException
Specified by:
delete in interface FileManagementServiceInterface
Throws:
NFMSException

downloadComplete

public void downloadComplete(int transferToken)
                      throws NFMSException
Specified by:
downloadComplete in interface FileManagementServiceInterface
Throws:
NFMSException

getLatestAvailableVersion

public int getLatestAvailableVersion(LogicalName logicalName)
                              throws NFMSException
Specified by:
getLatestAvailableVersion in interface FileManagementServiceInterface
Throws:
NFMSException

initialize

public void initialize(java.util.Properties p,
                       InitializationObjectInterface io)
                throws java.lang.Exception
Specified by:
initialize in interface InstantiationContractInterface
Throws:
java.lang.Exception

isDeleted

public boolean isDeleted(LogicalName logicalName,
                         int version)
                  throws NFMSException
Specified by:
isDeleted in interface FileManagementServiceInterface
Throws:
NFMSException

requestDownload

public TransferReturnBean requestDownload(LogicalName logicalName,
                                          DownloadOptions downloadOptions)
                                   throws NFMSException
Specified by:
requestDownload in interface FileManagementServiceInterface
Throws:
NFMSException

requestDownloadWithOptions

public TransferReturnBean requestDownloadWithOptions(LogicalName logicalName,
                                                     DownloadOptions[] downloadOptions)
                                              throws NFMSException
Specified by:
requestDownloadWithOptions in interface FileManagementServiceInterface
Throws:
NFMSException

requestUpload

public TransferReturnBean requestUpload(LogicalName logicalName,
                                        UploadOptions uploadOptions)
                                 throws NFMSException
Specified by:
requestUpload in interface FileManagementServiceInterface
Throws:
NFMSException

requestUploadWithOptions

public TransferReturnBean requestUploadWithOptions(LogicalName logicalName,
                                                   UploadOptions[] uploadOptions)
                                            throws NFMSException
Specified by:
requestUploadWithOptions in interface FileManagementServiceInterface
Throws:
NFMSException

uploadComplete

public void uploadComplete(int transferToken)
                    throws NFMSException
Specified by:
uploadComplete in interface FileManagementServiceInterface
Throws:
NFMSException

getID

public Identifier getID(LogicalName logicalName)
                 throws NFMSException
Specified by:
getID in interface FileManagementServiceInterface
Throws:
NFMSException

runIt

protected Result runIt(NFMSCommand command,
                       java.lang.String errorMessage)
                throws NFMSException
Utility to wrap up a single command, execute it and check the result is ok.

Throws:
NFMSException