blackboard.data.navigation
Class CourseToc

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.navigation.CourseToc
All Implemented Interfaces:
IBbObject, Identifiable, Positionable, java.io.Serializable, java.lang.Cloneable

public class CourseToc
extends BbObject
implements Positionable

The CourseToc class provides a representation of the course menu items displayed when inside a course in the Blackboard application.

Since:
Bb 6.0
Author:
Jeffrey Bradley
See Also:
Serialized Form

Nested Class Summary
static class CourseToc.Target
           
 
Field Summary
static DataType DATA_TYPE
          Object data type constant *
static java.lang.String RESOURCE_BUNDLE
          Resource bundle for this data object *
private static long serialVersionUID
           
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Fields inherited from interface blackboard.data.Positionable
POS_UNDEFINED
 
Constructor Summary
CourseToc()
          Creates an instance of Course with default property values.
 
Method Summary
 boolean getAllowGuests()
          Returns the allow guests flag for this CourseToc.
 boolean getAllowObservers()
          Returns the allow observers flag for this CourseToc.
 boolean getContentAvailable()
          Returns whether content associate with this course toc is available based on adaptive release rules
 boolean getContentEmpty()
           
 Id getContentId()
          Returns the content Id of this CourseToc.
 Id getCourseId()
          Returns the course Id of this CourseToc.
 DataType getDataType()
          Returns the DataType identifier for this object.
 java.lang.String getInternalHandle()
          Returns the internal handle associated with this CourseToc.
 boolean getIsEnabled()
          Returns whether this CourseToc is enabled.
 boolean getIsEntryPoint()
          Returns whether this CourseToc is an entry point.
 java.lang.String getLabel()
          Returns the label associated with this CourseToc.
 boolean getLaunchInNewWindow()
          Returns whether this CourseToc should be launched in a new window (when selected within the user interface).
 java.lang.String getPersistentLabel()
          Returns the database label associated with this CourseToc.
 int getPosition()
          Returns the position of this CourseToc.
 CourseToc.Target getTargetType()
          Returns the target type for this CourseToc.
 java.lang.String getUrl()
          Returns the URL associated with this CourseToc.
 void setAllowGuests(boolean bAllowGuests)
          Sets the allow guests flag for this CourseToc.
 void setAllowObservers(boolean bAllowObservers)
          Sets the allow observers flag for this CourseToc.
 void setContentAvailable(boolean bContentAvailable)
           
 void setContentEmpty(boolean bContentEmpty)
           
 void setContentId(Id iContentId)
          Sets the content Id value for this CourseToc.
 void setCourseId(Id iCourseId)
          Sets the course Id value for this CourseToc.
 void setInternalHandle(java.lang.String strInternalHandle)
          Sets the internal handle associated with this CourseToc.
 void setIsEnabled(boolean bIsEnabled)
          Sets whether this CourseToc should be enabled.
 void setIsEntryPoint(boolean bIsEntryPoint)
          Sets whether this course menu item is the point of entry for users accessing the course.
 void setLabel(java.lang.String strLabel)
          Sets the label associated with this CourseToc.
 void setLaunchInNewWindow(boolean bLaunchInNewWindow)
          Sets whether this CourseToc should be launched in a new window (when selected within the user interface).
 void setPosition(int nPos)
          Sets the position of this CourseToc.
 void setTargetType(CourseToc.Target eTargetType)
          Sets the target type for this CourseToc.
 void setUrl(java.lang.String strUrl)
          Sets the URL associated with this CourseToc.
 void validate()
          Validates the contents of this CourseToc.
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, getModifiedDate, matches, persist, setCreatedDate, setId, setModifiedDate, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

DATA_TYPE

public static final DataType DATA_TYPE
Object data type constant *


RESOURCE_BUNDLE

public static final java.lang.String RESOURCE_BUNDLE
Resource bundle for this data object *

See Also:
Constant Field Values
Constructor Detail

CourseToc

public CourseToc()
Creates an instance of Course with default property values.

Method Detail

getCourseId

public Id getCourseId()
Returns the course Id of this CourseToc.

Returns:
course Id value for this course toc

setCourseId

public void setCourseId(Id iCourseId)
Sets the course Id value for this CourseToc. The course id is of the course this course menu is in.

Parameters:
iCourseId - the course Id value to use for this course toc

getContentId

public Id getContentId()
Returns the content Id of this CourseToc.

Returns:
content Id value for this course toc

setContentId

public void setContentId(Id iContentId)
Sets the content Id value for this CourseToc. This field is required and should be given a ContentFolder Id object. The ContentFolder object should have its parent id set as Id.UNSET_ID and the title and course id fields set matching this course menu.

Parameters:
iContentId - the content Id value to use for this course toc

getPersistentLabel

public java.lang.String getPersistentLabel()
Returns the database label associated with this CourseToc.

Returns:
the label value of this course toc as a String

getLabel

public java.lang.String getLabel()
Returns the label associated with this CourseToc.

Returns:
the label value of this course toc as a String

setLabel

public void setLabel(java.lang.String strLabel)
Sets the label associated with this CourseToc. The label is what is displayed to users in the course of this course menu.

Parameters:
strLabel - a String containing the label for this course toc

getUrl

public java.lang.String getUrl()
Returns the URL associated with this CourseToc.

Returns:
the URL value of this course toc as a String

setUrl

public void setUrl(java.lang.String strUrl)
Sets the URL associated with this CourseToc. If the course menu is an external link course menu, this is where the URL should be set for the link. For all other types of course menus, this setting is not referenced and will be null as default.

