/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/GenericPkg/GenParamSigID.java

http://mobicents.googlecode.com/ · Java · 96 lines · 30 code · 12 blank · 54 comment · 0 complexity · 62b58986fc65e8de2cfd2ee8fcbcf6af MD5 · raw file

  1. package javax.megaco.pkg.GenericPkg;
  2. import javax.megaco.message.DescriptorType;
  3. import javax.megaco.pkg.ParamValueType;
  4. import javax.megaco.pkg.PkgConsts;
  5. import javax.megaco.pkg.PkgItemParam;
  6. /**
  7. * The MEGACO parameter class for the Signal Identity Parameter is associated
  8. * with Signal Completion event of Generic Package. This class defines all the
  9. * static information for this parameter.
  10. */
  11. public class GenParamSigID extends PkgItemParam {
  12. /**
  13. * Identifies Signal Identity parameter of the MEGACO Generic Package. Its
  14. * value shall be set equal to 0x0001.
  15. */
  16. public static final int GEN_PARAM_SIGID = 0x0001;
  17. /**
  18. * Constructs a parameter class for Generic package that specifies the
  19. * parameter as Signal Identity.
  20. */
  21. public GenParamSigID() {
  22. super();
  23. super.paramId = GEN_PARAM_SIGID;
  24. super.itemValueType = ParamValueType.M_STRING;
  25. super.paramsDescriptorIds = new int[] { DescriptorType.M_OBSERVED_EVENT_DESC };
  26. super.paramsItemIds = new int[] { GenSigComplEvent.GEN_SIG_COMPL_EVENT };
  27. }
  28. /**
  29. * The method can be used to get the parameter identifier as defined in the
  30. * MEGACO packages. The implementation of this method in this class returns
  31. * Id of Signal Identity parameter.
  32. *
  33. * @return paramId - Returns param id as {@link GEN_PARAM_SIGID}.
  34. */
  35. public int getParamId() {
  36. return super.paramId;
  37. }
  38. /**
  39. * The method can be used to get the type of the parameter as defined in the
  40. * MEGACO packages. These could be one of string or enumerated value or
  41. * integer or double value or boolean.
  42. *
  43. * @return It returns {@link M_STRING} indicating that the
  44. * parameter is a string.
  45. */
  46. public int getParamValueType() {
  47. return super.itemValueType;
  48. }
  49. /**
  50. * The method can be used to get the descriptor ids corresponding to the
  51. * parameters to which the parameter can be set.
  52. *
  53. * @return This parameter can be present in Event descriptor. It shall thus
  54. * return a value {@link M_OBSERVED_EVENT_DESC} as a part of integer
  55. * vector.
  56. */
  57. public int[] getParamsDescriptorIds() {
  58. return super.paramsDescriptorIds;
  59. }
  60. /**
  61. * The method can be used to get the item ids corresponding to the
  62. * parameters to which the parameter can be set. This method specifies the
  63. * valid item (event/signal) ids to which the parameter can belong to.
  64. *
  65. * @return The integer value corresponding to Signal Completion Event. Thus
  66. * this shall return {@link GEN_SIG_COMPL_EVENT}.
  67. */
  68. public int[] getParamsItemIds() {
  69. return super.paramsItemIds;
  70. }
  71. /**
  72. * The method can be used to get the package id corresponding to the to
  73. * which the parameter can be set. This method specifies the package for
  74. * which the parameter is valid. Even though the parameter may be set for an
  75. * item, but the parameter may not be valid for package to which the item
  76. * belongs, but may be valid for a package which has extended this package.
  77. *
  78. * @return This shall return @ GENERIC_PACKAGE} as the integer value. The
  79. * integer values are defined in @ PkgConsts} .
  80. */
  81. public int getParamsPkgId() {
  82. return PkgConsts.GENERIC_PACKAGE;
  83. }
  84. }