OSID Logo
OSID Specifications
billing package
Version 3.0.0
Interfaceosid.billing.ItemBusinessAssignmentSession
Implementsosid.OsidSession
Used Byosid.billing.BillingManager
osid.billing.BillingProxyManager
Description

This session provides methods to re-assign Items to Businesses . An Item may appear in multiple Businesses and removing the last reference to an Item is the equivalent of deleting it. Each Business may have its own authorizations governing who is allowed to operate on it.

Adding a reference of an Item to another Business is not a copy operation (eg: does not change its Id ).

MethodcanAssignItems
Description

Tests if this user can alter item/business mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Returnbooleanfalse if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignItemToBusiness
Description

Tests if this user can alter item/business mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 to unauthorized users.

Parametersosid.id.IdbusinessIdthe Id of the Business
Returnbooleanfalse if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENTbusinessId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableBusinessIds
Description

Gets a list of businesses including and under the given business node in which any item can be assigned.

Parametersosid.id.IdbusinessIdthe Id of the Business
Returnosid.id.IdListlist of assignable business Ids
ErrorsNULL_ARGUMENTbusinessId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableBusinessIdsForItem
Description

Gets a list of businesses including and under the given business node in which a specific item can be assigned.

Parametersosid.id.IdbusinessIdthe Id of the Business
osid.id.IditemIdthe Id of the Item
Returnosid.id.IdListlist of assignable business Ids
ErrorsNULL_ARGUMENTbusinessId or itemId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignItemToBusiness
Description

Adds an existing Item to a Business .

Parametersosid.id.IditemIdthe Id of the Item
osid.id.IdbusinessIdthe Id of the Business
ErrorsALREADY_EXISTSitemId is already assigned to businessId
NOT_FOUNDitemId or businessId not found
NULL_ARGUMENTitemId or businessId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignItemFromBusiness
Description

Removes an Item from a Business .

Parametersosid.id.IditemIdthe Id of the Item
osid.id.IdbusinessIdthe Id of the Business
ErrorsNOT_FOUNDitemId or businessId not found or itemId not assigned to businessId
NULL_ARGUMENTitemId or businessId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignItemToBusiness
Description

Moves an Item from one Business to another. Mappings to other Businesses are unaffected.

Parametersosid.id.IditemIdthe Id of the Item
osid.id.IdfromBusinessIdthe Id of the current Business
osid.id.IdtoBusinessIdthe Id of the destination Business
ErrorsALREADY_EXISTSitemId already assigned to toBusinessId
NOT_FOUNDitemId, fromBusinessId , or toBusinessId not found or itemId not mapped to fromBusinessId
NULL_ARGUMENTitemId, fromBusinessId , or toBusinessId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.