com.ibm.diameter.charging.util
Class TrunkGroupId

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

public class TrunkGroupId
extends java.lang.Object

TrunkGroupId is a lightweight representation of the Grouped [Trnk-Group-Id] Avp. It holds information which identifies the Public Telephone Switched Network (PSTN).

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


Constructor Summary
TrunkGroupId()
          Constructs an empty TrunkGroupId object representing the [Trunk-Group-Id] Avp.
TrunkGroupId(java.util.List<Avp> avps)
          Constructs a TrunkGroupId object representing the Grouped [Trunk-Group-Id] Avp.
 
Method Summary
 java.lang.String getIncomingTrunkGroupId()
          Gets the value corresponding to the payload of the [Incoming-Trunk-Group-ID] Avp.
 java.lang.String getOutgoingTrunkGroupId()
          Gets the value corresponding to the payload of the [Outgoing-Trunk-Group-ID] Avp.
 void setIncomingTrunkGroupId(java.lang.String incomingTrunkGroupId)
          Sets the value corresponding to the payload of the [Incoming-Trunk-Group-ID] Avp.
 void setOutgoingTrunkGroupId(java.lang.String outgoingTrunkGroupId)
          Sets the value corresponding to the payload of the [Outgoing-Trunk-Group-ID] Avp.
 Avp toAvp()
          Transforms a TrunkGroupId object into a Grouped [Trunk-Group-Id] Avp.
 void validate()
          Validates the members of the TrunkGroupId object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrunkGroupId

public TrunkGroupId()
Constructs an empty TrunkGroupId object representing the [Trunk-Group-Id] Avp.


TrunkGroupId

public TrunkGroupId(java.util.List<Avp> avps)
             throws AvpTransformationException
Constructs a TrunkGroupId object representing the Grouped [Trunk-Group-Id] Avp.

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

getIncomingTrunkGroupId

public java.lang.String getIncomingTrunkGroupId()
Gets the value corresponding to the payload of the [Incoming-Trunk-Group-ID] Avp.

Returns:
the value corresponding to the payload of the [Incoming-Trunk-Group-ID] Avp.

setIncomingTrunkGroupId

public void setIncomingTrunkGroupId(java.lang.String incomingTrunkGroupId)
Sets the value corresponding to the payload of the [Incoming-Trunk-Group-ID] Avp.

Parameters:
incomingTrunkGroupId - the value corresponding to the payload of the [Incoming-Trunk-Group-ID] Avp.

getOutgoingTrunkGroupId

public java.lang.String getOutgoingTrunkGroupId()
Gets the value corresponding to the payload of the [Outgoing-Trunk-Group-ID] Avp.

Returns:
the value corresponding to the payload of the [Outgoing-Trunk-Group-ID] Avp.

setOutgoingTrunkGroupId

public void setOutgoingTrunkGroupId(java.lang.String outgoingTrunkGroupId)
Sets the value corresponding to the payload of the [Outgoing-Trunk-Group-ID] Avp.

Parameters:
outgoingTrunkGroupId - the value corresponding to the payload of the [Outgoing-Trunk-Group-ID] Avp.

validate

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

toAvp

public Avp toAvp()
          throws AvpTransformationException
Transforms a TrunkGroupId object into a Grouped [Trunk-Group-Id] Avp.

All non-null members of TrunkGroupId will be transformed into Avps nested inside of the [Trunk-Group-Id] Avp.

Returns:
the [Trunk-Group-Id] Avp.
Throws:
AvpTransformationException - if a member of TrunkGroupId is in an unexpected format.


Copyright © 2006 IBM Corp. All Rights Reserved.