com.intel.gpe.clients.api
Interface StorageClient

All Superinterfaces:
ServiceClient, WSRFClient, WSRPClient

public interface StorageClient
extends WSRPClient

The client interface to the storage management resource

Version:
$Id: StorageClient.java,v 1.11 2006/04/11 08:58:52 lukichev Exp $
Author:
Alexander Lukichev, Valery Shorin, Nikolay Malyshev, Ralf Ratering

Method Summary
 void changePermissions(java.lang.String path, boolean readable, boolean writable, boolean executable)
          Change the file permissions.
 void copyFile(java.lang.String destination, java.lang.String source)
          Copy the file from one location to another at the storage
 void createDirectory(java.lang.String path)
          Create the directory at the storage.
 void deleteFile(java.lang.String path)
          Delete the remote file.
<FileTransferClientType extends FileTransferClient>
FileTransferClientType
exportFile(java.lang.String path, java.lang.String protocol, boolean isPipe)
          Create the file transfer resource to transfer the file from the the remote location at the storage to the client machine
 java.lang.String getFileSeparator()
          Get the file separator suitable for valid path construction for this storage
<FileSystemType extends FileSystem>
FileSystemType
getFileSystem()
           
 java.lang.String[] getSupportedProtocols()
          Get the list of supported file transfer protocols.
<FileTransferClientType extends FileTransferClient>
FileTransferClientType
importFile(java.lang.String file, java.lang.String protocol, boolean isPipe)
          Create the file transfer resource to transfer the file from the client machine to the remote location at the storage
<GridFileType extends GridFile>
java.util.List<GridFileType>
listDirectory(java.lang.String path)
          List the files in the directory.
<GridFileType extends GridFile>
GridFileType
listProperties(java.lang.String path)
          List the properties (attributes) of the file
 void renameFile(java.lang.String destination, java.lang.String source)
          Rename the remote file
 
Methods inherited from interface com.intel.gpe.clients.api.WSRPClient
getMultipleResourceProperties, getResourceProperty, getResourcePropertyDocument, queryXPath10Properties
 

Method Detail

listDirectory

<GridFileType extends GridFile> java.util.List<GridFileType> listDirectory(java.lang.String path)
                                                            throws GPESecurityException,
                                                                   GPEMiddlewareServiceException,
                                                                   GPEResourceUnknownException,
                                                                   GPEDirectoryNotListedException,
                                                                   GPEMiddlewareRemoteException
List the files in the directory.

Parameters:
path - The relative path to the directory
Returns:
The array of the remote file information structures
Throws:
GPEDirectoryNotListedException - If failed to list directory contents
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

createDirectory

void createDirectory(java.lang.String path)
                     throws GPEResourceUnknownException,
                            GPEDirectoryNotCreatedException,
                            GPESecurityException,
                            GPEMiddlewareServiceException,
                            GPEMiddlewareRemoteException
Create the directory at the storage.

Parameters:
path - The relative path to the directory
Throws:
GPEDirectoryNotCreatedException - If failed to create directory
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

deleteFile

void deleteFile(java.lang.String path)
                throws GPEResourceUnknownException,
                       GPEFileNotDeletedException,
                       GPESecurityException,
                       GPEMiddlewareRemoteException,
                       GPEMiddlewareServiceException
Delete the remote file.

Parameters:
path - The path to the file
Throws:
GPEFileNotDeletedException - If failed to delete file
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

listProperties

<GridFileType extends GridFile> GridFileType listProperties(java.lang.String path)
                                             throws GPESecurityException,
                                                    GPEMiddlewareServiceException,
                                                    GPEFilePropertiesNotListedException,
                                                    GPEResourceUnknownException,
                                                    GPEMiddlewareRemoteException
List the properties (attributes) of the file

Parameters:
path - The path to the file
Returns:
The remote file information structure
Throws:
GPEFilePropertiesNotListedException - If failed to list file properties
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

importFile

<FileTransferClientType extends FileTransferClient> FileTransferClientType importFile(java.lang.String file,
                                                                                      java.lang.String protocol,
                                                                                      boolean isPipe)
                                                             throws GPEResourceUnknownException,
                                                                    GPEImportFileResourceNotCreatedException,
                                                                    GPESecurityException,
                                                                    GPEFileTransferProtocolNotSupportedException,
                                                                    GPEMiddlewareServiceException,
                                                                    GPEMiddlewareRemoteException
Create the file transfer resource to transfer the file from the client machine to the remote location at the storage

Parameters:
file - The path where the file must be stored
protocol - The protocol for file transfer operation
isPipe - if true then write to pipe
Returns:
The client for managing the created file transfer resource
Throws:
GPEImportFileResourceNotCreatedException - If failed to create import file resource
GPEFileTransferProtocolNotSupportedException - If corresponding file transfer protocol is not supported by a target system
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

