org.ogf.saga.namespace
Interface NSEntry

All Superinterfaces:
Async, Cloneable, Permissions<NSEntry>, SagaObject
All Known Subinterfaces:
Directory, File, LogicalDirectory, LogicalFile, NSDirectory

public interface NSEntry
extends SagaObject, Async, Permissions<NSEntry>

Defines methods that allow inspection and management of the entry.


Field Summary
 
Fields inherited from interface org.ogf.saga.SagaObject
NO_WAIT, WAIT_FOREVER
 
Method Summary
 void close()
          Closes this entry.
 void close(float timeoutInSeconds)
          Closes this entry.
 Task<NSEntry,Void> close(TaskMode mode)
          Creates a task that closes this entry.
 Task<NSEntry,Void> close(TaskMode mode, float timeoutInSeconds)
          Creates a task that closes this entry.
 Task<NSEntry,Void> copy(TaskMode mode, URL target)
          Creates a task that copies this entry to another part of the namespace.
 Task<NSEntry,Void> copy(TaskMode mode, URL target, int flags)
          Creates a task that copies this entry to another part of the namespace.
 void copy(URL target)
          Copies this entry to another part of the namespace.
 void copy(URL target, int flags)
          Copies this entry to another part of the namespace.
 URL getCWD()
          Obtains the current working directory for the entry.
 Task<NSEntry,URL> getCWD(TaskMode mode)
          Creates a task that obtains a String representing the current working directory for the entry.
 long getMTime()
          Returns the time of the last modification in seconds since epoch (01.01.1970).
 Task<NSEntry,Long> getMTime(TaskMode mode)
          Creates a task that returns the last modification time of this entry.
 URL getName()
          Obtains the name part of the URL of this entry.
 Task<NSEntry,URL> getName(TaskMode mode)
          Creates a task that obtains the name part of the URL of this entry.
 URL getURL()
          Obtains the complete URL referring to the entry.
 Task<NSEntry,URL> getURL(TaskMode mode)
          Creates a task that obtains the complete URL pointing to the entry.
 boolean isDir()
          Tests this entry for being a directory.
 Task<NSEntry,Boolean> isDir(TaskMode mode)
          Creates a task that tests this entry for being a directory.
 boolean isEntry()
          Tests this entry for being a namespace entry.
 Task<NSEntry,Boolean> isEntry(TaskMode mode)
          Creates a task that tests this entry for being a namespace entry.
 boolean isLink()
          Tests this entry for being a link.
 Task<NSEntry,Boolean> isLink(TaskMode mode)
          Creates a task that tests this entry for being a link.
 Task<NSEntry,Void> link(TaskMode mode, URL target)
          Creates a task that creates a symbolic link from the target to this entry.
 Task<NSEntry,Void> link(TaskMode mode, URL target, int flags)
          Creates a task that creates a symbolic link from the target to this entry.
 void link(URL target)
          Creates a symbolic link from the target to this entry.
 void link(URL target, int flags)
          Creates a symbolic link from the target to this entry.
 Task<NSEntry,Void> move(TaskMode mode, URL target)
          Creates a task that renames this entry to the target, or moves this entry to the target if it is a directory.
 Task<NSEntry,Void> move(TaskMode mode, URL target, int flags)
          Creates a task that renames this entry to the target, or moves this entry to the target if it is a directory.
 void move(URL target)
          Renames this entry to the target, or moves this entry to the target if it is a directory.
 void move(URL target, int flags)
          Renames this entry to the target, or moves this entry to the target if it is a directory.
 void permissionsAllow(String id, int permissions, int flags)
          Allows the specified permissions for the specified id.
 Task<NSEntry,Void> permissionsAllow(TaskMode mode, String id, int permissions, int flags)
          Creates a task that enables the specified permissions for the specified id.
 void permissionsDeny(String id, int permissions, int flags)
          Denies the specified permissions for the specified id.
 Task<NSEntry,Void> permissionsDeny(TaskMode mode, String id, int permissions, int flags)
          Creates a task that disables the specified permissions for the specified id.
 URL readLink()
          Returns the URL representing the link target.
 Task<NSEntry,URL> readLink(TaskMode mode)
          Creates a task that returns the URL representing the link target.
 void remove()
          Removes this entry and closes it.
 void remove(int flags)
          Removes this entry and closes it.
 Task<NSEntry,Void> remove(TaskMode mode)
          Creates a task that removes this entry and closes it.
 Task<NSEntry,Void> remove(TaskMode mode, int flags)
          Creates a task that removes this entry and closes it.
 
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
 

Method Detail

