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