Interface UsageRequest
- All Superinterfaces:
Request<Usage>
,Serializable
,TemporalObject
,oracle.communication.brm.charging.ratingview.UsageRequestView
public interface UsageRequest
extends Request<Usage>, oracle.communication.brm.charging.ratingview.UsageRequestView
Class represents a UsageRequest which is processed by the ECE Charging Service.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionconvertToTerminate
(Usage requestType) Method to create a TERMINATE Usage Request from the current original UsageRequest.convertToTerminate
(Usage requestType, ZonedDateTime requestStartTime, ZonedDateTime requestEnd, boolean isMultipleUSU, boolean isBeforeTTC, String sessionIdOverridenForLifeCycleUpdate) Method to create a TERMINATE Usage Request from the current original UsageRequest.convertToTerminateZeroUsedUnit
(Usage requestType, ZonedDateTime requestStartTime, ZonedDateTime requestEnd, boolean isMultipleUSU, boolean isBeforeTTC, String sessionIdOverridenForLifeCycleUpdate) Gets the name of the USU field that tracks DURATION usage for session based charging.get the event type associated with the usageRequest.oracle.communication.brm.charging.servicecontext.internal.OverageDetailsImpl
Getterget the product type associated with the usageRequest.getQtyPropBasedOnCreditBreach
(BigDecimalFraction proportion, boolean isDurationRumPresent, long configuredValidity, long tariffSwitchTime, long unratedDuration, boolean ifWorstCostImpacted, long ratedDurationInMillis, boolean isQuotaAttributePresent, int randomizationInterval) Get the expiration date and time in case of reverse rating (ONLY)get the requestId associated with the UsageRequest.get the requestId associated with the UsageRequest.Getterint
get the sequence number for this usage request.boolean
get the subscriber trace flagGet the version of the usage requestvoid
resolve
(UsageRequest oldUsageRequest, UsageRequest newUsageRequest, boolean isInternalOverride) Conflict logic to resolve between 2 usage request across clusters.void
setOverageDetails
(oracle.communication.brm.charging.servicecontext.internal.OverageDetailsImpl overageDetails) settervoid
setReportingReason
(String reportingReason) sets the Reporting-Reasonvoid
setTraced
(boolean traced) Set the subscriber trace flagwithDateTimes
(ZonedDateTime requestStart, ZonedDateTime requestEnd) Method to create a new UsageRequest from the current request using the supplied payload.withRequestId
(String newRequestId) New UsageRequest with specified newRequestId.Methods inherited from interface oracle.communication.brm.charging.messages.framework.Request
getOperation, getPayload, getStatus
Methods inherited from interface oracle.communication.brm.charging.messages.framework.TemporalObject
getCreationInstant
Methods inherited from interface oracle.communication.brm.charging.ratingview.UsageRequestView
getBrmEventType, getOperationName, getParentEventType, getPayload, getRequestEnd, getRequestStart, getSessionStart, getUserIdentity, isAmountBasedRequest, setRequestStart, setStateTransition
-
Field Details
-
IMPACT_AMOUNT_BLOCK_NAME
- See Also:
-
BALANCE_ELEMENT_ID_NAME
- See Also:
-
AMOUNT_NAME
- See Also:
-
CO_RELATION_IDENTIFIER_NAME
- See Also:
-
REQUESTED_UNITS
- See Also:
-
USED_UNITS_BLOCK
- See Also:
-
TARIFF_CHANGE_USAGE
- See Also:
-
TARIFF_CHANGE_USAGE_BEFORE_TTC
static final int TARIFF_CHANGE_USAGE_BEFORE_TTC- See Also:
-
TARIFF_CHANGE_USAGE_AFTER_TTC
static final int TARIFF_CHANGE_USAGE_AFTER_TTC- See Also:
-
-
Method Details
-
getRequestId
String getRequestId()get the requestId associated with the UsageRequest. This unique session Id is constant across all INITIATE, UPDATE and TERMINATES corresponding to the same session.- Specified by:
getRequestId
in interfaceoracle.communication.brm.charging.ratingview.UsageRequestView
- Returns:
- the sessionId
-
getReportingReason
String getReportingReason()get the requestId associated with the UsageRequest. This unique session Id is constant across all INITIATE, UPDATE and TERMINATES corresponding to the same session.- Returns:
- the reportingReason
-
setReportingReason
sets the Reporting-Reason -
getProductType
String getProductType()get the product type associated with the usageRequest.- Specified by:
getProductType
in interfaceoracle.communication.brm.charging.ratingview.UsageRequestView
- Returns:
-
getEventType
String getEventType()get the event type associated with the usageRequest.- Specified by:
getEventType
in interfaceoracle.communication.brm.charging.ratingview.UsageRequestView
- Returns:
-
setTraced
void setTraced(boolean traced) Set the subscriber trace flag -
getTraced
boolean getTraced()get the subscriber trace flag- Returns:
- true if the subscriber request is to be traced or false
-
getSequenceNumber
int getSequenceNumber()get the sequence number for this usage request. Multiple UsageRequest corresponding to the same session will have their sequence number incremented each time.- Returns:
- the sequence number for this usage request
-
getRatingConditionChange
Boolean getRatingConditionChange()- Returns:
- The flag representing if there is rating condition change
-
getUnitReportingMode
UnitReportingMode getUnitReportingMode()- Returns:
- The Unit Reporting Mode of this usage Request.
-
withDateTimes
Method to create a new UsageRequest from the current request using the supplied payload. Values from the request will be used by default. Only the values passed in parameters will be over written.- Parameters:
requestStart
- session start timerequestEnd
- request end time- Returns:
- enriched Usage Request
-
getVersion
String getVersion()Get the version of the usage request- Returns:
- version
-
getDurationAttributeName
String getDurationAttributeName()Gets the name of the USU field that tracks DURATION usage for session based charging.- Returns:
- the name of the USU field for tracking DURATION. Will return null if the UsageRequest does not contain fields for DURATION based charging.
-
getQtyPropBasedOnCreditBreach
Long getQtyPropBasedOnCreditBreach(BigDecimalFraction proportion, boolean isDurationRumPresent, long configuredValidity, long tariffSwitchTime, long unratedDuration, boolean ifWorstCostImpacted, long ratedDurationInMillis, boolean isQuotaAttributePresent, int randomizationInterval) Get the expiration date and time in case of reverse rating (ONLY)- Returns:
- long value of the duration to the end time after being adjusted with the proportion in seconds
-
withRequestId
New UsageRequest with specified newRequestId. All other properties are retained- Parameters:
newRequestId
- newRequestId- Returns:
- UsageRequest UsageRequest
-
convertToTerminate
Method to create a TERMINATE Usage Request from the current original UsageRequest. This is used during the ASO Cleanup, Mid session CDR operation and Management Accounting on/off.- Parameters:
requestType
- request type- Returns:
- new forcefully created TERMINATE request
-
resolve
void resolve(UsageRequest oldUsageRequest, UsageRequest newUsageRequest, boolean isInternalOverride) Conflict logic to resolve between 2 usage request across clusters.- Parameters:
oldUsageRequest
-newUsageRequest
-
-
getRequestMode
RequestMode getRequestMode()Getter- Returns:
- to get the request mode (ONLINE or OFFLINE)
-
convertToTerminate
UsageRequest convertToTerminate(Usage requestType, ZonedDateTime requestStartTime, ZonedDateTime requestEnd, boolean isMultipleUSU, boolean isBeforeTTC, String sessionIdOverridenForLifeCycleUpdate) Method to create a TERMINATE Usage Request from the current original UsageRequest. This is used during the ASO Cleanup, Mid session CDR operation and Management Accounting on/off.- Parameters:
requestType
- request typesessionIdOverridenForLifeCycleUpdate
-- Returns:
- new forcefully created TERMINATE request
-
convertToTerminateZeroUsedUnit
UsageRequest convertToTerminateZeroUsedUnit(Usage requestType, ZonedDateTime requestStartTime, ZonedDateTime requestEnd, boolean isMultipleUSU, boolean isBeforeTTC, String sessionIdOverridenForLifeCycleUpdate) - Parameters:
requestType
-requestStartTime
-requestEnd
-isMultipleUSU
-isBeforeTTC
-sessionIdOverridenForLifeCycleUpdate
-- Returns:
-
getOverageDetails
oracle.communication.brm.charging.servicecontext.internal.OverageDetailsImpl getOverageDetails()Getter- Returns:
- the overageDetails entry
-
setOverageDetails
void setOverageDetails(oracle.communication.brm.charging.servicecontext.internal.OverageDetailsImpl overageDetails) setter- Parameters:
overageDetails
- overageDetail objects
-