Summary
[OsidManagers|#osid.OsidManager] are the top level service endpoint interface into an OSID Provider.
OsidManagers
The job of an OsidManager is to:
- articulate what OsidSessions are supported
- access OsidSessions
- articulate what (sub) OsidManagers are supported
- access OsidManagers
- articulate what Types are supported
- articulate what Locales are supported
- identify the OSID Provider
- provide the ability to access versions of an OSID Provider
For now, we'll just concern ourselves with session support and access.
OsidSession Access
Each OsidSession can be considered a service endpoint within an OSID that deals with some smaller set of functionality. Slicing a large functional domain into smaller parts eases the ability to implement an OSID Provider, and communicates clearly what is and is not supported by an OSID Provider. The OsidManager is essentially a mini-service bus.
OsidProfiles
The specification groups the identity and support methods into OsidProfiles which are extended to become osid.OsidManager.
Example
This is an example subset of the Learning OSID where two of the OsidSessions manage retrieval and querying of learning objectives.
Method | supportsObjectiveLookup | ||
---|---|---|---|
Description | Tests if an objective lookup service is supported. An objective lookup service defines methods to access objectives. | ||
Return | boolean | true if objective lookup is supported, false otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getObjectiveLookupSession | ||
Description | Gets the OsidSession associated with the objective lookup service. | ||
Return | osid.learning.ObjectiveLookupSession | an ObjectiveLookupSession | |
Errors | OPERATION_FAILED | unable to complete request | |
UNIMPLEMENTED | supportsObjectiveLookup() is false | ||
Compliance | optional | This method must be implemented if supportsObjectiveLookup() is true. | |
Method | supportsObjectiveQuery | ||
Description | Tests if an objective query service is supported. | ||
Return | boolean | true if objective query is supported, false otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getObjectiveQuerySession | ||
Description | Gets the OsidSession associated with the objective query service. | ||
Return | osid.learning.ObjectiveQuerySession | an ObjectiveQuerySession | |
Errors | OPERATION_FAILED | unable to complete request | |
UNIMPLEMENTED | supportsObjectiveQuery() is false | ||
Compliance | optional | This method must be implemented if supportsObjectiveQuery() is true. |
Java Consumer
if (learningManager.supportsObjectiveQuery()) { try { org.osid.learning.ObjectiveQuerySession querySession = manager.getObjectiveQuerySession(); } catch (org.osid.OperationFailedException oe) { log ("error getting query session", oe); } }
See Also