public class DataSpaceClient extends Object implements IDataSpaceClient
IDataSpaceClient.Dataspace, IDataSpaceClient.ILocalDestination, IDataSpaceClient.ILocalSource, IDataSpaceClient.IRemoteDestination, IDataSpaceClient.IRemoteSource
Constructor and Description |
---|
DataSpaceClient() |
DataSpaceClient(String restServerUrl,
org.jboss.resteasy.client.jaxrs.ClientHttpEngine httpEngine) |
Modifier and Type | Method and Description |
---|---|
boolean |
create(IDataSpaceClient.IRemoteSource source)
Creates a new file or folder in the specified dataspace dataspace.
|
boolean |
delete(IDataSpaceClient.IRemoteSource source)
Deletes the specified directory or the file from the dataspace.
|
boolean |
download(IDataSpaceClient.IRemoteSource source,
IDataSpaceClient.ILocalDestination destination) |
RemoteSpace |
getGlobalSpace()
Returns a
RemoteSpace implementation instance which represents
the globalspace. |
RemoteSpace |
getUserSpace()
Returns a
RemoteSpace implementation instance which represents
the userspace |
void |
init(ConnectionInfo connectionInfo) |
void |
init(String restServerUrl,
ISchedulerClient client) |
org.ow2.proactive_grid_cloud_portal.dataspace.dto.ListFile |
list(IDataSpaceClient.IRemoteSource source)
Returns a
ListFile type object which contains the names of files
and directories in the specified location of the dataspace. |
Map<String,String> |
metadata(IDataSpaceClient.IRemoteSource source)
Returns the metadata map of the specified file in the dataspace.
|
boolean |
upload(IDataSpaceClient.ILocalSource source,
IDataSpaceClient.IRemoteDestination destination) |
public DataSpaceClient()
public DataSpaceClient(String restServerUrl, org.jboss.resteasy.client.jaxrs.ClientHttpEngine httpEngine)
public void init(String restServerUrl, ISchedulerClient client)
public void init(ConnectionInfo connectionInfo) throws Exception
Exception
public boolean upload(IDataSpaceClient.ILocalSource source, IDataSpaceClient.IRemoteDestination destination) throws NotConnectedException, PermissionException
upload
in interface IDataSpaceClient
NotConnectedException
PermissionException
public boolean create(IDataSpaceClient.IRemoteSource source) throws NotConnectedException, PermissionException
IDataSpaceClient
create
in interface IDataSpaceClient
source
- the remote source used to identify the type of file to create and its location.true
if the creation has succeeded, false
otherwise.NotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to upload the file to
the specified location in the serverpublic boolean download(IDataSpaceClient.IRemoteSource source, IDataSpaceClient.ILocalDestination destination) throws NotConnectedException, PermissionException
download
in interface IDataSpaceClient
NotConnectedException
PermissionException
public RemoteSpace getGlobalSpace()
IDataSpaceClient
RemoteSpace
implementation instance which represents
the globalspace.getGlobalSpace
in interface IDataSpaceClient
RemoteSpace
public RemoteSpace getUserSpace()
IDataSpaceClient
RemoteSpace
implementation instance which represents
the userspacegetUserSpace
in interface IDataSpaceClient
RemoteSpace
public org.ow2.proactive_grid_cloud_portal.dataspace.dto.ListFile list(IDataSpaceClient.IRemoteSource source) throws NotConnectedException, PermissionException
IDataSpaceClient
ListFile
type object which contains the names of files
and directories in the specified location of the dataspace.list
in interface IDataSpaceClient
NotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to upload the file to
the specified location in the serverpublic boolean delete(IDataSpaceClient.IRemoteSource source) throws NotConnectedException, PermissionException
IDataSpaceClient
delete
in interface IDataSpaceClient
NotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to upload the file to
the specified location in the serverpublic Map<String,String> metadata(IDataSpaceClient.IRemoteSource source) throws NotConnectedException, PermissionException
IDataSpaceClient
metadata
in interface IDataSpaceClient
Map
NotConnectedException
- if the client is not logged in or the session has expiredPermissionException
- if the user does not have permission to upload the file to
the specified location in the server