Interface PayerBusinessAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PayerBusinessAssignmentSession extends OsidSession

This session provides methods to re-assign Payers to Businesses . A Payer may appear in multiple Business objects and removing the last reference to a Payer is the equivalent of deleting it. Each Business may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Payer to another Business is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignPayers

      boolean canAssignPayers()
      Tests if this user can alter payer/business 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.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignPayerToBusiness

      boolean canAssignPayerToBusiness(Id businessId)
      Tests if this user can alter payer/business 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 lookup operations to unauthorized users.
      Parameters:
      businessId - the Id of the Business
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - businessId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableBusinessIds

      IdList getAssignableBusinessIds(Id businessId) throws OperationFailedException
      Gets a list of businesses including and under the given business node in which any payer can be assigned.
      Parameters:
      businessId - the Id of the Business
      Returns:
      list of assignable business Ids
      Throws:
      NullArgumentException - businessId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableBusinessIdsForPayer

      IdList getAssignableBusinessIdsForPayer(Id businessId, Id payerId) throws OperationFailedException
      Gets a list of businesses including and under the given business node in which a specific payer can be assigned.
      Parameters:
      businessId - the Id of the Business
      payerId - the Id of the Payer
      Returns:
      list of assignable business Ids
      Throws:
      NullArgumentException - businessId or payerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignPayerToBusiness

      void assignPayerToBusiness(Id payerId, Id businessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Payer to a Business .
      Parameters:
      payerId - the Id of the Payer
      businessId - the Id of the Business
      Throws:
      AlreadyExistsException - payerId is already assigned to businessId
      NotFoundException - payerId or businessId not found
      NullArgumentException - payerId or businessId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignPayerFromBusiness

      void unassignPayerFromBusiness(Id payerId, Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Payer from a Business .
      Parameters:
      payerId - the Id of the Payer
      businessId - the Id of the Business
      Throws:
      NotFoundException - payerId or businessId not found or payerId not assigned to businessId
      NullArgumentException - payerId or businessId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignPayerToBusiness

      void reassignPayerToBusiness(Id payerId, Id fromBusinessId, Id toBusinessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Payer from one Business to another. Mappings to other Businesses are unaffected.
      Parameters:
      payerId - the Id of the Payer
      fromBusinessId - the Id of the current Business
      toBusinessId - the Id of the destination Business
      Throws:
      AlreadyExistsException - payerId already assigned to toBusinessId
      NotFoundException - payerId, fromBusinessId , or toBusinessId not found or payerId not mapped to fromBusinessId
      NullArgumentException - payerId, fromBusinessId , or toBusinessId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.