OSID Logo
OSID Specifications
contact rules package
Version 3.0.0
Release Candidate Preview
Interfaceosid.contact.rules.ContactEnablerAdminSession
Implementsosid.OsidSession
Description

This session creates and removes contact enablers. The data for create and update is provided via the ContactEnablerForm.

MethodgetAddressBookId
Description

Gets the AddressBook Id associated with this session.

Returnosid.id.Idthe AddressBook Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetAddressBook
Description

Gets the AddressBook associated with this session.

Returnosid.contact.AddressBookthe address book
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateContactEnabler
Description

Tests if this user can create contact enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a ContactEnabler 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 ContactEnabler creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateContactEnablerWithRecordTypes
Description

Tests if this user can create a single ContactEnabler using the desired record types. While ContactRulesManager.getContactEnablerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific ContactEnabler. Providing an empty array tests if a ContactEnabler can be created with no records.

Parametersosid.type.Type[]contactEnablerRecordTypesarray of contact enabler record types
Returnboolean true if ContactEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT contactEnablerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetContactEnablerFormForCreate
Description

Gets the contact enabler form for creating new contact enablers. A new form should be requested for each create transaction.

Parametersosid.type.Type[]contactEnablerRecordTypesarray of contact enabler record types
Returnosid.contact.rules.ContactEnablerFormthe contact enabler form
ErrorsNULL_ARGUMENT contactEnablerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateContactEnabler
Description

Creates a new ContactEnabler.

Parametersosid.contact.rules.ContactEnablerFormcontactEnablerFormthe form for this ContactEnabler
Returnosid.contact.rules.ContactEnablerthe new ContactEnabler
ErrorsILLEGAL_STATE contactEnablerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT contactEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED contactEnablerForm did not originate from getContactEnablerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateContactEnablers
Description

Tests if this user can update contact enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a ContactEnabler 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 ContactEnabler modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetContactEnablerFormForUpdate
Description

Gets the contact enabler form for updating an existing contact enabler. A new contact enabler form should be requested for each update transaction.

Parametersosid.id.IdcontactEnablerIdthe Id of the ContactEnabler
Returnosid.contact.rules.ContactEnablerFormthe contact enabler form
ErrorsNOT_FOUND contactEnablerId is not found
NULL_ARGUMENT contactEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateContactEnabler
Description

Updates an existing contact enabler.

Parametersosid.contact.rules.ContactEnablerFormcontactEnablerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE contactEnablerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT contactEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED contactEnablerForm did not originate from getContactEnablerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteContactEnablers
Description

Tests if this user can delete contact enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a ContactEnabler 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 ContactEnabler deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteContactEnabler
Description

Deletes a ContactEnabler.

Parametersosid.id.IdcontactEnablerIdthe Id of the ContactEnabler to remove
ErrorsNOT_FOUND contactEnablerId not found
NULL_ARGUMENT contactEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageContactEnablerAliases
Description

Tests if this user can manage Id aliases for contact enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if ContactEnabler aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasContactEnabler
Description

Adds an Id to a ContactEnabler for the purpose of creating compatibility. The primary Id of the ContactEnabler is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another contact enabler. it is reassigned to the given contact enabler Id.

Parametersosid.id.IdcontactEnablerIdthe Id of a ContactEnabler
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND contactEnablerId not found
NULL_ARGUMENT contactEnablerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.