getURL

URL getURL()
           throws NotImplementedException,
                  IncorrectStateException,
                  TimeoutException,
                  NoSuccessException
Obtains the complete URL referring to the entry.

Returns:
the URL.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
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 NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

getCWD

URL getCWD()
           throws NotImplementedException,
                  IncorrectStateException,
                  TimeoutException,
                  NoSuccessException
Obtains the current working directory for the entry.

Returns:
the current working directory.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
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 NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

getName

URL getName()
            throws NotImplementedException,
                   IncorrectStateException,
                   TimeoutException,
                   NoSuccessException
Obtains the name part of the URL of this entry.

Returns:
the name part.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
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 NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

isDir

boolean isDir()
              throws NotImplementedException,
                     AuthenticationFailedException,
                     AuthorizationFailedException,
                     PermissionDeniedException,
                     IncorrectStateException,
                     TimeoutException,
                     NoSuccessException
Tests this entry for being a directory.

Returns:
true if the entry is a directory.
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 NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

isEntry

boolean isEntry()
                throws NotImplementedException,
                       AuthenticationFailedException,
                       AuthorizationFailedException,
                       PermissionDeniedException,
                       IncorrectStateException,
                       TimeoutException,
                       NoSuccessException
Tests this entry for being a namespace entry. If this entry represents a link or a directory, this method returns false, although strictly speaking, directories and links are namespace entries as well.

Returns:
true if the entry is a namespace 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.
IncorrectStateException - is thrown when the NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

isLink

boolean isLink()
               throws NotImplementedException,
                      AuthenticationFailedException,
                      AuthorizationFailedException,
                      PermissionDeniedException,
                      IncorrectStateException,
                      TimeoutException,
                      NoSuccessException
Tests this entry for being a link.

Returns:
true if the entry is a link.
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 NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

readLink

URL readLink()
             throws NotImplementedException,
                    AuthenticationFailedException,
                    AuthorizationFailedException,
                    PermissionDeniedException,
                    IncorrectStateException,
                    TimeoutException,
                    NoSuccessException
Returns the URL representing the link target. Resolves one link level only.

Returns:
the link target.
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 NSEntry is already closed, or does not refer to a link.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

getMTime

long getMTime()
              throws NotImplementedException,
                     AuthenticationFailedException,
                     AuthorizationFailedException,
                     PermissionDeniedException,
                     IncorrectStateException,
                     TimeoutException,
                     NoSuccessException
Returns the time of the last modification in seconds since epoch (01.01.1970).

Returns:
the last modification time.
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 NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

copy

void copy(URL target,
          int flags)
          throws NotImplementedException,
                 AuthenticationFailedException,
                 AuthorizationFailedException,
                 PermissionDeniedException,
                 BadParameterException,
                 IncorrectStateException,
                 AlreadyExistsException,
                 DoesNotExistException,
                 TimeoutException,
                 NoSuccessException,
                 IncorrectURLException
Copies this entry to another part of the namespace.

Parameters:
target - the name to copy to.
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.
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 NSEntry is already closed or the DEREFERENCE flag is given and dereferencing is impossible.
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 target 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.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

copy

void copy(URL target)
          throws NotImplementedException,
                 AuthenticationFailedException,
                 AuthorizationFailedException,
                 PermissionDeniedException,
                 BadParameterException,
                 IncorrectStateException,
                 AlreadyExistsException,
                 DoesNotExistException,
                 TimeoutException,
                 NoSuccessException,
                 IncorrectURLException
Copies this entry to another part of the namespace.

Parameters:
target - the name to copy 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.
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 NSEntry is already closed or the DEREFERENCE flag is given and dereferencing is impossible.
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 target 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.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

link

void link(URL target,
          int flags)
          throws NotImplementedException,
                 AuthenticationFailedException,
                 AuthorizationFailedException,
                 PermissionDeniedException,
                 BadParameterException,
                 DoesNotExistException,
                 IncorrectStateException,
                 AlreadyExistsException,
                 TimeoutException,
                 NoSuccessException,
                 IncorrectURLException
Creates a symbolic link from the target to this entry.

Parameters:
target - the name that will have the symbolic link to this entry.
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.
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 NSEntry is already closed or the DEREFERENCE flag is given and dereferencing is impossible.
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 target 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.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

link

void link(URL target)
          throws NotImplementedException,
                 AuthenticationFailedException,
                 AuthorizationFailedException,
                 PermissionDeniedException,
                 BadParameterException,
                 DoesNotExistException,
                 IncorrectStateException,
                 AlreadyExistsException,
                 TimeoutException,
                 NoSuccessException,
                 IncorrectURLException
