public class BatchServiceClient extends AsyncBatchServiceClient
Java class provides the necessary operations to
implement Offline Charging Services (OFCS) in your SAP system landscape
to send chargeable items to the connected SAP CC Core Server system to
charge the past usage (consumption) of a marketable service by end customers;
This class enables synchronous communications via
the Message TCP high-speed technical interface.
Recommendation
You can implement the AsyncBatchServiceClient class to speed up the processing.
Consider the following information in this topic:
Example
For test, demo, or training purposes, a program (SAP CC Message Client) is provided with the SAP CC Core Tool software unit:
It allows you to send some charging operation requests to the SAP CC system.
The SAP CC Message Client user interface implements
some methods of this Java class.
acquire(java.util.List)
With this Java class, you can implement offline charging services
via the Message TCP high-speed technical interface.
Charging is based on acquired events.
| Business Services: Offline Charging Services | Operations | Technical Names (Consider the methods in this Java class) |
|---|---|---|
| Chargeable item acquisition (for deferred charging managed in SAP CI) | Batch acquisition operation | acquire(..)
|
| Batch charging | Batch charging operation (*) | batchCharge(..) to a contract or subscription already identified
|
| Event-based charging without credit control | Single charging operation | charge(..)
|
| Event-based advice of charge | Blank charging operation | blankCharge(..)
|
| Offline recharging | Peration |
For each subscription or provider contract to re-charge:
|
Recommendation
You can implement the rerating end-to-end service (based on provider contracts) by using another technical interface based on SOAP APIs: SAP CC provides Web Services that your client application can consume.
Note
Consult all the offline charging services that you can implement in
your Java-based client application used as a mediation system.
Refer to the AsyncBatchServiceClient class for asynchronous communications and very high throughput performances.
This charging client benefits from
the functions provided by the Message TCP technical interface.
Refer to its features about:
The connected SAP CC system replies to operation requests with the following data:
All services and operations take into account the operational status
of a charging contract.
This means that an operation exception can be thrown if the operational status of a charging contract
is locked or closed.
You can define a client-side timeout associated to a
charging client based on this BatchServiceClient class:
The connected SAP CC system must process your operation request during this limited time.
If the limited time is exceeded, the operation is automatically rolled back:
charging client of your client application.
This client-side timeout does not guarantee that related operations successfully ended (see SAP CC Application Help).
To implement a ciphered connection between the client and SAP CC, use AsyncRatingServiceClient.setSslContext(javax.net.ssl.SSLContext )
Since SAP CC 4.1 SP2, SAP CC is able to require an authenticated connection from a client application (see the MESSAGE_API_AUTHENTICATION_REQUIRED parameter in the parameter reference guide).
The client must setup some valid user credentials by calling the setUserCredentials() method.
Then, the client application will be authenticated and authorized to connect to the SAP CC server by calling one of the following connect() methods:
AsyncRatingServiceClient.connect(com.highdeal.admin.hci.InstanceMap, String, int, FoundLostRatingListener, ServiceClientTuning)AsyncRatingServiceClient.connect(String, java.net.InetSocketAddress...)AsyncRatingServiceClient.connect(String, com.highdeal.barbus.InstanceAddress... )AsyncRatingServiceClient.connect(String, int )AsyncRatingServiceClient.connect(String, int, boolean, String, int, FoundLostRatingListener, ServiceClientTuning)AsyncRatingServiceClient.connect(String, int, FoundLostRatingListener)AsyncRatingServiceClient.connect(String, int, java.net.InetSocketAddress, String, int, FoundLostRatingListener, ServiceClientTuning, java.net.InetSocketAddress...)AsyncRatingServiceClient.connect(String, int, java.net.InetSocketAddress, String, int, FoundLostRatingListener, ServiceClientTuning, com.highdeal.barbus.InstanceAddress... )AsyncRatingServiceClient.connect(String, int, int)AsyncRatingServiceClient.connect(String, int, String, int, FoundLostRatingListener)AsyncRatingServiceClient.connect(String, int, String, int, FoundLostRatingListener, ServiceClientTuning)
Code Snippet
The following code snippet provides an example of how to authenticate a client application to the SAP CC server :
private static final String DISPATCHER_HOST = "localhost";
private static final int DISPATCHER_EXT_PORT = 2000;
// Initialize the stateful service client by (always) calling the empty builder (other builders are deprecated)
BatchServiceClient client = new BatchServiceClient();
// Set the user credentials for the new created client
// These credentials must refer to an existing service user in SAP CC that has the "messageChargingClient" role.
client.setUserCredentials("clientX", "foopasswd");
//Call one of the connect() methods that are provided in Service Client classes according to the
// expected behavior.
ConnectionStatus status = client.connect(DISPATCHER_HOST, DISPATCHER_EXT_PORT);
// Check the result of the connect() method.
if (!status.isServiceAvailable()) { // No dispatcher can be reached
} // else at least one CC dispatcher has been reached and charging is available
You can implement this business operation if both SAP Convergent Charging and SAP Convergent Invoicing (SAP CI) are available in your system landscape. The consumption item management function must be enable in SAP CI (in the SAP ERP/FI-CA system).
Use the method acquire(..) .
guiderLookup(..)
batchCharge(..)
The following advanced implementation activities are possible. Refer to the implementation note section for more information.
To provide your system landscape with rerating services, you must implement the Recharging step of this process. This step follows the correction of the source(s) of the mistakes.
Recommendation
Before implementing these operations, refer to the SAP CC Application Help for more information about these processes.
Develop the following sequence of operations to recharge the usage and to correct the related subsriptions or charging contracts:
reratingLockCodestartSubscriptionRerating operation
for each subscription or charging contract to lock it and restore the values of its counters
charge operation )
stopSubscriptionRerating operation
for each subscription or charging contract to unlock it
Consult all the online and offline charging services that you can implement in your Java-based client application.
Consult the SAP CC Application Help for more information about the Offline Charging Services (OFCS) and the charging process in batch mode.
| Modifier and Type | Class and Description |
|---|---|
static class |
BatchServiceClient.ReratingClientRequestHandler
Rerating service client request handler: always refuse rerating information, except if a
rerating information handler has been set.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
RERATING_STATUS_PING |
static int |
RERATING_STATUS_START |
static int |
RERATING_STATUS_STOP |
static int |
RERATING_STATUS_UPDATE |
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRING, CANCELLED, CONFIRMED, MASTER_TRANSACTION, NONE_TRANSACTION| Constructor and Description |
|---|
BatchServiceClient()
Creates a non-initialized
charging client for implementing the offline charging services in your Java-based client application;
One of the {TEST #connect(java.lang.String, int) connect(..)} methods must then be used to connect this MessageClient to the distant SAP CC system. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<AcquisitionResult> |
acquire(java.util.List<AcquisitionParameters> parameters)
Requests the connected SAP CC Core Server system to collect a list of
chargeable items included in an acquisition parameter. |
BatchChargeResult |
batchCharge(java.util.Vector<ChargeParameters> parameters,
java.lang.Long subscriptionOrContractID,
short partitionID,
AccessibleChargeType chargeType,
int ts,
boolean ft,
MessageHeader.TransactionMode tm,
java.lang.String reratingLockCode)
Deprecated.
|
BatchChargeResult |
batchCharge(java.util.Vector<ChargeParameters> parameters,
java.lang.Long subscriptionID,
short partitionID,
int ts)
Deprecated.
|
BatchChargeResult |
batchCharge(java.util.Vector<ChargeParameters> parameters,
java.lang.Long subscriptionID,
short partitionID,
int ts,
boolean ft,
MessageHeader.TransactionMode tm,
java.lang.String reratingLockCode)
Deprecated.
|
BatchChargeResult |
batchCharge(java.util.Vector<ChargeParameters> parameters,
java.lang.Long subscriptionOrContractID,
short partitionID,
long suacID,
AccessibleChargeType chargeType,
int ts,
boolean ft,
MessageHeader.TransactionMode tm,
java.lang.String reratingLockCode)
This operation allows you to request the connected SAP CC Core Server system to charge in batch mode a sorted set of
chargeable items for the specified
user service ID (USID) and service ID (SID) and relating to an already identified subscription or charging contract.
|
PurchaseOrder |
blankCharge(ChargeableItem ci,
java.lang.String serviceID,
java.lang.String userServiceID,
java.util.Date consumptionDate,
int ts)
Main
blank charge opertation; Requests the connected SAP CC Core Server system to
charge in blank mode the specified chargeable item for the specified user service ID and
service ID at the specified date. |
PurchaseOrder |
blankCharge(ChargeableItem ci,
java.lang.String serviceID,
java.lang.String userServiceID,
java.util.Date consumptionDate,
int ts,
boolean ft)
Refer to the main operation request;
Requests the connected SAP CC Core Server system to charge in blank mode the specified chargeable item for the specified user service ID and
service ID at the specified date.
|
PurchaseOrder |
charge(ChargeableItem ci,
java.lang.String serviceID,
java.lang.String userServiceID,
java.util.Date consumptionDate,
int ts)
Requests the connected SAP CC Core Server system to charge the specified chargeable item for the specified user service ID and the specified
service ID at the specified date with transaction filtered selection.
|
PurchaseOrder |
charge(ChargeableItem ci,
java.lang.String serviceID,
java.lang.String userServiceID,
java.util.Date consumptionDate,
java.lang.String reratingLockCode)
Requests the connected SAP CC Core Server system to charge the specified chargeable item for the specified user service ID and the specified
service ID at the specified date without transaction selection.
|
PurchaseOrder |
charge(ChargeableItem ci,
java.lang.String serviceID,
java.lang.String userServiceID,
java.util.Date consumptionDate,
java.lang.String reratingLockCode,
ChargeExecutionContext context)
Requests the connected SAP CC Core Server system to charge the specified chargeable item for the specified user service ID and service
ID at the specified date.
|
PurchaseOrder |
charge(ChargeableItem ci,
java.lang.String serviceID,
java.lang.String userServiceID,
java.util.Date consumptionDate,
java.lang.String reratingLockCode,
int ts,
boolean ft)
Requests the connected SAP CC Core Server system to charge in offline environment a unit chargeable item (service consumption information data) for the specified user service ID and the specified
service ID at the specified date; Operation request is sent in synchronous mode.
|
static com.highdeal.cnd.message.common.AcceptableResponse |
generateResponse(com.highdeal.cnd.message.common.ReratingInfoRequest request,
boolean isAccepted) |
static com.highdeal.cnd.message.common.ReratingInfoRequest |
getRequestFromBuffer(com.highdeal.hmi.IDataBuffer buf) |
static com.highdeal.cnd.message.common.AcceptableResponse |
getResponseFromBuffer(com.highdeal.hmi.IDataBuffer buf) |
GuidingEntry |
guiderLookup(GuidingRequest request)
Requests the connected SAP CC Core Server system for the
guiding entry relating to
the specified guiding request; |
LookedUpGuidingEntry[] |
guiderLookup(GuidingRequest[] requests)
Requests the connected SAP CC Core Server system for processing in batch mode
a
set of guiding requests. |
GuidingEntry |
guiderLookup(java.lang.String serviceID,
java.lang.String userServiceID,
java.util.Date consumptionDate)
Requests the connected SAP CC Core Server system for the
guiding entry that
relates to the specified user service ID (USID) and service ID (SID) at the specified consumption date of the digital service; |
boolean |
pingReratingOperation(java.lang.String reratingLockCode)
Checks if a rerating operation identified is running.
|
void |
setReratingInfoRequestHandler(com.highdeal.barbus.RequestHandler newHandler)
Sets an handler that will react to rerating information published by the distant SAP CC system.
|
StartSubscriptionReratingResult |
startContractCollectionRerating(java.lang.String reratingLockCode,
short partitionId,
java.util.Date restorationDate,
java.util.List<java.lang.Long> contractIdList)
Deprecated.
|
StartSubscriptionReratingResult |
startContractCollectionRerating(java.lang.String reratingLockCode,
short partitionId,
long suacId,
java.util.Date restorationDate,
java.util.List<java.lang.Long> contractIdList)
Starts the rerating of a collection of charging contracts.
|
StartSubscriptionReratingResult |
startSubscriptionRerating(java.lang.String reratingLockCode,
long subscriptionId,
short partitionId,
AccessibleChargeType accessibleChargeType,
java.util.Date restorationDate)
Deprecated.
|
StartSubscriptionReratingResult |
startSubscriptionRerating(java.lang.String reratingLockCode,
long subscriptionId,
short partitionId,
long suacId,
AccessibleChargeType accessibleChargeType,
java.util.Date restorationDate)
Starts the rerating of a subscription or charging contract.
|
boolean |
stopSubscriptionRerating(java.lang.String reratingLockCode,
long subscriptionId,
java.util.Date maxConsumptionDate,
java.util.Date activationDate,
short partitionId,
AccessibleChargeType accessibleChargeType)
Deprecated.
|
boolean |
stopSubscriptionRerating(java.lang.String reratingLockCode,
long subscriptionId,
java.util.Date maxConsumptionDate,
java.util.Date activationDate,
short partitionId,
long suacId,
AccessibleChargeType accessibleChargeType)
Stops the rerating of a subscription or charging contract.
|
boolean |
unlockSubscription(java.lang.String reratingLockCode,
long subscriptionId,
java.util.Date maxConsumptionDate,
java.util.Date activationDate,
short partitionId)
Deprecated.
|
acquire, batchCharge, batchCharge, batchCharge, blankCharge, charge, charge, charge, guiderLookup, guiderLookup, guiderLookup, informStartContractCollectionRerating, informStartContractCollectionRerating, informStartSubscriptionRerating, informStartSubscriptionRerating, informStopSubscriptionRerating, informStopSubscriptionRerating, informUnlockSubscriptionaddAuthenticationListener, close, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getBootMode, getClientOpEventListener, getConnectionStatus, getSslContext, getTimeout, isAtLeastOneConnectionIsRegistered, isConnected, isNoTimeout, setBootMode, setClientOpEventListener, setHAEventListener, setNoTimeout, setSslContext, setUserCredentialspublic static final int RERATING_STATUS_START
public static final int RERATING_STATUS_UPDATE
public static final int RERATING_STATUS_STOP
public static final int RERATING_STATUS_PING
public BatchServiceClient()
charging client for implementing the offline charging services in your Java-based client application;
One of the {TEST #connect(java.lang.String, int) connect(..)} methods must then be used to connect this MessageClient to the distant SAP CC system.public void setReratingInfoRequestHandler(com.highdeal.barbus.RequestHandler newHandler)
setReratingInfoRequestHandler in class AsyncBatchServiceClientnewHandler - An implementation of an handlerpublic PurchaseOrder charge(ChargeableItem ci, java.lang.String serviceID, java.lang.String userServiceID, java.util.Date consumptionDate, java.lang.String reratingLockCode, int ts, boolean ft) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException
This operation may conflict with the prerating feature. Do not use this operation if some prerating operatoins are not post-rated.
ci - The chargeable item to charge and that represents the consumption of a customer serviceserviceID - the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID - the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate - the date the service was consumed by the end customerreratingLockCode - The rerating lock code in case of rechargingts - The transaction selection NONE_TRANSACTION, MASTER_TRANSACTION,
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRINGft - Sets if the returned transactions must be filtered according to the transactionTemplatePurchaseOrderInvalidItemException - if the chargeable item is not validForbiddenChargeException - if charging is forbiddenTransactionClearingException - if a transaction clearing error occursServerFailureException - if the distant SAP CC system is not availableCommunicationFailureException - if a communication failure occurspublic PurchaseOrder charge(ChargeableItem ci, java.lang.String serviceID, java.lang.String userServiceID, java.util.Date consumptionDate, java.lang.String reratingLockCode, ChargeExecutionContext context) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException
PurchaseOrder.getChargingResults().
The content of the result can be configured using the specified context.
ci - the ChargeableItem to chargeserviceID - the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID - the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate - the date the service was consumed by the end customerreratingLockCode - the rerating operation lock codecontext - the conditions under which the charge operation must be executed (can be null)PurchaseOrderInvalidItemException - if the chargeable item is not validForbiddenChargeException - if charging is forbiddenTransactionClearingException - if a transaction clearing error occursServerFailureException - if the server is not availableCommunicationFailureException - if a communication failure occurspublic PurchaseOrder charge(ChargeableItem ci, java.lang.String serviceID, java.lang.String userServiceID, java.util.Date consumptionDate, int ts) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException
This operation may conflict with the pre-rating feature. Don't use this operation if some pre-ratings are not post-rated.
ci - the ChargeableItem to rateserviceID - the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID - the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate - the date the service was consumed by the end customerts - the transaction selection NONE_TRANSACTION, MASTER_TRANSACTION,
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRINGPurchaseOrderInvalidItemException - if the chargeable item is not validForbiddenChargeException - if charging is forbiddenTransactionClearingException - if a transaction clearing error occursServerFailureException - if the server is not availableCommunicationFailureException - if a communication failure occurspublic PurchaseOrder charge(ChargeableItem ci, java.lang.String serviceID, java.lang.String userServiceID, java.util.Date consumptionDate, java.lang.String reratingLockCode) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException
This operation may conflict with the pre-rating feature. Don't use this operation if some pre-ratings are not post-rated.
ci - the ChargeableItem to rateserviceID - the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID - the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate - the date the service was consumed by the end customerreratingLockCode - the rerating operation codePurchaseOrderInvalidItemException - if the chargeable item is not validForbiddenChargeException - if charging is forbiddenTransactionClearingException - if a transaction clearing error occursServerFailureException - if the server is not availableCommunicationFailureException - if a communication failure occurspublic PurchaseOrder blankCharge(ChargeableItem ci, java.lang.String serviceID, java.lang.String userServiceID, java.util.Date consumptionDate, int ts) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException
blank charge opertation; Requests the connected SAP CC Core Server system to
charge in blank mode the specified chargeable item for the specified user service ID and
service ID at the specified date.
This operation is equivalent to a charge operation
but the blank mode means that no data is committed to the database.
Caution
If the transaction processor does not take care about the database transaction (transaction processor which stores the transactions into a file by example), the transaction processor action will not be rollbacked.
ci - the chargeable item to be charged by the distant SAP CC systemserviceID - the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID - the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate - the date the service was consumed by the end customerts - the transaction selection NONE_TRANSACTION, MASTER_TRANSACTION,
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRINGPurchaseOrderInvalidItemException - if the chargeable item is not validForbiddenChargeException - if charging operation is forbiddenTransactionClearingException - if a transaction clearing error occursServerFailureException - if the distant SAP CC system is not availableCommunicationFailureException - if a communication failure occurspublic PurchaseOrder blankCharge(ChargeableItem ci, java.lang.String serviceID, java.lang.String userServiceID, java.util.Date consumptionDate, int ts, boolean ft) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException
ci - the ChargeableItem to rate.serviceID - the service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID - the user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate - the date the service was consumed by the end customerts - the transaction selection NONE_TRANSACTION, MASTER_TRANSACTION,
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRINGft - sets if the returned transactions must be filtered according to the transactionTemplatePurchaseOrderInvalidItemException - if the chargeable item is not validForbiddenChargeException - if charging is forbiddenTransactionClearingException - if a transaction clearing error occursServerFailureException - if the server is not availableCommunicationFailureException - if a communication failure occurspublic GuidingEntry guiderLookup(java.lang.String serviceID, java.lang.String userServiceID, java.util.Date consumptionDate) throws ForbiddenChargeException, ServerFailureException, CommunicationFailureException
guiding entry that
relates to the specified user service ID (USID) and service ID (SID) at the specified consumption date of the digital service;serviceID - The service identifier (SID), which represents a technical identifier of the service provided by the service provideruserServiceID - The user service identifier (USID), which represents a technical identifier of the end customer consuming the serviceconsumptionDate - The date when the digital service was consumed by the end customerForbiddenChargeException - if charging is forbiddenServerFailureException - if the SAP CC system is not availableCommunicationFailureException - if a communication failure occurspublic GuidingEntry guiderLookup(GuidingRequest request) throws ForbiddenChargeException, ServerFailureException, CommunicationFailureException
guiding entry relating to
the specified guiding request;request - A guiding requestForbiddenChargeException - if charging is forbiddenServerFailureException - if the SAP CC system is not availableCommunicationFailureException - if a communication failure occurspublic LookedUpGuidingEntry[] guiderLookup(GuidingRequest[] requests) throws ForbiddenChargeException, ServerFailureException, CommunicationFailureException
set of guiding requests.
It returns an overall result that contains
the expected guiding entries associated to an
operation status for each initial request; see the status details in the LookedUpGuidingEntry class.
You implement this batch operation in your client application. Design and develop the error and exception handling.
requests - A set of guiding requestsForbiddenChargeException - if charging is forbiddenServerFailureException - if the SAP CC system is not availableCommunicationFailureException - if a communication failure occurs@Deprecated public BatchChargeResult batchCharge(java.util.Vector<ChargeParameters> parameters, java.lang.Long subscriptionID, short partitionID, int ts) throws BatchChargeException, ForbiddenChargeException, ServerFailureException, CommunicationFailureException, TransactionClearingException
The system returns the resulting purchase orders that includes transactions computed according to the ts parameter.
Note
transaction templates assigned to the subscribed offer.
parameters - The USID, SID, and the chronological set of past chargeable items to charge in batch modesubscriptionID - The already identifed unique ID of the selected subscriptionpartitionID - The already identified ID of the database partition that contains the subscription and related customer master datats - The transaction selection NONE_TRANSACTION, MASTER_TRANSACTION,
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRINGcomputed purchase orders and business subexceptionsBatchChargeException - if an error occurs during batch chargingServerFailureException - if the SAP CC system is not availableCommunicationFailureException - if a communication failure occursTransactionClearingException - if a transaction clearing error occursServerFailureException - if the SAP CC system is not availableForbiddenChargeException - if charging is forbidden@Deprecated public BatchChargeResult batchCharge(java.util.Vector<ChargeParameters> parameters, java.lang.Long subscriptionID, short partitionID, int ts, boolean ft, MessageHeader.TransactionMode tm, java.lang.String reratingLockCode) throws BatchChargeException, CommunicationFailureException, ForbiddenChargeException, ServerFailureException, TransactionClearingException
ft, tm, and reratingLockCode.
Requests the connected SAP CC Core Server system to charge in batch mode a sorted set of
chargeable items for the specified
user service ID (USID) and service ID (SID) and relating to an already identified subscription.
The system returns the resulting purchase orders that includes transactions computed according to the ts parameter.
Note
transaction templates assigned to the subscribed offer.
parameters - The chronological set of ChargeParameters to charge in batch modesubscriptionID - The unique ID of the selected subscriptionpartitionID - The identifier of the rating partitionts - The transaction selection NONE_TRANSACTION, MASTER_TRANSACTION,
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRINGft - Optional flag to enable the filtering of resulting transactions according to the transaction template
configured in the subscribed offertm - The transaction modereratingLockCode - The rerating operation codecomputed purchase orders and business subexceptionsBatchChargeException - if an error occurs during batch chargingServerFailureException - if the server is not availableCommunicationFailureException - if a communication failure occursTransactionClearingException - if a transaction clearing error occursServerFailureException - if the server is not availableForbiddenChargeException - if charging is forbidden@Deprecated public BatchChargeResult batchCharge(java.util.Vector<ChargeParameters> parameters, java.lang.Long subscriptionOrContractID, short partitionID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, java.lang.String reratingLockCode) throws BatchChargeException, CommunicationFailureException, ForbiddenChargeException, ServerFailureException, TransactionClearingException
ts parameter.
Note
When dealing with subscriptions:
transaction templates assigned to the subscribed offer.
parameters - The USID, the SID, the chronological set of past chargeable items to charge in batch modesubscriptionOrContractID - The unique ID of the selected subscription or charging contractpartitionID - The identifier of the rating partitionchargeType - The type of accessible charge depending on the scope of the batch charging operation: subscription or charging contractts - The transaction selection NONE_TRANSACTION, MASTER_TRANSACTION,
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRINGft - Optional flag to enable the filtering of resulting transactions according to the transaction template
configured in the subscribed offer (only relevant for subscriptions)tm - The {#@link TransactionMode transaction mode}reratingLockCode - The rerating operation codecomputed purchase orders and business subexceptionsBatchChargeException - if an error occurs during batch chargingServerFailureException - if the SAP CC system is not availableCommunicationFailureException - if a communication failure occursTransactionClearingException - if a transaction clearing error occursServerFailureException - if the SAP CC system is not availableForbiddenChargeException - if charging is forbiddenpublic BatchChargeResult batchCharge(java.util.Vector<ChargeParameters> parameters, java.lang.Long subscriptionOrContractID, short partitionID, long suacID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, java.lang.String reratingLockCode) throws BatchChargeException, CommunicationFailureException, ForbiddenChargeException, ServerFailureException, TransactionClearingException
ts parameter.
Note
When dealing with subscriptions:
transaction templates assigned to the subscribed offer.
parameters - The USID, the SID, the chronological set of past chargeable items to charge in batch modesubscriptionOrContractID - The unique ID of the selected subscription or charging contractpartitionID - The identifier of the rating partitionsuacID - The identifier of the subscriber accountchargeType - The type of accessible charge depending on the scope of the batch charging operation: subscription or charging contractts - The transaction selection NONE_TRANSACTION, MASTER_TRANSACTION,
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRINGft - Optional flag to enable the filtering of resulting transactions according to the transaction template
configured in the subscribed offer (only relevant for subscriptions)tm - The {#@link TransactionMode transaction mode}reratingLockCode - The rerating operation codecomputed purchase orders and business subexceptionsBatchChargeException - if an error occurs during batch chargingServerFailureException - if the SAP CC system is not availableCommunicationFailureException - if a communication failure occursTransactionClearingException - if a transaction clearing error occursServerFailureException - if the SAP CC system is not availableForbiddenChargeException - if charging is forbiddenpublic java.util.List<AcquisitionResult> acquire(java.util.List<AcquisitionParameters> parameters) throws CommunicationFailureException, ServerFailureException
chargeable items included in an acquisition parameter.
The SAP CC Core Server system processes these chargeable items and stores them in temporary files.
Note
The SAP CC system executes the acquisition request in the most processing mode: The failure of a single acquisition does not stop the global acquisition. Most ot the single acquisition are processed.
Acquisition parameters contains a chargeable item and access information (service identifier,
user identifier and consumption date). The acquisition consists in finding the charging contract targetted by the access specified,
and then to export the chargeable item with additional information using the CIF, without performing rating or charging,
for storage purposes.
The acquisition operations are executed in mode most, meaning that if an acquisition operation for a chargeable item fails, the following acquisition operations are executed anyway.
The method waits for the end of the processing by the connected SAP CC system.
It returns a list of acquisition operation results, each one corresponding to the acquisition parameters
in the same position in the list of parameters specified as argument of the method.
If a single acquisition operation fails, the corresponding result
contains an exception which contains details on the error.
Note
This business operation is not allowed if the CIF of the rater instances does not contain a chargeable item processor.
parameters - A set of single acquisition operations to executesingle acquisition results, in the same order as the single operation requests specified as
arguments in this method; the result may include business subexceptions.CommunicationFailureException - if a communication failure occurs during the acquisition of the chargeable itemsServerFailureException - if an unexpected exception occurs during the acquisition of the chargeable items@Deprecated public StartSubscriptionReratingResult startSubscriptionRerating(java.lang.String reratingLockCode, long subscriptionId, short partitionId, AccessibleChargeType accessibleChargeType, java.util.Date restorationDate) throws CommunicationFailureException, ServerFailureException, RerateSubscriptionException
Starts the rerating of a subscription or charging contract.
This operation does the following:
reratingLockCode - The rerating operation codesubscriptionId - The unique identifier of the subscription or charging contract to reratepartitionId - The partition identifier of the subscription or charging contract to rerateaccessibleChargeType - The type of object on which the rerating is performed
(subscription or charging contract)restorationDate - The date from which the rerating will be performedCommunicationFailureException - if a communication failure occurs during the execution of the operationServerFailureException - if an unexpected failure occurs during the execution of the operationRerateSubscriptionException - if the rerating operation cannot be performedpublic StartSubscriptionReratingResult startSubscriptionRerating(java.lang.String reratingLockCode, long subscriptionId, short partitionId, long suacId, AccessibleChargeType accessibleChargeType, java.util.Date restorationDate) throws CommunicationFailureException, ServerFailureException, RerateSubscriptionException
Starts the rerating of a subscription or charging contract.
This operation does the following:
reratingLockCode - The rerating operation codesubscriptionId - The unique identifier of the subscription or charging contract to reratepartitionId - The partition identifier of the subscription or charging contract to reratesuacId - The identifier of the subscriber account that owns the charging contract to rerateaccessibleChargeType - The type of object on which the rerating is performed
(subscription or charging contract)restorationDate - The date from which the rerating will be performedCommunicationFailureException - if a communication failure occurs during the execution of the operationServerFailureException - if an unexpected failure occurs during the execution of the operationRerateSubscriptionException - if the rerating operation cannot be performed@Deprecated public StartSubscriptionReratingResult startContractCollectionRerating(java.lang.String reratingLockCode, short partitionId, java.util.Date restorationDate, java.util.List<java.lang.Long> contractIdList) throws CommunicationFailureException, ServerFailureException, RerateSubscriptionException
This operation does the following:
reratingLockCode - The rerating operation codepartitionId - The partition identifier of the charging contracts to reraterestorationDate - The date from which the rerating will be performedcontractIdList - The list of unique identifiers of the charging contracts to rerateCommunicationFailureException - if a communication failure occurs during the execution of the operationServerFailureException - if an unexpected failure occurs during the execution of the operationRerateSubscriptionException - if the rerating operation cannot be performedpublic StartSubscriptionReratingResult startContractCollectionRerating(java.lang.String reratingLockCode, short partitionId, long suacId, java.util.Date restorationDate, java.util.List<java.lang.Long> contractIdList) throws CommunicationFailureException, ServerFailureException, RerateSubscriptionException
This operation does the following:
reratingLockCode - The rerating operation codepartitionId - The partition identifier of the charging contracts to reratesuacId - The identifier of the subscriber account that owns the charging contracts to reraterestorationDate - The date from which the rerating will be performedcontractIdList - The list of unique identifiers of the charging contracts to rerateCommunicationFailureException - if a communication failure occurs during the execution of the operationServerFailureException - if an unexpected failure occurs during the execution of the operationRerateSubscriptionException - if the rerating operation cannot be performed@Deprecated
public boolean unlockSubscription(java.lang.String reratingLockCode,
long subscriptionId,
java.util.Date maxConsumptionDate,
java.util.Date activationDate,
short partitionId)
throws CommunicationFailureException,
ForbiddenChargeException,
ServerFailureException,
TransactionClearingException
Stops the rerating of a subscription.
This operation does the following:
reratingLockCode - The rerating operation codesubscriptionId - The unique identifier of the subscription to reratemaxConsumptionDate - The maximum consumption date of the CDRs rated during the rerating operationactivationDate - The date to be used to activate the subscription
(if no date is specified, the activation is not performed)partitionId - The partition identifier of the subscription to reratetrue if subscription has been successfully unlocked, false otherwiseCommunicationFailureException - if a communication failure occurs during the execution of the operationServerFailureException - if an unexpected failure occurs during the execution of the operationForbiddenChargeException - if the rerating operation cannot be performedTransactionClearingException - if the rerating operation cannot be performed@Deprecated
public boolean stopSubscriptionRerating(java.lang.String reratingLockCode,
long subscriptionId,
java.util.Date maxConsumptionDate,
java.util.Date activationDate,
short partitionId,
AccessibleChargeType accessibleChargeType)
throws CommunicationFailureException,
ForbiddenChargeException,
ServerFailureException,
TransactionClearingException
Stops the rerating of a subscription or charging contract.
This operation does the following:
reratingLockCode - The rerating operation codesubscriptionId - The unique identifier of the subscription or charging contract to reratemaxConsumptionDate - The maximum consumption date of the CDRs rated during the rerating operationactivationDate - The date to be used to activate the subscription or charging contract
(if no date is specified, the activation is not performed)partitionId - The partition identifier of the subscription or charging contract to rerateaccessibleChargeType - The type of object on which the rerating is performed
(subscription or charging contract)true if subscription or charging contract has been successfully unlocked, false otherwiseCommunicationFailureException - if a communication failure occurs during the execution of the operationServerFailureException - if an unexpected failure occurs during the execution of the operationForbiddenChargeException - if the rerating operation cannot be performedTransactionClearingException - if the rerating operation cannot be performedpublic boolean stopSubscriptionRerating(java.lang.String reratingLockCode,
long subscriptionId,
java.util.Date maxConsumptionDate,
java.util.Date activationDate,
short partitionId,
long suacId,
AccessibleChargeType accessibleChargeType)
throws CommunicationFailureException,
ForbiddenChargeException,
ServerFailureException,
TransactionClearingException
Stops the rerating of a subscription or charging contract.
This operation does the following:
reratingLockCode - The rerating operation codesubscriptionId - The unique identifier of the subscription or charging contract to reratemaxConsumptionDate - The maximum consumption date of the CDRs rated during the rerating operationactivationDate - The date to be used to activate the subscription or charging contract
(if no date is specified, the activation is not performed)partitionId - The partition identifier of the subscription or charging contract to reratesuacId - The identifier of the subscriber account that owns the subscription or the charging contract to rerateaccessibleChargeType - The type of object on which the rerating is performed
(subscription or charging contract)true if subscription or charging contract has been successfully unlocked, false otherwiseCommunicationFailureException - if a communication failure occurs during the execution of the operationServerFailureException - if an unexpected failure occurs during the execution of the operationForbiddenChargeException - if the rerating operation cannot be performedTransactionClearingException - if the rerating operation cannot be performedpublic boolean pingReratingOperation(java.lang.String reratingLockCode)
throws CommunicationFailureException
pingReratingOperation in class AsyncBatchServiceClientreratingLockCode - The rerating operation code to checktrue if the rerating operation is alive, false otherwiseCommunicationFailureException - if a communication failure occurs during the execution of the operationpublic static com.highdeal.cnd.message.common.AcceptableResponse generateResponse(com.highdeal.cnd.message.common.ReratingInfoRequest request,
boolean isAccepted)
public static com.highdeal.cnd.message.common.AcceptableResponse getResponseFromBuffer(com.highdeal.hmi.IDataBuffer buf)
public static com.highdeal.cnd.message.common.ReratingInfoRequest getRequestFromBuffer(com.highdeal.hmi.IDataBuffer buf)