PageRenderTime 48ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/ss7/map/map-api/src/main/java/org/mobicents/protocols/ss7/map/api/MAPParameterFactory.java

http://mobicents.googlecode.com/
Java | 312 lines | 112 code | 44 blank | 156 comment | 0 complexity | b17e88c9c102aa0b6b025f88e7bd7540 MD5 | raw file
Possible License(s): LGPL-3.0, GPL-3.0, LGPL-2.1, GPL-2.0, CC-BY-SA-3.0, CC0-1.0, Apache-2.0, BSD-3-Clause
  1. /*
  2. * JBoss, Home of Professional Open Source
  3. * Copyright 2011, Red Hat, Inc. and individual contributors
  4. * by the @authors tag. See the copyright.txt in the distribution for a
  5. * full listing of individual contributors.
  6. *
  7. * This is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU Lesser General Public License as
  9. * published by the Free Software Foundation; either version 2.1 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This software is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this software; if not, write to the Free
  19. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21. */
  22. package org.mobicents.protocols.ss7.map.api;
  23. import java.nio.charset.Charset;
  24. import java.util.ArrayList;
  25. import org.mobicents.protocols.ss7.isup.message.parameter.LocationNumber;
  26. import org.mobicents.protocols.ss7.map.api.dialog.MAPUserAbortChoice;
  27. import org.mobicents.protocols.ss7.map.api.primitives.AdditionalNumberType;
  28. import org.mobicents.protocols.ss7.map.api.primitives.AddressNature;
  29. import org.mobicents.protocols.ss7.map.api.primitives.AddressString;
  30. import org.mobicents.protocols.ss7.map.api.primitives.AlertingPattern;
  31. import org.mobicents.protocols.ss7.map.api.primitives.CellGlobalIdOrServiceAreaIdFixedLength;
  32. import org.mobicents.protocols.ss7.map.api.primitives.CellGlobalIdOrServiceAreaIdOrLAI;
  33. import org.mobicents.protocols.ss7.map.api.primitives.FTNAddressString;
  34. import org.mobicents.protocols.ss7.map.api.primitives.IMEI;
  35. import org.mobicents.protocols.ss7.map.api.primitives.IMSI;
  36. import org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString;
  37. import org.mobicents.protocols.ss7.map.api.primitives.LAIFixedLength;
  38. import org.mobicents.protocols.ss7.map.api.primitives.LMSI;
  39. import org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer;
  40. import org.mobicents.protocols.ss7.map.api.primitives.MAPPrivateExtension;
  41. import org.mobicents.protocols.ss7.map.api.primitives.NumberingPlan;
  42. import org.mobicents.protocols.ss7.map.api.primitives.USSDString;
  43. import org.mobicents.protocols.ss7.map.api.service.callhandling.CallReferenceNumber;
  44. import org.mobicents.protocols.ss7.map.api.service.sms.LocationInfoWithLMSI;
  45. import org.mobicents.protocols.ss7.map.api.service.sms.MWStatus;
  46. import org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_DA;
  47. import org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_OA;
  48. import org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_SMEA;
  49. import org.mobicents.protocols.ss7.map.api.service.sms.SmsSignalInfo;
  50. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.GeodeticInformation;
  51. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.GeographicalInformation;
  52. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.LSAIdentity;
  53. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.LocationInformation;
  54. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.LocationInformationEPS;
  55. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.LocationNumberMap;
  56. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.NotReachableReason;
  57. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.SubscriberState;
  58. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.SubscriberStateChoice;
  59. import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.UserCSGInformation;
  60. import org.mobicents.protocols.ss7.map.api.service.subscriberManagement.ExtBasicServiceCode;
  61. import org.mobicents.protocols.ss7.map.api.service.subscriberManagement.ExtBearerServiceCode;
  62. import org.mobicents.protocols.ss7.map.api.service.subscriberManagement.ExtTeleserviceCode;
  63. import org.mobicents.protocols.ss7.map.api.service.supplementary.ProcessUnstructuredSSRequestIndication;
  64. import org.mobicents.protocols.ss7.map.api.service.supplementary.ProcessUnstructuredSSResponseIndication;
  65. import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSNotifyRequestIndication;
  66. import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSNotifyResponseIndication;
  67. import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSRequestIndication;
  68. import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSResponseIndication;
  69. import org.mobicents.protocols.ss7.map.api.smstpdu.SmsTpdu;
  70. import org.mobicents.protocols.ss7.tcap.asn.comp.GeneralProblemType;
  71. import org.mobicents.protocols.ss7.tcap.asn.comp.InvokeProblemType;
  72. import org.mobicents.protocols.ss7.tcap.asn.comp.Problem;
  73. import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnErrorProblemType;
  74. import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultProblemType;
  75. /**
  76. *
  77. * @author amit bhayani
  78. * @author sergey vetyutnev
  79. *
  80. */
  81. public interface MAPParameterFactory {
  82. public ProcessUnstructuredSSRequestIndication createProcessUnstructuredSSRequestIndication(byte ussdDataCodingSch, USSDString ussdString,
  83. AlertingPattern alertingPattern, ISDNAddressString msisdnAddressString);
  84. public ProcessUnstructuredSSResponseIndication createProcessUnstructuredSSResponseIndication(byte ussdDataCodingScheme, USSDString ussdString);
  85. public UnstructuredSSRequestIndication createUnstructuredSSRequestIndication(byte ussdDataCodingSch, USSDString ussdString,
  86. AlertingPattern alertingPattern, ISDNAddressString msisdnAddressString);
  87. public UnstructuredSSResponseIndication createUnstructuredSSRequestIndication(byte ussdDataCodingScheme, USSDString ussdString);
  88. public UnstructuredSSNotifyRequestIndication createUnstructuredSSNotifyRequestIndication(byte ussdDataCodingSch, USSDString ussdString,
  89. AlertingPattern alertingPattern, ISDNAddressString msisdnAddressString);
  90. public UnstructuredSSNotifyResponseIndication createUnstructuredSSNotifyResponseIndication();
  91. /**
  92. * Creates a new instance of {@link USSDString}. The passed USSD String is
  93. * encoded by using the default Charset defined in GSM 03.38 Specs
  94. *
  95. * @param ussdString
  96. * The USSD String
  97. * @return new instance of {@link USSDString}
  98. */
  99. public USSDString createUSSDString(String ussdString);
  100. /**
  101. * Creates a new instance of {@link USSDString} using the passed
  102. * {@link java.nio.charset.Charset} for encoding the passed ussdString
  103. * String
  104. *
  105. * @param ussdString
  106. * The USSD String
  107. * @param charSet
  108. * The Charset used for encoding the passed USSD String
  109. * @return new instance of {@link USSDString}
  110. */
  111. public USSDString createUSSDString(String ussdString, Charset charSet);
  112. /**
  113. * Creates a new instance of {@link USSDString}. The passed USSD String
  114. * byte[] is encoded by using the default Charset defined in GSM 03.38 Specs
  115. *
  116. * @param ussdString
  117. * The USSD String
  118. * @return new instance of {@link USSDString}
  119. */
  120. public USSDString createUSSDString(byte[] ussdString);
  121. /**
  122. * Creates a new instance of {@link USSDString} using the passed
  123. * {@link java.nio.charset.Charset} for encoding the passed ussdString
  124. * byte[]
  125. *
  126. * @param ussdString
  127. * The byte[] of the USSD String
  128. * @param charSet
  129. * The Charset used for encoding the passed USSD String byte[]
  130. * @return new instance of {@link USSDString}
  131. */
  132. public USSDString createUSSDString(byte[] ussdString, Charset charSet);
  133. /**
  134. * Creates a new instance of {@link AddressString}
  135. *
  136. * @param addNature
  137. * The nature of this AddressString. See {@link AddressNature}.
  138. * @param numPlan
  139. * The {@link NumberingPlan} of this AddressString
  140. * @param address
  141. * The actual address (number)
  142. * @return new instance of {@link AddressString}
  143. */
  144. public AddressString createAddressString(AddressNature addNature, NumberingPlan numPlan, String address);
  145. public ISDNAddressString createISDNAddressString(AddressNature addNature, NumberingPlan numPlan, String address);
  146. public FTNAddressString createFTNAddressString(AddressNature addNature, NumberingPlan numPlan, String address);
  147. /**
  148. * Creates a new instance of {@link IMSI}
  149. *
  150. * @param data
  151. * whole data string
  152. * @return new instance of {@link IMSI}
  153. */
  154. public IMSI createIMSI(String data);
  155. public IMEI createIMEI(String imei);
  156. /**
  157. * Creates a new instance of {@link LMSI}
  158. *
  159. * @param data
  160. *
  161. * @return new instance of {@link LMSI}
  162. */
  163. public LMSI createLMSI(byte[] data);
  164. /**
  165. * Creates a new instance of {@link SM_RP_DA} with imsi parameter
  166. *
  167. * @param imsi
  168. * @return
  169. */
  170. public SM_RP_DA createSM_RP_DA(IMSI imsi);
  171. /**
  172. * Creates a new instance of {@link SM_RP_DA} with lmsi parameter
  173. *
  174. * @param lmsi
  175. * @return
  176. */
  177. public SM_RP_DA createSM_RP_DA(LMSI lmsi);
  178. /**
  179. * Creates a new instance of {@link SM_RP_DA} with serviceCentreAddressDA
  180. * parameter
  181. *
  182. * @param serviceCentreAddressDA
  183. * @return
  184. */
  185. public SM_RP_DA createSM_RP_DA(AddressString serviceCentreAddressDA);
  186. /**
  187. * Creates a new instance of {@link SM_RP_DA} with noSM_RP_DA parameter
  188. *
  189. * @return
  190. */
  191. public SM_RP_DA createSM_RP_DA();
  192. /**
  193. * Creates a new instance of {@link SM_RP_OA} with msisdn parameter
  194. *
  195. * @param msisdn
  196. * @return
  197. */
  198. public SM_RP_OA createSM_RP_OA_Msisdn(ISDNAddressString msisdn);
  199. /**
  200. * Creates a new instance of {@link SM_RP_OA} with serviceCentreAddressOA
  201. * parameter
  202. *
  203. * @param serviceCentreAddressOA
  204. * @return
  205. */
  206. public SM_RP_OA createSM_RP_OA_ServiceCentreAddressOA(AddressString serviceCentreAddressOA);
  207. /**
  208. * Creates a new instance of {@link SM_RP_OA} with noSM_RP_OA parameter
  209. *
  210. * @return
  211. */
  212. public SM_RP_OA createSM_RP_OA();
  213. public SmsSignalInfo createSmsSignalInfo(byte[] data, Charset gsm8Charset);
  214. public SmsSignalInfo createSmsSignalInfo(SmsTpdu data, Charset gsm8Charset) throws MAPException;
  215. public SM_RP_SMEA createSM_RP_SMEA(byte[] data);
  216. /**
  217. * Creates a new instance of {@link MAPUserAbortChoice}
  218. *
  219. * @return
  220. */
  221. public MAPUserAbortChoice createMAPUserAbortChoice();
  222. public MWStatus createMWStatus(boolean scAddressNotIncluded, boolean mnrfSet, boolean mcefSet, boolean mnrgSet);
  223. public LocationInfoWithLMSI createLocationInfoWithLMSI(ISDNAddressString networkNodeNumber, LMSI lmsi, MAPExtensionContainer extensionContainer,
  224. AdditionalNumberType additionalNumberType, ISDNAddressString additionalNumber);
  225. /**
  226. * Creates a new instance of {@link MAPPrivateExtension} for
  227. * {@link MAPExtensionContainer}
  228. *
  229. * @param oId
  230. * PrivateExtension ObjectIdentifier
  231. * @param data
  232. * PrivateExtension data (ASN.1 encoded byte array with tag
  233. * bytes)
  234. * @return
  235. */
  236. public MAPPrivateExtension createMAPPrivateExtension(long[] oId, byte[] data);
  237. /**
  238. * @param privateExtensionList
  239. * List of PrivateExtensions
  240. * @param pcsExtensions
  241. * pcsExtensions value (ASN.1 encoded byte array without tag
  242. * byte)
  243. * @return
  244. */
  245. public MAPExtensionContainer createMAPExtensionContainer(ArrayList<MAPPrivateExtension> privateExtensionList, byte[] pcsExtensions);
  246. public CellGlobalIdOrServiceAreaIdOrLAI createCellGlobalIdOrServiceAreaIdOrLAI(CellGlobalIdOrServiceAreaIdFixedLength cellGlobalIdOrServiceAreaIdFixedLength);
  247. public CellGlobalIdOrServiceAreaIdOrLAI createCellGlobalIdOrServiceAreaIdOrLAI(LAIFixedLength laiFixedLength);
  248. public CellGlobalIdOrServiceAreaIdFixedLength createCellGlobalIdOrServiceAreaIdFixedLength(byte[] data);
  249. public CellGlobalIdOrServiceAreaIdFixedLength createCellGlobalIdOrServiceAreaIdFixedLength(int mcc, int mnc, int lac, int cellId) throws MAPException;
  250. public LAIFixedLength createLAIFixedLength(byte[] data);
  251. public LAIFixedLength createLAIFixedLength(int mcc, int mnc, int lac) throws MAPException;
  252. public CallReferenceNumber createCallReferenceNumber(byte[] data);
  253. public LocationInformation createLocationInformation(Integer ageOfLocationInformation, GeographicalInformation geographicalInformation,
  254. ISDNAddressString vlrNumber, LocationNumberMap locationNumber, CellGlobalIdOrServiceAreaIdOrLAI cellGlobalIdOrServiceAreaIdOrLAI,
  255. MAPExtensionContainer extensionContainer, LSAIdentity selectedLSAId, ISDNAddressString mscNumber, GeodeticInformation geodeticInformation,
  256. boolean currentLocationRetrieved, boolean saiPresent, LocationInformationEPS locationInformationEPS, UserCSGInformation userCSGInformation);
  257. public LocationNumberMap createLocationNumberMap(byte[] data);
  258. public LocationNumberMap createLocationNumberMap(LocationNumber locationNumber) throws MAPException;
  259. public SubscriberState createSubscriberState(SubscriberStateChoice subscriberStateChoice, NotReachableReason notReachableReason);
  260. public ExtBasicServiceCode createExtBasicServiceCode(ExtBearerServiceCode extBearerServiceCode);
  261. public ExtBasicServiceCode createExtBasicServiceCode(ExtTeleserviceCode extTeleserviceCode);
  262. public ExtBearerServiceCode createExtBearerServiceCode(byte[] data);
  263. public ExtTeleserviceCode createExtTeleserviceCode(byte[] data);
  264. public Problem createProblemGeneral(GeneralProblemType prob);
  265. public Problem createProblemInvoke(InvokeProblemType prob);
  266. public Problem createProblemResult(ReturnResultProblemType prob);
  267. public Problem createProblemError(ReturnErrorProblemType prob);
  268. }