|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nees.util.sessions.SessionFacade
org.nees.data.service.client.NFMSFacade
This class provides a set of convenience API's for uploading and downloading files to and from a repository using NFMS and GridFTP. It combines the steps of negotiating transfers and performing the transfers, so that the application does not need to use any GridFTP API's. It can also interact with an NMDS service to create metadata linked to each file.
Typical Usage:
Used instead of lower-level methods in the FileManagementService interface.
Life Cycle:
Once a FileManagementService is located, it's passed to NFMSFacade's constructor. Then, NFMSFacade methods can be used to put or get files to and from the repository. The variants of get() and put() are used to do this. In addition, an NMDS instance can be passed to setRepositoryService and then serveral NMDS-related methods can be used to create and retrieve metadata objects associated with files; see createFileObject() and getFileObject() for details.
| Constructor Summary | |
NFMSFacade(SessionFactory factory)
|
|
NFMSFacade(SessionFactory factory,
java.lang.String protocol)
Create an NFMSFacade for an NFMS service. |
|
NFMSFacade(SessionProvider provider)
|
|
NFMSFacade(SessionProvider provider,
java.lang.String protocol)
Create an NFMSFacade for an NFMS service. |
|
| Method Summary | |
void |
append(LogicalName logicalName,
java.io.File localFragment)
Append to an existing file or create a new file if none exists. |
void |
append(LogicalName logicalName,
java.io.File[] fileList)
|
void |
appendNew(LogicalName logicalName,
java.io.File localFragment)
Appends to an existing file, throwing an exception if the file already exists on the server. |
void |
appendNewVersion(LogicalName logicalName,
java.io.File localFragment)
If the file is already on the server, this will version it and append. |
void |
appendNewVersion(LogicalName logicalName,
java.io.File[] fList)
This will append several files to a (possibly) existing one and create a new version consisting of all the files concatenated. |
void |
get(LogicalName logicalName,
java.io.File localFile,
int versionNumber)
If the file is already on the server, this will version it and append. |
org.ietf.jgss.GSSCredential |
getCredential()
Get the credential used to authenticate to the services. |
void |
getLatestVersion(LogicalName logicalName,
java.io.File localFile)
|
int |
getLatestVersionNumber(LogicalName logicalName)
|
void |
put(LogicalName logicalName,
java.io.File localFile)
|
void |
put(LogicalName logicalName,
java.io.File localFile,
boolean isNew,
boolean isToAppend,
boolean makeNewVersion)
|
void |
putNew(LogicalName logicalName,
java.io.File localFile)
|
void |
putNewVersion(LogicalName logicalName,
java.io.File localFragment)
|
void |
serverSideAppend(LogicalName tailLN,
int tailVersion,
LogicalName headLN,
boolean makeNewVersion)
|
void |
serverSideCopy(LogicalName sourceLN,
int sourceVersion,
LogicalName targetLN,
boolean overwrite,
boolean makeNewVersion)
|
void |
serverSideDelete(LogicalName logicalName,
int versionNumber)
|
void |
setASCIITransferType()
Set the transfer type to ASCII. |
void |
setBinaryTransferType()
Set the transfer type to binary. |
| Methods inherited from class org.nees.util.sessions.SessionFacade |
getSession, getSessionProvider, releaseSession |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NFMSFacade(SessionFactory factory,
java.lang.String protocol)
throws java.lang.Exception
java.lang.Exception - If the facade cannot be initialized.
public NFMSFacade(SessionFactory factory)
throws java.lang.Exception
public NFMSFacade(SessionProvider provider,
java.lang.String protocol)
throws java.lang.Exception
java.lang.Exception - If the facade cannot be initialized.
public NFMSFacade(SessionProvider provider)
throws java.lang.Exception
| Method Detail |
public void setASCIITransferType()
public void setBinaryTransferType()
public org.ietf.jgss.GSSCredential getCredential()
throws java.lang.Exception
java.lang.Exception - If the credential cannot be loaded.
public void append(LogicalName logicalName,
java.io.File localFragment)
throws java.lang.Exception
logicalName - The logical name for the filelocalFragment - The local file to be appended.
java.lang.Exception - If an error prevents completion.
public void append(LogicalName logicalName,
java.io.File[] fileList)
throws java.lang.Exception
java.lang.Exception
public void appendNewVersion(LogicalName logicalName,
java.io.File[] fList)
throws java.lang.Exception
java.lang.Exception
public void appendNew(LogicalName logicalName,
java.io.File localFragment)
throws java.lang.Exception
logicalName - The logical name of the file.localFragment - The name of the local file
java.lang.Exception - Thrown if the given logical name is already in use on the server.
public void appendNewVersion(LogicalName logicalName,
java.io.File localFragment)
throws java.lang.Exception
logicalName - localFragment -
java.lang.Exception
public void get(LogicalName logicalName,
java.io.File localFile,
int versionNumber)
throws java.lang.Exception
logicalName -
java.lang.Exception
public void getLatestVersion(LogicalName logicalName,
java.io.File localFile)
throws java.lang.Exception
java.lang.Exception
public int getLatestVersionNumber(LogicalName logicalName)
throws java.lang.Exception
java.lang.Exception
public void put(LogicalName logicalName,
java.io.File localFile)
throws java.lang.Exception
java.lang.Exception
public void put(LogicalName logicalName,
java.io.File localFile,
boolean isNew,
boolean isToAppend,
boolean makeNewVersion)
throws java.lang.Exception
java.lang.Exception
public void putNew(LogicalName logicalName,
java.io.File localFile)
throws java.lang.Exception
java.lang.Exception
public void putNewVersion(LogicalName logicalName,
java.io.File localFragment)
throws java.lang.Exception
java.lang.Exception
public void serverSideCopy(LogicalName sourceLN,
int sourceVersion,
LogicalName targetLN,
boolean overwrite,
boolean makeNewVersion)
throws java.lang.Exception
java.lang.Exception
public void serverSideAppend(LogicalName tailLN,
int tailVersion,
LogicalName headLN,
boolean makeNewVersion)
throws java.lang.Exception
java.lang.Exception
public void serverSideDelete(LogicalName logicalName,
int versionNumber)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||