Interface FrontOfficeAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
All Known Subinterfaces:
FrontOfficeBatchAdminSession

public interface FrontOfficeAdminSession extends OsidSession

This session creates, updates, and deletes FrontOffices . The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a FrontOffice , a FrontOfficeForm is requested using getFrontOfficeFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned FrontOfficeForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the FrontOfficeForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each FrontOfficeForm corresponds to an attempted transaction.

For updates, FrontOfficeForms are requested to the FrontOffice Id that is to be updated using getFrontOfficeFormForUpdate() . Similarly, the FrontOfficeForm has metadata about the data that can be updated and it can perform validation before submitting the update. The FrontOfficeForm can only be used once for a successful update and cannot be reused.

The delete operations delete FrontOffices .

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

  • Method Details

    • canCreateFrontOffices

      boolean canCreateFrontOffices()
      Tests if this user can create FrontOffices . A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a FrontOffice . will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
      Returns:
      false if FrontOffice creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateFrontOfficeWithRecordTypes

      boolean canCreateFrontOfficeWithRecordTypes(Type[] frontOfficeRecordTypes)
      Tests if this user can create a single FrontOffice using the desired record types. While TrackingManager.getFrontOfficeRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific FrontOffice . Providing an empty array tests if a FrontOffice can be created with no records.
      Parameters:
      frontOfficeRecordTypes - array of front office record types
      Returns:
      true if FrontOffice creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - frontOfficeRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getFrontOfficeFormForCreate

      FrontOfficeForm getFrontOfficeFormForCreate(Type[] frontOfficeRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the front office form for creating new frontOffices. A new form should be requested for each create transaction.
      Parameters:
      frontOfficeRecordTypes - array of front office record types
      Returns:
      the front office form
      Throws:
      NullArgumentException - frontOfficeRecordTypes 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.
    • createFrontOffice

      Creates a new FrontOffice .
      Parameters:
      frontOfficeForm - the form for this FrontOffice
      Returns:
      the new FrontOffice
      Throws:
      IllegalStateException - frontOfficeForm already use din a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - frontOfficeForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - frontOfficeForm did not originate from getFrontOfficeFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateFrontOffices

      boolean canUpdateFrontOffices()
      Tests if this user can update FrontOffices . A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a FrontOffice will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
      Returns:
      false if FrontOffice modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getFrontOfficeFormForUpdate

      FrontOfficeForm getFrontOfficeFormForUpdate(Id frontOfficeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the front office form for updating an existing front office. A new front office form should be requested for each update transaction.
      Parameters:
      frontOfficeId - the Id of the FrontOffice
      Returns:
      the front office form
      Throws:
      NotFoundException - frontOfficeId is not found
      NullArgumentException - frontOfficeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateFrontOffice

      void updateFrontOffice(FrontOfficeForm frontOfficeForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing front office
      Parameters:
      frontOfficeForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - frontOfficeForm already use din an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - frontOfficeId or frontOfficeForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - frontOfficeForm did not originate from getFrontOfficeFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteFrontOffices

      boolean canDeleteFrontOffices()
      Tests if this user can delete FrontOffices . A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a FrontOffice will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
      Returns:
      false if FrontOffice deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteFrontOffice

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

      boolean canManageFrontOfficeAliases()
      Tests if this user can manage Id aliases for FrontOffices . 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 FrontOffice aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasFrontOffice

      void aliasFrontOffice(Id frontOfficeId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to a FrontOffice for the purpose of creating compatibility. The primary Id of the FrontOffice is determined by the provider. The new Id performs as an alias to the primary Id .
      Parameters:
      frontOfficeId - the Id of a FrontOffice
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - frontOfficeId not found
      NullArgumentException - frontOfficeId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.