OSID Logo
OSID Specifications
type package
Version 3.1.0
Interfaceosid.type.TypeAdminSession
Implementsosid.OsidSession
Used Byosid.type.TypeManager
osid.type.TypeProxyManager
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
Compliancemandatory This 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.Typetype the Type to be created
Returnosid.type.TypeForm the type form
ErrorsNULL_ARGUMENT type is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcreateType
Description

Creates a new Type.

Parametersosid.type.TypeFormtypeForm the type form
Returnosid.type.Type the created Type
ErrorsILLEGAL_STATE typeForm already used in a create transaction
INVALID_ARGUMENT one or more of the arguments is invalid
NULL_ARGUMENT typeForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED typeForm did not originate from getTypeFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.Typetype the Type to be updated
Returnosid.type.TypeForm the type form
ErrorsNOT_FOUND type not found
NULL_ARGUMENT type is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateType
Description

Updates a type.

Parametersosid.type.TypeFormtypeForm the type form
ErrorsILLEGAL_STATE typeForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT typeForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED typeForm did not originate from getTypeFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This 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.Typetype the Type to be deleted
Returnboolean false if type deletion is not authorized, true otherwise
ErrorsNULL_ARGUMENT type is null
Compliancemandatory This method must be implemented.
MethoddeleteType
Description

Removes a Type.

Parametersosid.type.Typetype the Type to remove
ErrorsNOT_FOUND type is not found
NULL_ARGUMENT type is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodmakeEquivalent
Description

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

Parametersosid.type.TypeprimaryType the primary Type
osid.type.TypeequivalentType a Type to be made equivalent
ErrorsNOT_FOUND primaryType or equivalentType is not found
NULL_ARGUMENT primaryType or equivalentType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.Typetype a Type
osid.type.TypebaseType a base type
ErrorsNOT_FOUND type or baseType is not found
NULL_ARGUMENT type or baseType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodremoveBaseType
Description

Removes a base type from a type.

Parametersosid.type.Typetype a Type
osid.type.TypebaseType a 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodaddTypeRelation
Description

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

Parametersosid.type.TypesourceType the source type
osid.type.TypedestinationType the destination type
osid.type.TyperelationType the relation type
ErrorsNOT_FOUND sourceType, destinationType, or relationType is not found
NULL_ARGUMENT sourceType, destinationType, or relationType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodremoveTypeRelation
Description

Renoves a relation between two types.

Parametersosid.type.TypesourceType the source type
osid.type.TypedestinationType the destination type
osid.type.TyperelationType the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.