OSID Logo
OSID Specifications
resource package
Version 3.0.0
Release Candidate Preview
Interfaceosid.resource.ResourceForm
Implementsosid.OsidObjectForm
Description

This is the form for creating and updating Resources. Like all OsidForm objects, various data elements may be set here for use in the create and update methods in the ResourceAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.

Resources can be designated as a group. The group metadata indicates if it is possible to convert a resource to a group and vice-versa.

MethodgetGroupMetadata
Description

Gets the metadata for a group.

Returnosid.Metadatametadata for the group
CompliancemandatoryThis method must be implemented.
MethodsetGroup
Description

Sets the resource as a group.

Parametersbooleangroup true if this resource is a group, false otherwise
ErrorsINVALID_ARGUMENT group is invalid
NO_ACCESS Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodclearGroup
Description

Clears the group designation.

ErrorsNO_ACCESS Metadata.isRequired() or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetAvatarMetadata
Description

Gets the metadata for an asset.

Returnosid.Metadatametadata for the asset
CompliancemandatoryThis method must be implemented.
MethodsetAvatar
Description

Sets the avatar asset.

Parametersosid.id.IdassetIdan asset Id
ErrorsINVALID_ARGUMENT assetId is invalid
NO_ACCESS Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodclearAvatar
Description

Clears the asset.

ErrorsNO_ACCESS Metadata.isRequired() or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetResourceFormRecord
Description

Gets the ResourceFormRecord corresponding to the given Resource record Type.

Parametersosid.type.TyperesourceRecordTypethe resource record type
Returnosid.resource.records.ResourceFormRecordthe resource form record
ErrorsNULL_ARGUMENT resourceRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(resourceRecordType) is false
CompliancemandatoryThis method must be implemented.