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

This session is used to create, update and delete Types in the registry.

MethodcanCreateTypes
Description

Tests if this user can create Types. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Type will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Type creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetTypeFormForCreate
Description

Gets the type form for creating new types. A new form should be requested for each create transaction.

Parametersosid.type.Typetypethe Type to be created
Returnosid.type.TypeFormthe type form
ErrorsNULL_ARGUMENT type is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcreateType
Description

Creates a new Type.

Parametersosid.type.TypeFormtypeFormthe type form
Returnosid.type.Typethe created Type
ErrorsILLEGAL_STATE typeForm already used in a create transaction
INVALID_ARGUMENTone or more of the arguments is invalid
NULL_ARGUMENT typeForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED typeForm did not originate from getTypeFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateTypes
Description

Tests if this user can update types. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Type will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if type modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetTypeFormForUpdate
Description

Gets the type form for creating new types. A new form should be requested for each create transaction.

Parametersosid.type.Typetypethe Type to be updated
Returnosid.type.TypeFormthe type form
ErrorsNOT_FOUND type not found
NULL_ARGUMENT type is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateType
Description

Updates a type.

Parametersosid.type.TypeFormtypeFormthe type form
ErrorsILLEGAL_STATE typeForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT typeForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED typeForm did not originate from getTypeFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteTypes
Description

Tests if this user can delete Types from this ItemBank. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Type will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Item deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanDeleteType
Description

Tests if this user can delete the specified type. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleteing the Type will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Parametersosid.type.Typetypethe Type to be deleted
Returnboolean false if type deletion is not authorized, true otherwise
ErrorsNULL_ARGUMENT type is null
CompliancemandatoryThis method must be implemented.
MethoddeleteType
Description

Removes a Type.

Parametersosid.type.Typetypethe Type to remove
ErrorsNOT_FOUND type is not found
NULL_ARGUMENT type is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodmakeEquivalent
Description

Makes two Types equivalent. Calls to TypeLookupSession.getType(equivalentType) return the primaryType.

Parametersosid.type.TypeprimaryTypethe primary Type
osid.type.TypeequivalentTypea Type to be made equivalent
ErrorsNOT_FOUND primaryType or equivalentType is not found
NULL_ARGUMENT primaryType or equivalentType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaddBaseType
Description

Adds a base type to a type. A base type is a parent of the type where the type implies support of the base type.

Parametersosid.type.Typetypea Type
osid.type.TypebaseTypea base type
ErrorsNOT_FOUND type or baseType is not found
NULL_ARGUMENT type or baseType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveBaseType
Description

Removes a base type from a type.

Parametersosid.type.Typetypea Type
osid.type.TypebaseTypea base type
ErrorsNOT_FOUND type or baseType is not found or baseType is not a base of type
NULL_ARGUMENT type or baseType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodaddTypeRelation
Description

Adds a relation between two types. The relationship is a Type in itself.

Parametersosid.type.TypesourceTypethe source type
osid.type.TypedestinationTypethe destination type
osid.type.TyperelationTypethe relation type
ErrorsNOT_FOUND sourceType, destinationType, or relationType is not found
NULL_ARGUMENT sourceType, destinationType, or relationType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveTypeRelation
Description

Renoves a relation between two types.

Parametersosid.type.TypesourceTypethe source type
osid.type.TypedestinationTypethe destination type
osid.type.TyperelationTypethe relation type
ErrorsNOT_FOUND sourceType, destinationType, or relationType is not found, or the relationship does not exist
NULL_ARGUMENT sourceType, destinationType, or relationType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.