Class AbstractOperableOsidObjectForm
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
- All Implemented Interfaces:
Extensible, Identifiable, OsidBrowsableForm, OsidExtensibleForm, OsidForm, OsidIdentifiableForm, OsidObjectForm, OsidOperableForm, Suppliable
- Direct Known Subclasses:
AbstractOsidRuleForm
public abstract class AbstractOperableOsidObjectForm
extends AbstractOsidObjectForm
implements OsidObjectForm, OsidOperableForm
A basic OsidOperableForm.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classDefines anOsidOperableForm.Nested classes/interfaces inherited from class AbstractOsidExtensibleForm
AbstractOsidExtensibleForm.ExtensibleModifier and TypeClassDescriptionprotected classDefines anExtensible. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOperableOsidObjectForm(Locale locale, boolean update) Constructs a newAbstractOperableOsidObjectForm. -
Method Summary
Modifier 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
-
AbstractOperableOsidObjectForm
Constructs a newAbstractOperableOsidObjectForm.- 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
-
getEnabledMetadata
Gets the metadata for the enabled.- Specified by:
getEnabledMetadatain interfaceOsidOperableForm- Returns:
- metadata for the enabled
-
setEnabledMetadata
Sets the enabled metadata.- Parameters:
metadata- the enabled metadata- Throws:
NullArgumentException-metadataisnull
-
getEnabledId
-
setEnabled
Sets the enabled flag.- Specified by:
setEnabledin interfaceOsidOperableForm- Parameters:
enabled- the new enabled flag- Throws:
InvalidArgumentException-enabledis invalidNoAccessException-Metadata.isReadonly()istrue
-
clearEnabled
Clears the enabled flag.- Specified by:
clearEnabledin interfaceOsidOperableForm- Throws:
NoAccessException-Metadata.isRequired()orMetadata.isReadOnly()istrue
-
isEnabledSet
protected boolean isEnabledSet()Tests if the enabled flag has been set in this form.- Returns:
trueif the enabled has been set,falseotherwise
-
isEnabledCleared
protected boolean isEnabledCleared()Tests if the enabled flag has been cleared in this form.- Returns:
trueif the enabled has been cleared,falseotherwise
-
getEnabled
protected boolean getEnabled()Returns the current enabled value.- Returns:
- the enabled value or
nullifisEnabledSet()isfalse
-
getDisabledMetadata
Gets the metadata for the disabled.- Specified by:
getDisabledMetadatain interfaceOsidOperableForm- Returns:
- metadata for the disabled
-
setDisabledMetadata
Sets the disabled metadata.- Parameters:
metadata- the disabled metadata- Throws:
NullArgumentException-metadataisnull
-
getDisabledId
-
setDisabled
Sets the disabled flag.- Specified by:
setDisabledin interfaceOsidOperableForm- Parameters:
disabled- the new disabled flag- Throws:
InvalidArgumentException-disabledis invalidNoAccessException-Metadata.isReadonly()istrue
-
clearDisabled
Clears the disabled flag.- Specified by:
clearDisabledin interfaceOsidOperableForm- Throws:
NoAccessException-Metadata.isRequired()orMetadata.isReadOnly()istrue
-
isDisabledSet
protected boolean isDisabledSet()Tests if the disabled flag has been set in this form.- Returns:
trueif the disabled has been set,falseotherwise
-
isDisabledCleared
protected boolean isDisabledCleared()Tests if the disabled flag has been cleared in this form.- Returns:
trueif the disabled has been cleared,falseotherwise
-
getDisabled
protected boolean getDisabled()Returns the current disabled value.- Returns:
- the disabled value or
nullifisDisabledSet()isfalse
-