/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/AnalogLineSPkg/AnalogLineSParamStrict.java
Java | 100 lines | 31 code | 12 blank | 57 comment | 0 complexity | 19b230fbf6c9433c836840b8725d1317 MD5 | raw file
1package javax.megaco.pkg.AnalogLineSPkg; 2 3import javax.megaco.message.DescriptorType; 4import javax.megaco.pkg.ParamValueType; 5import javax.megaco.pkg.PkgConsts; 6import javax.megaco.pkg.PkgItemParam; 7 8/** 9 * The MEGACO parameter class for the Strict Parameter is associated with On 10 * Hook and Off Hook event of Analog Line Supervision Package. This class 11 * defines all the static information for this paramete 12 */ 13public class AnalogLineSParamStrict extends PkgItemParam { 14 15 /** 16 * Identifies Strict parameter of the MEGACO Analog Line Supervision 17 * Package. Its value shall be set equal to 0x0001. 18 */ 19 public static final int ANALOG_LINE_PARAM_STRICT = 0x0001; 20 21 protected int[] paramsItemIds = null; 22 23 /** 24 * Constructs a parameter class for Analog Line Supervision package that 25 * specifies the parameter as Strict. 26 */ 27 public AnalogLineSParamStrict() { 28 super(); 29 super.paramId = ANALOG_LINE_PARAM_STRICT; 30 super.itemValueType = ParamValueType.M_STRING; 31 super.paramsDescriptorIds = new int[] { DescriptorType.M_EVENT_DESC }; 32 this.paramsItemIds = new int[] { AnalogLineSOnEvt.ANALOG_LINE_ONHOOK_EVENT, AnalogLineSOffEvt.ANALOG_LINE_OFFHOOK_EVENT }; 33 } 34 35 /** 36 * The method can be used to get the parameter identifier as defined in the 37 * MEGACO packages. The implementation of this method in this class returns 38 * Id of Minimum Duration parameter. 39 * 40 * @return paramId - Returns param id as {@link ANALOG_LINE_PARAM_STRICT}. 41 */ 42 public int getParamId() { 43 44 return super.paramId; 45 } 46 47 /** 48 * The method can be used to get the type of the parameter as defined in the 49 * MEGACO packages. These could be one of string or enumerated value or 50 * integer or double value or boolean. 51 * 52 * @return It returns {@link ParamValueType.M_STRING } 53 * indicating that the parameter is a string. 54 */ 55 public int getParamValueType() { 56 57 return super.itemValueType; 58 } 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 values corresponding to On Hook event and Off Hook 66 * event. Thus this shall return a vector containing the elements 67 * {@link ANALOG_LINE_ONHOOK_EVENT} and 68 * {@link ANALOG_LINE_OFFHOOK_EVENT}. 69 */ 70 public int[] getParamsItemIds() { 71 return this.paramsItemIds; 72 } 73 74 /** 75 * The method can be used to get the package id corresponding to the to 76 * which the parameter can be set. This method specifies the package for 77 * which the parameter is valid. Even though the parameter may be set for an 78 * item, but the parameter may not be valid for package to which the item 79 * belongs, but may be valid for a package which has extended this package. 80 * 81 * @return This shall return {@link PkgConsts.ANALOG_LINE_PACKAGE} as the 82 * integer value. The integer values are defined in 83 * {@link PkgConsts}. 84 */ 85 public int getParamsPkgId() { 86 return PkgConsts.ANALOG_LINE_PACKAGE; 87 } 88 89 /** 90 * The method can be used to get the descriptor ids corresponding to the 91 * parameters to which the parameter can be set. 92 * 93 * @return This parameter can be present in Event descriptor. It shall thus 94 * return a value {@link DescriptorType.M_SIGNAL_DESC} and 95 * {@link DescriptorType.M_EVENT_DESC}. 96 */ 97 public int[] getParamsDescriptorIds() { 98 return super.paramsDescriptorIds; 99 } 100}