public interface CourseEntryCourseCatalogAssignmentSession extends OsidSession
This session provides methods to re-assign CourseEntries
to CourseCatalogs.
A CourseEntry
may appear
in multiple CourseCatalogs
and removing the last reference
to a CourseEntry
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 CourseEntry
to another
CourseCatalog
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignCourseEntryToCourseCatalog(Id courseEntryId,
Id courseCatalogId)
Adds an existing
CourseEntry to a CourseCatalog. |
boolean |
canAssignCourseEntries()
Tests if this user can alter course entry/course catalog mappings.
|
boolean |
canAssignCourseEntryToCourseCatalog(Id courseCatalogId)
Tests if this user can alter course entry/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 entry can be assigned.
|
IdList |
getAssignableCourseCatalogIdsForCourseEntry(Id courseCatalogId,
Id courseEntryId)
Gets a list of course catalogs including and under the given course
catalog node in which a specific course entry can be assigned.
|
void |
reassignCourseEntryToCourseCatalog(Id courseEntryId,
Id fromCourseCatalogId,
Id toCourseCatalogId)
Moves a
CourseEntry from one CourseCatalog
to another. |
void |
unassignCourseEntryFromCourseCatalog(Id courseEntryId,
Id courseCatalogId)
Removes a
CourseEntry from a CourseCatalog. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignCourseEntries()
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 canAssignCourseEntryToCourseCatalog(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 getAssignableCourseCatalogIdsForCourseEntry(Id courseCatalogId, Id courseEntryId) throws OperationFailedException
courseCatalogId
- the Id
of the
CourseCatalog
courseEntryId
- the Id
of the CourseEntry
Ids
NullArgumentException
- courseCatalogId
or courseEntryId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignCourseEntryToCourseCatalog(Id courseEntryId, Id courseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
CourseEntry
to a CourseCatalog.
courseEntryId
- the Id
of the CourseEntry
courseCatalogId
- the Id
of the
CourseCatalog
AlreadyExistsException
- courseEntryId
is already assigned to courseCatalogId
NotFoundException
- courseEntryId
or
courseCatalogId
not foundNullArgumentException
- courseEntryId
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignCourseEntryFromCourseCatalog(Id courseEntryId, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CourseEntry
from a CourseCatalog.
courseEntryId
- the Id
of the CourseEntry
courseCatalogId
- the Id
of the
CourseCatalog
NotFoundException
- courseEntryId
or
courseCatalogId
not found or
courseEntryId
not assigned to courseCatalogId
NullArgumentException
- courseEntryId
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignCourseEntryToCourseCatalog(Id courseEntryId, Id fromCourseCatalogId, Id toCourseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CourseEntry
from one CourseCatalog
to another. Mappings to other CourseCatalogs
are unaffected.courseEntryId
- the Id
of the CourseEntry
fromCourseCatalogId
- the Id
of the current
CourseCatalog
toCourseCatalogId
- the Id
of the destination
CourseCatalog
NotFoundException
- courseEntryId,
fromCourseCatalogId,
or toCourseCatalogId
not found or courseEntryId
not mapped
to fromCourseCatalogId
NullArgumentException
- courseEntryId,
fromCourseCatalogId,
or toCourseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.