public interface ContactEnablerAdminSession extends OsidSession
This session creates and removes contact enablers. The data for create
and update is provided via the ContactEnablerForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasContactEnabler(Id contactEnablerId,
Id aliasId)
Adds an
Id to a ContactEnabler for the
purpose of creating compatibility. |
boolean |
canCreateContactEnabler()
Tests if this user can create contact enablers.
|
boolean |
canCreateContactEnablerWithRecordTypes(Type[] contactEnablerRecordTypes)
Tests if this user can create a single
ContactEnabler
using the desired record types. |
boolean |
canDeleteContactEnablers()
Tests if this user can delete contact enablers.
|
boolean |
canManageContactEnablerAliases()
Tests if this user can manage
Id aliases for contact
enablers. |
boolean |
canUpdateContactEnablers()
Tests if this user can update contact enablers.
|
ContactEnabler |
createContactEnabler(ContactEnablerForm contactEnablerForm)
Creates a new
ContactEnabler. |
void |
deleteContactEnabler(Id contactEnablerId)
Deletes a
ContactEnabler. |
AddressBook |
getAddressBook()
Gets the
AddressBook associated with this session. |
Id |
getAddressBookId()
Gets the
AddressBook Id associated with
this session. |
ContactEnablerForm |
getContactEnablerFormForCreate(Type[] contactEnablerRecordTypes)
Gets the contact enabler form for creating new contact enablers.
|
ContactEnablerForm |
getContactEnablerFormForUpdate(Id contactEnablerId)
Gets the contact enabler form for updating an existing contact
enabler.
|
void |
updateContactEnabler(ContactEnablerForm contactEnablerForm)
Updates an existing contact enabler.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAddressBookId()
AddressBook
Id
associated with
this session. AddressBook Id
associated with this sessionmandatory
- This method must be implemented. AddressBook getAddressBook() throws OperationFailedException, PermissionDeniedException
AddressBook
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateContactEnabler()
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. false
if ContactEnabler
creation
is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateContactEnablerWithRecordTypes(Type[] contactEnablerRecordTypes)
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.contactEnablerRecordTypes
- array of contact enabler record
types true
if ContactEnabler
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
-
contactEnablerRecordTypes
is null
mandatory
- This method must be implemented. ContactEnablerForm getContactEnablerFormForCreate(Type[] contactEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
contactEnablerRecordTypes
- array of contact enabler record
typesNullArgumentException
-
contactEnablerRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. ContactEnabler createContactEnabler(ContactEnablerForm contactEnablerForm) throws OperationFailedException, PermissionDeniedException
ContactEnabler.
contactEnablerForm
- the form for this ContactEnabler
ContactEnabler
IllegalStateException
- contactEnablerForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- contactEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- contactEnablerForm
did not originate from
getContactEnablerFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateContactEnablers()
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. false
if ContactEnabler
modification is not authorized, true
otherwisemandatory
- This method must be implemented. ContactEnablerForm getContactEnablerFormForUpdate(Id contactEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
contactEnablerId
- the Id
of the
ContactEnabler
NotFoundException
- contactEnablerId
is
not foundNullArgumentException
- contactEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateContactEnabler(ContactEnablerForm contactEnablerForm) throws OperationFailedException, PermissionDeniedException
contactEnablerForm
- the form containing the elements to be
updatedIllegalStateException
- contactEnablerForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- contactEnablerForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- contactEnablerForm
did not originate from
getContactEnablerFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteContactEnablers()
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. false
if ContactEnabler
deletion
is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteContactEnabler(Id contactEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ContactEnabler.
contactEnablerId
- the Id
of the
ContactEnabler
to removeNotFoundException
- contactEnablerId
not
foundNullArgumentException
- contactEnablerId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageContactEnablerAliases()
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. false
if ContactEnabler
aliasing
is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasContactEnabler(Id contactEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
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.
contactEnablerId
- the Id
of a
ContactEnabler
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- contactEnablerId
not
foundNullArgumentException
- contactEnablerId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.