org.jdiameter.common.impl.validation
Class DictionaryImpl

java.lang.Object
  extended by org.jdiameter.common.impl.validation.DictionaryImpl
All Implemented Interfaces:
Dictionary

public class DictionaryImpl
extends java.lang.Object
implements Dictionary

Implementation of Dictionary interface.

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

Field Summary
static java.lang.String _AVP_ATTRIBUTE_CODE
           
static java.lang.String _AVP_ATTRIBUTE_INDEX
           
static java.lang.String _AVP_ATTRIBUTE_MULTIPLICITY
           
static java.lang.String _AVP_ATTRIBUTE_NAME
           
static java.lang.String _AVP_ATTRIBUTE_VENDOR
           
static Dictionary INSTANCE
           
 
Method Summary
 void configure(java.io.InputStream is)
           
 AvpRepresentation getAvp(int code)
           
 AvpRepresentation getAvp(int code, long vendorId)
           
 AvpRepresentation getAvp(java.lang.String avpName)
           
 java.util.Map<AvpRepresentation,AvpRepresentation> getAvpMap()
           
 java.util.Map<MessageRepresentation,MessageRepresentation> getCommandMap()
           
 MessageRepresentation getMessage(int commandCode, boolean isRequest)
           
 MessageRepresentation getMessage(int commandCode, long applicationId, boolean isRequest)
           
 java.util.Map<java.lang.String,AvpRepresentation> getNameToCodeMap()
           
 ValidatorLevel getReceiveLevel()
           
 ValidatorLevel getSendLevel()
           
 java.util.Map<java.lang.String,java.lang.String> getTypedefMap()
           
 java.util.Map<java.lang.String,java.lang.String> getVendorMap()
           
 boolean isConfigured()
           
 boolean isEnabled()
           
protected  void parseAvps(org.w3c.dom.Document doc)
          Parses the attributes from a Dictionary XML Document
protected  void parseTypeDefs(org.w3c.dom.Document doc)
          Parses the attributes from a Dictionary XML Document
protected  void parseVendors(org.w3c.dom.Document doc)
          Parses the attributes from a Dictionary XML Document
protected  void printAvpTree(AvpRepresentation rep, java.lang.String tab)
           
 void setConfigured(boolean configured)
           
 void setEnabled(boolean enabled)
           
 void setReceiveLevel(ValidatorLevel level)
           
 void setSendLevel(ValidatorLevel level)
           
 void validate(Message msg, boolean incoming)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final Dictionary INSTANCE

_AVP_ATTRIBUTE_NAME

public static final java.lang.String _AVP_ATTRIBUTE_NAME
See Also:
Constant Field Values

_AVP_ATTRIBUTE_CODE

public static final java.lang.String _AVP_ATTRIBUTE_CODE
See Also:
Constant Field Values

_AVP_ATTRIBUTE_VENDOR

public static final java.lang.String _AVP_ATTRIBUTE_VENDOR
See Also:
Constant Field Values

_AVP_ATTRIBUTE_MULTIPLICITY

public static final java.lang.String _AVP_ATTRIBUTE_MULTIPLICITY
See Also:
Constant Field Values

_AVP_ATTRIBUTE_INDEX

public static final java.lang.String _AVP_ATTRIBUTE_INDEX
See Also:
Constant Field Values
Method Detail

configure

public void configure(java.io.InputStream is)
Specified by:
configure in interface Dictionary

parseVendors

protected void parseVendors(org.w3c.dom.Document doc)
Parses the attributes from a Dictionary XML Document

Parameters:
doc - the DOM object representing the XML Document with the Dictionary definitions

parseTypeDefs

protected void parseTypeDefs(org.w3c.dom.Document doc)
Parses the attributes from a Dictionary XML Document

Parameters:
doc - the DOM object representing the XML Document with the Dictionary definitions

parseAvps

protected void parseAvps(org.w3c.dom.Document doc)
Parses the attributes from a Dictionary XML Document

Parameters:
doc - the DOM object representing the XML Document with the Dictionary definitions

isConfigured

public boolean isConfigured()
Specified by:
isConfigured in interface Dictionary

getAvp

public AvpRepresentation getAvp(int code)
Specified by:
getAvp in interface Dictionary

getAvp

public AvpRepresentation getAvp(int code,
                                long vendorId)
Specified by:
getAvp in interface Dictionary

getAvp

public AvpRepresentation getAvp(java.lang.String avpName)
Specified by:
getAvp in interface Dictionary

getMessage

public MessageRepresentation getMessage(int commandCode,
                                        boolean isRequest)
Specified by:
getMessage in interface Dictionary

getMessage

public MessageRepresentation getMessage(int commandCode,
                                        long applicationId,
                                        boolean isRequest)
Specified by:
getMessage in interface Dictionary

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface Dictionary

getSendLevel

public ValidatorLevel getSendLevel()
Specified by:
getSendLevel in interface Dictionary

getReceiveLevel

public ValidatorLevel getReceiveLevel()
Specified by:
getReceiveLevel in interface Dictionary

setSendLevel

public void setSendLevel(ValidatorLevel level)
Specified by:
setSendLevel in interface Dictionary

setReceiveLevel

public void setReceiveLevel(ValidatorLevel level)
Specified by:
setReceiveLevel in interface Dictionary

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface Dictionary

setConfigured

public void setConfigured(boolean configured)

validate

public void validate(Message msg,
                     boolean incoming)
              throws AvpNotAllowedException
Specified by:
validate in interface Dictionary
Throws:
AvpNotAllowedException

getAvpMap

public java.util.Map<AvpRepresentation,AvpRepresentation> getAvpMap()

getVendorMap

public java.util.Map<java.lang.String,java.lang.String> getVendorMap()

getCommandMap

public java.util.Map<MessageRepresentation,MessageRepresentation> getCommandMap()

getTypedefMap

public java.util.Map<java.lang.String,java.lang.String> getTypedefMap()

getNameToCodeMap

public java.util.Map<java.lang.String,AvpRepresentation> getNameToCodeMap()

printAvpTree

protected void printAvpTree(AvpRepresentation rep,
                            java.lang.String tab)


Copyright © 2014. All Rights Reserved.