Interface CourseRegistrationCourseCatalogAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign CourseRegistra tions
to CourseCatalog mappings. A CourseRegistr ation may
appear in multiple CourseCatalog catalogs and removing the last
reference to a CourseRegistr ation 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 CourseRegistr ation to another
CourseCatalog is not a copy operation (eg: does not change its Id
).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignCourseRegistrationToCourseCatalog(Id courseRegistrationId, Id courseCatalogId) Adds an existingCourseRegistrationto aCourseCatalog.booleanTests if this user can alter course registration/course catalog mappings.booleancanAssignCourseRegistrationToCourseCatalog(Id courseCatalogId) Tests if this user can alter course registration/course catalog mappings.getAssignableCourseCatalogIds(Id courseCatalogId) Gets a list of course catalogs including and under the given course catalog node in which any course registration can be assigned.getAssignableCourseCatalogIdsForCourseRegistration(Id courseCatalogId, Id courseRegistrationId) Gets a list of course catalogs including and under the given course catalog node in which a specific course registration can be assigned.voidreassignCourseRegistrationToCourseCatalog(Id courseRegistrationId, Id fromCourseCatalogId, Id toCourseCatalogId) Moves aCourseRegistrationfrom oneCourseCatalogto another.voidunassignCourseRegistrationFromCourseCatalog(Id courseRegistrationId, Id courseCatalogId) Removes aCourseRegistrationfrom 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
-
canAssignCourseRegistrations
boolean canAssignCourseRegistrations()Tests if this user can alter course registration/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.
-
canAssignCourseRegistrationToCourseCatalog
Tests if this user can alter course registration/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.- 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 registration 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.
-
getAssignableCourseCatalogIdsForCourseRegistration
IdList getAssignableCourseCatalogIdsForCourseRegistration(Id courseCatalogId, Id courseRegistrationId) throws OperationFailedException Gets a list of course catalogs including and under the given course catalog node in which a specific course registration can be assigned.- Parameters:
courseCatalogId- theIdof theCourseCatalogcourseRegistrationId- theIdof theCourseRegistration- Returns:
- list of assignable course catalog
Ids - Throws:
NullArgumentException-courseCatalogIdorcourseRegistrationIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignCourseRegistrationToCourseCatalog
void assignCourseRegistrationToCourseCatalog(Id courseRegistrationId, Id courseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingCourseRegistrationto aCourseCatalog.- Parameters:
courseRegistrationId- theIdof theCourseRegistrationcourseCatalogId- theIdof theCourseCatalog- Throws:
AlreadyExistsException-courseRegistrationIdis already assigned tocourseCatalogIdNotFoundException-courseRegistrationIdorcourseCatalogIdnot foundNullArgumentException-courseRegistrationIdorcourseCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignCourseRegistrationFromCourseCatalog
void unassignCourseRegistrationFromCourseCatalog(Id courseRegistrationId, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aCourseRegistrationfrom aCourseCatalog.- Parameters:
courseRegistrationId- theIdof theCourseRegistrationcourseCatalogId- theIdof theCourseCatalog- Throws:
NotFoundException-courseRegistrationIdorcourseCatalogIdnot found orcourseRegistrationIdnot assigned tocourseCatalogIdNullArgumentException-courseRegistrationIdorcourseCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignCourseRegistrationToCourseCatalog
void reassignCourseRegistrationToCourseCatalog(Id courseRegistrationId, Id fromCourseCatalogId, Id toCourseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aCourseRegistrationfrom oneCourseCatalogto another. Mappings to otherCourseCatalogsare unaffected.- Parameters:
courseRegistrationId- theIdof theCourseRegistrationfromCourseCatalogId- theIdof the currentCourseCatalogtoCourseCatalogId- theIdof the destinationCourseCatalog- Throws:
AlreadyExistsException-courseRegistrationIdalready assigned totocourseCatalogIdNotFoundException-courseRegistrationId, fromCourseCatalogId, ortoCourseCatalogeIdnot found orcourseRegistrationIdnot mapped tofromCourseCatalogIdNullArgumentException-courseRegistrationId, fromCourseCatalogId, ortoCourseCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-