org.ogf.saga.logicalfile
Interface LogicalFile

All Superinterfaces:
Async, AsyncAttributes<LogicalFile>, Attributes, Cloneable, NSEntry, Permissions<NSEntry>, SagaObject

public interface LogicalFile
extends NSEntry, AsyncAttributes<LogicalFile>

A LogicalFile provides the means to handle the contents of logical files.


Field Summary
 
Fields inherited from interface org.ogf.saga.SagaObject
NO_WAIT, WAIT_FOREVER
 
Fields inherited from interface org.ogf.saga.attributes.Attributes
BOOL, ENUM, FALSE, FLOAT, INT, STRING, TIME, TRIGGER, TRUE
 
Method Summary
 Task<LogicalFile,Void> addLocation(TaskMode mode, URL name)
          Creates a task that adds a replica location to the replica set.
 void addLocation(URL name)
          Adds a replica location to the replica set.
 List<URL> listLocations()
          Lists the locations in this location set.
 Task<LogicalFile,List<URL>> listLocations(TaskMode mode)
          Creates a task that lists the locations in this location set.
 Task<LogicalFile,Void> removeLocation(TaskMode mode, URL name)
          Creates a task that removes a replica location from the replica set.
 void removeLocation(URL name)
          Removes a replica location from the replica set.
 Task<LogicalFile,Void> replicate(TaskMode mode, URL name)
          Creates a task that replicates a file from any of the known locations to a new location, with default flags NONE.
 Task<LogicalFile,Void> replicate(TaskMode mode, URL name, int flags)
          Creates a task that replicates a file from any of the known locations to a new location.
 void replicate(URL name)
          Replicates a file from any of the known locations to a new location, with default flags NONE.
 void replicate(URL name, int flags)
          Replicates a file from any of the known locations to a new location.
 Task<LogicalFile,Void> updateLocation(TaskMode mode, URL nameOld, URL nameNew)
          Creates a task that changes a replica location in the replica set.
 void updateLocation(URL nameOld, URL nameNew)
          Changes a replica location in the replica set.
 
Methods inherited from interface org.ogf.saga.namespace.NSEntry
close, close, close, close, copy, copy, copy, copy, getCWD, getCWD, getMTime, getMTime, getName, getName, getURL, getURL, isDir, isDir, isEntry, isEntry, isLink, isLink, link, link, link, link, move, move, move, move, permissionsAllow, permissionsAllow, permissionsDeny, permissionsDeny, readLink, readLink, remove, remove, remove, remove
 
Methods inherited from interface org.ogf.saga.SagaObject
clone, getId, getSession
 
Methods inherited from interface org.ogf.saga.permissions.Permissions
getGroup, getGroup, getOwner, getOwner, permissionsAllow, permissionsAllow, permissionsCheck, permissionsCheck, permissionsDeny, permissionsDeny
 
Methods inherited from interface org.ogf.saga.attributes.AsyncAttributes
existsAttribute, findAttributes, getAttribute, getVectorAttribute, isReadOnlyAttribute, isRemovableAttribute, isVectorAttribute, isWritableAttribute, listAttributes, removeAttribute, setAttribute, setVectorAttribute
 
Methods inherited from interface org.ogf.saga.attributes.Attributes
existsAttribute, findAttributes, getAttribute, getVectorAttribute, isReadOnlyAttribute, isRemovableAttribute, isVectorAttribute, isWritableAttribute, listAttributes, removeAttribute, setAttribute, setVectorAttribute
 

Method Detail

addLocation

void addLocation(URL name)
                 throws NotImplementedException,
                        IncorrectURLException,
                        AuthenticationFailedException,
                        AuthorizationFailedException,
                        PermissionDeniedException,
                        BadParameterException,
                        IncorrectStateException,
                        TimeoutException,
                        NoSuccessException
Adds a replica location to the replica set. Note: does never throw an AlreadyExists exception!

Parameters:
name - the location to add.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown when the specified URL is an invalid entry name.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
IncorrectStateException - is thrown when the logical file is closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

removeLocation

void removeLocation(URL name)
                    throws NotImplementedException,
                           IncorrectURLException,
                           AuthenticationFailedException,
                           AuthorizationFailedException,
                           PermissionDeniedException,
                           BadParameterException,
                           IncorrectStateException,
                           DoesNotExistException,
                           TimeoutException,
                           NoSuccessException
Removes a replica location from the replica set.

Parameters:
name - the location to remove.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown when the specified URL is an invalid entry name.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
IncorrectStateException - is thrown when the logical file is closed.
DoesNotExistException - is thrown when the logical file does not contain the specified URL.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

updateLocation