Parameters:
strUrl - a String containing the URL for this course toc

getTargetType

public CourseToc.Target getTargetType()
Returns the target type for this CourseToc.

Returns:
a type value as defined in CourseToc.Target
See Also:
CourseToc.Target

setTargetType

public void setTargetType(CourseToc.Target eTargetType)
Sets the target type for this CourseToc. The target type defines what kind of course menu this is. The current different types of course menu items are "content area," "tools area," "course link," and "external link."

Parameters:
eTargetType - a valid type value as defined in CourseToc.Target
See Also:
CourseToc.Target

getPosition

public int getPosition()
Returns the position of this CourseToc. This position should be used when displaying tocs relative to each other. Position values are zero-based (the first element has a position value of zero, not one).

Specified by:
getPosition in interface Positionable
Returns:
the position of this course toc within its current context. If this value has not been set or is unknown its value will be Positionable.POS_UNDEFINED.

setPosition

public void setPosition(int nPos)
Sets the position of this CourseToc. Position values are zero-based (the first element has a position value of zero, not one). If the position is not set, the default the last position, and will acquire a position number of the current highest position number for course menu items in a course plus one.

Specified by:
setPosition in interface Positionable
Parameters:
nPos - the new position value of this course toc. This value should be a positive value.

getLaunchInNewWindow

public boolean getLaunchInNewWindow()
Returns whether this CourseToc should be launched in a new window (when selected within the user interface).

Returns:
true if this course toc should be launched in a new browser window, false otherwise

setLaunchInNewWindow

public void setLaunchInNewWindow(boolean bLaunchInNewWindow)
Sets whether this CourseToc should be launched in a new window (when selected within the user interface). The default is true.

Parameters:
bLaunchInNewWindow - true if the course toc should be opened in a new window, false otherwise.

getIsEnabled

public boolean getIsEnabled()
Returns whether this CourseToc is enabled.

Returns:
true if this course toc is enabled, false otherwise

setIsEnabled

public void setIsEnabled(boolean bIsEnabled)
Sets whether this CourseToc should be enabled. If the course menu is not enabled, it will not show up to users accessing the course in the course view. The default is true

Parameters:
bIsEnabled - true if the course toc should be enabled, false otherwise.

getIsEntryPoint

public boolean getIsEntryPoint()
Returns whether this CourseToc is an entry point.

Returns:
true if this course toc is an entry point, false otherwise

setIsEntryPoint

public void setIsEntryPoint(boolean bIsEntryPoint)
Sets whether this course menu item is the point of entry for users accessing the course. If this is set to true, then this course menu will be what a user will see when the course first loads. The default value is false.

Parameters:
bIsEntryPoint - true if this course menu item should be an entry point, false otherwise.

getAllowObservers

public boolean getAllowObservers()
Returns the allow observers flag for this CourseToc. This flag determines whether or not "observers" (parents of a student in a course for example) are allowed access to this course toc.

Returns:
a boolean denoting whether observers should be allowed access to this course toc

setAllowObservers

public void setAllowObservers(boolean bAllowObservers)
Sets the allow observers flag for this CourseToc. This flag determines whether or not "observers" (users with an observer role, parents of a student in a course, for example) are allowed access to this course menu. The default is false.

This setting allows a finer degree of control over observer access than Course.setAllowObservers(boolean). However, this setting does not override that value. Only if that value is true is this value used to provide more control over access.

Parameters:
bAllowObservers - true if observers should be allowed in this course menu, false otherwise

getInternalHandle

public java.lang.String getInternalHandle()
Returns the internal handle associated with this CourseToc.

Returns:
the internal handle value of this course toc as a String

setInternalHandle

public void setInternalHandle(java.lang.String strInternalHandle)
Sets the internal handle associated with this CourseToc. This value is set manually to "content" if this is a content area course menu, can be left as null if this is a course or external link course menu, and is set to the appropriate tool internal handle if this is a tool link course menu.

Parameters:
strInternalHandle - a String containing the internal handle for this course toc

getAllowGuests

public boolean getAllowGuests()
Returns the allow guests flag for this CourseToc. This flag determines whether or not "guests" (users with the role guest) are allowed access to this course toc.

Returns:
a boolean denoting whether guests should be allowed in this course toc

setAllowGuests

public void setAllowGuests(boolean bAllowGuests)
Sets the allow guests flag for this CourseToc. This flag determines whether or not "guests" (users with the role guest) are allowed access to this course menu. The default is false.

This setting allows a finer degree of control over guest access than Course.setAllowGuests(boolean). However, this setting does not override that value. Only if that value is true is this value used to provide more control over access.

Parameters:
bAllowGuests - true if guests should be allowed in this course menu, false otherwise

getContentAvailable

public boolean getContentAvailable()
Returns whether content associate with this course toc is available based on adaptive release rules


setContentAvailable

public void setContentAvailable(boolean bContentAvailable)

getContentEmpty

public boolean getContentEmpty()

setContentEmpty

public void setContentEmpty(boolean bContentEmpty)

getDataType

public DataType getDataType()
Returns the DataType identifier for this object. Can be used to uniquely identify the "type" of this data object.

Specified by:
getDataType in interface IBbObject
Specified by:
getDataType in interface Identifiable
Specified by:
getDataType in class BbObject
Returns:
the DataType for this object

validate

public void validate()
              throws ValidationException
Validates the contents of this CourseToc. Internal consistency checks are also performed.

Specified by:
validate in interface IBbObject
Overrides:
validate in class BbObject
Throws:
ValidationException - if validation of this object fails