Interface ResourceForm

All Superinterfaces:
Extensible, Identifiable, OsidBrowsableForm, OsidExtensibleForm, OsidForm, OsidIdentifiableForm, OsidObjectForm, Suppliable
All Known Subinterfaces:
ResourceBatchForm

public interface ResourceForm extends OsidObjectForm

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.

  • Method Details

    • getGroupMetadata

      Metadata getGroupMetadata()
      Gets the metadata for a group.
      Returns:
      metadata for the group
      Compliance:
      mandatory - This method must be implemented.
    • setGroup

      void setGroup(boolean group)
      Sets the resource as a group.
      Parameters:
      group - true if this resource is a group, false otherwise
      Throws:
      InvalidArgumentException - group is invalid
      NoAccessException - Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • clearGroup

      void clearGroup()
      Clears the group designation.
      Throws:
      NoAccessException - Metadata.isRequired() or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getAvatarMetadata

      Metadata getAvatarMetadata()
      Gets the metadata for an asset.
      Returns:
      metadata for the asset
      Compliance:
      mandatory - This method must be implemented.
    • setAvatar

      void setAvatar(Id assetId)
      Sets the avatar asset.
      Parameters:
      assetId - an asset Id
      Throws:
      InvalidArgumentException - assetId is invalid
      NoAccessException - Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • clearAvatar

      void clearAvatar()
      Clears the asset.
      Throws:
      NoAccessException - Metadata.isRequired() or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getResourceFormRecord

      ResourceFormRecord getResourceFormRecord(Type resourceRecordType) throws OperationFailedException
      Gets the ResourceFormRecord corresponding to the given Resource record Type .
      Parameters:
      resourceRecordType - the resource record type
      Returns:
      the resource form record
      Throws:
      NullArgumentException - resourceRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(resourceRecordType) is false
      Compliance:
      mandatory - This method must be implemented.