foo are the top level service endpoint interface into an OSID Provider.
The job of an OsidManager is to:
For now, we'll just concern ourselves with session support and 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.
The specification groups the identity and support methods into OsidProfiles which are extended to become osid.OsidManager.
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. |
if (learningManager.supportsObjectiveQuery()) { try { org.osid.learning.ObjectiveQuerySession querySession = manager.getObjectiveQuerySession(); } catch (org.osid.OperationFailedException oe) { log ("error getting query session", oe); } } |