public interface PlanCourseCatalogAssignmentSession extends OsidSession
This session provides methods to re-assign Plans
to
Course Catalogs.
A Plan
may map to multiple
CourseCatalogs
and removing the last reference to a
Plan
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 Plan
to another
CourseCatalog
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignPlanToCourseCatalog(Id planId,
Id courseCatalogId)
Adds an existing
Plan to an CourseCatalog. |
boolean |
canAssignPlans()
Tests if this user can alter plan/course catalog mappings.
|
boolean |
canAssignPlansToCourseCatalog(Id courseCatalogId)
Tests if this user can alter plan/course catalog mappings.
|
IdList |
getAssignableCourseCatalogIds(Id courseCatalogId)
Gets a list of course catalogs including and under the given course
catalog node in which any plan can be assigned.
|
IdList |
getAssignableCourseCatalogIdsForPlan(Id courseCatalogId,
Id planId)
Gets a list of course catalogs including and under the given course
catalog node in which a specific plan can be assigned.
|
void |
reassignPlanToCourseCatalog(Id planId,
Id fromCourseCatalogId,
Id toCourseCatalogId)
Moves a
Plan from one CourseCatalog to
another. |
void |
unassignPlanFromCourseCatalog(Id planId,
Id courseCatalogId)
Removes a
Plan from an CourseCatalog. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignPlans()
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 canAssignPlansToCourseCatalog(Id courseCatalogId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment 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 getAssignableCourseCatalogIdsForPlan(Id courseCatalogId, Id planId) throws OperationFailedException
courseCatalogId
- the Id
of the
CourseCatalog
planId
- the Id
of the Plan
Ids
NullArgumentException
- courseCatalogId
or planId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignPlanToCourseCatalog(Id planId, Id courseCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Plan
to an CourseCatalog.
planId
- the Id
of the Plan
courseCatalogId
- the Id
of the
CourseCatalog
AlreadyExistsException
- planId
is
already assigned to courseCatalogId
NotFoundException
- planId
or
courseCatalogId
not foundNullArgumentException
- planId
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignPlanFromCourseCatalog(Id planId, Id courseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Plan
from an CourseCatalog.
planId
- the Id
of the Plan
courseCatalogId
- the Id
of the
CourseCatalog
NotFoundException
- planId
or
courseCatalogId
not found or planId
not
assigned to courseCatalogId
NullArgumentException
- planId
or
courseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignPlanToCourseCatalog(Id planId, Id fromCourseCatalogId, Id toCourseCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Plan
from one CourseCatalog
to
another. Mappings to other CourseCatalogs
are
unaffected.planId
- the Id
of the Plan
fromCourseCatalogId
- the Id
of the current
CourseCatalog
toCourseCatalogId
- the Id
of the destination
CourseCatalog
NotFoundException
- planId, fromCourseCatalogId,
or toCourseCatalogId
not found or
planId
not mapped to fromCourseCatalogId
NullArgumentException
- planId,
fromCourseCatalogId,
or toCourseCatalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.