com.ibm.diameter.charging.util
Class MultipleServicesCreditControl

java.lang.Object
  extended by com.ibm.diameter.charging.util.MultipleServicesCreditControl

public class MultipleServicesCreditControl
extends java.lang.Object

MultipleServicesCreditControl is a lightweight representation of the Grouped [Multiple-Services-Credit-Control] Avp.

The [Multiple-Services-Credit-Control] Avp is defined in RFC 4006 - Diameter Credit-Control Application.


Constructor Summary
MultipleServicesCreditControl()
          Constructs an empty MultipleServicesCreditControl object representing the [Multiple-Services-Credit-Control] Avp.
MultipleServicesCreditControl(java.util.List<Avp> avps)
          Constructs a MultipleServicesCreditControl object representing the Grouped [Multiple-Services-Credit-Control] Avp.
 
Method Summary
 FinalUnitIndication getFinalUnitIndication()
          Gets the value corresponding to the payload of the [Final-Unit-Indication] Avp.
 GrantedServiceUnit getGrantedServiceUnit()
          Gets the value corresponding to the payload of the [Granted-Service-Unit] Avp.
 GSUPoolReference getGSUPoolReference()
          Gets the value corresponding to the payload of the [GSU-Pool-Reference] Avp.
 PSFurnishChargingInformation getPsFurnishChargingInformation()
          Gets the value corresponding to the payload of the [PS-Furnish-Charging-Information] Avp.
 java.lang.Integer getQuotaConsumptionTime()
          Gets the value corresponding to the payload of the [Quota-Consumption-Time] Avp.
 java.lang.Integer getQuotaHoldingTime()
          Gets the value corresponding to the payload of the [Quota-Holding-Time] Avp.
 java.lang.Integer getRatingGroup()
          Gets the value corresponding to the payload of the [Rating-Group] Avp.
 java.lang.Integer[] getReportingReasons()
          Gets the values corresponding to the payloads of the [Reporting-Reason] Avps.
 RequestedServiceUnit getRequestedServiceUnit()
          Gets the value corresponding to the payload of the [Requested-Service-Unit] Avp.
 java.lang.Integer getResultCode()
          Gets the value corresponding to the payload of the [Result-Code] Avp.
 java.lang.Integer getServiceIdentifier()
          Gets the value corresponding to the payload of the [Service-Identifier] Avp.
 java.lang.Integer getTimeQuotaThreshold()
          Gets the value corresponding to the payload of the [Time-Quota-Threshold] Avp.
 java.lang.Integer[] getTriggerTypes()
          Gets the values corresponding to the payloads of the [Trigger-Type] Avps.
 java.lang.Integer getUnitQuotaThreshold()
          Gets the value corresponding to the payload of the [Unit-Quota-Threshold] Avp.
 UsedServiceUnit[] getUsedServiceUnits()
          Gets the values corresponding to the payloads of the [Used-Service-Unit] Avps.
 java.lang.Integer getValidityTime()
          Gets the value corresponding to the payload of the [Validity-Time] Avp.
 java.lang.Integer getVolumeQuotaThreshold()
          Gets the value corresponding to the payload of the [Volume-Quota-Threshold] Avp.
 void setFinalUnitIndication(FinalUnitIndication finalUnitIndication)
          Sets the value corresponding to the payload of the [Final-Unit-Indication] Avp.
 void setGrantedServiceUnit(GrantedServiceUnit grantedServiceUnit)
          Sets the value corresponding to the payload of the [Granted-Service-Unit] Avp.
 void setGSUPoolReference(GSUPoolReference poolReference)
          Sets the value corresponding to the payload of the [GSU-Pool-Reference] Avp.
 void setPsFurnishChargingInformation(PSFurnishChargingInformation psFurnishChargingInformation)
          Sets the value corresponding to the payload of the [PS-Furnish-Charging-Information] Avp.
 void setQuotaConsumptionTime(java.lang.Integer quotaConsumptionTime)
          Sets the value corresponding to the payload of the [Quota-Consumption-Time] Avp.
 void setQuotaHoldingTime(java.lang.Integer quotaHoldingTime)
          Sets the value corresponding to the payload of the [Quota-Holding-Time] Avp.
 void setRatingGroup(java.lang.Integer ratingGroup)
          Sets the value corresponding to the payload of the [Rating-Group] Avp.
 void setReportingReasons(java.lang.Integer[] reportingReasons)
          Sets the values corresponding to the payloads of the [Reporting-Reason] Avps.
 void setRequestedServiceUnit(RequestedServiceUnit requestedServiceUnit)
          Sets the value corresponding to the payload of the [Requested-Service-Unit] Avp.
 void setResultCode(java.lang.Integer resultCode)
          Sets the value corresponding to the payload of the [Result-Code] Avp.
 void setServiceIdentifier(java.lang.Integer serviceIdentifier)
          Sets the value corresponding to the payload of the [Service-Identifier] Avp.
 void setTimeQuotaThreshold(java.lang.Integer timeQuotaThreshold)
          Sets the value corresponding to the payload of the [Time-Quota-Threshold] Avp.
 void setTriggerTypes(java.lang.Integer[] triggerTypes)
          Sets the values corresponding to the payloads of the [Trigger-Type] Avps.
 void setUnitQuotaThreshold(java.lang.Integer unitQuotaThreshold)
          Sets the value corresponding to the payload of the [Unit-Quota-Threshold] Avp.
 void setUsedServiceUnits(UsedServiceUnit[] usedServiceUnits)
          Sets the values corresponding to the payloads of the [Used-Service-Unit] Avps.
 void setValidityTime(java.lang.Integer validityTime)
          Sets the value corresponding to the payload of the [Validity-Time] Avp.
 void setVolumeQuotaThreshold(java.lang.Integer volumeQuotaThreshold)
          Sets the value corresponding to the payload of the [Volume-Quota-Threshold] Avp.
 Avp toAvp()
          Transforms a MultipleServicesCreditControl object into a Grouped [Multiple-Services-Credit-Control] Avp.
 void validate()
          Validates the members of the MultipleServicesCreditControl object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipleServicesCreditControl

