Interface RegistrationTargetCourseCatalogAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign RegistrationTa rgets
to CourseCatalog mappings. A RegistrationT arget may
appear in multiple CourseCatalog catalogs and removing the last
reference to a RegistrationT arget 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 RegistrationT arget to another
CourseCatalog is not a copy operation (eg: does not change its
Id) .
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignRegistrationTargetToCourseCatalog(Id registrationTargetId, Id courseCatalogId) Adds an existingRegistrationTargetto aCourseCatalog.booleanTests if this user can alter registration target/course catalog mappings.booleancanAssignRegistrationTargetToCourseCatalog(Id courseCatalogId) Tests if this user can alter registration target/course catalog mappings.getAssignableCourseCatalogIds(Id courseCatalogId) Gets a list of course catalogs including and under the given course catalog node in which any registration target can be assigned.getAssignableCourseCatalogIdsForRegistrationTarget(Id courseCatalogId, Id registrationTargetId) Gets a list of course catalogs including and under the given course catalog node in which a specific registration target can be assigned.voidreassignRegistrationTargetToCourseCatalog(Id registrationTargetId, Id fromCourseCatalogId, Id toCourseCatalogId) Moves aRegistrationTargetfrom oneCourseCatalogto another.voidunassignRegistrationTargetFromCourseCatalog(Id registrationTargetId, Id courseCatalogId) Removes aRegistrationTargetfrom 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
-
canAssignRegistrationTargets
boolean canAssignRegistrationTargets()Tests if this user can alter registration target/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.
-
canAssignRegistrationTargetToCourseCatalog
Tests if this user can alter registration target/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 registration target 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.
-
getAssignableCourseCatalogIdsForRegistrationTarget
IdList getAssignableCourseCatalogIdsForRegistrationTarget(Id courseCatalogId, Id registrationTargetId) throws OperationFailedException Gets a list of course catalogs including and under the given course catalog node in which a specific registration target can be assigned.- Parameters:
courseCatalogId- theIdof theCourseCatalogregistrationTargetId- theIdof theRegistrationTarget- Returns:
- list of assignable course catalog
Ids - Throws:
NullArgumentException-courseCatalogIdorregistrationTargetIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignRegistrationTargetToCourseCatalog
void assignRegistrationTargetToCourseCatalog(Id registrationTargetId, Id courseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingRegistrationTargetto aCourseCatalog.- Parameters:
registrationTargetId- theIdof theRegistrationTargetcourseCatalogId- theIdof theCourseCatalog- Throws:
AlreadyExistsException-registrationTargetIdis already assigned tocourseCatalogIdNotFoundException-registrationTargetIdorcourseCatalogIdnot foundNullArgumentException-registrationTargetIdorcourseCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignRegistrationTargetFromCourseCatalog
void unassignRegistrationTargetFromCourseCatalog(Id registrationTargetId, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aRegistrationTargetfrom aCourseCatalog.- Parameters:
registrationTargetId- theIdof theRegistrationTargetcourseCatalogId- theIdof theCourseCatalog- Throws:
NotFoundException-registrationTargetIdorcourseCatalogIdnot found orregistrationTargetIdnot assigned tocourseCatalogIdNullArgumentException-registrationTargetIdorcourseCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignRegistrationTargetToCourseCatalog
void reassignRegistrationTargetToCourseCatalog(Id registrationTargetId, Id fromCourseCatalogId, Id toCourseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aRegistrationTargetfrom oneCourseCatalogto another. Mappings to otherCourseCatalogsare unaffected.- Parameters:
registrationTargetId- theIdof theRegistrationTargetfromCourseCatalogId- theIdof the currentCourseCatalogtoCourseCatalogId- theIdof the destinationCourseCatalog- Throws:
AlreadyExistsException-registrationTargetIdalready assigned totocourseCatalogIdNotFoundException-registrationTargetId, fromCourseCatalogId, ortoCourseCatalogeIdnot found orregistrationTargetIdnot mapped tofromCourseCatalogIdNullArgumentException-registrationTargetId, fromCourseCatalogId, ortoCourseCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-