Interface Resource
- All Superinterfaces:
Browsable, Extensible, Identifiable, 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.
-
Method Summary
Modifier and TypeMethodDescriptionGets the asset.Gets the assetId.getResourceRecord(Type resourceRecordType) Gets the resource record corresponding to the givenResourcerecordType.This method is used to retrieve an object implementing the requested record.booleanTests if this resource has an avatar.booleanTests if this resource is a demographic.booleanisGroup()Tests if this resource is a group.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.
-
Method Details
-
isGroup
boolean isGroup()Tests if this resource is a group. A resource that is a group can be used in the group sessions.- Returns:
trueif this resource is a group,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
isDemographic
boolean isDemographic()Tests if this resource is a demographic. A resource that is a demographic can be used in the demographic service and the group sessions.- Returns:
trueif this resource is a demographic,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
hasAvatar
boolean hasAvatar()Tests if this resource has an avatar.- Returns:
trueif this resource has an avatar,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getAvatarId
Id getAvatarId()Gets the assetId.- Returns:
- the asset
Id - Throws:
IllegalStateException-hasAvatar()isfalse- Compliance:
mandatory- This method must be implemented.
-
getAvatar
Gets the asset.- Returns:
- the asset
- Throws:
IllegalStateException-hasAvatar()isfalseOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getResourceRecord
Gets the resource record corresponding to the givenResourcerecordType.This method is used to retrieve an object implementing the requested record. TheresourceRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(resourceRecordType)istrue.- Parameters:
resourceRecordType- the resource record type- Returns:
- the resource record
- Throws:
NullArgumentException-resourceRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(resourceRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-