Creates a symbolic link from the target to this entry.

Parameters:
target - the name that will have the symbolic link to this 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 NSEntry is already closed or the DEREFERENCE flag is given and dereferencing is impossible.
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 target 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.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

move

void move(URL target,
          int flags)
          throws NotImplementedException,
                 AuthenticationFailedException,
                 AuthorizationFailedException,
                 PermissionDeniedException,
                 BadParameterException,
                 IncorrectStateException,
                 AlreadyExistsException,
                 DoesNotExistException,
                 TimeoutException,
                 NoSuccessException,
                 IncorrectURLException
Renames this entry to the target, or moves this entry to the target if it is a directory.

Parameters:
target - the name to move to.
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.
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 NSEntry is already closed or the DEREFERENCE flag is given and dereferencing is impossible.
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 target 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.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

move

void move(URL target)
          throws NotImplementedException,
                 AuthenticationFailedException,
                 AuthorizationFailedException,
                 PermissionDeniedException,
                 BadParameterException,
                 IncorrectStateException,
                 AlreadyExistsException,
                 DoesNotExistException,
                 TimeoutException,
                 NoSuccessException,
                 IncorrectURLException
Renames this entry to the target, or moves this entry to the target if it is a directory.

Parameters:
target - the name to move 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.
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 NSEntry is already closed or the DEREFERENCE flag is given and dereferencing is impossible.
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 target 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.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

remove

void remove(int flags)
            throws NotImplementedException,
                   AuthenticationFailedException,
                   AuthorizationFailedException,
                   PermissionDeniedException,
                   BadParameterException,
                   IncorrectStateException,
                   TimeoutException,
                   NoSuccessException
Removes this entry and closes it.

Parameters:
flags - defining the operation modus. The only allowed flags are RECURSIVE, DEREFERENCE, and NONE.
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 if the entry is a directory and the RECURSIVE flag is not set, or the entry is a directory and the RECURSIVE flag is set, or invalid flags are specified.
IncorrectStateException - is thrown when the NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

remove

void remove()
            throws NotImplementedException,
                   AuthenticationFailedException,
                   AuthorizationFailedException,
                   PermissionDeniedException,
                   BadParameterException,
                   IncorrectStateException,
                   TimeoutException,
                   NoSuccessException
Removes this entry and closes it.

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 if the entry is a directory and the RECURSIVE flag is not set, or the entry is a directory and the RECURSIVE flag is set, or invalid flags are set.
IncorrectStateException - is thrown when the NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

close

void close()
           throws NotImplementedException,
                  NoSuccessException
Closes this entry. This is a non-blocking close. Any subsequent method invocation on the object (except for close()) will throw an IncorrectState exception.

Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

close

void close(float timeoutInSeconds)
           throws NotImplementedException,
                  NoSuccessException
Closes this entry. Any subsequent method invocation on the object will throw an IncorrectState exception.

Parameters:
timeoutInSeconds - seconds to wait.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

permissionsAllow

void permissionsAllow(String id,
                      int permissions,
                      int flags)
                      throws NotImplementedException,
                             AuthenticationFailedException,
                             AuthorizationFailedException,
                             PermissionDeniedException,
                             IncorrectStateException,
                             BadParameterException,
                             TimeoutException,
                             NoSuccessException
Allows the specified permissions for the specified id. An id of "*" enables the permissions for all.

Parameters:
id - the id.
permissions - the permissions to enable.
flags - the only allowed flags are RECURSIVE and DEREFERENCE.
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 given id is unknown or not supported, or illegal flags are specified, or RECURSIVE is specified on a non-directory.
IncorrectStateException - is thrown when the NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

permissionsDeny

void permissionsDeny(String id,
                     int permissions,
                     int flags)
                     throws NotImplementedException,
                            AuthenticationFailedException,
                            AuthorizationFailedException,
                            IncorrectStateException,
                            PermissionDeniedException,
                            BadParameterException,
                            TimeoutException,
                            NoSuccessException
Denies the specified permissions for the specified id. An id of "*" disables the permissions for all.

Parameters:
id - the id.
permissions - the permissions to disable.
flags - the only allowed flags are RECURSIVE and DEREFERENCE.
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 given id is unknown or not supported, or illegal flags are specified, or RECURSIVE is specified on a non-directory.
IncorrectStateException - is thrown when the NSEntry is already closed.
NoSuccessException - is thrown when the operation was not successfully performed, and none of the other exceptions apply.

getURL

Task<NSEntry,URL> getURL(TaskMode mode)
                         throws NotImplementedException
