public interface ModuleLookupSession extends OsidSession
This session defines methods for retrieving modules.
This lookup session defines several views:
ModuleAdminSession.
The methods useFederatedCourseCatalogView()
and
useIsolatedCourseCatalogView()
behave as a radio group and one
should be selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupModules()
Tests if this user can lookup modules.
|
CourseCatalog |
getCourseCatalog()
Gets the
CourseCatalog associated with this session. |
Id |
getCourseCatalogId()
Gets the
CourseCatalog Id associated
with this session. |
Module |
getModule(Id moduleId)
Gets the
Module specified by its Id. |
ModuleList |
getModules()
Gets all modules.
|
ModuleList |
getModulesByGenusType(Type moduleGenusType)
Gets a
ModuleList corresponding to the given module
genus Type which does not include modules of genus
types derived from the specified Type. |
ModuleList |
getModulesByIds(IdList moduleIds)
Gets a
ModuleList corresponding to the given
IdList. |
ModuleList |
getModulesByParentGenusType(Type moduleGenusType)
Gets a
ModuleList corresponding to the given module
genus Type and include any additional modules with
genus types derived from the specified Type. |
ModuleList |
getModulesByProvider(Id resourceId)
Gets a
ModuleList for the given provider. |
ModuleList |
getModulesByRecordType(Type moduleRecordType)
Gets a
ModuleList containing the given module record
Type. |
ModuleList |
getModulesForSyllabus(Id syllabusId)
Gets a
ModuleList for the given syllabus Id. |
void |
useActiveModuleView()
Only active modules are returned from methods in this session.
|
void |
useAnyStatusModuleView()
Borth active and inactive modules are returned from methods in this
session.
|
void |
useComparativeModuleView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useFederatedCourseCatalogView()
Federates the view for methods in this session.
|
void |
useIsolatedCourseCatalogView()
Isolates the view for methods in this session.
|
void |
usePlenaryModuleView()
A complete view of the
Module returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCourseCatalogId()
CourseCatalog
Id
associated
with this session. CourseCatalog Id
associated with this
sessionmandatory
- This method must be implemented. CourseCatalog getCourseCatalog() throws OperationFailedException, PermissionDeniedException
CourseCatalog
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupModules()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations. false
if module lookup methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeModuleView()
mandatory
- This method is must be implemented. void usePlenaryModuleView()
Module
returns is desired.
Methods will return what is requested or result in an error. This view
is used when greater precision is desired at the expense of
interoperability.mandatory
- This method is must be implemented. void useFederatedCourseCatalogView()
mandatory
- This method is must be implemented. void useIsolatedCourseCatalogView()
mandatory
- This method is must be implemented. void useActiveModuleView()
mandatory
- This method is must be implemented. void useAnyStatusModuleView()
mandatory
- This method is must be implemented. Module getModule(Id moduleId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Module
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Module
may have a different Id
than requested,
such as the case where a duplicate Id
was assigned to a
Module
and retained for compatibility.
In active mode, modeules are returned that are currently active. In
any status mode, active and inactive modules are returned.moduleId
- the Id
of the Module
to
retrieve Module
NotFoundException
- no Module
found with
the given Id
NullArgumentException
- moduleId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModuleList getModulesByIds(IdList moduleIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
ModuleList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
modules specified in the Id
list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible modules may be omitted from the list and may present the
elements in any order including returning a unique set.
In active mode, modeules are returned that are currently active. In
any status mode, active and inactive modules are returned.moduleIds
- the list of Ids
to retrieve Module list
NotFoundException
- an Id was
not foundNullArgumentException
- moduleIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModuleList getModulesByGenusType(Type moduleGenusType) throws OperationFailedException, PermissionDeniedException
ModuleList
corresponding to the given module
genus Type
which does not include modules of genus
types derived from the specified Type.
In plenary mode, the returned list contains all known
modules or an error results. Otherwise, the returned list may contain
only those modules that are accessible through this session.
In active mode, modeules are returned that are currently active. In
any status mode, active and inactive modules are returned.moduleGenusType
- a module genus type Module
listNullArgumentException
- moduleGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModuleList getModulesByParentGenusType(Type moduleGenusType) throws OperationFailedException, PermissionDeniedException
ModuleList
corresponding to the given module
genus Type
and include any additional modules with
genus types derived from the specified Type.
In plenary mode, the returned list contains all known modules or an
error results. Otherwise, the returned list may contain only those
modules that are accessible through this session.
In active mode, modeules are returned that are currently active. In
any status mode, active and inactive modules are returned.moduleGenusType
- a module genus type Module
listNullArgumentException
- moduleGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModuleList getModulesByRecordType(Type moduleRecordType) throws OperationFailedException, PermissionDeniedException
ModuleList
containing the given module record
Type.
In plenary mode, the returned list contains all known
modules or an error results. Otherwise, the returned list may contain
only those modules that are accessible through this session.
In active mode, modeules are returned that are currently active. In
any status mode, active and inactive modules are returned.moduleRecordType
- a module record type Module
listNullArgumentException
- moduleRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModuleList getModulesByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
ModuleList
for the given provider.
In plenary mode, the returned list contains all known
modules or an error results. Otherwise, the returned list may contain
only those modules that are accessible through this session.
In active mode, modeules are returned that are currently active. In
any status mode, active and inactive modules are returned.resourceId
- a resource Id
Module
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModuleList getModulesForSyllabus(Id syllabusId) throws OperationFailedException, PermissionDeniedException
ModuleList
for the given syllabus Id.
In plenary mode, the returned list contains all known
modules or an error results. Otherwise, the returned list may contain
only those modules that are accessible through this session.
In active mode, modeules are returned that are currently active. In
any status mode, active and inactive modules are returned.syllabusId
- a syllabus Id
Module
listNullArgumentException
- syllabusId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ModuleList getModules() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.