blackboard.cms.filesystem
Class CSCustomDirectory

java.lang.Object
  extended by blackboard.cms.filesystem.CSEntry
      extended by blackboard.cms.filesystem.CSDirectory
          extended by blackboard.cms.filesystem.CSCustomDirectory

public class CSCustomDirectory
extends CSDirectory

A directory in the system. Custom Directories are 'special' directories that are managed by the Blackboard Content System. More specifically, the directory contents of a CSCustomDirectory cannot be changed, as they are managed explicitly by Blackboard Content System. For instance, the /users, /courses directories are type CSCustomDirectory

Methods are available for managing quotas for each directory. These quotas are the total space alloted by the owner for all files and sub-directories contained in the directory. Once the quota is reached, no new files can be added to the directory or subdirectories

Since:
Bb CS 1.2
Version:
$Revision: #1 $

Field Summary
 
Fields inherited from class blackboard.cms.filesystem.CSDirectory
NO_QUOTA
 
Method Summary
 long getAvailableQuota()
          Returns the amount of unused quota remaining on this directory in bytes.
 java.util.List getDirectoryContents()
          Returns a List of all readable CSEntry objects which this Directory contains and are findable by navigating down the hiearchy directly.
 long getQuota()
          Returns the quota for this directory in bytes.
 boolean isCustomDirectory()
          Returns whether the directory is of type CSCustomDirectory
 boolean isQuotaLimited()
          Returns true if this directory or any parent directory has a quota limit.
 void setQuota(long quota)
          Sets the quota for this directory.
 
Methods inherited from class blackboard.cms.filesystem.CSEntry
delete, deleteAccessControlEntry, getAccessControlEntries, getAccessControlEntry, getBaseName, getCreationTimestamp, getCSEntryMetadata, getFileSystemEntry, getFullPath, getLastUpdateTimestamp, getParentPath, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isCustomDirectory

public boolean isCustomDirectory()
Returns whether the directory is of type CSCustomDirectory

Overrides:
isCustomDirectory in class CSDirectory
Returns:
true

getQuota

public long getQuota()
Returns the quota for this directory in bytes.

Overrides:
getQuota in class CSDirectory
Returns:
a long representing the quota in number of bytes

setQuota

public void setQuota(long quota)
              throws CSFileSystemException
Sets the quota for this directory.

Overrides:
setQuota in class CSDirectory
Parameters:
quota - a long representing the quota in number of bytes
Throws:
CSFileSystemException

getAvailableQuota

public long getAvailableQuota()
                       throws CSFileSystemException
Returns the amount of unused quota remaining on this directory in bytes.

Overrides:
getAvailableQuota in class CSDirectory
Returns:
a long representing the amount of unused quota remaining on this directory in number of bytes
Throws:
CSFileSystemException

isQuotaLimited

public boolean isQuotaLimited()
                       throws CSFileSystemException
Returns true if this directory or any parent directory has a quota limit.

Overrides:
isQuotaLimited in class CSDirectory
Returns:
a boolean if this directory or any ancestor directory has a quota limit, false otherwise.
Throws:
CSFileSystemException

getDirectoryContents

public java.util.List getDirectoryContents()
                                    throws CSFileSystemException
Returns a List of all readable CSEntry objects which this Directory contains and are findable by navigating down the hiearchy directly.

Overrides:
getDirectoryContents in class CSDirectory
Returns:
a List of all readable CSEntry objects
Throws:
CSFileSystemException


Copyright © 2003-2004 Blackboard, Inc. All Rights Reserved.