org.ogf.saga.logicalfile
Interface LogicalDirectory

All Superinterfaces:
Async, AsyncAttributes<LogicalDirectory>, Attributes, Cloneable, Iterable<URL>, NSDirectory, NSEntry, Permissions<NSEntry>, SagaObject

public interface LogicalDirectory
extends NSDirectory, AsyncAttributes<LogicalDirectory>

This interface represents a container for logical files in a logical file name space.


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
 List<URL> find(String namePattern, String[] attrPattern)
          Finds entries in the current directory and below, with matching names and matching meta data.
 List<URL> find(String namePattern, String[] attrPattern, int flags)
          Finds entries in the current directory and possibly below, with matching names and matching meta data.
 Task<LogicalDirectory,List<URL>> find(TaskMode mode, String namePattern, String[] attrPattern)
          Creates a task that finds entries in the current directory and below, with matching names and matching meta data.
 Task<LogicalDirectory,List<URL>> find(TaskMode mode, String namePattern, String[] attrPattern, int flags)
          Creates a task that finds entries in the current directory and below, with matching names and matching meta data.
 Task<NSDirectory,Boolean> isFile(TaskMode mode, URL name)
          Creates a task that tests the name for being a logical file.
 boolean isFile(URL name)
          Tests the name for being a logical file.
 Task<LogicalDirectory,LogicalDirectory> openLogicalDir(TaskMode mode, URL name)
          Creates a task that creates a new LogicalDirectory instance.
 Task<LogicalDirectory,LogicalDirectory> openLogicalDir(TaskMode mode, URL name, int flags)
          Creates a task that creates a new LogicalDirectory instance.
 LogicalDirectory openLogicalDir(URL name)
          Creates a new LogicalDirectory instance with read flag.
 LogicalDirectory openLogicalDir(URL name, int flags)
          Creates a new LogicalDirectory instance.
 Task<LogicalDirectory,LogicalFile> openLogicalFile(TaskMode mode, URL name)
          Creates a task that creates a new LogicalFile instance.
 Task<LogicalDirectory,LogicalFile> openLogicalFile(TaskMode mode, URL name, int flags)
          Creates a task that creates a new LogicalFile instance.
 LogicalFile openLogicalFile(URL name)
          Creates a new LogicalFile instance with read flag.
 LogicalFile openLogicalFile(URL name, int flags)
          Creates a new LogicalFile instance.
 
Methods inherited from interface org.ogf.saga.namespace.NSDirectory
changeDir, changeDir, copy, copy, copy, copy, copy, copy, copy, copy, exists, exists, find, find, find, find, getEntry, getEntry, getMTime, getMTime, getNumEntries, getNumEntries, isDir, isDir, isEntry, isEntry, isLink, isLink, link, link, link, link, link, link, link, link, list, list, list, list, list, list, list, list, makeDir, makeDir, makeDir, makeDir, move, move, move, move, move, move, move, move, open, open, open, open, openDir, openDir, openDir, openDir, permissionsAllow, permissionsAllow, permissionsAllow, permissionsAllow, permissionsAllow, permissionsAllow, permissionsAllow, permissionsAllow, permissionsDeny, permissionsDeny, permissionsDeny, permissionsDeny, permissionsDeny, permissionsDeny, permissionsDeny, permissionsDeny, readLink, readLink, remove, remove, remove, remove, remove, remove, remove, remove
 
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 java.lang.Iterable
iterator
 
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

isFile

boolean isFile(URL name)
               throws NotImplementedException,
                      IncorrectURLException,
                      AuthenticationFailedException,
                      AuthorizationFailedException,
                      PermissionDeniedException,
                      BadParameterException,
                      DoesNotExistException,
                      IncorrectStateException,
                      TimeoutException,
                      NoSuccessException
Tests the name for being a logical file. Is an alias for NSDirectory.isEntry(org.ogf.saga.url.URL).

Parameters:
name - to be tested.
Returns:
true if the name represents a non-directory entry.
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 contains an invalid entry name.
IncorrectStateException - is thrown when the LogicalDirectory is already closed.
IncorrectURLException - is thrown when an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
DoesNotExistException - is thrown if the specified name does not exist.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

find

List<URL> find(String namePattern,
               String[] attrPattern,
               int flags)
               throws NotImplementedException,
                      AuthenticationFailedException,
                      AuthorizationFailedException,
                      PermissionDeniedException,
                      BadParameterException,
                      IncorrectStateException,
                      TimeoutException,
                      NoSuccessException
Finds entries in the current directory and possibly below, with matching names and matching meta data.

Parameters:
namePattern - pattern for names of entries to be found.
attrPattern - pattern for meta data keys/values of entries to be found.
flags - flags defining the operation modus.
Returns:
the list of matching entries.
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 illegal flags are specified: only RECURSIVE (or NONE) is allowed, or one or more of the patterns is not correctly formatted.
IncorrectStateException - is thrown when the LogicalDirectory is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

find

List<URL> find(String namePattern,
               String[] attrPattern)
               throws NotImplementedException,
                      AuthenticationFailedException,
                      AuthorizationFailedException,
                      PermissionDeniedException,
                      BadParameterException,
                      IncorrectStateException,
                      TimeoutException,
                      NoSuccessException
Finds entries in the current directory and below, with matching names and matching meta data.

Parameters:
namePattern - pattern for names of entries to be found.
attrPattern - pattern for meta data keys/values of entries to be found.
Returns:
the list of matching entries.
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 one or more of the patterns is not correctly formatted.
IncorrectStateException - is thrown when the LogicalDirectory is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

openLogicalDir