public MultipleServicesCreditControl()
Constructs an empty MultipleServicesCreditControl object representing the [Multiple-Services-Credit-Control] Avp.


MultipleServicesCreditControl

public MultipleServicesCreditControl(java.util.List<Avp> avps)
                              throws AvpTransformationException
Constructs a MultipleServicesCreditControl object representing the Grouped [Multiple-Services-Credit-Control] Avp.

The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of MultipleServicesCreditControl, the member will be populated with the Avp value during construction. If an Avp code is unknown, the value will be silently discarded.

Parameters:
avps - a list of Avps that can appear in the Grouped [Multiple-Services-Credit-Control] Avp.
Throws:
AvpTransformationException - if the Avp value is in an unexpected format.
Method Detail

getFinalUnitIndication

public FinalUnitIndication getFinalUnitIndication()
Gets the value corresponding to the payload of the [Final-Unit-Indication] Avp.

Returns:
the value corresponding to the payload of the [Final-Unit-Indication] Avp.

setFinalUnitIndication

public void setFinalUnitIndication(FinalUnitIndication finalUnitIndication)
Sets the value corresponding to the payload of the [Final-Unit-Indication] Avp.

Parameters:
finalUnitIndication - the value corresponding to the payload of the [Final-Unit-Indication] Avp.

getGrantedServiceUnit

public GrantedServiceUnit getGrantedServiceUnit()
Gets the value corresponding to the payload of the [Granted-Service-Unit] Avp.

Returns:
the value corresponding to the payload of the [Granted-Service-Unit] Avp.

setGrantedServiceUnit

public void setGrantedServiceUnit(GrantedServiceUnit grantedServiceUnit)
Sets the value corresponding to the payload of the [Granted-Service-Unit] Avp.

Parameters:
grantedServiceUnit - the value corresponding to the payload of the [Granted-Service-Unit] Avp.

getGSUPoolReference

public GSUPoolReference getGSUPoolReference()
Gets the value corresponding to the payload of the [GSU-Pool-Reference] Avp.

Returns:
the value corresponding to the payload of the [GSU-Pool-Reference] Avp.

setGSUPoolReference

public void setGSUPoolReference(GSUPoolReference poolReference)
Sets the value corresponding to the payload of the [GSU-Pool-Reference] Avp.

