Summary
OSID Runtime manages configuration for OSID Providers.
...
Code Block | ||
---|---|---|
| ||
public class MyCalendarManager extends net.okapia.osid.jamocha.calendaring.spi.AbstractCalendaringManager implements org.osid.calendaring.CalendaringManager { private org.osid.logging.LoggingManager logger; private static final org.osid.id.Id LOGGING_IMPL_PARAMETER_ID = new net.okapia.primordium.id.BasicId("myCalendar", "configuration", "logging_osid"); @OSID @Override public void initialize(org.osid.OsidRuntimeManager runtime) throws org.osid.ConfigurationErrorException, org.osid.OperationFailedException { super.initialize(runtime); this.logger = (org.osid.logging.LoggingManager) loadOsidManager(OSID.LOGGING, getConfigurationValue(LOGGING_IMPL_PARAMETER_ID).getStringValue()); return; } .... } |
Single Vs. Multiple Values
There are two variants of value retrieval operations:
...
The Configuration OSID allows for a Parameter to have multiple Values. This makes sense if the Configuration OSID Consumer, the Calendaring OSID Provider in this case, is prepared to deal with multiple values. Our little example isn't. If there were multiple string values for that Parameter, one was simply selected for us by the Configuration OSID Provider. Multi-valued configurations are useful for federating and fallbacks.