org.jdiameter.api.validation
Interface MessageRepresentation


public interface MessageRepresentation

This class represents message/command in validation framework. It contains basic info about command along with avp list - their multiplicity and allowance.

Since:
1.5.4.0-build404
Author:
Bartosz Baranowski , Alexandre Mendonca

Method Summary
 long getApplicationId()
           
 AvpRepresentation getAvp(int code)
          Fetches Avp representation for given code.
 AvpRepresentation getAvp(int code, long vendorId)
          Fetches Avp representation for given code and vendorId.
 int getCommandCode()
           
 java.util.Map<AvpRepresentation,AvpRepresentation> getMessageAvps()
           
 java.lang.String getName()
           
 boolean isAllowed(int avpCode)
           
 boolean isAllowed(int avpCode, long vendorId)
           
 boolean isCountValidForMultiplicity(AvpSet destination, int code)
           
 boolean isCountValidForMultiplicity(AvpSet destination, int code, int numberToAdd)
           
 boolean isCountValidForMultiplicity(AvpSet destination, int code, long vendorId)
           
 boolean isCountValidForMultiplicity(AvpSet destination, int code, long vendorId, int numberToAdd)
           
 boolean isCountValidForMultiplicity(int code, int avpCount)
           
 boolean isCountValidForMultiplicity(int code, long vendorId, int avpCount)
           
 boolean isRequest()
           
 void validate(Message msg, ValidatorLevel validatorLevel)
           
 

Method Detail

getMessageAvps

java.util.Map<AvpRepresentation,AvpRepresentation> getMessageAvps()

getCommandCode

int getCommandCode()

getApplicationId

long getApplicationId()

isRequest

boolean isRequest()

getName

java.lang.String getName()

getAvp

AvpRepresentation getAvp(int code)
Fetches Avp representation for given code. If no such AVP is found, null value is returned. AVP must be top level AVP to be fetched by this operation.

Parameters:
code - - positive integer, equal to AVP code.
Returns:
AvpRepresentation for given code or null

getAvp

AvpRepresentation getAvp(int code,
                         long vendorId)
Fetches Avp representation for given code and vendorId. If no such AVP is found, null value is returned. AVP must be top level AVP to be fetched by this operation.

Parameters:
code - - positive integer, equal to AVP code.
vendorId - - positive long representing vendor code.
Returns:
AvpRepresentation for given code/vendor pair or null

isCountValidForMultiplicity

boolean isCountValidForMultiplicity(int code,
                                    int avpCount)

isCountValidForMultiplicity

boolean isCountValidForMultiplicity(int code,
                                    long vendorId,
                                    int avpCount)

isCountValidForMultiplicity

boolean isCountValidForMultiplicity(AvpSet destination,
                                    int code,
                                    long vendorId,
                                    int numberToAdd)

isCountValidForMultiplicity

boolean isCountValidForMultiplicity(AvpSet destination,
                                    int code,
                                    int numberToAdd)

isCountValidForMultiplicity

boolean isCountValidForMultiplicity(AvpSet destination,
                                    int code,
                                    long vendorId)

isCountValidForMultiplicity

boolean isCountValidForMultiplicity(AvpSet destination,
                                    int code)

isAllowed

boolean isAllowed(int avpCode,
                  long vendorId)

isAllowed

boolean isAllowed(int avpCode)

validate

void validate(Message msg,
              ValidatorLevel validatorLevel)
              throws AvpNotAllowedException
Throws:
AvpNotAllowedException


Copyright © 2013. All Rights Reserved.