Oracle Application Server Wireless Java API Reference
B14043-01


oracle.wireless.billing
Class BillingManager

java.lang.Object
  extended byoracle.wireless.billing.BillingManager


public class BillingManager
extends java.lang.Object

Billing manager provides the helper funtinalities to create and lookup service detail records


Constructor Summary
BillingManager()

Method Summary
ServiceDetailRecord createServiceDetailRecord(java.lang.String id, java.lang.String userName, java.lang.String serviceName, java.sql.Timestamp accessTime, java.lang.String componentName)
Creates the Service Detail Record Object with the given service detail values A passed sdr id is used for this transaction.
ServiceDetailRecord createServiceDetailRecord(java.lang.String userName, java.lang.String serviceName, java.sql.Timestamp accessTime, java.lang.String componentName)
Creates the Service Detail Record Object with the given service detail values A unique sdr id is generated for this transaction.
void deleteSDR(ServiceDetailRecord sdr)
void deleteSDRS(java.sql.Timestamp ts)
Delete the SDRs which access timestamp before the specifiec timestamp
static BillingManager getInstance()
ServiceDetailRecord getServiceDetailRecord(java.lang.String userName, java.lang.String serviceName, java.sql.Timestamp accessTime, java.lang.String id, java.lang.String externalBillingReferenceid, java.lang.String componentName)
Creates the Service Detail Record Object with the given service detail values This is used at lookup time or billing time when the reference id was already generated and available at the time of authorization.
ServiceDetailRecord[] getServiceDetailRecords(java.lang.String userInfo)
Returns the service detail records for the user
ServiceDetailRecord[] getServiceDetailRecordsAccessedBefore(java.sql.Timestamp accessTime)
Returns the service detail records for actions with "access time" before the specified time stamp
ServiceDetailRecord[] getServiceDetailRecordsByExtendedAttribute(java.lang.String attributeName, java.lang.String attributeValue)
Returns the service detail records for a given extended attribute name and value
ServiceDetailRecord[] getServiceDetailRecordsByServiceComponent(java.lang.String serviceName, java.lang.String componentName)
Returns the service detail records for the service and component
ServiceDetailRecord[] getServiceDetailRecordsByUserComponent(java.lang.String userInfo, java.lang.String componentName)
Returns the service detail records for the user and component
ServiceDetailRecord[] getServiceDetailRecordsForBillingReferenceId(java.lang.String billingRefId)
Returns the service detail records for the billing reference id
ServiceDetailRecord[] getServiceDetailRecordsForComponent(java.lang.String componentName)
Returns the service detail records for the component
ServiceDetailRecord[] getServiceDetailRecordsForService(java.lang.String serviceName)
Returns the service detail records for the service
java.util.ArrayList getServiceDetailRecordsForTransaction(java.lang.String transactionId)
Returns the service detail records for the transaction id
void insertSDR(ServiceDetailRecord sdr)
void updateSDR(ServiceDetailRecord sdr)
Deletes the SDR with the id and inserts the new one

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BillingManager

public BillingManager()

Method Detail

createServiceDetailRecord

public ServiceDetailRecord createServiceDetailRecord(java.lang.String id,
                                                     java.lang.String userName,
                                                     java.lang.String serviceName,
                                                     java.sql.Timestamp accessTime,
                                                     java.lang.String componentName)
                                              throws BillingException
Creates the Service Detail Record Object with the given service detail values A passed sdr id is used for this transaction.
Parameters:
id - the service detail record id
userName - The name of phonenumber of the user of this billed service
serviceName - The billed service
accessTime - The service access time. if null, current timestamp is used.
componentName - the component name
Returns:
The service detail record
Throws:
BillingException - when mandatory attributes (userName, service or component name) are null

createServiceDetailRecord

public ServiceDetailRecord createServiceDetailRecord(java.lang.String userName,
                                                     java.lang.String serviceName,
                                                     java.sql.Timestamp accessTime,
                                                     java.lang.String componentName)
                                              throws BillingException
Creates the Service Detail Record Object with the given service detail values A unique sdr id is generated for this transaction.
Parameters:
userName - The name of phonenumber of the user of this billed service
serviceName - The billed service
accessTime - The service access time. if null, current timestamp is used.
componentName - the component name
Returns:
The service detail record
Throws:
BillingException - when mandatory attributes (userName, service or component name) are null

deleteSDR

public void deleteSDR(ServiceDetailRecord sdr)
               throws PanamaException
Throws:
PanamaException

deleteSDRS

public void deleteSDRS(java.sql.Timestamp ts)
                throws PanamaException
