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.
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 Summary
Modifier and TypeMethodDescriptionGet a PortalContext object for performing operations on BRMlongReturns the current db.Returns the account poid associated with the PCM connectionReturns the user context.booleanisCurrency(int resourceId) Indicates whether currency.booleanInforms the caller if there is any active transaction of this contextHandles opcode processing.Handles opcode processing.readObject(Poid poid) Handles read object processing.readObject(String restId, String type) Handles read object processing.voidsetContext(PortalContext ctx) Store PortalContext object which can be used for connecting to BRMvoidsetUserContext(UserContext userCtx) Sets the user context.voidAborts an open transactionvoidCommits an open transactionvoidtransactionOpen(int flags) Opens a new transaction on the current schemavoidtransactionOpen(long targetDb, int flags) Opens a new transaction on specific schema
-
Method Details
-
opcode
Handles opcode processing.- Parameters:
opcodeNum- opcode num for opcodeinp- inp for opcode- Returns:
- the result of opcode
- Throws:
EBufException- if the BRM operation fails
-
opcode
Handles opcode processing.- Parameters:
opcodeNum- opcode num for opcodeflag- flag for opcodeinp- 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
Handles read object processing.- Parameters:
poid- POID for read object- Returns:
- the result of read object
- Throws:
EBufException- if the BRM operation fails
-
readObject
Handles read object processing.- Parameters:
restId- rest identifiertype- 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
Store PortalContext object which can be used for connecting to BRM- Parameters:
ctx- instance of PortalContext
-
transactionOpen
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
Opens a new transaction on specific schema- Parameters:
targetDb- BRM Schema on which the transaction must be openedflags- 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
Commits an open transaction- Throws:
EBufException- if required data cannot be read from or written to the FList
-
transactionAbort
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
Sets the user context.- Parameters:
userCtx- user ctx for set user context
-