com.ibm.diameter.charging.util
Class MMContentType

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

public class MMContentType
extends java.lang.Object

MMContentType is a lightweight representation of the Grouped [MM-Content-Type] Avp. It includes information about the contents of an MM.

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


Constructor Summary
MMContentType()
          Constructs an empty MMContentType object representing the [MM-Content-Type] Avp.
MMContentType(java.util.List<Avp> avps)
          Constructs a MMContentType object representing the Grouped [MM-Content-Type] Avp.
 
Method Summary
 AdditionalContentInformation[] getAdditionalContentInformation()
          Gets the value corresponding to the payload of the [Additional-Content-Information] Avp.
 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 setAdditionalContentInformation(AdditionalContentInformation[] additionalContentInformation)
          Sets the value corresponding to the payload of the [Additional-Content-Information] 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 a MMContentType object into a Grouped [MM-Content-Type] Avp.
 void validate()
          Validates the members of the MMContentType object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MMContentType

public MMContentType()
Constructs an empty MMContentType object representing the [MM-Content-Type] Avp.


MMContentType

public MMContentType(java.util.List<Avp> avps)
              throws AvpTransformationException
Constructs a MMContentType object representing the Grouped [MM-Content-Type] Avp.

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

getAdditionalContentInformation

public AdditionalContentInformation[] getAdditionalContentInformation()
Gets the value corresponding to the payload of the [Additional-Content-Information] Avp.

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

setAdditionalContentInformation

public void setAdditionalContentInformation(AdditionalContentInformation[] additionalContentInformation)
Sets the value corresponding to the payload of the [Additional-Content-Information] Avp.

Parameters:
additionalContentInformation - the value corresponding to the payload of the [Additional-Content-Information] Avp.

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 MMContentType 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 MMContentType is in an unexpected format.

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms a MMContentType object into a Grouped [MM-Content-Type] Avp.

All non-null members of MMContentType will be transformed into Avps nested inside of the [MM-Content-Type] Avp.

Returns:
the [MM-Content-Type] Avp.
Throws:
AvpTransformationException - if a member of MMContentType is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.