public interface CourseCourseCatalogAssignmentSession extends OsidSession
This session provides methods to re-assign Courses
to
CourseCatalog
objects A Course
may appear in
multiple CourseCatalog
objects and removing the last
reference to a Course
is the equivalent of deleting it.
Each CourseCatalog
may have its own authorizations
governing who is allowed to operate on it.
Adding a reference of a Course
to another
CourseCatalog
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignCourseToCourseCatalog(Id courseId,
Id courseCatalogId)
Adds an existing
Course to a CourseCatalog. |
boolean |
canAssignCourses()
Tests if this user can alter course/course catalog mappings.
|
boolean |
canAssignCourseToCourseCatalog(Id courseCatalogId)
Tests if this user can alter course/course catalog mappings.
|
IdList |
getAssignableCourseCatalogIds(Id courseCatalogId)
Gets a list of course catalogs including and under the given course
catalog node in which any course can be assigned.
|
IdList |
getAssignableCourseCatalogIdsForCourse(Id courseCatalogId,
Id courseId)
Gets a list of course catalogs including and under the given course
catalog node in which a specific course can be assigned.
|
void |
reassignCourseToCourseCatalog(Id courseId,
Id fromCourseCatalogId,
Id toCourseCatalogId)
Moves a
Course from one CourseCatalog to
another. |
void |
unassignCourseFromCourseCatalog(Id courseId,
Id courseCatalogId)
Removes a
Course from a CourseCatalog. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignCourses()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignCourseToCourseCatalog(Id courseCatalogId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users.courseCatalogId
- the Id
of the
CourseCatalog
false
if mapping is not authorized, true
otherwiseNullArgumentException
- courseCatalogId
is null
mandatory
- This method must be implemented. IdList getAssignableCourseCatalogIds(Id courseCatalogId) throws OperationFailedException
courseCatalogId
- the Id
of the
CourseCatalog
Ids
NullArgumentException
- courseCatalogId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableCourseCatalogIdsForCourse(Id courseCatalogId, Id courseId) throws OperationFailedException
courseCatalogId
- the Id
of the
CourseCatalog
courseId
- the Id
of the Course
Ids
NullArgumentException
- courseCatalogId
or courseId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignCourseToCourseCatalog(Id courseId, Id courseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Course
to a CourseCatalog.
courseId
- the Id
of the Course
courseCatalogId
- the Id
of the
CourseCatalog
AlreadyExistsException
- courseId
is
already assigned to courseCatalogId
NotFoundException
- courseId
or
courseCatalogId
not foundNullArgumentException
- courseId
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignCourseFromCourseCatalog(Id courseId, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Course
from a CourseCatalog.
courseId
- the Id
of the Course
courseCatalogId
- the Id
of the
CourseCatalog
NotFoundException
- courseId
or
courseCatalogId
not found or courseId
not assigned to courseCatalogId
NullArgumentException
- courseId
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignCourseToCourseCatalog(Id courseId, Id fromCourseCatalogId, Id toCourseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Course
from one CourseCatalog
to
another. Mappings to other CourseCatalogs
are
unaffected.courseId
- the Id
of the Course
fromCourseCatalogId
- the Id
of the current
CourseCatalog
toCourseCatalogId
- the Id
of the destination
CourseCatalog
NotFoundException
- courseId,
fromCourseCatalogId,
or toCourseCatalogId
not found or courseId
not mapped to
fromCourseCatalogId
NullArgumentException
- courseId,
fromCourseCatalogId,
or toCourseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.