Class BatchServiceClient
- All Implemented Interfaces:
com.highdeal.barbus.ISSLContextProvider
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:
- Synchronous Services and Operations
- Features
- Implementation in Your Client Application
- Notes on SAP CC Implementation
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.
Synchronous Services and Operations
- Offline acquisition step of the Deferred charging service - see
acquire(java.util.List) - Offline charging service (batch mode or single chargeable item)
- Quote service (blank charging)
- Recharging step for the Rerating end-to-end service (based on subscriptions or on provider contracts)
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.
Features
This charging client benefits from
the functions provided by the Message TCP technical interface.
Refer to its features about:
- High Availability Management
- High Volume Management
- High Performance Management
Operation Results
The connected SAP CC system replies to operation requests with the following data:
Charging Contract Operational Status
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.
Communication Timeout
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:
- An operation is sent to the SAP CC system in background to cancel the initial operation request.
- An exception is thrown in the
charging clientof your client application.
This client-side timeout does not guarantee that related operations successfully ended (see SAP CC Application Help).
Security
To implement a ciphered connection between the client and SAP CC, use AsyncRatingServiceClient.setSslContext(javax.net.ssl.SSLContext).
Then, the client application will be authenticated and authorized to connect to the SAP CC server by calling the
AsyncRatingServiceClient.connect(String hostname, int port, boolean secure, String bindAddress, int timeout, FoundLostRatingListener ratingListener, ServiceClientTuning config)
method, with secure parameter set to true.
To implement user authentication between the client and SAP CC, the client must set up 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
Implementation in Your Client Application
Implementing Batch Acquisition Services
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(..) .
Implementing Batch Charging Services
Customizing Sequence
guiderLookup(..)batchCharge(..)
Advanced Implementation
The following advanced implementation activities are possible. Refer to the implementation note section for more information.
Notes on SAP CC Implementation
Implementing Recharging for Rerating Services
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.
Customizing Sequence
Develop the following sequence of operations to recharge the usage and to correct the related subsriptions or charging contracts:
- Identify the subscriptions or the charging contracts to re-charge
- Generate a
reratingLockCode - Call the
startSubscriptionRerating operationfor each subscription or charging contract to lock it and restore the values of its counters - Send the corrected chargeable items to recharge for all subscriptions or charging contracts in chronological order
(by calling the
charge operation) - Call the
stopSubscriptionRerating operationfor each subscription or charging contract to unlock it
Additional Information
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.
Related Information
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRerating service client request handler: always refuse rerating information, except if a rerating information handler has been set. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intFields inherited from class com.highdeal.cnd.message.AsyncRatingServiceClient
ALL_TRANSACTION, ALL_TRANSACTION_AND_RECURRING, CANCELLED, CHARGING_RESULT_MSG, CHARGING_RESULT_REST, CHARGING_RESULT_WS, CONFIRMED, MASTER_TRANSACTION, NONE_TRANSACTION -
Constructor Summary
ConstructorsConstructorDescriptionCreates a non-initializedcharging clientfor 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 thisMessageClientto the distant SAP CC system. -
Method Summary
Modifier and TypeMethodDescriptionacquire(List<AcquisitionParameters> parameters) Requests the connected SAP CC Core Server system to collect a list ofchargeable items included in an acquisition parameter.batchCharge(Vector<ChargeParameters> parameters, Long subscriptionID, short partitionID, int ts) Deprecated.batchCharge(Vector<ChargeParameters> parameters, Long subscriptionID, short partitionID, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode) Deprecated.batchCharge(Vector<ChargeParameters> parameters, Long subscriptionOrContractID, short partitionID, long suacID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, 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.batchCharge(Vector<ChargeParameters> parameters, Long subscriptionOrContractID, short partitionID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode) Deprecated.blankCharge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, int ts) Mainblank 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.blankCharge(ChargeableItem ci, String serviceID, String userServiceID, 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.charge(ChargeableItem ci, String serviceID, String userServiceID, 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.charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, 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.charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, 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.charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, 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.static com.highdeal.cnd.message.common.AcceptableResponsegenerateResponse(com.highdeal.cnd.message.common.ReratingInfoRequest request, boolean isAccepted) static com.highdeal.cnd.message.common.ReratingInfoRequestgetRequestFromBuffer(com.highdeal.hmi.IDataBuffer buf) static com.highdeal.cnd.message.common.AcceptableResponsegetResponseFromBuffer(com.highdeal.hmi.IDataBuffer buf) guiderLookup(GuidingRequest request) Requests the connected SAP CC Core Server system for theguiding entryrelating to thespecified guiding request;guiderLookup(GuidingRequest[] requests) Requests the connected SAP CC Core Server system for processing in batch mode aset of guiding requests.guiderLookup(String serviceID, String userServiceID, Date consumptionDate) Requests the connected SAP CC Core Server system for theguiding entrythat relates to the specified user service ID (USID) and service ID (SID) at the specified consumption date of the digital service;booleanpingReratingOperation(String reratingLockCode) Checks if a rerating operation identified is running.voidsetReratingInfoRequestHandler(com.highdeal.barbus.RequestHandler newHandler) Sets an handler that will react to rerating information published by the distant SAP CC system.startContractCollectionRerating(String reratingLockCode, short partitionId, long suacId, Date restorationDate, List<Long> contractIdList) Starts the rerating of a collection of charging contracts.startContractCollectionRerating(String reratingLockCode, short partitionId, Date restorationDate, List<Long> contractIdList) Deprecated.startSubscriptionRerating(String reratingLockCode, long subscriptionId, short partitionId, long suacId, AccessibleChargeType accessibleChargeType, Date restorationDate) Starts the rerating of a subscription or charging contract.startSubscriptionRerating(String reratingLockCode, long subscriptionId, short partitionId, AccessibleChargeType accessibleChargeType, Date restorationDate) Deprecated.booleanstopSubscriptionRerating(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId, long suacId, AccessibleChargeType accessibleChargeType) Stops the rerating of a subscription or charging contract.booleanstopSubscriptionRerating(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId, AccessibleChargeType accessibleChargeType) Deprecated.booleanunlockSubscription(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId) Deprecated.Methods inherited from class com.highdeal.cnd.message.AsyncBatchServiceClient
acquire, batchCharge, batchCharge, batchCharge, blankCharge, charge, charge, charge, guiderLookup, guiderLookup, guiderLookup, informStartContractCollectionRerating, informStartContractCollectionRerating, informStartSubscriptionRerating, informStartSubscriptionRerating, informStopSubscriptionRerating, informStopSubscriptionRerating, informUnlockSubscriptionMethods inherited from class com.highdeal.cnd.message.AsyncRatingServiceClient
addAuthenticationListener, 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, setUserCredentials, setUserCredentials
-
Field Details
-
RERATING_STATUS_START
public static final int RERATING_STATUS_START- See Also:
-
RERATING_STATUS_UPDATE
public static final int RERATING_STATUS_UPDATE- See Also:
-
RERATING_STATUS_STOP
public static final int RERATING_STATUS_STOP- See Also:
-
RERATING_STATUS_PING
public static final int RERATING_STATUS_PING- See Also:
-
-
Constructor Details
-
BatchServiceClient
public BatchServiceClient()Creates a non-initializedcharging clientfor 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 thisMessageClientto the distant SAP CC system.
-
-
Method Details
-
setReratingInfoRequestHandler
public void setReratingInfoRequestHandler(com.highdeal.barbus.RequestHandler newHandler) Sets an handler that will react to rerating information published by the distant SAP CC system.- Overrides:
setReratingInfoRequestHandlerin classAsyncBatchServiceClient- Parameters:
newHandler- An implementation of an handler
-
charge
public PurchaseOrder charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, String reratingLockCode, int ts, boolean ft) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException 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.This operation may conflict with the prerating feature. Do not use this operation if some prerating operatoins are not post-rated.
- Parameters:
ci- Thechargeable itemto 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 selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- Sets if the returned transactions must be filtered according to thetransactionTemplate- Returns:
- The transaction's
PurchaseOrder - Throws:
InvalidItemException- 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 occurs
-
charge
public PurchaseOrder charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, String reratingLockCode, ChargeExecutionContext context) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException 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.
The result can be retrieved using the methodPurchaseOrder.getChargingResults(). The content of the result can be configured using the specifiedcontext.
This operation may conflict with the prerating feature. Do not use this operation if some preratings are not post-rated.- Parameters:
ci- theChargeableItemto 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 benull)- Returns:
- the transaction's
PurchaseOrder - Throws:
InvalidItemException- 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 occurs
-
charge
public PurchaseOrder charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, int ts) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException 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.This operation may conflict with the pre-rating feature. Don't use this operation if some pre-ratings are not post-rated.
- Parameters:
ci- theChargeableItemto 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 selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRING- Returns:
- the transaction's
PurchaseOrder - Throws:
InvalidItemException- 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 occurs
-
charge
public PurchaseOrder charge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, String reratingLockCode) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException 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.This operation may conflict with the pre-rating feature. Don't use this operation if some pre-ratings are not post-rated.
- Parameters:
ci- theChargeableItemto 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 code- Returns:
- the transaction's
PurchaseOrder - Throws:
InvalidItemException- 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 occurs
-
blankCharge
public PurchaseOrder blankCharge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, int ts) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException Mainblank 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.
- Parameters:
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 selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRING- Returns:
- The
PurchaseOrder - Throws:
InvalidItemException- 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 occurs
-
blankCharge
public PurchaseOrder blankCharge(ChargeableItem ci, String serviceID, String userServiceID, Date consumptionDate, int ts, boolean ft) throws InvalidItemException, ForbiddenChargeException, TransactionClearingException, ServerFailureException, CommunicationFailureException 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. This operation is equivalent to charge operation but the blank mode means that no data is committed to the database. WARNING : if the transaction processor doesn't take care about the DB transaction (transaction processor which stores the transactions into a file by example), the transaction processor action will not be rollbacked.- Parameters:
ci- theChargeableItemto 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 selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- sets if the returned transactions must be filtered according to thetransactionTemplate- Returns:
- the transaction's
PurchaseOrder - Throws:
InvalidItemException- 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 occurs
-
guiderLookup
public GuidingEntry guiderLookup(String serviceID, String userServiceID, Date consumptionDate) throws ForbiddenChargeException, ServerFailureException, CommunicationFailureException Requests the connected SAP CC Core Server system for theguiding entrythat relates to the specified user service ID (USID) and service ID (SID) at the specified consumption date of the digital service;- Parameters:
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 customer- Returns:
- A guiding entry
- Throws:
ForbiddenChargeException- if charging is forbiddenServerFailureException- if the SAP CC system is not availableCommunicationFailureException- if a communication failure occurs
-
guiderLookup
public GuidingEntry guiderLookup(GuidingRequest request) throws ForbiddenChargeException, ServerFailureException, CommunicationFailureException Requests the connected SAP CC Core Server system for theguiding entryrelating to thespecified guiding request;- Parameters:
request- A guiding request- Returns:
- A guiding entry
- Throws:
ForbiddenChargeException- if charging is forbiddenServerFailureException- if the SAP CC system is not availableCommunicationFailureException- if a communication failure occurs
-
guiderLookup
public LookedUpGuidingEntry[] guiderLookup(GuidingRequest[] requests) throws ForbiddenChargeException, ServerFailureException, CommunicationFailureException Requests the connected SAP CC Core Server system for processing in batch mode aset of guiding requests. It returns anoverall resultthat contains the expectedguiding entriesassociated to an operation status for each initial request; see the status details in theLookedUpGuidingEntry class.Customizing
You implement this batch operation in your client application. Design and develop the error and exception handling.
- Parameters:
requests- A set of guiding requests- Returns:
- GuidingEntry[]
- Throws:
ForbiddenChargeException- if charging is forbiddenServerFailureException- if the SAP CC system is not availableCommunicationFailureException- if a communication failure occurs
-
batchCharge
@Deprecated public BatchChargeResult batchCharge(Vector<ChargeParameters> parameters, Long subscriptionID, short partitionID, int ts) throws BatchChargeException, ForbiddenChargeException, ServerFailureException, CommunicationFailureException, TransactionClearingException Deprecated.This main operation allows you to request the connected SAP CC Core Server system to charge in batch mode a chronologically sorted set of chargeable items for a particular past service consumption by a individual end customer; or the specified user service ID (USID) and service ID (SID) and relating to an already identified subscription (and database partition).The system returns the resulting purchase orders that includes transactions computed according to the
tsparameter.Prerequisites
- The subscription to charge is already identified.
- The database partition of the identified subscription is already determined.
Note
-
The SAP CC system filters the computed transactions according to
the
transaction templatesassigned to the subscribedoffer. - This business operation may conflict with prerating operations. Do not use this operation when there are some pending prerating operations.
- Parameters:
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 selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRING- Returns:
- A set of
computed purchase ordersand business subexceptions - Throws:
BatchChargeException- 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
-
batchCharge
@Deprecated public BatchChargeResult batchCharge(Vector<ChargeParameters> parameters, Long subscriptionID, short partitionID, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode) throws BatchChargeException, CommunicationFailureException, ForbiddenChargeException, ServerFailureException, TransactionClearingException Deprecated.Consult the main batch charging operation and consider the supplementary options:ft,tm, andreratingLockCode.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
tsparameter.Note
-
The SAP CC system filters the computed transactions according to
the
transaction templatesassigned to the subscribedoffer. - This business operation may conflict with prerating operations. Do not use this operation there are some pending prerating operations.
- Parameters:
parameters- The chronological set ofChargeParametersto charge in batch modesubscriptionID- The unique ID of the selected subscriptionpartitionID- The identifier of the rating partitionts- The transaction selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- Optional flag to enable the filtering of resulting transactions according to thetransaction templateconfigured in the subscribed offertm- Thetransaction modereratingLockCode- The rerating operation code- Returns:
- A set of
computed purchase ordersand business subexceptions - Throws:
BatchChargeException- 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
-
The SAP CC system filters the computed transactions according to
the
-
batchCharge
@Deprecated public BatchChargeResult batchCharge(Vector<ChargeParameters> parameters, Long subscriptionOrContractID, short partitionID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode) throws BatchChargeException, CommunicationFailureException, ForbiddenChargeException, ServerFailureException, TransactionClearingException Deprecated.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. The system returns the resulting purchase orders that includes transactions computed according to thetsparameter.Note
When dealing with subscriptions:
-
The SAP CC system filters the computed transactions according to
the
transaction templatesassigned to the subscribedoffer. - This operation may conflict with prerating operations. Do not use this operation there are some pending prerating operations.
- Parameters:
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- Thetype of accessible chargedepending on the scope of the batch charging operation: subscription or charging contractts- The transaction selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- Optional flag to enable the filtering of resulting transactions according to thetransaction templateconfigured in the subscribed offer (only relevant for subscriptions)tm- The {#@link TransactionMode transaction mode}reratingLockCode- The rerating operation code- Returns:
- A set of
computed purchase ordersand business subexceptions - Throws:
BatchChargeException- 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
-
The SAP CC system filters the computed transactions according to
the
-
batchCharge
public BatchChargeResult batchCharge(Vector<ChargeParameters> parameters, Long subscriptionOrContractID, short partitionID, long suacID, AccessibleChargeType chargeType, int ts, boolean ft, MessageHeader.TransactionMode tm, String reratingLockCode) throws BatchChargeException, CommunicationFailureException, ForbiddenChargeException, ServerFailureException, TransactionClearingException 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. The system returns the resulting purchase orders that includes transactions computed according to thetsparameter.Note
When dealing with subscriptions:
-
The SAP CC system filters the computed transactions according to
the
transaction templatesassigned to the subscribedoffer. - This operation may conflict with prerating operations. Do not use this operation there are some pending prerating operations.
- Parameters:
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- Thetype of accessible chargedepending on the scope of the batch charging operation: subscription or charging contractts- The transaction selectionNONE_TRANSACTION,MASTER_TRANSACTION,ALL_TRANSACTION,ALL_TRANSACTION_AND_RECURRINGft- Optional flag to enable the filtering of resulting transactions according to thetransaction templateconfigured in the subscribed offer (only relevant for subscriptions)tm- The {#@link TransactionMode transaction mode}reratingLockCode- The rerating operation code- Returns:
- A set of
computed purchase ordersand business subexceptions - Throws:
BatchChargeException- 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
-
The SAP CC system filters the computed transactions according to
the
-
acquire
public List<AcquisitionResult> acquire(List<AcquisitionParameters> parameters) throws CommunicationFailureException, ServerFailureException Requests the connected SAP CC Core Server system to collect a list ofchargeable 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 itemand 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
Error Handling: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
exceptionwhich 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:
parameters- A set ofsingle acquisition operationsto execute- Returns:
- A set of
single acquisition results, in the same order as the single operation requests specified as arguments in thismethod; the result may include business subexceptions. - Throws:
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
-
startSubscriptionRerating
@Deprecated public StartSubscriptionReratingResult startSubscriptionRerating(String reratingLockCode, long subscriptionId, short partitionId, AccessibleChargeType accessibleChargeType, Date restorationDate) throws CommunicationFailureException, ServerFailureException, RerateSubscriptionException Deprecated.Starts the rerating of a subscription or charging contract.
This operation does the following:
- Lock the subscription or charging contract using the rerating lock code specified, so that it cannot be used by other processes
- Restore the values of the counters of the subscription or charging contract at the date specified
- Perform additional verifications with an external system using the Rerating Integration Framework (RIF)
- Parameters:
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 (subscriptionorcharging contract)restorationDate- The date from which the rerating will be performed- Returns:
- A start rerating result containing information on the execution of the operation
- Throws:
CommunicationFailureException- 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
-
startSubscriptionRerating
public StartSubscriptionReratingResult startSubscriptionRerating(String reratingLockCode, long subscriptionId, short partitionId, long suacId, AccessibleChargeType accessibleChargeType, Date restorationDate) throws CommunicationFailureException, ServerFailureException, RerateSubscriptionException Starts the rerating of a subscription or charging contract.
This operation does the following:
- Lock the subscription or charging contract using the rerating lock code specified, so that it cannot be used by other processes
- Restore the values of the counters of the subscription or charging contract at the date specified
- Perform additional verifications with an external system using the Rerating Integration Framework (RIF)
- Parameters:
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 (subscriptionorcharging contract)restorationDate- The date from which the rerating will be performed- Returns:
- A start rerating result containing information on the execution of the operation
- Throws:
CommunicationFailureException- 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
-
startContractCollectionRerating
@Deprecated public StartSubscriptionReratingResult startContractCollectionRerating(String reratingLockCode, short partitionId, Date restorationDate, List<Long> contractIdList) throws CommunicationFailureException, ServerFailureException, RerateSubscriptionException Deprecated.Starts the rerating of a collection of charging contracts.This operation does the following:
- Lock the charging contracts using the rerating lock code specified, so that they cannot be used by other processes
- Restore the values of the counters of the charging contracts at the date specified
- Perform additional verifications with an external system using the Rerating Integration Framework (RIF)
- Parameters:
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 rerate- Returns:
- A start rerating result containing information on the execution of the operation
- Throws:
CommunicationFailureException- 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
-
startContractCollectionRerating
public StartSubscriptionReratingResult startContractCollectionRerating(String reratingLockCode, short partitionId, long suacId, Date restorationDate, List<Long> contractIdList) throws CommunicationFailureException, ServerFailureException, RerateSubscriptionException Starts the rerating of a collection of charging contracts.This operation does the following:
- Lock the charging contracts using the rerating lock code specified, so that they cannot be used by other processes
- Restore the values of the counters of the charging contracts at the date specified
- Perform additional verifications with an external system using the Rerating Integration Framework (RIF)
- Parameters:
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 rerate- Returns:
- A start rerating result containing information on the execution of the operation
- Throws:
CommunicationFailureException- 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
-
unlockSubscription
@Deprecated public boolean unlockSubscription(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId) throws CommunicationFailureException, ForbiddenChargeException, ServerFailureException, TransactionClearingException Deprecated.Stops the rerating of a subscription.
This operation does the following:
- Optionally activate the subscription until the activate date specified
- Unlock the subscription, so that it can be used by other processes again
- Parameters:
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 rerate- Returns:
trueif subscription has been successfully unlocked,falseotherwise- Throws:
CommunicationFailureException- 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
-
stopSubscriptionRerating
@Deprecated public boolean stopSubscriptionRerating(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, Date activationDate, short partitionId, AccessibleChargeType accessibleChargeType) throws CommunicationFailureException, ForbiddenChargeException, ServerFailureException, TransactionClearingException Deprecated.Stops the rerating of a subscription or charging contract.
This operation does the following:
- Optionally activate the subscription or charging contract until the activate date specified
- Unlock the subscription or charging contract, so that it can be used by other processes again
- Parameters:
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 (subscriptionorcharging contract)- Returns:
trueif subscription or charging contract has been successfully unlocked,falseotherwise- Throws:
CommunicationFailureException- 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
-
stopSubscriptionRerating
public boolean stopSubscriptionRerating(String reratingLockCode, long subscriptionId, Date maxConsumptionDate, 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:
- Optionally activate the subscription or charging contract until the activate date specified
- Unlock the subscription or charging contract, so that it can be used by other processes again
- Parameters:
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 (subscriptionorcharging contract)- Returns:
trueif subscription or charging contract has been successfully unlocked,falseotherwise- Throws:
CommunicationFailureException- 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
-
pingReratingOperation
Checks if a rerating operation identified is running.- Overrides:
pingReratingOperationin classAsyncBatchServiceClient- Parameters:
reratingLockCode- The rerating operation code to check- Returns:
trueif the rerating operation is alive,falseotherwise- Throws:
CommunicationFailureException- if a communication failure occurs during the execution of the operation
-
generateResponse
public static com.highdeal.cnd.message.common.AcceptableResponse generateResponse(com.highdeal.cnd.message.common.ReratingInfoRequest request, boolean isAccepted) -
getResponseFromBuffer
public static com.highdeal.cnd.message.common.AcceptableResponse getResponseFromBuffer(com.highdeal.hmi.IDataBuffer buf) -
getRequestFromBuffer
public static com.highdeal.cnd.message.common.ReratingInfoRequest getRequestFromBuffer(com.highdeal.hmi.IDataBuffer buf)
-