Delete the SDRs which access timestamp before the specifiec timestamp
Parameters:
ts - timestamp before which the SDRs need to be purged
Throws:
PanamaException - when delete operation failed

getInstance

public static BillingManager getInstance()

getServiceDetailRecord

public ServiceDetailRecord getServiceDetailRecord(java.lang.String userName,
                                                  java.lang.String serviceName,
                                                  java.sql.Timestamp accessTime,
                                                  java.lang.String id,
                                                  java.lang.String externalBillingReferenceid,
                                                  java.lang.String componentName)
                                           throws BillingException
Creates the Service Detail Record Object with the given service detail values This is used at lookup time or billing time when the reference id was already generated and available at the time of authorization. To create a new reference id, use BillingManager.createServiceDetailRecord()
Parameters:
userName - The name or phone number of the user of this billed service
serviceName - The billed service
accessTime - The service access time. if null, current timestamp is used.
id - wireless internal billing reference id or service detail record id
externalBillingReferenceid - external billing reference id
Returns:
The service detail record
Throws:
BillingException - thrown when mandatory parameters are null user == null || service == null || accessTime == null || billingReferenceId == null || componentName == null

getServiceDetailRecords

public ServiceDetailRecord[] getServiceDetailRecords(java.lang.String userInfo)
                                              throws PanamaException
Returns the service detail records for the user
Parameters:
userInfo - the user's name of phone number
Returns:
array of service detail records
Throws:
PanamaException

getServiceDetailRecordsAccessedBefore

public ServiceDetailRecord[] getServiceDetailRecordsAccessedBefore(java.sql.Timestamp accessTime)
                                                            throws PanamaException
Returns the service detail records for actions with "access time" before the specified time stamp
Parameters:
accessTime - the cut-off accessTime before which the SDRs are returned
Returns:
array of service detail records
Throws:
PanamaException

getServiceDetailRecordsByExtendedAttribute

public ServiceDetailRecord[] getServiceDetailRecordsByExtendedAttribute(java.lang.String attributeName,
                                                                        java.lang.String attributeValue)
                                                                 throws PanamaException
Returns the service detail records for a given extended attribute name and value
Parameters:
attributeName - the extended attribute name
attributeValue - the extende attribute value
Returns:
array of service detail records
Throws:
PanamaException

getServiceDetailRecordsByServiceComponent

public ServiceDetailRecord[] getServiceDetailRecordsByServiceComponent(java.lang.String serviceName,
                                                                       java.lang.String componentName)
                                                                throws PanamaException
Returns the service detail records for the service and component
Parameters:
serviceName - the service name
componentName - the component name
Returns:
array of service detail records
Throws:
PanamaException

getServiceDetailRecordsByUserComponent

public ServiceDetailRecord[] getServiceDetailRecordsByUserComponent(java.lang.String userInfo,
                                                                    java.lang.String componentName)
                                                             throws PanamaException
Returns the service detail records for the user and component
Parameters:
userInfo - the user's name of phone number
componentName - the component name. One of the predefined list of components or '%' or '*'
Returns:
array of service detail records
Throws:
PanamaException

getServiceDetailRecordsForBillingReferenceId

public ServiceDetailRecord[] getServiceDetailRecordsForBillingReferenceId(java.lang.String billingRefId)
                                                                   throws PanamaException
Returns the service detail records for the billing reference id
Parameters:
billingRefId - the billingRefId
Returns:
array of service detail records
Throws:
PanamaException

getServiceDetailRecordsForComponent

public ServiceDetailRecord[] getServiceDetailRecordsForComponent(java.lang.String componentName)
                                                          throws PanamaException
Returns the service detail records for the component
Parameters:
componentName - the service name
Returns:
array of service detail records
Throws:
PanamaException

getServiceDetailRecordsForService

public ServiceDetailRecord[] getServiceDetailRecordsForService(java.lang.String serviceName)
                                                        throws PanamaException
Returns the service detail records for the service
Parameters:
serviceName - the service name
Returns:
array of service detail records
Throws:
PanamaException

getServiceDetailRecordsForTransaction

public java.util.ArrayList getServiceDetailRecordsForTransaction(java.lang.String transactionId)
                                                          throws PanamaException
Returns the service detail records for the transaction id
Parameters:
transactionId - the transactionId
Returns:
array list of service detail records
Throws:
PanamaException

insertSDR

public void insertSDR(ServiceDetailRecord sdr)
               throws PanamaException
Throws:
PanamaException

updateSDR

public void updateSDR(ServiceDetailRecord sdr)
               throws PanamaException
Deletes the SDR with the id and inserts the new one
Parameters:
sdr - the service detail record
Throws:
PanamaException - thrown if sdr is invalid or some operational error

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.