PageRenderTime 20ms CodeModel.GetById 11ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

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