Class AbstractOsidRuleApplicatorForm
java.lang.Object
net.okapia.osid.jamocha.spi.AbstractIdentifiable
net.okapia.osid.jamocha.spi.AbstractOsidForm
net.okapia.osid.jamocha.spi.AbstractOsidExtensibleForm
net.okapia.osid.jamocha.spi.AbstractOsidBrowsableForm
net.okapia.osid.jamocha.spi.AbstractOsidObjectForm
net.okapia.osid.jamocha.spi.AbstractOperableOsidObjectForm
net.okapia.osid.jamocha.spi.AbstractOsidRuleForm
net.okapia.osid.jamocha.spi.AbstractOsidEnablerForm
net.okapia.osid.jamocha.spi.AbstractOsidRuleApplicatorForm
- All Implemented Interfaces:
Extensible, Identifiable, OsidBrowsableForm, OsidEnablerForm, OsidExtensibleForm, OsidForm, OsidIdentifiableForm, OsidObjectForm, OsidOperableForm, OsidRuleApplicatorForm, OsidRuleForm, OsidTemporalForm, Suppliable
public abstract class AbstractOsidRuleApplicatorForm
extends AbstractOsidEnablerForm
implements OsidRuleApplicatorForm
A basic OsidRuleApplicatorForm.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractOperableOsidObjectForm
AbstractOperableOsidObjectForm.OsidOperableFormModifier and TypeClassDescriptionprotected classDefines anOsidOperableForm.Nested classes/interfaces inherited from class AbstractOsidExtensibleForm
AbstractOsidExtensibleForm.ExtensibleModifier and TypeClassDescriptionprotected classDefines anExtensible. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOsidRuleApplicatorForm(Locale locale, boolean update) Constructs a newAbstractOsidRuleApplicatorForm. -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the resource.protected IdReturns the current resource value.Gets the metadata for the resource.protected booleanTests if the resource has been cleared in this form.protected booleanTests if the resource has been set in this form.voidsetResource(Id resourceId) Sets the resource.protected voidsetResourceMetadata(Metadata metadata) Sets the resource metadata.Methods inherited from class AbstractOsidEnablerForm
clearCyclicEvent, clearCyclicTimePeriod, clearEndDate, clearEvent, clearRequirement, clearSchedule, clearStartDate, clearTimePeriod, getCyclicEventId, getCyclicEventMetadata, getCyclicTimePeriodId, getCyclicTimePeriodPeriodMetadata, getEndDate, getEndDateMetadata, getEventId, getEventMetadata, getRequirement, getRequirementMetadata, getScheduleId, getScheduleMetadata, getStartDate, getStartDateMetadata, getTimePeriodId, getTimePeriodPeriodMetadata, isCyclicEventCleared, isCyclicEventSet, isCyclicTimePeriodCleared, isCyclicTimePeriodSet, isEndDateCleared, isEndDateSet, isEventCleared, isEventSet, isRequirementCleared, isRequirementSet, isScheduleCleared, isScheduleSet, isStartDateCleared, isStartDateSet, isTimePeriodCleared, isTimePeriodSet, setCyclicEvent, setCyclicEventMetadata, setCyclicTimePeriod, setCyclicTimePeriodMetadata, setEndDate, setEndDateMetadata, setEvent, setEventMetadata, setRequirement, setRequirementMetadata, setSchedule, setScheduleMetadata, setStartDate, setStartDateMetadata, setTimePeriod, setTimePeriodMetadataModifier and TypeMethodDescriptionvoidClears the cyclic event.voidClears the cyclic time period.voidClears the end date.voidClears the event.voidClears the requirement.voidClears the schedule.voidClears the start date.voidClears the time period.protected IdReturns the current cyclic event value.Gets the metadata for the cyclic event.protected IdReturns the current cyclic time period value.Gets the metadata for the cyclic time period.protected DateTimeReturns the current end date value.Gets the metadata for an end date.protected IdReturns the current event value.Gets the metadata for the event.protected booleanReturns the current requirement value.Gets the metadata for the requirement.protected IdReturns the current schedule value.Gets the metadata for the schedule.protected DateTimeReturns the current start date value.Gets the metadata for a start date.protected IdReturns the current time period value.Gets the metadata for the time period.protected booleanTests if the cyclic event has been cleared in this form.protected booleanTests if the cyclic event has been set in this form.protected booleanTests if the cyclic time period has been cleared in this form.protected booleanTests if the cyclic time period has been set in this form.protected booleanTests if the end date has been cleared in this form.protected booleanTests if the end date has been set in this form.protected booleanTests if the event has been cleared in this form.protected booleanTests if the event has been set in this form.protected booleanTests if the requirement has been cleared in this form.protected booleanTests if the requirement has been set in this form.protected booleanTests if the schedule has been cleared in this form.protected booleanTests if the schedule has been set in this form.protected booleanTests if the start date has been cleared in this form.protected booleanTests if the start date has been set in this form.protected booleanTests if the time period has been cleared in this form.protected booleanTests if the time period has been set in this form.voidsetCyclicEvent(Id cyclicEventId) Sets the cyclic event.protected voidsetCyclicEventMetadata(Metadata metadata) Sets the cyclic event metadata.voidsetCyclicTimePeriod(Id cyclicTimePeriodId) Sets the cyclic time period.protected voidsetCyclicTimePeriodMetadata(Metadata metadata) Sets the cyclic time period metadata.voidsetEndDate(DateTime date) Sets the end date.protected voidsetEndDateMetadata(Metadata metadata) Sets the end date metadata.voidSets the event.protected voidsetEventMetadata(Metadata metadata) Sets the event metadata.voidsetRequirement(boolean requirement) Sets the requirement flag.protected voidsetRequirementMetadata(Metadata metadata) Sets the requirement metadata.voidsetSchedule(Id scheduleId) Sets the schedule.protected voidsetScheduleMetadata(Metadata metadata) Sets the schedule metadata.voidsetStartDate(DateTime date) Sets the start date.protected voidsetStartDateMetadata(Metadata metadata) Sets the start date metadata.voidsetTimePeriod(Id timePeriodId) Sets the time period.protected voidsetTimePeriodMetadata(Metadata metadata) Sets the time period metadata.Methods inherited from class AbstractOsidRuleForm
clearConditionRecordTypes, clearRule, getConditionRecordTypes, getConditionRecordTypesId, getConditionRecordTypesMetadata, getRule, getRuleId, getRuleMetadata, isConditionRecordTypesCleared, isConditionRecordTypesSet, isRuleCleared, isRuleSet, setConditionRecordTypes, setConditionRecordTypesMetadata, setRule, setRuleMetadataModifier and TypeMethodDescriptionvoidClears the condition record types.voidRemoves the rule.protected Type[]Returns the current condition record types value.protected IdGets the Id for the condition record types field.Gets the metadata for the condition record types.protected IdgetRule()Returns the current rule value.protected IdGets the Id for the rule Id field.Gets the metadata for an associated rule.protected booleanTests if the condition record types have been cleared in this form.protected booleanTests if the condition record types have been set in this form.protected booleanTests if the rule has been cleared in this form.protected booleanTests if the rule has been set in this form.voidsetConditionRecordTypes(Type[] conditionRecordTypes) Sets the condition record types.protected voidsetConditionRecordTypesMetadata(Metadata metadata) Sets the condition record types metadata.voidSets a rule.protected voidsetRuleMetadata(Metadata metadata) Sets the rule metadata.Methods inherited from class AbstractOperableOsidObjectForm
clearDisabled, clearEnabled, getDisabled, getDisabledId, getDisabledMetadata, getEnabled, getEnabledId, getEnabledMetadata, isDisabledCleared, isDisabledSet, isEnabledCleared, isEnabledSet, setDisabled, setDisabledMetadata, setEnabled, setEnabledMetadataModifier and TypeMethodDescriptionvoidClears the disabled flag.voidClears the enabled flag.protected booleanReturns the current disabled value.protected IdGets the Id for the disabled field.Gets the metadata for the disabled.protected booleanReturns the current enabled value.protected IdGets the Id for the enabled field.Gets the metadata for the enabled.protected booleanTests if the disabled flag has been cleared in this form.protected booleanTests if the disabled flag has been set in this form.protected booleanTests if the enabled flag has been cleared in this form.protected booleanTests if the enabled flag has been set in this form.voidsetDisabled(boolean disabled) Sets the disabled flag.protected voidsetDisabledMetadata(Metadata metadata) Sets the disabled metadata.voidsetEnabled(boolean enabled) Sets the enabled flag.protected voidsetEnabledMetadata(Metadata metadata) Sets the enabled metadata.Methods inherited from class AbstractOsidObjectForm
clearDescription, clearDisplayName, clearGenusType, getDescription, getDescriptionId, getDescriptionMetadata, getDisplayName, getDisplayNameId, getDisplayNameMetadata, getGenusType, getGenusTypeId, getGenusTypeMetadata, isDescriptionCleared, isDescriptionSet, isDisplayNameCleared, isDisplayNameSet, isGenusTypeCleared, isGenusTypeSet, setDescription, setDescriptionMetadata, setDisplayName, setDisplayNameMetadata, setGenusType, setGenusTypeMetadataModifier and TypeMethodDescriptionvoidClears the description.voidClears the display name.voidClears the genus type.protected StringReturns the current description value.protected IdGets the Id for the description field.Gets the metadata for the description.protected StringReturns the current display name value.protected IdGets the Id for the display name field.Gets the metadata for the display name.protected TypeReturns the current genus type value.protected IdGets the Id for the genus type field.Gets the metadata for the genus type.protected booleanTests if a description has been cleared in this form.protected booleanTests if a description has been set in this form.protected booleanTests if the display name has been cleared in this form.protected booleanTests if the display name has been set in this form.protected booleanTests if a genus type has been cleared in this form.protected booleanTests if a genus type has been set in this form.voidsetDescription(String description) Sets a description.protected voidsetDescriptionMetadata(Metadata metadata) Sets the description metadata.voidsetDisplayName(String displayName) Sets a display name.protected voidsetDisplayNameMetadata(Metadata metadata) Sets the display name metadata.voidsetGenusType(Type genusType) Sets a genus type.protected voidsetGenusTypeMetadata(Metadata metadata) Sets the genus type metadata.Methods inherited from class AbstractOsidExtensibleForm
addRecordType, addRequiredRecordType, getRecordTypes, getRequiredRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionprotected voidaddRecordType(Type recordType) Adds a record type.protected voidaddRequiredRecordType(Type requiredRecordType) Adds a required record type.Gets the record types available in this object.Gets the required record types for this form.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from class AbstractOsidForm
addLocale, addLocales, clearLocales, getDefaultArrayIdMetadata, getDefaultArrayTypeMetadata, getDefaultBooleanMetadata, getDefaultDateTimeMetadata, getDefaultIdMetadata, getDefaultLocale, getDefaultStringMetadata, getDefaultTypeMetadata, getInvalidMetadata, getJournalComment, getJournalCommentId, getJournalCommentMetadata, getLocale, getLocales, getValidationMessages, isForUpdate, isJournalCommentSet, isValid, makeElementId, makeId, setJournalComment, setJournalCommentMetadata, setLocaleModifier and TypeMethodDescriptionprotected voidAdds an available locale.protected voidaddLocales(Collection<Locale> locales) Adds a collection of available locales.protected voidClears the available locales.protected MetadatagetDefaultArrayIdMetadata(Id elementId, String field) Gets a default read-only metadata for Ids.protected MetadatagetDefaultArrayTypeMetadata(Id elementId, String field) Gets a default read-only metadata for arrays of types.protected MetadatagetDefaultBooleanMetadata(Id elementId, String field) Gets a default read-only metadata for booleans.protected MetadatagetDefaultDateTimeMetadata(Id elementId, String field) Gets a default read-only metadata for date times.protected MetadatagetDefaultIdMetadata(Id elementId, String field) Gets a default read-only metadata for Ids.Gets a default locale forDisplayTextswhen a locale is not specified.protected MetadatagetDefaultStringMetadata(Id elementId, String field) Gets a default read-only metadata for strings.protected MetadatagetDefaultTypeMetadata(Id elementId, String field) Gets a default read-only metadata for types.Metadata[]Gets a list of metadata for the elements in this form which are not valid.protected StringReturns the current comment value.protected IdGets the Id for the comment field.Gets the metadata for the comment corresponding to this form submission.protected LocaleGets the current locale.Gets a list of locales for availableDisplayTexttranslations that can be performed using this form.Gets text messages corresponding to additional instructions to pass form validation.booleanTests if this form is for an update operation.protected booleanTests if a comment has been set in this form.booleanisValid()Tests if ths form is in a valid state for submission.protected IdmakeElementId(String identifier) Makes an Id for a form element.protected IdmakeId()Generates a unique Id for this form.voidsetJournalComment(String comment) Sets a comment.protected voidsetJournalCommentMetadata(Metadata metadata) Sets the comment metadata.voidSpecifies a language and script type forDisplayTextfields in this form.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
-
AbstractOsidRuleApplicatorForm
Constructs a newAbstractOsidRuleApplicatorForm.- Parameters:
locale- this serves as the default Locale for this form which generally is the Locale of the associated session. Additional locales may be set.update-trueif for update,falseif for create
-
-
Method Details
-
getResourceMetadata
Gets the metadata for the resource.- Specified by:
getResourceMetadatain interfaceOsidRuleApplicatorForm- Returns:
- metadata for the resource
-
setResourceMetadata
Sets the resource metadata.- Parameters:
metadata- the resource metadata- Throws:
NullArgumentException-metadataisnull
-
setResource
Sets the resource.- Specified by:
setResourcein interfaceOsidRuleApplicatorForm- Parameters:
resourceId- the new resource- Throws:
InvalidArgumentException-resourceIdis invalidNoAccessException-Metadata.isReadOnly()istrueNullArgumentException-resourceIdisnull
-
clearResource
Clears the resource.- Specified by:
clearResourcein interfaceOsidRuleApplicatorForm- Throws:
NoAccessException-Metadata.isRequired()orMetadata.isReadOnly()istrue
-
isResourceSet
protected boolean isResourceSet()Tests if the resource has been set in this form.- Returns:
trueif the resource has been set,falseotherwise
-
isResourceCleared
protected boolean isResourceCleared()Tests if the resource has been cleared in this form.- Returns:
trueif the resource has been cleared,falseotherwise
-
getResourceId
Returns the current resource value.- Returns:
- the resource Id or
nullifisResourceSet()isfalse
-