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