public interface Resource extends OsidObject
A Resource represents an arbitrary entity. Resources are
used to define an object to accompany an OSID Id used in
other OSIDs. A resource may be used to represent a meeting room in the
Scheduling OSID, or a student in the Course OSID.
A Resource may also represent a group or organization.
A provider may present such a group in an opaque manner through a single
resource definition, or the provider may expose the resource collection
for examination or manipulation. If such a resource collection is visible,
isGroup() is true and can be used in one of
the group sessions available in this OSID.
| Modifier and Type | Method and Description |
|---|---|
Asset |
getAvatar()
Gets the asset.
|
Id |
getAvatarId()
Gets the asset
Id. |
ResourceRecord |
getResourceRecord(Type resourceRecordType)
Gets the resource record corresponding to the given
Resource
record Type. |
boolean |
hasAvatar()
Tests if this resource has an avatar.
|
boolean |
isDemographic()
Tests if this resource is a demographic.
|
boolean |
isGroup()
Tests if this resource is a group.
|
getDescription, getDisplayName, getGenusType, isOfGenusTypegetId, isCurrentgetRecordTypes, hasRecordTypegetProperties, getPropertiesByRecordTypeboolean isGroup()
true if this resource is a group, false
otherwisemandatory - This method must be implemented. boolean isDemographic()
true if this resource is a demographic,
false otherwisemandatory - This method must be implemented. boolean hasAvatar()
true if this resource has an avatar,
false otherwisemandatory - This method must be implemented. Id getAvatarId()
Id. Id IllegalStateException - hasAvatar() is
false mandatory - This method must be implemented. Asset getAvatar() throws OperationFailedException
IllegalStateException - hasAvatar() is
false OperationFailedException - unable to complete requestmandatory - This method must be implemented. ResourceRecord getResourceRecord(Type resourceRecordType) throws OperationFailedException
Resource
record Type. This method is used to retrieve an
object implementing the requested record. The
resourceRecordType may be the Type returned in
getRecordTypes() or any of its parents in a Type
hierarchy where hasRecordType(resourceRecordType)
is true .resourceRecordType - the resource record typeNullArgumentException - resourceRecordType
is null OperationFailedException - unable to complete requestUnsupportedException -
hasRecordType(resourceRecordType) is false
mandatory - This method must be implemented.