PageRenderTime 61ms CodeModel.GetById 52ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/AnalogLineSPkg/AnalogLineSParamInit.java

http://mobicents.googlecode.com/
Java | 99 lines | 31 code | 12 blank | 56 comment | 0 complexity | 81cb5ad3d012b00e2e402c2ea6d9b494 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 Init Parameter is associated with On Hook
10 * and Off Hook event of Analog Line Supervision Package. This class defines all
11 * the static information for this parameter.
12 */
13public class AnalogLineSParamInit extends PkgItemParam {
14
15	/**
16	 *Identifies Init parameter of the MEGACO Analog Line Supervision Package.
17	 * Its value shall be set equal to 0x0002.
18	 */
19	public static final int ANALOG_LINE_PARAM_INIT = 0x0002;
20
21	protected int[] paramsItemIds = null;
22
23	/**
24	 * Constructs a parameter class for Analog Line Supervision package that
25	 * specifies the parameter as Initial State.
26	 */
27	public AnalogLineSParamInit() {
28		super();
29		super.paramId = ANALOG_LINE_PARAM_INIT;
30		super.itemValueType = ParamValueType.M_STRING;
31		super.paramsDescriptorIds = new int[] { DescriptorType.M_OBSERVED_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 Cadence parameter.
39	 * 
40	 * @return paramId - Returns param id as {@link ANALOG_LINE_PARAM_INIT}.
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_OBSERVED_EVENT_DESC}.
95	 */
96	public int[] getParamsDescriptorIds() {
97		return super.paramsDescriptorIds;
98	}
99}