Class AbstractOsidRule
java.lang.Object
net.okapia.osid.jamocha.spi.AbstractIdentifiable
net.okapia.osid.jamocha.spi.AbstractOsidObject
net.okapia.osid.jamocha.spi.AbstractOperableOsidObject
net.okapia.osid.jamocha.spi.AbstractOsidRule
- All Implemented Interfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject, OsidRule
- Direct Known Subclasses:
AbstractAction, AbstractAgenda, AbstractAssessmentRequirement, AbstractAwardRequirement, AbstractCheck, AbstractCourseRequirement, AbstractCredentialRequirement, AbstractDemographic, AbstractFunction, AbstractGradebookColumnCalculation, AbstractGradeSystemTransform, AbstractInquiry, AbstractLearningObjectiveRequirement, AbstractOffsetEvent, AbstractOsidConstrainer, AbstractOsidEnabler, AbstractOsidProcessor, AbstractParameter, AbstractPrice, AbstractProgramRequirement, AbstractRecurringEvent, AbstractRequisiteRequirement, AbstractRule, AbstractSequenceRule, AbstractSignal, AbstractSpeedZone, AbstractStep, AbstractSupersedingEvent, AbstractTodoProducer, AbstractTrigger
Defines a simple OSID rule to draw from. using this
abstract class requires that
setId() must be done
before passing this interface to a consumer in order to maintain
compliance with the OSID specification.-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractOperableOsidObject
AbstractOperableOsidObject.OperableModifier and TypeClassDescriptionprotected classThe composed OPerable.Nested classes/interfaces inherited from class AbstractOsidObject
AbstractOsidObject.BrowsableModifier and TypeClassDescriptionprotected classComposed Browsable. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConditionRecordType(Type conditionRecordType) Adds a condition record type.Gets the list ofOsidConditionrecordTypesthis rule requires.getRule()Gets the rule.Gets the ruleId.booleanhasRule()Tests if an explicit rule is available.protected voidSets the rule.Methods inherited from class AbstractOperableOsidObject
isActive, isDisabled, isEnabled, isOperational, setDisabled, setEnabled, setOperationalModifier and TypeMethodDescriptionbooleanisActive()Tests if this operable is active.booleanTests if this operable is administravely disabled.booleanTests if this operable is administravely enabled.booleanTests if this operable is operational in that all rules pertaining to this operation except for an administrative disable aretrue.protected voidsetDisabled(boolean disabled) Sets the disabled flag.protected voidsetEnabled(boolean enabled) Sets the enabled flag.protected voidsetOperational(boolean operational) Sets the operational flag.Methods inherited from class AbstractOsidObject
addProperties, addRecordType, getDescription, getDisplayName, getGenusType, getProperties, getPropertiesByRecordType, getRecordTypes, hasRecordType, isOfGenusType, setDescription, setDisplayName, setGenusTypeModifier and TypeMethodDescriptionprotected voidaddProperties(Collection<Property> set, Type recordType) Adds a property set.protected voidaddRecordType(Type recordType) Adds a record type.Gets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.Gets a list of all properties of this object including those corresponding to data within this object's records.getPropertiesByRecordType(Type recordType) Gets the properties by record type.Gets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.protected voidsetDescription(DisplayText description) Sets the description of this object.protected voidsetDisplayName(DisplayText displayName) Sets the displayName for this object.protected voidsetGenusType(Type genusType) Sets a genus type.Methods inherited from class AbstractIdentifiable
current, equals, getId, hashCode, isCurrent, setId, stale, toStringModifier and TypeMethodDescriptionprotected voidcurrent()Sets the current flag totrue.final booleanDetermines if the givenIdis equal to this one.getId()Gets theIdassociated with this instance of this OSID object.inthashCode()Returns a hash code value for thisOsidObjectbased on theId.booleanTests to see if the last method invoked retrieved up-to-date data.protected voidSets theIdassociated with this instance of this OSID object.protected voidstale()Sets the current flag tofalse.toString()Returns a string representation of this OsidObject.
-
Constructor Details
-
AbstractOsidRule
public AbstractOsidRule()Constructs a newAbstractOsidRule.
-
-
Method Details
-
hasRule
-
getRuleId
Gets the ruleId.- Specified by:
getRuleIdin interfaceOsidRule- Returns:
- the rule
Id - Throws:
IllegalStateException-hasRule()isfalse
-
getRule
Gets the rule.- Specified by:
getRulein interfaceOsidRule- Returns:
- the rule
- Throws:
IllegalStateException-hasRule()isfalseOperationFailedException- unable to complete request
-
setRule
Sets the rule.- Parameters:
rule- the rule- Throws:
NullArgumentException-ruleisnull
-
getConditionRecordTypes
Gets the list ofOsidConditionrecordTypesthis rule requires.- Specified by:
getConditionRecordTypesin interfaceOsidRule- Returns:
- a list of
OsidConditionrecord types
-
addConditionRecordType
Adds a condition record type.- Parameters:
conditionRecordType- the condition record type to add- Throws:
NullArgumentException-conditionRecordTypeisnull
-