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