OSID Logo
OSID Specifications
type package
Version 3.0.0
Release Candidate Preview
Interfaceosid.type.TypeLookupSession
Implementsosid.OsidSession
Description

This session retrieves Types. A single Type can be retrieved using getType() and all types known to this service can be accessed via getTypes() .

MethodcanLookupTypes
Description

Tests if this user can perform Type lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetType
Description

Gets a Type by its string representation which is a combination of the authority and identifier. This method only returns the Type if it is known by the given identification components.

Parametersstringnamespacethe identifier namespace
stringidentifierthe identifier
stringauthoritythe authority
Returnosid.type.Typethe Type
ErrorsNOT_FOUNDthe type is not found
NULL_ARGUMENT null argument provided
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodhasType
Description

Tests if the given Type is known.

Parametersosid.type.Typetypethe Type to look for
Returnboolean true if the given Type is known, false otherwise
ErrorsNULL_ARGUMENT type is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetTypesByDomain
Description

Gets all the known Types by domain.

Parametersstringdomainthe domain
Returnosid.type.TypeListthe list of Types with the given domain
ErrorsNULL_ARGUMENT domain is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetTypesByAuthority
Description

Gets all the known Types by authority.

Parametersstringauthoritythe authority
Returnosid.type.TypeListthe list of Types with the given authority
ErrorsNULL_ARGUMENT authority is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDrespect my authoritay
CompliancemandatoryThis method must be implemented.
MethodgetTypesByDomainAndAuthority
Description

Gets all the known Types by domain and authority.

Parametersstringdomainthe domain
stringauthoritythe authority
Returnosid.type.TypeListthe list of Types with the given domain and authority
ErrorsNULL_ARGUMENT domain or authority is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetTypes
Description

Gets all the known Types.

Returnosid.type.TypeListthe list of all known Types
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisEquivalent
Description

Tests if the given types are equivalent.

Parametersosid.type.Typetypea type
osid.type.TypeequivalentTypeanother type
Returnboolean true if both types are equivalent, false otherwise
ErrorsNULL_ARGUMENT type is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodimpliesSupport
Description

Tests if the given type is implies support of a base type.

Parametersosid.type.Typetypea type
osid.type.TypebaseTypeanother type
Returnboolean true if baseType if supported by type, false otherwise
ErrorsNULL_ARGUMENT type or baseType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodhasBaseType
Description

Tests if the given type is derived from a base type.

Parametersosid.type.Typetypea type
Returnboolean true is the given type is derived from a base type, false otherwise
ErrorsNULL_ARGUMENT type is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetBaseTypes
Description

Gets the immediate base types of this type.

Parametersosid.type.Typetypea type
Returnosid.type.TypeListthe base types
ErrorsNULL_ARGUMENT type is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRelationTypes
Description

Gets all known relation Types. A relation Types relates two Types.

Returnosid.type.TypeListknown relation types
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetSourceTypesByRelationType
Description

Gets all source Types related by the given type.

Parametersosid.type.TyperelationTypea relation type
Returnosid.type.TypeListthe source types
ErrorsNULL_ARGUMENT relationType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetDestinationTypesBySource
Description

Gets all destination Types related to the given source Type.

Parametersosid.type.TypesourceTypea source type
Returnosid.type.TypeListthe related types
ErrorsNULL_ARGUMENT sourceType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetDestinationTypesBySourceAndRelationType
Description

Gets all destination Types related to the given source Type and relation Type.

Parametersosid.type.TypesourceTypea source type
osid.type.TyperelationTypea relation type
Returnosid.type.TypeListthe related types
ErrorsNULL_ARGUMENT sourceType or relationType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetDestinationTypesByRelationType
Description

Gets all destination Types related by the given type.

Parametersosid.type.TyperelationTypea relation type
Returnosid.type.TypeListthe destination types
ErrorsNULL_ARGUMENT relationType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetSourceTypesByDestination
Description

Gets all source Types related to the given destination Type.

Parametersosid.type.TypedestinationTypea destination type
Returnosid.type.TypeListthe source types
ErrorsNULL_ARGUMENT destinationType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetSourceTypesByDestinationAndRelationType
Description

Gets all source Types related to the given destination Type and relation Type.

Parametersosid.type.TypedestinationTypea destination type
osid.type.TyperelationTypea relation type
Returnosid.type.TypeListthe related types
ErrorsNULL_ARGUMENT destinationType or relationType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.