| Interface | osid.OsidForm | ||
|---|---|---|---|
| Implements | osid.Identifiable | ||
osid.Suppliable | |||
| Implemented By | osid.OsidIdentifiableForm | ||
osid.OsidExtensibleForm | |||
osid.OsidBrowsableForm | |||
osid.OsidTemporalForm | |||
osid.OsidSubjugateableForm | |||
osid.OsidAggregateableForm | |||
osid.OsidContainableForm | |||
osid.OsidSourceableForm | |||
osid.OsidFederateableForm | |||
osid.OsidOperableForm | |||
osid.OsidCapsuleForm | |||
osid.id.batch.IdBatchForm | |||
osid.type.TypeForm | |||
osid.rules.RuleForm | |||
osid.id.IdForm | |||
| Description |
The The form may provide some feedback as to the validity of certain data updates before the update transaction is issued to the correspodning session but a successful modification of the form is not a guarantee of success for the update transaction. A consumer may elect to perform all updates within a single update transaction or break up a large update intio smaller units. The tradeoff is the granularity of error feedback vs. the performance gain of a single transaction. OsidForms are Identifiable. The
Id of the OsidForm is used to
uniquely identify the update or create transaction and not
that of the object being updated. Currently, it is not
necessary to have these Ids persisted.
As with all aspects of the OSIDs, nulls cannot be used. Methods to clear values are also defined in the form. A new ObjectForm form = session.getObjectFormForUpdate(objectId);
form.setDisplayName("new name");
ColorForm recordForm = form.getFormRecord(colorRecordType);
recordForm.setColor("green");
session.updateObject(objectId, form);
| ||
| Method | isForUpdate | ||
| Description |
Tests if this form is for an update operation. | ||
| Return | boolean | true if this form is for an update operation,
false if for a create operation | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getDefaultLocale | ||
| Description |
Gets a default locale for the form. | ||
| Return | osid.locale.Locale | the default locale | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getLocales | ||
| Description |
Gets the locales available for this form. | ||
| Return | osid.locale.LocaleList | list of available locales | |
| Compliance | mandatory | This method must be implemented. | |
| Method | setLocale | ||
| Description |
Specifies a language and script type for the form. | ||
| Parameters | osid.type.Type | languageType | the language type |
osid.type.Type | scriptType | the script type | |
| Errors | NULL_ARGUMENT | languageType or scriptType is null | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getJournalCommentMetadata | ||
| Description |
Gets the metadata for the comment corresponding to this form submission. The comment is used for describing the nature of the change to the corresponding object for the purposes of logging and auditing. | ||
| Return | osid.Metadata | metadata for the comment | |
| Compliance | mandatory | This method must be implemented. | |
| Method | setJournalComment | ||
| Description |
Sets a comment. | ||
| Parameters | string | comment | the new comment |
| Errors | INVALID_ARGUMENT | comment is invalid | |
| NO_ACCESS | Metadata.isReadonly() is true | ||
| NULL_ARGUMENT | comment is null | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | isValid | ||
| Description |
Tests if this form is in a valid state for submission. A form is valid if all required data has been supplied compliant with any constraints. | ||
| Return | boolean | false if there is a known error in this form,
true otherwise | |
| Errors | OPERATION_FAILED | attempt to perform validation failed | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getValidationMessages | ||
| Description |
Gets text messages corresponding to additional instructions to pass form validation. | ||
| Return | osid.locale.DisplayText[] | a list of messages | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getInvalidMetadata | ||
| Description |
Gets a list of metadata for the elements in this form which are not valid. | ||
| Return | osid.Metadata[] | invalid metadata | |
| Compliance | mandatory | This method must be implemented. | |