Interface ContactEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ContactEnablerAdminSession extends OsidSession

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

  • Method Details

    • getAddressBookId

      Id getAddressBookId()
      Gets the AddressBook Id associated with this session.
      Returns:
      the AddressBook Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getAddressBook

      Gets the AddressBook associated with this session.
      Returns:
      the address book
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canCreateContactEnabler

      boolean canCreateContactEnabler()
      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.
      Returns:
      false if ContactEnabler creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateContactEnablerWithRecordTypes

      boolean canCreateContactEnablerWithRecordTypes(Type[] contactEnablerRecordTypes)
      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.
      Parameters:
      contactEnablerRecordTypes - array of contact enabler record types
      Returns:
      true if ContactEnabler creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - contactEnablerRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getContactEnablerFormForCreate

      ContactEnablerForm getContactEnablerFormForCreate(Type[] contactEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the contact enabler form for creating new contact enablers. A new form should be requested for each create transaction.
      Parameters:
      contactEnablerRecordTypes - array of contact enabler record types
      Returns:
      the contact enabler form
      Throws:
      NullArgumentException - contactEnablerRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createContactEnabler

      ContactEnabler createContactEnabler(ContactEnablerForm contactEnablerForm) throws OperationFailedException, PermissionDeniedException
      Creates a new ContactEnabler.
      Parameters:
      contactEnablerForm - the form for this ContactEnabler
      Returns:
      the new ContactEnabler
      Throws:
      IllegalStateException - contactEnablerForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - contactEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - contactEnablerForm did not originate from getContactEnablerFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateContactEnablers

      boolean canUpdateContactEnablers()
      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.
      Returns:
      false if ContactEnabler modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getContactEnablerFormForUpdate

      ContactEnablerForm getContactEnablerFormForUpdate(Id contactEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the contact enabler form for updating an existing contact enabler. A new contact enabler form should be requested for each update transaction.
      Parameters:
      contactEnablerId - the Id of the ContactEnabler
      Returns:
      the contact enabler form
      Throws:
      NotFoundException - contactEnablerId is not found
      NullArgumentException - contactEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateContactEnabler

      void updateContactEnabler(ContactEnablerForm contactEnablerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing contact enabler.
      Parameters:
      contactEnablerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - contactEnablerForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - contactEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - contactEnablerForm did not originate from getContactEnablerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteContactEnablers

      boolean canDeleteContactEnablers()
      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.
      Returns:
      false if ContactEnabler deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteContactEnabler

      void deleteContactEnabler(Id contactEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes a ContactEnabler.
      Parameters:
      contactEnablerId - the Id of the ContactEnabler to remove
      Throws:
      NotFoundException - contactEnablerId not found
      NullArgumentException - contactEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageContactEnablerAliases

      boolean canManageContactEnablerAliases()
      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.
      Returns:
      false if ContactEnabler aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasContactEnabler

      void aliasContactEnabler(Id contactEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      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.
      Parameters:
      contactEnablerId - the Id of a ContactEnabler
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - contactEnablerId not found
      NullArgumentException - contactEnablerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.