Creates a task that obtains the complete URL pointing to the entry.

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

getCWD

Task<NSEntry,URL> getCWD(TaskMode mode)
                         throws NotImplementedException
Creates a task that obtains a String representing the current working directory for the entry.

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

getName

Task<NSEntry,URL> getName(TaskMode mode)
                          throws NotImplementedException
Creates a task that obtains the name part of the URL of this entry.

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

getMTime

Task<NSEntry,Long> getMTime(TaskMode mode)
                            throws NotImplementedException
Creates a task that returns the last modification time of this entry.

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

isDir

Task<NSEntry,Boolean> isDir(TaskMode mode)
                            throws NotImplementedException
Creates a task that tests this entry for being a directory.

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

isEntry

Task<NSEntry,Boolean> isEntry(TaskMode mode)
                              throws NotImplementedException
Creates a task that tests this entry for being a namespace entry. If this entry represents a link or a directory, this method returns false, although strictly speaking, directories and links are namespace entries as well.

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

isLink

Task<NSEntry,Boolean> isLink(TaskMode mode)
                             throws NotImplementedException
Creates a task that tests this entry for being a link.

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

readLink

Task<NSEntry,URL> readLink(TaskMode mode)
                           throws NotImplementedException
Creates a task that returns the URL representing the link target. Resolves one link level only.

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

copy

Task<NSEntry,Void> copy(TaskMode mode,
                        URL target,
                        int flags)
                        throws NotImplementedException
Creates a task that copies this entry to another part of the namespace.

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

copy

Task<NSEntry,Void> copy(TaskMode mode,
                        URL target)
                        throws NotImplementedException
Creates a task that copies this entry to another part of the namespace.

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

link

Task<NSEntry,Void> link(TaskMode mode,
                        URL target,
                        int flags)
                        throws NotImplementedException
Creates a task that creates a symbolic link from the target to this entry.

Parameters:
mode - the task mode.
target - the name that will have the symbolic link to this entry.
flags - defining the operation modus.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

link

Task<NSEntry,Void> link(TaskMode mode,
                        URL target)
                        throws NotImplementedException
Creates a task that creates a symbolic link from the target to this entry.

Parameters:
mode - the task mode.
target - the name that will have the symbolic link to this entry.
Returns:
the task.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

move

Task<NSEntry,Void> move(TaskMode mode,
                        URL target,
                        int flags)
                        throws NotImplementedException
Creates a task that renames this entry to the target, or moves this entry to the target if it is a directory.

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

move

Task<NSEntry,Void> move(TaskMode mode,
                        URL target)
                        throws NotImplementedException
Creates a task that renames this entry to the target, or moves this entry to the target if it is a directory.

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

remove

Task<NSEntry,Void> remove(TaskMode mode,
                          int flags)
                          throws NotImplementedException
Creates a task that removes this entry and closes it.

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

remove

Task<NSEntry,Void> remove(TaskMode mode)
                          throws NotImplementedException
Creates a task that removes this entry and closes it.

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

close

Task<NSEntry,Void> close(TaskMode mode)
                         throws NotImplementedException
Creates a task that closes this entry. This is a non-blocking close. When the task is done, any subsequent method invocation on the object will throw an IncorrectState exception.

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

close

Task<NSEntry,Void> close(TaskMode mode,
                         float timeoutInSeconds)
                         throws NotImplementedException
Creates a task that closes this entry. When the task is done, any subsequent method invocation on the object will throw an IncorrectState exception.

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

permissionsAllow

Task<NSEntry,Void> permissionsAllow(TaskMode mode,
                                    String id,
                                    int permissions,
                                    int flags)
                                    throws NotImplementedException
Creates a task that enables the specified permissions for the specified id. An id of "*" enables the permissions for all.

Parameters:
mode - determines the initial state of the task.
id - the id.
permissions - the permissions to enable.
flags - the only allowed flags are RECURSIVE and DEREFERENCE.
Returns:
the task object.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.

permissionsDeny

Task<NSEntry,Void> permissionsDeny(TaskMode mode,
                                   String id,
                                   int permissions,
                                   int flags)
                                   throws NotImplementedException
Creates a task that disables the specified permissions for the specified id. An id of "*" disables the permissions for all.

Parameters:
mode - determines the initial state of the task.
id - the id.
permissions - the permissions to disable.
flags - the only allowed flags are RECURSIVE and DEREFERENCE.
Returns:
the task object.
Throws:
NotImplementedException - is thrown when the task version of this method is not implemented.


Copyright © 2014 Open Grid Forum. All rights reserved.