Interface FiscalPeriodBusinessAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface FiscalPeriodBusinessAssignmentSession extends OsidSession

This session provides methods to re-assign FiscalPeriods to Businesses . A FiscalPeriod may appear in multiple Businesses and removing the last reference to a FiscalPeriod 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 FiscalPeriod to another Business is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignFiscalPeriods

      boolean canAssignFiscalPeriods()
      Tests if this user can alter fiscal period/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.
    • canAssignFiscalPeriodToBusiness

      boolean canAssignFiscalPeriodToBusiness(Id businessId)
      Tests if this user can alter fiscal period/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 fiscal period 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.
    • getAssignableBusinessIdsForFiscalPeriod

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

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

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

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