Parameters:
poolReference - the value corresponding to the payload of the [GSU-Pool-Reference] Avp.

getRatingGroup

public java.lang.Integer getRatingGroup()
Gets the value corresponding to the payload of the [Rating-Group] Avp.

Returns:
the value corresponding to the payload of the [Rating-Group] Avp.

setRatingGroup

public void setRatingGroup(java.lang.Integer ratingGroup)
Sets the value corresponding to the payload of the [Rating-Group] Avp.

Parameters:
ratingGroup - the value corresponding to the payload of the [Rating-Group] Avp.

getRequestedServiceUnit

public RequestedServiceUnit getRequestedServiceUnit()
Gets the value corresponding to the payload of the [Requested-Service-Unit] Avp.

Returns:
the value corresponding to the payload of the [Requested-Service-Unit] Avp.

setRequestedServiceUnit

public void setRequestedServiceUnit(RequestedServiceUnit requestedServiceUnit)
Sets the value corresponding to the payload of the [Requested-Service-Unit] Avp.

Parameters:
requestedServiceUnit - the value corresponding to the payload of the [Requested-Service-Unit] Avp.

getResultCode

public java.lang.Integer getResultCode()
Gets the value corresponding to the payload of the [Result-Code] Avp.

Returns:
the value corresponding to the payload of the [Result-Code] Avp.

setResultCode

public void setResultCode(java.lang.Integer resultCode)
Sets the value corresponding to the payload of the [Result-Code] Avp.

Parameters:
resultCode - the value corresponding to the payload of the [Result-Code] Avp.

getServiceIdentifier

public java.lang.Integer getServiceIdentifier()
Gets the value corresponding to the payload of the [Service-Identifier] Avp.

Returns:
the value corresponding to the payload of the [Service-Identifier] Avp.

setServiceIdentifier

public void setServiceIdentifier(java.lang.Integer serviceIdentifier)
Sets the value corresponding to the payload of the [Service-Identifier] Avp.

Parameters:
serviceIdentifier - the value corresponding to the payload of the [Service-Identifier] Avp.

getUsedServiceUnits

public UsedServiceUnit[] getUsedServiceUnits()
Gets the values corresponding to the payloads of the [Used-Service-Unit] Avps.

Returns:
the values corresponding to the payloads of the [Used-Service-Unit] Avps.

setUsedServiceUnits

public void setUsedServiceUnits(UsedServiceUnit[] usedServiceUnits)
Sets the values corresponding to the payloads of the [Used-Service-Unit] Avps.

Parameters:
usedServiceUnits - the values corresponding to the payloads of the [Used-Service-Unit] Avps.

getValidityTime

public java.lang.Integer getValidityTime()
Gets the value corresponding to the payload of the [Validity-Time] Avp.

Returns:
the value corresponding to the payload of the [Validity-Time] Avp.

setValidityTime

public void setValidityTime(java.lang.Integer validityTime)
Sets the value corresponding to the payload of the [Validity-Time] Avp.

Parameters:
validityTime - the value corresponding to the payload of the [Validity-Time] Avp.

getPsFurnishChargingInformation

public PSFurnishChargingInformation getPsFurnishChargingInformation()
Gets the value corresponding to the payload of the [PS-Furnish-Charging-Information] Avp.

Returns:
the value corresponding to the payload of the [PS-Furnish-Charging-Information] Avp.

setPsFurnishChargingInformation

public void setPsFurnishChargingInformation(PSFurnishChargingInformation psFurnishChargingInformation)
Sets the value corresponding to the payload of the [PS-Furnish-Charging-Information] Avp.

Parameters:
psFurnishChargingInformation - the value corresponding to the payload of the [PS-Furnish-Charging-Information] Avp.

getQuotaConsumptionTime

public java.lang.Integer getQuotaConsumptionTime()
Gets the value corresponding to the payload of the [Quota-Consumption-Time] Avp.

Returns:
the value corresponding to the payload of the [Quota-Consumption-Time] Avp.

setQuotaConsumptionTime

public void setQuotaConsumptionTime(java.lang.Integer quotaConsumptionTime)
Sets the value corresponding to the payload of the [Quota-Consumption-Time] Avp.

