blackboard.data.course
Class CourseQuota

java.lang.Object
  extended by blackboard.data.course.CourseQuota

public class CourseQuota
extends java.lang.Object

The CourseQuota class provides convenience methods and accessor methods that encapsulate common routines that are needed when using Course quotas.

Since:
Bb 6.3
Version:
$Revision: #1 $ $Date: 2005/06/27 $

Constructor Summary
protected CourseQuota(Course course)
           
 
Method Summary
static CourseQuota createInstance(Course course)
           
 Course getCourse()
          Accessor Methods
 long getCourseAbsoluteLimit()
          This method looks at the individual absolute course quota as well as the absolute system level quota and will return the absolute course quota if it exists.
 long getCourseAbsoluteLimitRemainingSize()
          Calculate the remaining size left in the course quota
 long getCourseSize()
          Return the size of the current course.
 long getCourseSoftLimit()
          This method looks at the individual soft course quota as well as the soft system level quota and will return the soft course quota if it exists.
 long getCourseUploadLimit()
          This method looks at the individual course file upload limit as well as the system level file upload limit and will return the course limit if it exists.
 boolean getEnforceQuota()
          Return whether quotas are enabled on the system level for the course or organization
 boolean getEnforceUploadLimit()
          Return whether system upload limits are enabled for the course or organization
 long getSystemAbsoluteLimit()
          Return the system level quota absolute limit (if set).
 long getSystemSoftLimit()
          Return the system level quota soft limit (if set).
 long getSystemUploadLimit()
          Return the system level quota upload limit (if set).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CourseQuota

protected CourseQuota(Course course)
Method Detail

createInstance

public static CourseQuota createInstance(Course course)
                                  throws KeyNotFoundException
Throws:
KeyNotFoundException

getCourse

public Course getCourse()
Accessor Methods


getEnforceQuota

public boolean getEnforceQuota()
Return whether quotas are enabled on the system level for the course or organization

Returns:
A boolean representing whether quotas are enforced
Since:
Bb 6.3

getEnforceUploadLimit

public boolean getEnforceUploadLimit()
Return whether system upload limits are enabled for the course or organization

Returns:
A boolean representing whether upload limit is enforced
Since:
Bb 6.3

getCourseSize

public long getCourseSize()
Return the size of the current course. This size is calculated by an asynchronous process (batch_du.pl) that is scheduled to execute daily.

Returns:
A long representing number in bytes of the current size of the course
Since:
Bb 6.3

getSystemAbsoluteLimit

public long getSystemAbsoluteLimit()
Return the system level quota absolute limit (if set). If it is not set, returns -1.

Returns:
A long representing number in bytes of the system level quota
Since:
Bb 6.3

getSystemSoftLimit

public long getSystemSoftLimit()
Return the system level quota soft limit (if set). If it is not set, returns -1.

Returns:
A long representing number in bytes of the system level soft quota
Since:
Bb 6.3

getSystemUploadLimit

public long getSystemUploadLimit()
Return the system level quota upload limit (if set). If it is not set, returns -1.

Returns:
A long representing number in bytes of the system level upload quota
Since:
Bb 6.3

getCourseAbsoluteLimitRemainingSize

public long getCourseAbsoluteLimitRemainingSize()
Calculate the remaining size left in the course quota

Returns:
A long representing the remaining number of bytes left in the quota. Zero is returned if quota is exceeded.
Since:
Bb 6.3

getCourseAbsoluteLimit

public long getCourseAbsoluteLimit()
This method looks at the individual absolute course quota as well as the absolute system level quota and will return the absolute course quota if it exists. If the course quota does not exist, it will return the absolute system quota.

Returns:
A long representing the active absolute course quota
Since:
Bb 6.3

getCourseSoftLimit

public long getCourseSoftLimit()
This method looks at the individual soft course quota as well as the soft system level quota and will return the soft course quota if it exists. If the course quota does not exist, it will return the soft system quota.

Returns:
A long representing the active soft course quota
Since:
Bb 6.3

getCourseUploadLimit

public long getCourseUploadLimit()
This method looks at the individual course file upload limit as well as the system level file upload limit and will return the course limit if it exists. If the course lmit does not exist, it will return the system limit.

Returns:
A long representing the active course limit
Since:
Bb 6.3


Copyright © 2003 Blackboard, Inc. All Rights Reserved.