com.jscape.inet.vfs
Class AccessPermissions

java.lang.Object
  extended by com.jscape.inet.vfs.AccessPermissions
All Implemented Interfaces:
java.io.Serializable

public final class AccessPermissions
extends java.lang.Object
implements java.io.Serializable

Represents access permissions for virtual file.

The following is an example of AccessPermissions class

    AccessPermissions permissions = new AccessPermissions(); // Permission of the virtual file name
    permissions.setDirectoryDeletionAllowed(false);
    permissions.setFileDownloadingAllowed(false);
    permissions.setFileUploadingAllowed(false);         
       
    // Creates a VirtualLocalFile and give some permissions
    VirtualLocalFile vp = new VirtualLocalFile(virtualFileName,permissions,realFileName);
                
 

Version:
1.0
Author:
Alex Usun
See Also:
Serialized Form

Constructor Summary
AccessPermissions()
          Creates a new permissions instance.
AccessPermissions(AccessPermissions that)
          Copy constructor.
 
Method Summary
 boolean isDirectoriesListingAllowed()
          Checks if the user is allowed to list subdirs in the current direcory.
 boolean isDirectoryDeletionAllowed()
          Checks if the user is allowed to delete directories in the current direcory.
 boolean isDirectoryMakingAllowed()
          Checks if the user is allowed to make directories in the current direcory.
 boolean isFileAppendingAllowed()
          Checks if the user is allowed to append files in the current direcory.
 boolean isFileDeletionAllowed()
          Checks if the user is allowed to delete files from the current direcory.
 boolean isFileDownloadingAllowed()
          Checks if the user is allowed to download files from the current direcory.
 boolean isFileListingAllowed()
          Checks if the user is allowed to list files in the current direcory.
 boolean isFileUploadingAllowed()
          Checks if the user is allowed to upload files to the current direcory.
 boolean isSubdirectoriesBrowsingAllowed()
          Checks if the user is allowed to browse subdirs in the current direcory.
 void setDirectoriesListingAllowed(boolean val)
          Sets the ability to list subdirs in the current direcory.
 void setDirectoryDeletionAllowed(boolean val)
          Sets the ability to delete directories in the current direcory.
 void setDirectoryMakingAllowed(boolean val)
          Sets the ability to make directories in the current direcory.
 void setFileAppendingAllowed(boolean val)
          Sets the ability to append files in the current direcory.
 void setFileDeletionAllowed(boolean val)
          Sets the ability to delete files from the current direcory.
 void setFileDownloadingAllowed(boolean val)
          Sets the ability to download files from the current direcory.
 void setFileListingAllowed(boolean val)
          Sets the ability to list files in the current direcory.
 void setFileUploadingAllowed(boolean val)
          Sets the ability to upload files to the current direcory.
 void setSubdirectoriesBrowsingAllowed(boolean val)
          Sets the ability to browse subdirs in the current direcory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessPermissions

public AccessPermissions()
Creates a new permissions instance.


AccessPermissions

public AccessPermissions(AccessPermissions that)
Copy constructor.

Parameters:
that - instance to copy
Method Detail

isFileDownloadingAllowed

public boolean isFileDownloadingAllowed()
Checks if the user is allowed to download files from the current direcory.

Returns:
true if the user is allowed to download files; false otherwise

setFileDownloadingAllowed

public void setFileDownloadingAllowed(boolean val)
Sets the ability to download files from the current direcory.

Parameters:
val - if true the user is allowed to download files from the current direcory

isFileUploadingAllowed

public boolean isFileUploadingAllowed()
Checks if the user is allowed to upload files to the current direcory.

Returns:
true if the user is allowed to upload files; false otherwise

setFileUploadingAllowed

public void setFileUploadingAllowed(boolean val)
Sets the ability to upload files to the current direcory.

Parameters:
val - if true the user is allowed to upload files to the current direcory

isFileDeletionAllowed

public boolean isFileDeletionAllowed()
Checks if the user is allowed to delete files from the current direcory.

Returns:
true if the user is allowed to delete files; false otherwise

setFileDeletionAllowed

public void setFileDeletionAllowed(boolean val)
Sets the ability to delete files from the current direcory.

Parameters:
val - if true the user is allowed to delete files from the current direcory

isFileAppendingAllowed

public boolean isFileAppendingAllowed()
Checks if the user is allowed to append files in the current direcory.

Returns:
true if the user is allowed to append files; false otherwise

setFileAppendingAllowed

public void setFileAppendingAllowed(boolean val)
Sets the ability to append files in the current direcory.

Parameters:
val - if true the user is allowed to append files in the current direcory

isFileListingAllowed

public boolean isFileListingAllowed()
Checks if the user is allowed to list files in the current direcory.

Returns:
true if the user is allowed to list files; false otherwise

setFileListingAllowed

public void setFileListingAllowed(boolean val)
Sets the ability to list files in the current direcory.

Parameters:
val - if true the user is allowed to list files in the current direcory

isDirectoriesListingAllowed

public boolean isDirectoriesListingAllowed()
Checks if the user is allowed to list subdirs in the current direcory.

Returns:
true if the user is allowed to list subdirs; false otherwise

setDirectoriesListingAllowed

public void setDirectoriesListingAllowed(boolean val)
Sets the ability to list subdirs in the current direcory.

Parameters:
val - if true the user is allowed to list subdirs in the current direcory

isDirectoryMakingAllowed

public boolean isDirectoryMakingAllowed()
Checks if the user is allowed to make directories in the current direcory.

Returns:
true if the user is allowed to make directories; false otherwise

setDirectoryMakingAllowed

public void setDirectoryMakingAllowed(boolean val)
Sets the ability to make directories in the current direcory.

Parameters:
val - if true the user is allowed to make directories in the current direcory

isDirectoryDeletionAllowed

public boolean isDirectoryDeletionAllowed()
Checks if the user is allowed to delete directories in the current direcory.

Returns:
true if the user is allowed to delete directories; false otherwise

setDirectoryDeletionAllowed

public void setDirectoryDeletionAllowed(boolean val)
Sets the ability to delete directories in the current direcory.

Parameters:
val - if true the user is allowed to delete directories in the current direcory

isSubdirectoriesBrowsingAllowed

public boolean isSubdirectoriesBrowsingAllowed()
Checks if the user is allowed to browse subdirs in the current direcory.

Returns:
true if the user is allowed to brows subdirs; false otherwise

setSubdirectoriesBrowsingAllowed

public void setSubdirectoriesBrowsingAllowed(boolean val)
Sets the ability to browse subdirs in the current direcory.

Parameters:
val - if true the user is allowed to browse subdirs in the current direcory


Copyright © 2007 JSCAPE Corp. All Rights Reserved.