Parameters:
quotaConsumptionTime - the value corresponding to the payload of the [Quota-Consumption-Time] Avp.

getQuotaHoldingTime

public java.lang.Integer getQuotaHoldingTime()
Gets the value corresponding to the payload of the [Quota-Holding-Time] Avp.

Returns:
the value corresponding to the payload of the [Quota-Holding-Time] Avp.

setQuotaHoldingTime

public void setQuotaHoldingTime(java.lang.Integer quotaHoldingTime)
Sets the value corresponding to the payload of the [Quota-Holding-Time] Avp.

Parameters:
quotaHoldingTime - the value corresponding to the payload of the [Quota-Holding-Time] Avp.

getReportingReasons

public java.lang.Integer[] getReportingReasons()
Gets the values corresponding to the payloads of the [Reporting-Reason] Avps.

Returns:
the values corresponding to the payloads of the [Reporting-Reason] Avps.

setReportingReasons

public void setReportingReasons(java.lang.Integer[] reportingReasons)
Sets the values corresponding to the payloads of the [Reporting-Reason] Avps.

Parameters:
reportingReasons - the values corresponding to the payloads of the [Reporting-Reason] Avps.

getTimeQuotaThreshold

public java.lang.Integer getTimeQuotaThreshold()
Gets the value corresponding to the payload of the [Time-Quota-Threshold] Avp.

Returns:
the value corresponding to the payload of the [Time-Quota-Threshold] Avp.

setTimeQuotaThreshold

public void setTimeQuotaThreshold(java.lang.Integer timeQuotaThreshold)
Sets the value corresponding to the payload of the [Time-Quota-Threshold] Avp.

Parameters:
timeQuotaThreshold - the value corresponding to the payload of the [Time-Quota-Threshold] Avp.

getTriggerTypes

public java.lang.Integer[] getTriggerTypes()
Gets the values corresponding to the payloads of the [Trigger-Type] Avps.

Returns:
the values corresponding to the payloads of the [Trigger-Type] Avps.

setTriggerTypes

public void setTriggerTypes(java.lang.Integer[] triggerTypes)
Sets the values corresponding to the payloads of the [Trigger-Type] Avps.

Parameters:
triggerTypes - the values corresponding to the payloads of the [Trigger-Type] Avps.

getUnitQuotaThreshold

public java.lang.Integer getUnitQuotaThreshold()
Gets the value corresponding to the payload of the [Unit-Quota-Threshold] Avp.

Returns:
the value corresponding to the payload of the [Unit-Quota-Threshold] Avp.

setUnitQuotaThreshold

public void setUnitQuotaThreshold(java.lang.Integer unitQuotaThreshold)
Sets the value corresponding to the payload of the [Unit-Quota-Threshold] Avp.

Parameters:
unitQuotaThreshold - the value corresponding to the payload of the [Unit-Quota-Threshold] Avp.

getVolumeQuotaThreshold

public java.lang.Integer getVolumeQuotaThreshold()
Gets the value corresponding to the payload of the [Volume-Quota-Threshold] Avp.

Returns:
the value corresponding to the payload of the [Volume-Quota-Threshold] Avp.

setVolumeQuotaThreshold

public void setVolumeQuotaThreshold(java.lang.Integer volumeQuotaThreshold)
Sets the value corresponding to the payload of the [Volume-Quota-Threshold] Avp.

Parameters:
volumeQuotaThreshold - the value corresponding to the payload of the [Volume-Quota-Threshold] Avp.

validate

public void validate()
              throws ChargingValidationException
Validates the members of the MultipleServicesCreditControl object. The charging Web Services call this method before transforming the object into a Grouped Avp. This ensures that improperly formed Avps are not sent to the Diameter peer.

Throws:
ChargingValidationException - if a member of MultipleServicesCreditControl is in an unexpected format.

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms a MultipleServicesCreditControl object into a Grouped [Multiple-Services-Credit-Control] Avp.

All non-null members of MultipleServicesCreditControl will be transformed into Avps nested inside of the [Multiple-Services-Credit-Control] Avp.

Returns:
the [Multiple-Services-Credit-Control] Avp.
Throws:
AvpTransformationException - if a member of MultipleServicesCreditControl is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.