OSID Logo
OSID Specifications
contact package
Version 3.0.0
Interfaceosid.contact.AddressAddressBookAssignmentSession
Implementsosid.OsidSession
Used Byosid.contact.ContactManager
osid.contact.ContactProxyManager
Description

This session provides methods to re-assign Addresses to AddressBooks . An Address may map to multiple AddressBooks and removing the last reference to an Address is the equivalent of deleting it. Each AddressBook may have its own authorizations governing who is allowed to operate on it.

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

MethodcanAssignAddresses
Description

Tests if this user can alter address/address book 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.
MethodcanAssignAddressesToAddressBook
Description

Tests if this user can alter address/address book 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.

Parametersosid.id.IdaddressBookIdthe Id of the AddressBook
Returnbooleanfalse if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENTaddressBookId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableAddressBookIds
Description

Gets a list of address books including and under the given address book node in which any address can be assigned.

Parametersosid.id.IdaddressBookIdthe Id of the AddressBook
Returnosid.id.IdListlist of assignable address book Ids
ErrorsNULL_ARGUMENTaddressBookId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableAddressBookIdsForAddress
Description

Gets a list of address books including and under the given address book node in which a specific address can be assigned.

Parametersosid.id.IdaddressBookIdthe Id of the AddressBook
osid.id.IdaddressIdthe Id of the Address
Returnosid.id.IdListlist of assignable address book Ids
ErrorsNULL_ARGUMENTaddressBookId or addressId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignAddressToAddressBook
Description

Adds an existing Address to an AddressBook .

Parametersosid.id.IdaddressIdthe Id of the Address
osid.id.IdaddressBookIdthe Id of the AddressBook
ErrorsALREADY_EXISTSaddressId is already assigned to addressBookId
NOT_FOUNDaddressId or addressBookId not found
NULL_ARGUMENTaddressId or addressBookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignAddressFromAddressBook
Description

Removes an Address from an AddressBook .

Parametersosid.id.IdaddressIdthe Id of the Address
osid.id.IdaddressBookIdthe Id of the AddressBook
ErrorsNOT_FOUNDaddressId or addressBookId not found or addressId not assigned to addressBookId
NULL_ARGUMENTaddressId or addressBookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignAddressToAddressBook
Description

Moves an Address from one AddressBook to another. Mappings to other AddressBooks are unaffected.

Parametersosid.id.IdaddressIdthe Id of the Address
osid.id.IdfromAddressBookIdthe Id of the current AddressBook
osid.id.IdtoAddressBookIdthe Id of the destination AddressBook
ErrorsALREADY_EXISTSaddressId already assigned to toAddressBookId
NOT_FOUNDaddressId, fromAddressBookId , or toAddressBookId not found or addressId not mapped to fromAddressBookId
NULL_ARGUMENTaddressId, fromAddressBookId , or toAddressBookId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.