LogicalDirectory openLogicalDir(URL name,
                                int flags)
                                throws NotImplementedException,
                                       IncorrectURLException,
                                       AuthenticationFailedException,
                                       AuthorizationFailedException,
                                       PermissionDeniedException,
                                       BadParameterException,
                                       IncorrectStateException,
                                       AlreadyExistsException,
                                       DoesNotExistException,
                                       TimeoutException,
                                       NoSuccessException
Creates a new LogicalDirectory instance.

Parameters:
name - directory to open.
flags - defining the operation modus.
Returns:
the opened directory instance.
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 does not point to a directory, or is an invalid entry name.
IncorrectStateException - is thrown when the LogicalDirectory is already closed.
IncorrectURLException - is thrown if 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 CREATE and EXCLUSIVE flags are given.
DoesNotExistException - is thrown if the specified URL does not exist, and the CREATE flag is not given.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

openLogicalDir

LogicalDirectory openLogicalDir(URL name)
                                throws NotImplementedException,
                                       IncorrectURLException,
                                       AuthenticationFailedException,
                                       AuthorizationFailedException,
                                       PermissionDeniedException,
                                       BadParameterException,
                                       IncorrectStateException,
                                       AlreadyExistsException,
                                       DoesNotExistException,
                                       TimeoutException,
                                       NoSuccessException
Creates a new LogicalDirectory instance with read flag.

Parameters:
name - directory to open.
Returns:
the opened directory instance.
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 does not point to a directory, or is an invalid entry name.
IncorrectStateException - is thrown when the LogicalDirectory is already closed.
IncorrectURLException - is thrown if an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
AlreadyExistsException - not thrown, but specified because a method may be invoked that can throw this exception, but will not in this case.
DoesNotExistException - is thrown if the specified URL does not exist.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

openLogicalFile

LogicalFile openLogicalFile(URL name,
                            int flags)
                            throws NotImplementedException,
                                   IncorrectURLException,
                                   AuthenticationFailedException,
                                   AuthorizationFailedException,
                                   PermissionDeniedException,
                                   BadParameterException,
                                   IncorrectStateException,
                                   AlreadyExistsException,
                                   DoesNotExistException,
                                   TimeoutException,
                                   NoSuccessException
Creates a new LogicalFile instance.

Parameters:
name - logical file to open.
flags - defining the operation modus.
Returns:
the opened logical file.
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 points to a directory, or is an invalid entry name.
IncorrectStateException - is thrown when the LogicalDirectory is already closed.
IncorrectURLException - is thrown if 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 CREATE and EXCLUSIVE flags are given.
DoesNotExistException - is thrown if the specified URL does not exist, and the CREATE flag is not given.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

openLogicalFile

LogicalFile openLogicalFile(URL name)
                            throws NotImplementedException,
                                   IncorrectURLException,
                                   AuthenticationFailedException,
                                   AuthorizationFailedException,
                                   PermissionDeniedException,
                                   BadParameterException,
                                   IncorrectStateException,
                                   AlreadyExistsException,
                                   DoesNotExistException,
                                   TimeoutException,
                                   NoSuccessException
Creates a new LogicalFile instance with read flag.

Parameters:
name - logical file to open.
Returns:
the opened logical file.
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 does not point to a directory, or is an invalid entry name.
IncorrectStateException - is thrown when the LogicalDirectory is already closed.
IncorrectURLException - is thrown if an implementation cannot handle the specified protocol, or that access to the specified entity via the given protocol is impossible.
AlreadyExistsException - not thrown, but specified because a method may be invoked that can throw this exception, but will not in this case.
DoesNotExistException - is thrown if the specified URL does not exist.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

isFile

Task<NSDirectory,Boolean> isFile(TaskMode mode,
                                 URL name)
                                 throws NotImplementedException
Creates a task that tests the name for being a logical file. Is an alias for NSDirectory.isEntry(org.ogf.saga.url.URL).

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

find

Task<LogicalDirectory,List<URL>> find(TaskMode mode,
                                      String namePattern,
                                      String[] attrPattern,
                                      int flags)
                                      throws NotImplementedException
Creates a task that finds entries in the current directory and below, with matching names and matching meta data.

Parameters:
mode - the task mode.
namePattern - pattern for names of entries to be found.
attrPattern - pattern for meta data keys/values of entries to be found.
flags - flags defining the operation modus.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

find

Task<LogicalDirectory,List<URL>> find(TaskMode mode,
                                      String namePattern,
                                      String[] attrPattern)
                                      throws NotImplementedException
Creates a task that finds entries in the current directory and below, with matching names and matching meta data.

Parameters:
mode - the task mode.
namePattern - pattern for names of entries to be found.
attrPattern - pattern for meta data keys/values of entries to be found.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

openLogicalDir

Task<LogicalDirectory,LogicalDirectory> openLogicalDir(TaskMode mode,
                                                       URL name,
                                                       int flags)
                                                       throws NotImplementedException
Creates a task that creates a new LogicalDirectory instance.

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

openLogicalDir

Task<LogicalDirectory,LogicalDirectory> openLogicalDir(TaskMode mode,
                                                       URL name)
                                                       throws NotImplementedException
Creates a task that creates a new LogicalDirectory instance.

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

openLogicalFile

Task<LogicalDirectory,LogicalFile> openLogicalFile(TaskMode mode,
                                                   URL name,
                                                   int flags)
                                                   throws NotImplementedException
Creates a task that creates a new LogicalFile instance.

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

openLogicalFile

Task<LogicalDirectory,LogicalFile> openLogicalFile(TaskMode mode,
                                                   URL name)
                                                   throws NotImplementedException
Creates a task that creates a new LogicalFile instance.

Parameters:
mode - the task mode.
name - the file to open.
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.