Interface CourseEntryCourseCatalogAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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
).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignCourseEntryToCourseCatalog(Id courseEntryId, Id courseCatalogId) Adds an existingCourseEntryto aCourseCatalog.booleanTests if this user can alter course entry/course catalog mappings.booleancanAssignCourseEntryToCourseCatalog(Id courseCatalogId) Tests if this user can alter course entry/course catalog mappings.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.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.voidreassignCourseEntryToCourseCatalog(Id courseEntryId, Id fromCourseCatalogId, Id toCourseCatalogId) Moves aCourseEntryfrom oneCourseCatalogto another.voidunassignCourseEntryFromCourseCatalog(Id courseEntryId, Id courseCatalogId) Removes aCourseEntryfrom aCourseCatalog.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignCourseEntries
boolean canAssignCourseEntries()Tests if this user can alter course entry/course catalog mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignCourseEntryToCourseCatalog
Tests if this user can alter course entry/course catalog mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
courseCatalogId- theIdof theCourseCatalog- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-courseCatalogIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableCourseCatalogIds
Gets a list of course catalogs including and under the given course catalog node in which any course entry can be assigned.- Parameters:
courseCatalogId- theIdof theCourseCatalog- Returns:
- list of assignable course catalog
Ids - Throws:
NullArgumentException-courseCatalogIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableCourseCatalogIdsForCourseEntry
IdList getAssignableCourseCatalogIdsForCourseEntry(Id courseCatalogId, Id courseEntryId) throws OperationFailedException Gets a list of course catalogs including and under the given course catalog node in which a specific course entry can be assigned.- Parameters:
courseCatalogId- theIdof theCourseCatalogcourseEntryId- theIdof theCourseEntry- Returns:
- list of assignable course catalog
Ids - Throws:
NullArgumentException-courseCatalogIdorcourseEntryIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignCourseEntryToCourseCatalog
void assignCourseEntryToCourseCatalog(Id courseEntryId, Id courseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingCourseEntryto aCourseCatalog.- Parameters:
courseEntryId- theIdof theCourseEntrycourseCatalogId- theIdof theCourseCatalog- Throws:
AlreadyExistsException-courseEntryIdis already assigned tocourseCatalogIdNotFoundException-courseEntryIdorcourseCatalogIdnot foundNullArgumentException-courseEntryIdorcourseCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignCourseEntryFromCourseCatalog
void unassignCourseEntryFromCourseCatalog(Id courseEntryId, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aCourseEntryfrom aCourseCatalog.- Parameters:
courseEntryId- theIdof theCourseEntrycourseCatalogId- theIdof theCourseCatalog- Throws:
NotFoundException-courseEntryIdorcourseCatalogIdnot found orcourseEntryIdnot assigned tocourseCatalogIdNullArgumentException-courseEntryIdorcourseCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignCourseEntryToCourseCatalog
void reassignCourseEntryToCourseCatalog(Id courseEntryId, Id fromCourseCatalogId, Id toCourseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aCourseEntryfrom oneCourseCatalogto another. Mappings to otherCourseCatalogsare unaffected.- Parameters:
courseEntryId- theIdof theCourseEntryfromCourseCatalogId- theIdof the currentCourseCatalogtoCourseCatalogId- theIdof the destinationCourseCatalog- Throws:
AlreadyExistsException-courseEntryIdalready assigned totoCourseCatalogIdNotFoundException-courseEntryId, fromCourseCatalogId, ortoCourseCatalogIdnot found orcourseEntryIdnot mapped tofromCourseCatalogIdNullArgumentException-courseEntryId, fromCourseCatalogId, ortoCourseCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-