void updateLocation(URL nameOld,
                    URL nameNew)
                    throws NotImplementedException,
                           IncorrectURLException,
                           AuthenticationFailedException,
                           AuthorizationFailedException,
                           PermissionDeniedException,
                           BadParameterException,
                           IncorrectStateException,
                           AlreadyExistsException,
                           DoesNotExistException,
                           TimeoutException,
                           NoSuccessException
Changes a replica location in the replica set.

Parameters:
nameOld - the location to be updated.
nameNew - the updated location.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown when either of the specified URLs is an invalid entry name.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
IncorrectStateException - is thrown when the logical file is closed.
DoesNotExistException - is thrown when the logical file does not contain the specified nameOld URL.
AlreadyExistsException - is thrown when the logical file already contains the specified nameNew URL.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

listLocations

List<URL> listLocations()
                        throws NotImplementedException,
                               AuthenticationFailedException,
                               AuthorizationFailedException,
                               PermissionDeniedException,
                               IncorrectStateException,
                               TimeoutException,
                               NoSuccessException
Lists the locations in this location set.

Returns:
the location list.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
IncorrectStateException - is thrown when the logical file is closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

replicate

void replicate(URL name,
               int flags)
               throws NotImplementedException,
                      IncorrectURLException,
                      AuthenticationFailedException,
                      AuthorizationFailedException,
                      PermissionDeniedException,
                      BadParameterException,
                      IncorrectStateException,
                      AlreadyExistsException,
                      DoesNotExistException,
                      TimeoutException,
                      NoSuccessException
Replicates a file from any of the known locations to a new location.

Parameters:
name - location to replicate to.
flags - flags defining the operation modus.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully, or the file was opened ReadOnly or WriteOnly.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown when the specified URL is an invalid entry name.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
AlreadyExistsException - is thrown if the specified URL already exists, and the OVERWRITE flag is not given.
DoesNotExistException - is thrown if the target lies in a non-existing part of the name space, unless the CREATEPARENTS flag is given.
IncorrectStateException - is thrown when the logical file is closed, or the location set is empty.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

replicate

void replicate(URL name)
               throws NotImplementedException,
                      IncorrectURLException,
                      AuthenticationFailedException,
                      AuthorizationFailedException,
                      PermissionDeniedException,
                      BadParameterException,
                      IncorrectStateException,
                      AlreadyExistsException,
                      DoesNotExistException,
                      TimeoutException,
                      NoSuccessException
Replicates a file from any of the known locations to a new location, with default flags NONE.

Parameters:
name - location to replicate to.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
PermissionDeniedException - is thrown when the method failed because the identity used did not have sufficient permissions to perform the operation successfully, or the file was opened ReadOnly or WriteOnly.
AuthorizationFailedException - is thrown when none of the available contexts of the used session could be used for successful authorization. This error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions.
AuthenticationFailedException - is thrown when operation failed because none of the available session contexts could successfully be used for authentication.
TimeoutException - is thrown when a remote operation did not complete successfully because the network communication or the remote service timed out.
BadParameterException - is thrown when the specified URL is an invalid entry name.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
AlreadyExistsException - is thrown if the specified URL already exists.
DoesNotExistException - is thrown if the target lies in a non-existing part of the name space.
IncorrectStateException - is thrown when the logical file is closed, or the location set is empty.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

addLocation

Task<LogicalFile,Void> addLocation(TaskMode mode,
                                   URL name)
                                   throws NotImplementedException
Creates a task that adds a replica location to the replica set.

Parameters:
mode - the task mode.
name - the location to add.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

removeLocation

Task<LogicalFile,Void> removeLocation(TaskMode mode,
                                      URL name)
                                      throws NotImplementedException
Creates a task that removes a replica location from the replica set.

Parameters:
mode - the task mode.
name - the location to remove.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

updateLocation

Task<LogicalFile,Void> updateLocation(TaskMode mode,
                                      URL nameOld,
                                      URL nameNew)
                                      throws NotImplementedException
Creates a task that changes a replica location in the replica set.

Parameters:
mode - the task mode.
nameOld - the location to be updated.
nameNew - the updated location.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

listLocations

Task<LogicalFile,List<URL>> listLocations(TaskMode mode)
                                          throws NotImplementedException
Creates a task that lists the locations in this location set.

Parameters:
mode - the task mode.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

replicate

Task<LogicalFile,Void> replicate(TaskMode mode,
                                 URL name,
                                 int flags)
                                 throws NotImplementedException
Creates a task that replicates a file from any of the known locations to a new location.

Parameters:
mode - the task mode.
name - location to replicate to.
flags - flags defining the operation modus.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

replicate

Task<LogicalFile,Void> replicate(TaskMode mode,
                                 URL name)
                                 throws NotImplementedException
Creates a task that replicates a file from any of the known locations to a new location, with default flags NONE.

Parameters:
mode - the task mode.
name - location to replicate to.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.


Copyright © 2014 Open Grid Forum. All rights reserved.