Package com.jscape.inet.vfs
Class AccessPermissions
- java.lang.Object
-
- com.jscape.inet.vfs.AccessPermissions
-
- All Implemented Interfaces:
java.io.Serializable
public class AccessPermissions extends java.lang.Object implements java.io.SerializableRepresents access permissions for virtual file. The following is an example of AccessPermissions classAccessPermissions 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);- Author:
- Alex Usun
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAccessPermissions.Format
-
Constructor Summary
Constructors Constructor Description AccessPermissions()Creates a new permissions instance.AccessPermissions(boolean fileDownloadingAllowed, boolean fileUploadingAllowed, boolean fileOverwritingAllowed, boolean fileDeletionAllowed, boolean fileAppendingAllowed, boolean fileListingAllowed, boolean fileRenamingAllowed, boolean fileSharingAllowed, boolean directoriesListingAllowed, boolean directoryMakingAllowed, boolean directoryDeletionAllowed, boolean subdirectoriesBrowsingAllowed)AccessPermissions(AccessPermissions that)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisDirectoriesListingAllowed()Checks if the user is allowed to list subdirs in the current directory.booleanisDirectoryDeletionAllowed()Checks if the user is allowed to delete directories in the current directory.booleanisDirectoryMakingAllowed()Checks if the user is allowed to make directories in the current directory.booleanisFileAppendingAllowed()Checks if the user is allowed to append files in the current directory.booleanisFileDeletionAllowed()Checks if the user is allowed to delete files from the current directory.booleanisFileDownloadingAllowed()Checks if the user is allowed to download files from the current directory.booleanisFileListingAllowed()Checks if the user is allowed to list files in the current directory.booleanisFileOverwritingAllowed()booleanisFileRenamingAllowed()Checks if the user is allowed to rename files in the current directory.booleanisFileSharingAllowed()Checks if the user is allowed to share files in the current directory.booleanisFileUploadingAllowed()Checks if the user is allowed to upload files to the current directory.booleanisSubdirectoriesBrowsingAllowed()Checks if the user is allowed to browse subdirs in the current directory.voidsetDirectoriesListingAllowed(boolean value)Sets the ability to list subdirs in the current directory.voidsetDirectoryDeletionAllowed(boolean value)Sets the ability to delete directories in the current directory.voidsetDirectoryMakingAllowed(boolean value)Sets the ability to make directories in the current directory.voidsetFileAppendingAllowed(boolean value)Sets the ability to append files in the current directory.voidsetFileDeletionAllowed(boolean value)Sets the ability to delete files from the current directory.voidsetFileDownloadingAllowed(boolean value)Sets the ability to download files from the current directory.voidsetFileListingAllowed(boolean value)Sets the ability to list files in the current directory.voidsetFileOverwritingAllowed(boolean value)voidsetFileRenamingAllowed(boolean value)Sets the ability to rename files in the current directory.voidsetFileSharingAllowed(boolean value)Sets the ability to share files in the current directory.voidsetFileUploadingAllowed(boolean value)Sets the ability to upload files to the current directory.voidsetSubdirectoriesBrowsingAllowed(boolean value)Sets the ability to browse subdirs in the current directory.java.lang.StringtoString()
-
-
-
Constructor Detail
-
AccessPermissions
public AccessPermissions(boolean fileDownloadingAllowed, boolean fileUploadingAllowed, boolean fileOverwritingAllowed, boolean fileDeletionAllowed, boolean fileAppendingAllowed, boolean fileListingAllowed, boolean fileRenamingAllowed, boolean fileSharingAllowed, boolean directoriesListingAllowed, boolean directoryMakingAllowed, boolean directoryDeletionAllowed, boolean subdirectoriesBrowsingAllowed)
-
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 directory.- Returns:
trueif the user is allowed to download files;falseotherwise
-
setFileDownloadingAllowed
public void setFileDownloadingAllowed(boolean value)
Sets the ability to download files from the current directory.- Parameters:
value- iftruethe user is allowed to download files from the current directory
-
isFileUploadingAllowed
public boolean isFileUploadingAllowed()
Checks if the user is allowed to upload files to the current directory.- Returns:
trueif the user is allowed to upload files;falseotherwise
-
setFileUploadingAllowed
public void setFileUploadingAllowed(boolean value)
Sets the ability to upload files to the current directory.- Parameters:
value- iftruethe user is allowed to upload files to the current directory
-
isFileOverwritingAllowed
public boolean isFileOverwritingAllowed()
-
setFileOverwritingAllowed
public void setFileOverwritingAllowed(boolean value)
-
isFileDeletionAllowed
public boolean isFileDeletionAllowed()
Checks if the user is allowed to delete files from the current directory.- Returns:
trueif the user is allowed to delete files;falseotherwise
-
setFileDeletionAllowed
public void setFileDeletionAllowed(boolean value)
Sets the ability to delete files from the current directory.- Parameters:
value- iftruethe user is allowed to delete files from the current directory
-
isFileAppendingAllowed
public boolean isFileAppendingAllowed()
Checks if the user is allowed to append files in the current directory.- Returns:
trueif the user is allowed to append files;falseotherwise
-
setFileAppendingAllowed
public void setFileAppendingAllowed(boolean value)
Sets the ability to append files in the current directory.- Parameters:
value- iftruethe user is allowed to append files in the current directory
-
isFileListingAllowed
public boolean isFileListingAllowed()
Checks if the user is allowed to list files in the current directory.- Returns:
trueif the user is allowed to list files;falseotherwise
-
setFileListingAllowed
public void setFileListingAllowed(boolean value)
Sets the ability to list files in the current directory.- Parameters:
value- iftruethe user is allowed to list files in the current directory
-
isFileRenamingAllowed
public boolean isFileRenamingAllowed()
Checks if the user is allowed to rename files in the current directory.- Returns:
trueif the user is allowed to rename files;falseotherwise
-
setFileRenamingAllowed
public void setFileRenamingAllowed(boolean value)
Sets the ability to rename files in the current directory.- Parameters:
value- iftruethe user is allowed to rename files in the current directory
-
isFileSharingAllowed
public boolean isFileSharingAllowed()
Checks if the user is allowed to share files in the current directory.- Returns:
trueif the user is allowed to share files;falseotherwise
-
setFileSharingAllowed
public void setFileSharingAllowed(boolean value)
Sets the ability to share files in the current directory.- Parameters:
value- iftruethe user is allowed to share files in the current directory
-
isDirectoriesListingAllowed
public boolean isDirectoriesListingAllowed()
Checks if the user is allowed to list subdirs in the current directory.- Returns:
trueif the user is allowed to list subdirs;falseotherwise
-
setDirectoriesListingAllowed
public void setDirectoriesListingAllowed(boolean value)
Sets the ability to list subdirs in the current directory.- Parameters:
value- iftruethe user is allowed to list subdirs in the current directory
-
isDirectoryMakingAllowed
public boolean isDirectoryMakingAllowed()
Checks if the user is allowed to make directories in the current directory.- Returns:
trueif the user is allowed to make directories;falseotherwise
-
setDirectoryMakingAllowed
public void setDirectoryMakingAllowed(boolean value)
Sets the ability to make directories in the current directory.- Parameters:
value- iftruethe user is allowed to make directories in the current directory
-
isDirectoryDeletionAllowed
public boolean isDirectoryDeletionAllowed()
Checks if the user is allowed to delete directories in the current directory.- Returns:
trueif the user is allowed to delete directories;falseotherwise
-
setDirectoryDeletionAllowed
public void setDirectoryDeletionAllowed(boolean value)
Sets the ability to delete directories in the current directory.- Parameters:
value- iftruethe user is allowed to delete directories in the current directory
-
isSubdirectoriesBrowsingAllowed
public boolean isSubdirectoriesBrowsingAllowed()
Checks if the user is allowed to browse subdirs in the current directory.- Returns:
trueif the user is allowed to brows subdirs;falseotherwise
-
setSubdirectoriesBrowsingAllowed
public void setSubdirectoriesBrowsingAllowed(boolean value)
Sets the ability to browse subdirs in the current directory.- Parameters:
value- iftruethe user is allowed to browse subdirs in the current directory
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-