Interface BaseOps

All Known Implementing Classes:
PCMBaseOps

public interface BaseOps
Abstraction of basic BRM operations. This may be implemented to interface with BRM or as a pseudo-implementation that interfaces with a set of files on disk.

This encapsulation of the basic operations can be passed to the various resource modules (AccountModule, BillingModule) which can then be coded to interact with BRM through this interface. These modules won't know (or care) if they're actually going all the way to BRM or being backed by a series of files instead.
  • Method Details

    • opcode

      FList opcode(int opcodeNum, FList inp) throws EBufException
      Handles opcode processing.
      Parameters:
      opcodeNum - opcode num for opcode
      inp - inp for opcode
      Returns:
      the result of opcode
      Throws:
      EBufException - if the BRM operation fails
    • opcode

      FList opcode(int opcodeNum, int flag, FList inp) throws EBufException
      Handles opcode processing.
      Parameters:
      opcodeNum - opcode num for opcode
      flag - flag for opcode
      inp - inp for opcode
      Returns:
      the result of opcode
      Throws:
      EBufException - if the BRM operation fails
    • getCurrentDB

      long getCurrentDB()
      Returns the current db.
      Returns:
      current db
    • getUserAccountID

      Poid getUserAccountID()
      Returns the account poid associated with the PCM connection
      Returns:
      account Poid
    • readObject

      FList readObject(Poid poid) throws EBufException
      Handles read object processing.
      Parameters:
      poid - POID for read object
      Returns:
      the result of read object
      Throws:
      EBufException - if the BRM operation fails
    • readObject

      FList readObject(String restId, String type) throws EBufException
      Handles read object processing.
      Parameters:
      restId - rest identifier
      type - type for read object
      Returns:
      the result of read object
      Throws:
      EBufException - if the BRM operation fails
    • isCurrency

      boolean isCurrency(int resourceId)
      Indicates whether currency.
      Parameters:
      resourceId - resource identifier
      Returns:
      whether currency
    • getContext

      PortalContext getContext()
      Get a PortalContext object for performing operations on BRM
      Returns:
      Stored instance of PortalContext for connecting to BRM
    • setContext

      void setContext(PortalContext ctx)
      Store PortalContext object which can be used for connecting to BRM
      Parameters:
      ctx - instance of PortalContext
    • transactionOpen

      void transactionOpen(int flags) throws EBufException
      Opens a new transaction on the current schema
      Parameters:
      flags - Transaction flag that defines the type of transaction to open
      Throws:
      EBufException - if required data cannot be read from or written to the FList
    • transactionOpen

      void transactionOpen(long targetDb, int flags) throws EBufException
      Opens a new transaction on specific schema
      Parameters:
      targetDb - BRM Schema on which the transaction must be opened
      flags - Transaction flag that defines the type of transaction to open
      Throws:
      EBufException - if required data cannot be read from or written to the FList
    • transactionCommit

      void transactionCommit() throws EBufException
      Commits an open transaction
      Throws:
      EBufException - if required data cannot be read from or written to the FList
    • transactionAbort

      void transactionAbort() throws EBufException
      Aborts an open transaction
      Throws:
      EBufException - if required data cannot be read from or written to the FList
    • isTransactionOpen

      boolean isTransactionOpen()
      Informs the caller if there is any active transaction of this context
      Returns:
      true if the transaction is open, false otherwise
    • getUserContext

      UserContext getUserContext()
      Returns the user context.
      Returns:
      user context
    • setUserContext

      void setUserContext(UserContext userCtx)
      Sets the user context.
      Parameters:
      userCtx - user ctx for set user context