com.ibm.diameter.charging.util
Class AdditionalContentInformation

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

public class AdditionalContentInformation
extends java.lang.Object

AdditionalContentInformation is a lightweight representation of the Grouped [Additional-Content-Information] Avp. It is used to identify the content within an MM when the MM-Content-Type Avp indicates multi-part content.

The [Additional-Content-Information] Avp is defined by the 3GPP in ETSI TS 132 299 V6.9.0 (2006-12) - Diameter charging applications.


Constructor Summary
AdditionalContentInformation()
          Constructs an empty AdditionalContentInformation object representing the [Additional-Content-Information] Avp.
AdditionalContentInformation(java.util.List<Avp> avps)
          Constructs an AdditionalContentInformation object representing the Grouped [Additional-Content-Information] Avp.
 
Method Summary
 java.lang.String getAdditionalTypeInformation()
          Gets the value corresponding to the payload of the [Additional-Type-Information] Avp.
 java.lang.Integer getContentSize()
          Gets the value corresponding to the payload of the [Content-Size] Avp.
 java.lang.Integer getTypeNumber()
          Gets the value corresponding to the payload of the [Type-Number] Avp.
 void setAdditionalTypeInformation(java.lang.String additionalTypeInformation)
          Sets the value corresponding to the payload of the [Additional-Type-Information] Avp.
 void setContentSize(java.lang.Integer contentSize)
          Sets the value corresponding to the payload of the [Content-Size] Avp.
 void setTypeNumber(java.lang.Integer typeNumber)
          Sets the value corresponding to the payload of the [Type-Number] Avp.
 Avp toAvp()
          Transforms an AdditionalContentInformation object into a Grouped [Additional-Content-Information] Avp.
 void validate()
          Validates the members of the AdditionalContentInformation object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdditionalContentInformation

public AdditionalContentInformation()
Constructs an empty AdditionalContentInformation object representing the [Additional-Content-Information] Avp.


AdditionalContentInformation

public AdditionalContentInformation(java.util.List<Avp> avps)
                             throws AvpTransformationException
Constructs an AdditionalContentInformation object representing the Grouped [Additional-Content-Information] Avp.

The method takes a List of Avps as an input. If an Avp code inside the list corresponds to a member of AdditionalContentInformation, 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 [Additional-Content-Information] Avp.
Throws:
AvpTransformationException - if the Avp value is in an unexpected format.
Method Detail

getAdditionalTypeInformation

public java.lang.String getAdditionalTypeInformation()
Gets the value corresponding to the payload of the [Additional-Type-Information] Avp.

Returns:
the value corresponding to the payload of the [Additional-Type-Information] Avp.

setAdditionalTypeInformation

public void setAdditionalTypeInformation(java.lang.String additionalTypeInformation)
Sets the value corresponding to the payload of the [Additional-Type-Information] Avp.

Parameters:
additionalTypeInformation - the value corresponding to the payload of the [Additional-Type-Information] Avp.

getContentSize

public java.lang.Integer getContentSize()
Gets the value corresponding to the payload of the [Content-Size] Avp.

Returns:
the value corresponding to the payload of the [Content-Size] Avp.

setContentSize

public void setContentSize(java.lang.Integer contentSize)
Sets the value corresponding to the payload of the [Content-Size] Avp.

Parameters:
contentSize - the value corresponding to the payload of the [Content-Size] Avp.

getTypeNumber

public java.lang.Integer getTypeNumber()
Gets the value corresponding to the payload of the [Type-Number] Avp.

Returns:
the value corresponding to the payload of the [Type-Number] Avp.

setTypeNumber

public void setTypeNumber(java.lang.Integer typeNumber)
Sets the value corresponding to the payload of the [Type-Number] Avp.

Parameters:
typeNumber - the value corresponding to the payload of the [Type-Number] Avp.

validate

public void validate()
              throws ChargingValidationException
Validates the members of the AdditionalContentInformation 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 AdditionalContentInformation is in an unexpected format.

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms an AdditionalContentInformation object into a Grouped [Additional-Content-Information] Avp.

All non-null members of AdditionalContentInformation will be transformed into Avps nested inside of the [Additional-Content-Information] Avp.

Returns:
the [Additional-Content-Information] Avp.
Throws:
AvpTransformationException - if a member of AdditionalContentInformation is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.