Interface | osid.OsidForm | ||
---|---|---|---|
Implements | osid.Identifiable | ||
osid.Suppliable | |||
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. 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 | ||
Return | osid.locale.Locale | the default locale | |
Compliance | mandatory | This method must be implemented. | |
Method | getLocales | ||
Description |
Gets a list of locales for available | ||
Return | osid.locale.LocaleList | a list of available locales or an empty list if no translation operations are available | |
Compliance | mandatory | This method must be implemented. | |
Method | setLocale | ||
Description |
Specifies a language and script type for If multiple locales are available for managing
translations, the | ||
Parameters | osid.type.Type | languageType | the language type |
osid.type.Type | scriptType | the script type | |
Errors | NULL_ARGUMENT | languageType or scriptType is null | |
UNSUPPORTED | languageType and scriptType not available
from getLocales() | ||
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 ths 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. |