PageRenderTime 46ms CodeModel.GetById 2ms app.highlight 37ms RepoModel.GetById 1ms app.codeStats 1ms

/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
  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
 23package org.mobicents.protocols.ss7.map.api;
 24
 25import java.nio.charset.Charset;
 26import java.util.ArrayList;
 27
 28import org.mobicents.protocols.ss7.isup.message.parameter.LocationNumber;
 29import org.mobicents.protocols.ss7.map.api.dialog.MAPUserAbortChoice;
 30import org.mobicents.protocols.ss7.map.api.primitives.AdditionalNumberType;
 31import org.mobicents.protocols.ss7.map.api.primitives.AddressNature;
 32import org.mobicents.protocols.ss7.map.api.primitives.AddressString;
 33import org.mobicents.protocols.ss7.map.api.primitives.AlertingPattern;
 34import org.mobicents.protocols.ss7.map.api.primitives.CellGlobalIdOrServiceAreaIdFixedLength;
 35import org.mobicents.protocols.ss7.map.api.primitives.CellGlobalIdOrServiceAreaIdOrLAI;
 36import org.mobicents.protocols.ss7.map.api.primitives.FTNAddressString;
 37import org.mobicents.protocols.ss7.map.api.primitives.IMEI;
 38import org.mobicents.protocols.ss7.map.api.primitives.IMSI;
 39import org.mobicents.protocols.ss7.map.api.primitives.ISDNAddressString;
 40import org.mobicents.protocols.ss7.map.api.primitives.LAIFixedLength;
 41import org.mobicents.protocols.ss7.map.api.primitives.LMSI;
 42import org.mobicents.protocols.ss7.map.api.primitives.MAPExtensionContainer;
 43import org.mobicents.protocols.ss7.map.api.primitives.MAPPrivateExtension;
 44import org.mobicents.protocols.ss7.map.api.primitives.NumberingPlan;
 45import org.mobicents.protocols.ss7.map.api.primitives.USSDString;
 46import org.mobicents.protocols.ss7.map.api.service.callhandling.CallReferenceNumber;
 47import org.mobicents.protocols.ss7.map.api.service.sms.LocationInfoWithLMSI;
 48import org.mobicents.protocols.ss7.map.api.service.sms.MWStatus;
 49import org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_DA;
 50import org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_OA;
 51import org.mobicents.protocols.ss7.map.api.service.sms.SM_RP_SMEA;
 52import org.mobicents.protocols.ss7.map.api.service.sms.SmsSignalInfo;
 53import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.GeodeticInformation;
 54import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.GeographicalInformation;
 55import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.LSAIdentity;
 56import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.LocationInformation;
 57import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.LocationInformationEPS;
 58import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.LocationNumberMap;
 59import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.NotReachableReason;
 60import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.SubscriberState;
 61import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.SubscriberStateChoice;
 62import org.mobicents.protocols.ss7.map.api.service.subscriberInformation.UserCSGInformation;
 63import org.mobicents.protocols.ss7.map.api.service.subscriberManagement.ExtBasicServiceCode;
 64import org.mobicents.protocols.ss7.map.api.service.subscriberManagement.ExtBearerServiceCode;
 65import org.mobicents.protocols.ss7.map.api.service.subscriberManagement.ExtTeleserviceCode;
 66import org.mobicents.protocols.ss7.map.api.service.supplementary.ProcessUnstructuredSSRequestIndication;
 67import org.mobicents.protocols.ss7.map.api.service.supplementary.ProcessUnstructuredSSResponseIndication;
 68import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSNotifyRequestIndication;
 69import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSNotifyResponseIndication;
 70import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSRequestIndication;
 71import org.mobicents.protocols.ss7.map.api.service.supplementary.UnstructuredSSResponseIndication;
 72import org.mobicents.protocols.ss7.map.api.smstpdu.SmsTpdu;
 73import org.mobicents.protocols.ss7.tcap.asn.comp.GeneralProblemType;
 74import org.mobicents.protocols.ss7.tcap.asn.comp.InvokeProblemType;
 75import org.mobicents.protocols.ss7.tcap.asn.comp.Problem;
 76import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnErrorProblemType;
 77import org.mobicents.protocols.ss7.tcap.asn.comp.ReturnResultProblemType;
 78
 79/**
 80 * 
 81 * @author amit bhayani
 82 * @author sergey vetyutnev
 83 * 
 84 */
 85public interface MAPParameterFactory {
 86
 87	public ProcessUnstructuredSSRequestIndication createProcessUnstructuredSSRequestIndication(byte ussdDataCodingSch, USSDString ussdString,
 88			AlertingPattern alertingPattern, ISDNAddressString msisdnAddressString);
 89
 90	public ProcessUnstructuredSSResponseIndication createProcessUnstructuredSSResponseIndication(byte ussdDataCodingScheme, USSDString ussdString);
 91
 92	public UnstructuredSSRequestIndication createUnstructuredSSRequestIndication(byte ussdDataCodingSch, USSDString ussdString,
 93			AlertingPattern alertingPattern, ISDNAddressString msisdnAddressString);
 94
 95	public UnstructuredSSResponseIndication createUnstructuredSSRequestIndication(byte ussdDataCodingScheme, USSDString ussdString);
 96	
 97	public UnstructuredSSNotifyRequestIndication createUnstructuredSSNotifyRequestIndication(byte ussdDataCodingSch, USSDString ussdString,
 98			AlertingPattern alertingPattern, ISDNAddressString msisdnAddressString);
 99
100	public UnstructuredSSNotifyResponseIndication createUnstructuredSSNotifyResponseIndication();
101
102	/**
103	 * Creates a new instance of {@link USSDString}. The passed USSD String is
104	 * encoded by using the default Charset defined in GSM 03.38 Specs
105	 * 
106	 * @param ussdString
107	 *            The USSD String
108	 * @return new instance of {@link USSDString}
109	 */
110	public USSDString createUSSDString(String ussdString);
111
112	/**
113	 * Creates a new instance of {@link USSDString} using the passed
114	 * {@link java.nio.charset.Charset} for encoding the passed ussdString
115	 * String
116	 * 
117	 * @param ussdString
118	 *            The USSD String
119	 * @param charSet
120	 *            The Charset used for encoding the passed USSD String
121	 * @return new instance of {@link USSDString}
122	 */
123	public USSDString createUSSDString(String ussdString, Charset charSet);
124
125	/**
126	 * Creates a new instance of {@link USSDString}. The passed USSD String
127	 * byte[] is encoded by using the default Charset defined in GSM 03.38 Specs
128	 * 
129	 * @param ussdString
130	 *            The USSD String
131	 * @return new instance of {@link USSDString}
132	 */
133	public USSDString createUSSDString(byte[] ussdString);
134
135	/**
136	 * Creates a new instance of {@link USSDString} using the passed
137	 * {@link java.nio.charset.Charset} for encoding the passed ussdString
138	 * byte[]
139	 * 
140	 * @param ussdString
141	 *            The byte[] of the USSD String
142	 * @param charSet
143	 *            The Charset used for encoding the passed USSD String byte[]
144	 * @return new instance of {@link USSDString}
145	 */
146	public USSDString createUSSDString(byte[] ussdString, Charset charSet);
147
148	/**
149	 * Creates a new instance of {@link AddressString}
150	 * 
151	 * @param addNature
152	 *            The nature of this AddressString. See {@link AddressNature}.
153	 * @param numPlan
154	 *            The {@link NumberingPlan} of this AddressString
155	 * @param address
156	 *            The actual address (number)
157	 * @return new instance of {@link AddressString}
158	 */
159	public AddressString createAddressString(AddressNature addNature, NumberingPlan numPlan, String address);
160
161	public ISDNAddressString createISDNAddressString(AddressNature addNature, NumberingPlan numPlan, String address);
162
163	public FTNAddressString createFTNAddressString(AddressNature addNature, NumberingPlan numPlan, String address);
164
165	/**
166	 * Creates a new instance of {@link IMSI}
167	 * 
168	 * @param data
169	 *            whole data string 
170	 * @return new instance of {@link IMSI}
171	 */
172	public IMSI createIMSI(String data);
173
174	public IMEI createIMEI(String imei);
175
176	/**
177	 * Creates a new instance of {@link LMSI}
178	 * 
179	 * @param data
180	 * 
181	 * @return new instance of {@link LMSI}
182	 */
183	public LMSI createLMSI(byte[] data);
184
185	/**
186	 * Creates a new instance of {@link SM_RP_DA} with imsi parameter
187	 * 
188	 * @param imsi
189	 * @return
190	 */
191	public SM_RP_DA createSM_RP_DA(IMSI imsi);
192
193	/**
194	 * Creates a new instance of {@link SM_RP_DA} with lmsi parameter
195	 * 
196	 * @param lmsi
197	 * @return
198	 */
199	public SM_RP_DA createSM_RP_DA(LMSI lmsi);
200
201	/**
202	 * Creates a new instance of {@link SM_RP_DA} with serviceCentreAddressDA
203	 * parameter
204	 * 
205	 * @param serviceCentreAddressDA
206	 * @return
207	 */
208	public SM_RP_DA createSM_RP_DA(AddressString serviceCentreAddressDA);
209
210	/**
211	 * Creates a new instance of {@link SM_RP_DA} with noSM_RP_DA parameter
212	 * 
213	 * @return
214	 */
215	public SM_RP_DA createSM_RP_DA();
216
217	/**
218	 * Creates a new instance of {@link SM_RP_OA} with msisdn parameter
219	 * 
220	 * @param msisdn
221	 * @return
222	 */
223	public SM_RP_OA createSM_RP_OA_Msisdn(ISDNAddressString msisdn);
224
225	/**
226	 * Creates a new instance of {@link SM_RP_OA} with serviceCentreAddressOA
227	 * parameter
228	 * 
229	 * @param serviceCentreAddressOA
230	 * @return
231	 */
232	public SM_RP_OA createSM_RP_OA_ServiceCentreAddressOA(AddressString serviceCentreAddressOA);
233
234	/**
235	 * Creates a new instance of {@link SM_RP_OA} with noSM_RP_OA parameter
236	 * 
237	 * @return
238	 */
239	public SM_RP_OA createSM_RP_OA();
240
241	public SmsSignalInfo createSmsSignalInfo(byte[] data, Charset gsm8Charset);
242
243	public SmsSignalInfo createSmsSignalInfo(SmsTpdu data, Charset gsm8Charset) throws MAPException;
244
245	public SM_RP_SMEA createSM_RP_SMEA(byte[] data);
246	
247	/**
248	 * Creates a new instance of {@link MAPUserAbortChoice}
249	 * 
250	 * @return
251	 */
252	public MAPUserAbortChoice createMAPUserAbortChoice();
253
254	public MWStatus createMWStatus(boolean scAddressNotIncluded, boolean mnrfSet, boolean mcefSet, boolean mnrgSet);
255
256	public LocationInfoWithLMSI createLocationInfoWithLMSI(ISDNAddressString networkNodeNumber, LMSI lmsi, MAPExtensionContainer extensionContainer,
257			AdditionalNumberType additionalNumberType, ISDNAddressString additionalNumber);
258
259	/**
260	 * Creates a new instance of {@link MAPPrivateExtension} for
261	 * {@link MAPExtensionContainer}
262	 * 
263	 * @param oId
264	 *            PrivateExtension ObjectIdentifier
265	 * @param data
266	 *            PrivateExtension data (ASN.1 encoded byte array with tag
267	 *            bytes)
268	 * @return
269	 */
270	public MAPPrivateExtension createMAPPrivateExtension(long[] oId, byte[] data);
271
272	/**
273	 * @param privateExtensionList
274	 *            List of PrivateExtensions
275	 * @param pcsExtensions
276	 *            pcsExtensions value (ASN.1 encoded byte array without tag
277	 *            byte)
278	 * @return
279	 */
280	public MAPExtensionContainer createMAPExtensionContainer(ArrayList<MAPPrivateExtension> privateExtensionList, byte[] pcsExtensions);
281	
282	public CellGlobalIdOrServiceAreaIdOrLAI createCellGlobalIdOrServiceAreaIdOrLAI(CellGlobalIdOrServiceAreaIdFixedLength cellGlobalIdOrServiceAreaIdFixedLength);
283
284	public CellGlobalIdOrServiceAreaIdOrLAI createCellGlobalIdOrServiceAreaIdOrLAI(LAIFixedLength laiFixedLength);
285	
286	public CellGlobalIdOrServiceAreaIdFixedLength createCellGlobalIdOrServiceAreaIdFixedLength(byte[] data);
287
288	public CellGlobalIdOrServiceAreaIdFixedLength createCellGlobalIdOrServiceAreaIdFixedLength(int mcc, int mnc, int lac, int cellId) throws MAPException;
289
290	public LAIFixedLength createLAIFixedLength(byte[] data);
291	public LAIFixedLength createLAIFixedLength(int mcc, int mnc, int lac) throws MAPException;
292
293	public CallReferenceNumber createCallReferenceNumber(byte[] data);
294
295	public LocationInformation createLocationInformation(Integer ageOfLocationInformation, GeographicalInformation geographicalInformation,
296			ISDNAddressString vlrNumber, LocationNumberMap locationNumber, CellGlobalIdOrServiceAreaIdOrLAI cellGlobalIdOrServiceAreaIdOrLAI,
297			MAPExtensionContainer extensionContainer, LSAIdentity selectedLSAId, ISDNAddressString mscNumber, GeodeticInformation geodeticInformation,
298			boolean currentLocationRetrieved, boolean saiPresent, LocationInformationEPS locationInformationEPS, UserCSGInformation userCSGInformation);
299	public LocationNumberMap createLocationNumberMap(byte[] data);
300	public LocationNumberMap createLocationNumberMap(LocationNumber locationNumber) throws MAPException;
301	public SubscriberState createSubscriberState(SubscriberStateChoice subscriberStateChoice, NotReachableReason notReachableReason);
302
303	public ExtBasicServiceCode createExtBasicServiceCode(ExtBearerServiceCode extBearerServiceCode);
304	public ExtBasicServiceCode createExtBasicServiceCode(ExtTeleserviceCode extTeleserviceCode);
305	public ExtBearerServiceCode createExtBearerServiceCode(byte[] data);
306	public ExtTeleserviceCode createExtTeleserviceCode(byte[] data);
307
308	public Problem createProblemGeneral(GeneralProblemType prob);
309	public Problem createProblemInvoke(InvokeProblemType prob);
310	public Problem createProblemResult(ReturnResultProblemType prob);
311	public Problem createProblemError(ReturnErrorProblemType prob);
312}