OSID Logo
OSID Specifications
osid package
Version 3.0.0
Release Candidate Preview
Interfaceosid.OsidEnabler
Implementsosid.OsidRule
osid.Temporal
Description

OsidEnabler is used to manage the effectiveness, enabledness, or operation of an OsidObejct. The OsidEnabler itself is active or inactive When an OsidEnabler is active, any OsidObject mapped to it is "on." When all OsidEnablers mapped to an OsidObject are inactive, then the OsidObject is "off."

The managed OsidObject may have varying semantics as to what its on/off status means and in particular, which methods are used to indicate the effect of an OsidEnabler. Some axamples:

  • Operables: OsidEnablers effect the operational status.
  • Temporals: OsidEnablers may be used to extend or shorten the effectiveness of a Temporal such as an OsidRelationship.

In the case where an OsidEnabler may cause a discontinuity in a Temporal, the OsidEnabler may cause the creation of new Temporals to capture the gap in effectiveness.

For example, An OsidRelationship that began in 2007 may be brought to an end in 2008 due to the absence of any active OsidEnablers. When an effective OsidEnabler appears in 2009, a new OsidRelationship is created with a starting effective date of 2009 leaving the existing OsidRelationship with effective dates from 2007 to 2008.

An OsidEnabler itself is both a Temporal and an OsidRule whose activity status of the object may be controlled administratively, using a span of effective dates, through an external rule, or all three. The OsidEnabler defines a set of canned rules based on dates, events, and cyclic events.

MethodisEffectiveBySchedule
Description

Tests if the effectiveness of the enabler is governed by a Schedule. If a schedule exists, it is bounded by the effective dates of this enabler. If isEffectiveBySchedule() is true, isEffectiveByEvent() and isEffectiveByCyclicEvent() must be false.

Returnboolean true if the enabler is governed by schedule, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetScheduleId
Description

Gets the schedule Id .

Returnosid.id.Idthe schedule Id
ErrorsILLEGAL_STATE isEffectiveBySchedule() is false
CompliancemandatoryThis method must be implemented.
MethodgetSchedule
Description

Gets the schedule.

Returnosid.calendaring.Schedulethe schedule
ErrorsILLEGAL_STATE isEffectiveBySchedule() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodisEffectiveByEvent
Description

Tests if the effectiveness of the enabler is governed by an Event such that the start and end dates of the event govern the effectiveness. The event may also be a RecurringEvent in which case the enabler is effective for start and end dates of each event in the series If an event exists, it is bounded by the effective dates of this enabler. If isEffectiveByEvent() is true, isEffectiveBySchedule() and isEffectiveByCyclicEvent() must be false.

Returnboolean true if the enabler is governed by an event, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetEventId
Description

Gets the event Id .

Returnosid.id.Idthe event Id
ErrorsILLEGAL_STATE isEffectiveByEvent() is false
CompliancemandatoryThis method must be implemented.
MethodgetEvent
Description

Gets the event.

Returnosid.calendaring.Eventthe event
ErrorsILLEGAL_STATE isEffectiveByEvent() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodisEffectiveByCyclicEvent
Description

Tests if the effectiveness of the enabler is governed by a CyclicEvent. If a cyclic event exists, it is evaluated by the accompanying cyclic time period. If isEffectiveByCyclicEvent() is true, isEffectiveBySchedule() and isEffectiveByEvent() must be false.

Returnboolean true if the enabler is governed by a cyclic event, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetCyclicEventId
Description

Gets the cyclic event Id .

Returnosid.id.Idthe cyclic event Id
ErrorsILLEGAL_STATE isEffectiveByCyclicEvent() is false
CompliancemandatoryThis method must be implemented.
MethodgetCyclicEvent
Description

Gets the cyclic event.

Returnosid.calendaring.cycle.CyclicEventthe cyclic event
ErrorsILLEGAL_STATE isEffectiveByCyclicEvent() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodisEffectiveForDemographic
Description

Tests if the effectiveness of the enabler applies to a demographic resource.

Returnboolean true if the rule apples to a demographic. false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDemographicId
Description

Gets the demographic resource Id .

Returnosid.id.Idthe resource Id
ErrorsILLEGAL_STATE isEffectiveForDemographic() is false
CompliancemandatoryThis method must be implemented.
MethodgetDemographic
Description

Gets the demographic resource.

Returnosid.resource.Resourcethe resource representing the demographic
ErrorsILLEGAL_STATE isEffectiveForDemographic() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.