exportFile

<FileTransferClientType extends FileTransferClient> FileTransferClientType exportFile(java.lang.String path,
                                                                                      java.lang.String protocol,
                                                                                      boolean isPipe)
                                                             throws GPEFileTransferProtocolNotSupportedException,
                                                                    GPEExportFileResourceNotCreatedException,
                                                                    GPEResourceUnknownException,
                                                                    GPESecurityException,
                                                                    GPEMiddlewareServiceException,
                                                                    GPEMiddlewareRemoteException
Create the file transfer resource to transfer the file from the the remote location at the storage to the client machine

Parameters:
path - The path where the file must be exported
protocol - The protocol for file transfer operation
isPipe - if true then read from pipe
Returns:
The client for managing the created file transfer resource
Throws:
GPEExportFileResourceNotCreatedException - If failed to create file export resource
GPEFileTransferProtocolNotSupportedException - If corresponding file transfer protocol is not supported by a target system
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

changePermissions

void changePermissions(java.lang.String path,
                       boolean readable,
                       boolean writable,
                       boolean executable)
                       throws GPEPermissionsNotChangedException,
                              GPEResourceUnknownException,
                              GPEMiddlewareRemoteException,
                              GPESecurityException,
                              GPEMiddlewareServiceException
Change the file permissions.

Parameters:
path - The path to the file
readable - if true make the file readable, otherwise make unreadable
writable - if true make the file writable, otherwise make unwritable
executable - if true make the file executable, otherwise non-executable
Throws:
GPEPermissionsNotChangedException - If failed to change file permissions
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

copyFile

void copyFile(java.lang.String destination,
              java.lang.String source)
              throws GPESecurityException,
                     GPEMiddlewareServiceException,
                     GPEMiddlewareRemoteException,
                     GPEFileNotCopiedException,
                     GPEResourceUnknownException
Copy the file from one location to another at the storage

Parameters:
destination - The destination location
source - The source location
Throws:
GPEFileNotCopiedException - If failed to copy file
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

renameFile

void renameFile(java.lang.String destination,
                java.lang.String source)
                throws GPESecurityException,
                       GPEFileNotRenamedException,
                       GPEResourceUnknownException,
                       GPEMiddlewareServiceException,
                       GPEMiddlewareRemoteException
Rename the remote file

Parameters:
destination - The destination
source - The source
Throws:
GPEFileNotRenamedException - If failed to rename file
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

getFileSystem

<FileSystemType extends FileSystem> FileSystemType getFileSystem()
                                                throws GPEInvalidResourcePropertyQNameException,
                                                       GPEResourceUnknownException,
                                                       GPEUnmarshallingException,
                                                       GPESecurityException,
                                                       GPEMiddlewareRemoteException,
                                                       GPEMiddlewareServiceException
Returns:
The file system type of the storage
Throws:
GPEInvalidResourcePropertyQNameException - If corresponding job resource does not provide FileSystem property
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPEUnmarshallingException - If something bad happens during convertation from XML to resource property object
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

getSupportedProtocols

java.lang.String[] getSupportedProtocols()
                                         throws GPEInvalidResourcePropertyQNameException,
                                                GPEResourceUnknownException,
                                                GPEUnmarshallingException,
                                                GPESecurityException,
                                                GPEMiddlewareRemoteException,
                                                GPEMiddlewareServiceException
Get the list of supported file transfer protocols.

Returns:
The list of supported file transfer protocols
Throws:
GPEInvalidResourcePropertyQNameException - If corresponding job resource does not provide FileTransferProtocol property
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPEUnmarshallingException - If something bad happens during convertation from XML to resource property object
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException

getFileSeparator

java.lang.String getFileSeparator()
                                  throws GPEInvalidResourcePropertyQNameException,
                                         GPEResourceUnknownException,
                                         GPEUnmarshallingException,
                                         GPESecurityException,
                                         GPEMiddlewareRemoteException,
                                         GPEMiddlewareServiceException
Get the file separator suitable for valid path construction for this storage

Returns:
The storage-specific file separator
Throws:
GPEInvalidResourcePropertyQNameException - If corresponding job resource does not provide FileSeparator property
GPEResourceUnknownException - If WSRF-HE fails to find a resource with corresponding identifier
GPEUnmarshallingException - If something bad happens during convertation from XML to resource property object
GPESecurityException - If client fails to setup security
GPEMiddlewareRemoteException - If middleware throws an analogue of RemoreException
GPEMiddlewareServiceException - If middleware throws an analogue of ServiceException


Copyright © 2008. All Rights Reserved.