PageRenderTime 60ms CodeModel.GetById 7ms app.highlight 46ms RepoModel.GetById 2ms app.codeStats 0ms

/protocols/ss7/isup/isup-impl/src/main/java/org/mobicents/protocols/ss7/isup/impl/message/InitialAddressMessageImpl.java

http://mobicents.googlecode.com/
Java | 780 lines | 561 code | 115 blank | 104 comment | 10 complexity | d3e65b04ce673bf5789a08ddb005ec78 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
 23/**
 24 * Start time:08:17:13 2009-07-17<br>
 25 * Project: mobicents-isup-stack<br>
 26 * 
 27 * @author <a href="mailto:baranowb@gmail.com">Bartosz Baranowski </a>
 28 * 
 29 */
 30package org.mobicents.protocols.ss7.isup.impl.message;
 31
 32import java.util.ArrayList;
 33import java.util.Collections;
 34import java.util.List;
 35import java.util.Map;
 36import java.util.Set;
 37
 38import org.mobicents.protocols.ss7.isup.ISUPParameterFactory;
 39import org.mobicents.protocols.ss7.isup.ParameterException;
 40import org.mobicents.protocols.ss7.isup.impl.message.parameter.AbstractISUPParameter;
 41import org.mobicents.protocols.ss7.isup.impl.message.parameter.MessageTypeImpl;
 42import org.mobicents.protocols.ss7.isup.message.InitialAddressMessage;
 43import org.mobicents.protocols.ss7.isup.message.parameter.CCSS;
 44import org.mobicents.protocols.ss7.isup.message.parameter.CallReference;
 45import org.mobicents.protocols.ss7.isup.message.parameter.CalledPartyNumber;
 46import org.mobicents.protocols.ss7.isup.message.parameter.CallingPartyCategory;
 47import org.mobicents.protocols.ss7.isup.message.parameter.CallingPartyNumber;
 48import org.mobicents.protocols.ss7.isup.message.parameter.ClosedUserGroupInterlockCode;
 49import org.mobicents.protocols.ss7.isup.message.parameter.ConnectionRequest;
 50import org.mobicents.protocols.ss7.isup.message.parameter.ForwardCallIndicators;
 51import org.mobicents.protocols.ss7.isup.message.parameter.ForwardGVNS;
 52import org.mobicents.protocols.ss7.isup.message.parameter.GenericDigits;
 53import org.mobicents.protocols.ss7.isup.message.parameter.GenericNotificationIndicator;
 54import org.mobicents.protocols.ss7.isup.message.parameter.GenericNumber;
 55import org.mobicents.protocols.ss7.isup.message.parameter.GenericReference;
 56import org.mobicents.protocols.ss7.isup.message.parameter.LocationNumber;
 57import org.mobicents.protocols.ss7.isup.message.parameter.MLPPPrecedence;
 58import org.mobicents.protocols.ss7.isup.message.parameter.MessageType;
 59import org.mobicents.protocols.ss7.isup.message.parameter.NatureOfConnectionIndicators;
 60import org.mobicents.protocols.ss7.isup.message.parameter.NetworkManagementControls;
 61import org.mobicents.protocols.ss7.isup.message.parameter.NetworkSpecificFacility;
 62import org.mobicents.protocols.ss7.isup.message.parameter.OptionalForwardCallIndicators;
 63import org.mobicents.protocols.ss7.isup.message.parameter.OriginalCalledNumber;
 64import org.mobicents.protocols.ss7.isup.message.parameter.OriginatingISCPointCode;
 65import org.mobicents.protocols.ss7.isup.message.parameter.ParameterCompatibilityInformation;
 66import org.mobicents.protocols.ss7.isup.message.parameter.PropagationDelayCounter;
 67import org.mobicents.protocols.ss7.isup.message.parameter.RedirectingNumber;
 68import org.mobicents.protocols.ss7.isup.message.parameter.RedirectionInformation;
 69import org.mobicents.protocols.ss7.isup.message.parameter.RemoteOperations;
 70import org.mobicents.protocols.ss7.isup.message.parameter.ServiceActivation;
 71import org.mobicents.protocols.ss7.isup.message.parameter.TransimissionMediumRequierementPrime;
 72import org.mobicents.protocols.ss7.isup.message.parameter.TransitNetworkSelection;
 73import org.mobicents.protocols.ss7.isup.message.parameter.TransmissionMediumRequirement;
 74import org.mobicents.protocols.ss7.isup.message.parameter.UserServiceInformation;
 75import org.mobicents.protocols.ss7.isup.message.parameter.UserServiceInformationPrime;
 76import org.mobicents.protocols.ss7.isup.message.parameter.UserTeleserviceInformation;
 77import org.mobicents.protocols.ss7.isup.message.parameter.UserToUserIndicators;
 78import org.mobicents.protocols.ss7.isup.message.parameter.UserToUserInformation;
 79import org.mobicents.protocols.ss7.isup.message.parameter.accessTransport.AccessTransport;
 80
 81/**
 82 * Start time:08:17:13 2009-07-17<br>
 83 * Project: mobicents-isup-stack<br>
 84 * 
 85 * @author <a href="mailto:baranowb@gmail.com">Bartosz Baranowski </a>
 86 */
 87public class InitialAddressMessageImpl extends ISUPMessageImpl implements InitialAddressMessage {
 88
 89	public static final MessageTypeImpl _MESSAGE_TYPE = new MessageTypeImpl(MESSAGE_CODE);
 90	private static final int _MANDATORY_VAR_COUNT = 1;
 91	// mandatory fixed L
 92	static final int _INDEX_F_MessageType = 0;
 93	static final int _INDEX_F_NatureOfConnectionIndicators = 1;
 94	static final int _INDEX_F_ForwardCallIndicators = 2;
 95	static final int _INDEX_F_CallingPartyCategory = 3;
 96	static final int _INDEX_F_TransmissionMediumRequirement = 4;
 97	// mandatory variable L
 98	static final int _INDEX_V_CalledPartyNumber = 0;
 99	// optional
100	static final int _INDEX_O_TransitNetworkSelection = 0;
101	static final int _INDEX_O_CallReference = 1;
102	static final int _INDEX_O_CallingPartyNumber = 2;
103	static final int _INDEX_O_OptionalForwardCallIndicators = 3;
104	static final int _INDEX_O_RedirectingNumber = 4;
105	static final int _INDEX_O_RedirectionInformation = 5;
106	static final int _INDEX_O_ClosedUserGroupInterlockCode = 6;
107	static final int _INDEX_O_ConnectionRequest = 7;
108	static final int _INDEX_O_OriginalCalledNumber = 8;
109	static final int _INDEX_O_UserToUserInformation = 9;
110	static final int _INDEX_O_AccessTransport = 10;
111	static final int _INDEX_O_UserServiceInformation = 11;
112	static final int _INDEX_O_User2UIndicators = 12;
113	static final int _INDEX_O_GenericNumber = 13;
114	static final int _INDEX_O_PropagationDelayCounter = 14;
115	static final int _INDEX_O_UserServiceInformationPrime = 15;
116	static final int _INDEX_O_NetworkSPecificFacility = 16;
117	static final int _INDEX_O_GenericDigits = 17;
118	static final int _INDEX_O_OriginatingISCPointCode = 18;
119	static final int _INDEX_O_UserTeleserviceInformation = 19;
120	static final int _INDEX_O_RemoteOperations = 20;
121	static final int _INDEX_O_ParameterCompatibilityInformation = 21;
122	static final int _INDEX_O_GenericNotificationIndicator = 22;
123	static final int _INDEX_O_ServiceActivation = 23;
124	static final int _INDEX_O_GenericReference = 24;
125	static final int _INDEX_O_MLPPPrecedence = 25;
126	static final int _INDEX_O_TransimissionMediumRequierementPrime = 26;
127	static final int _INDEX_O_LocationNumber = 27;
128	static final int _INDEX_O_ForwardGVNS = 28;
129	static final int _INDEX_O_CCSS = 29;
130	static final int _INDEX_O_NetworkManagementControls = 30;
131	static final int _INDEX_O_EndOfOptionalParameters = 31;
132
133	protected static final List<Integer> mandatoryParam;
134	static {
135		List<Integer> tmp = new ArrayList<Integer>();
136		tmp.add(_INDEX_F_MessageType);
137		tmp.add(_INDEX_F_NatureOfConnectionIndicators);
138		tmp.add(_INDEX_F_ForwardCallIndicators);
139		tmp.add(_INDEX_F_CallingPartyCategory);
140		tmp.add(_INDEX_F_TransmissionMediumRequirement);
141
142		mandatoryParam = Collections.unmodifiableList(tmp);
143
144	}
145
146	InitialAddressMessageImpl(Set<Integer> mandatoryCodes, Set<Integer> mandatoryVariableCodes, Set<Integer> optionalCodes,
147			Map<Integer, Integer> mandatoryCode2Index, Map<Integer, Integer> mandatoryVariableCode2Index, Map<Integer, Integer> optionalCode2Index) {
148		super(mandatoryCodes, mandatoryVariableCodes, optionalCodes, mandatoryCode2Index, mandatoryVariableCode2Index, optionalCode2Index);
149
150		super.f_Parameters.put(_INDEX_F_MessageType, this.getMessageType());
151		super.o_Parameters.put(_INDEX_O_EndOfOptionalParameters, _END_OF_OPTIONAL_PARAMETERS);
152
153	}
154
155	/*
156	 * (non-Javadoc)
157	 * 
158	 * @see
159	 * org.mobicents.isup.messages.ISUPMessage#decodeMandatoryParameters(byte[],
160	 * int)
161	 */
162	
163	protected int decodeMandatoryParameters(ISUPParameterFactory parameterFactory, byte[] b, int index) throws ParameterException {
164		int localIndex = index;
165		index += super.decodeMandatoryParameters(parameterFactory, b, index);
166		if (b.length - index > 5) {
167
168			try {
169				byte[] natureOfConnectionIndicators = new byte[1];
170				natureOfConnectionIndicators[0] = b[index++];
171
172				NatureOfConnectionIndicators _nai = parameterFactory.createNatureOfConnectionIndicators();
173				((AbstractISUPParameter)_nai).decode(natureOfConnectionIndicators);
174				this.setNatureOfConnectionIndicators(_nai);
175			} catch (Exception e) {
176				// AIOOBE or IllegalArg
177				throw new ParameterException("Failed to parse NatureOfConnectionIndicators due to: ", e);
178			}
179
180			try {
181				byte[] body = new byte[2];
182				body[0] = b[index++];
183				body[1] = b[index++];
184
185				ForwardCallIndicators v = parameterFactory.createForwardCallIndicators();
186				((AbstractISUPParameter)v).decode(body);
187				this.setForwardCallIndicators(v);
188			} catch (Exception e) {
189				// AIOOBE or IllegalArg
190				throw new ParameterException("Failed to parse ForwardCallIndicators due to: ", e);
191			}
192
193			try {
194				byte[] body = new byte[1];
195				body[0] = b[index++];
196
197				CallingPartyCategory v = parameterFactory.createCallingPartyCategory();
198				((AbstractISUPParameter)v).decode(body);
199				this.setCallingPartCategory(v);
200			} catch (Exception e) {
201				// AIOOBE or IllegalArg
202				throw new ParameterException("Failed to parse CallingPartyCategory due to: ", e);
203			}
204			try {
205				byte[] body = new byte[1];
206				body[0] = b[index++];
207
208				TransmissionMediumRequirement v = parameterFactory.createTransmissionMediumRequirement();
209				((AbstractISUPParameter)v).decode(body);
210				this.setTransmissionMediumRequirement(v);
211			} catch (Exception e) {
212				// AIOOBE or IllegalArg
213				throw new ParameterException("Failed to parse TransmissionMediumRequirement due to: ", e);
214			}
215
216			return index - localIndex;
217		} else {
218			throw new ParameterException("byte[] must have atleast eight octets");
219		}
220	}
221
222	/**
223	 * @param parameterBody
224	 * @param parameterCode
225	 * @throws ParameterException
226	 */
227	protected void decodeMandatoryVariableBody(ISUPParameterFactory parameterFactory, byte[] parameterBody, int parameterIndex) throws ParameterException {
228		switch (parameterIndex) {
229		case _INDEX_V_CalledPartyNumber:
230			CalledPartyNumber cpn = parameterFactory.createCalledPartyNumber();
231			((AbstractISUPParameter) cpn).decode(parameterBody);
232			this.setCalledPartyNumber(cpn);
233			break;
234		default:
235			throw new ParameterException("Unrecognized parameter index for mandatory variable part: " + parameterIndex);
236		}
237
238	}
239
240	/*
241	 * (non-Javadoc)
242	 * 
243	 * @see org.mobicents.isup.messages.ISUPMessage#decodeOptionalBody(byte[],
244	 * byte)
245	 */
246	
247	protected void decodeOptionalBody(ISUPParameterFactory parameterFactory, byte[] parameterBody, byte parameterCode) throws ParameterException {
248
249		// TODO Auto-generated method stub
250		switch ((int) parameterCode) {
251		case TransitNetworkSelection._PARAMETER_CODE:
252			TransitNetworkSelection v = parameterFactory.createTransitNetworkSelection();
253			((AbstractISUPParameter) v).decode(parameterBody);
254			setTransitNetworkSelection(v);
255			break;
256		case CallReference._PARAMETER_CODE:
257			CallReference cr = parameterFactory.createCallReference();
258			((AbstractISUPParameter) cr).decode(parameterBody);
259			this.setCallReference(cr);
260			break;
261		case CallingPartyNumber._PARAMETER_CODE:
262			CallingPartyNumber cpn = parameterFactory.createCallingPartyNumber();
263			((AbstractISUPParameter) cpn).decode(parameterBody);
264			this.setCallingPartyNumber(cpn);
265			break;
266		case OptionalForwardCallIndicators._PARAMETER_CODE:
267			OptionalForwardCallIndicators ofci = parameterFactory.createOptionalForwardCallIndicators();
268			((AbstractISUPParameter) ofci).decode(parameterBody);
269			this.setOptForwardCallIndicators(ofci);
270			break;
271		case RedirectingNumber._PARAMETER_CODE:
272			RedirectingNumber rn = parameterFactory.createRedirectingNumber();
273			((AbstractISUPParameter) rn).decode(parameterBody);
274			this.setRedirectingNumber(rn);
275			break;
276		case RedirectionInformation._PARAMETER_CODE:
277			RedirectionInformation ri = parameterFactory.createRedirectionInformation();
278			((AbstractISUPParameter) ri).decode(parameterBody);
279			this.setRedirectionInformation(ri);
280			break;
281		case ClosedUserGroupInterlockCode._PARAMETER_CODE:
282			ClosedUserGroupInterlockCode cugic = parameterFactory.createClosedUserGroupInterlockCode();
283			((AbstractISUPParameter) cugic).decode(parameterBody);
284			this.setCUserGroupInterlockCode(cugic);
285			break;
286		case ConnectionRequest._PARAMETER_CODE:
287			ConnectionRequest cr2 = parameterFactory.createConnectionRequest();
288			((AbstractISUPParameter) cr2).decode(parameterBody);
289			this.setConnectionRequest(cr2);
290			break;
291		case OriginalCalledNumber._PARAMETER_CODE:
292			OriginalCalledNumber orn = parameterFactory.createOriginalCalledNumber();
293			((AbstractISUPParameter) orn).decode(parameterBody);
294			this.setOriginalCalledNumber(orn);
295			break;
296		case UserToUserInformation._PARAMETER_CODE:
297			UserToUserInformation u2ui = parameterFactory.createUserToUserInformation();
298			((AbstractISUPParameter) u2ui).decode(parameterBody);
299			this.setU2UInformation(u2ui);
300			break;
301		case AccessTransport._PARAMETER_CODE:
302			AccessTransport at = parameterFactory.createAccessTransport();
303			((AbstractISUPParameter) at).decode(parameterBody);
304			this.setAccessTransport(at);
305			break;
306		case UserServiceInformation._PARAMETER_CODE:
307			UserServiceInformation usi = parameterFactory.createUserServiceInformation();
308			((AbstractISUPParameter) usi).decode(parameterBody);
309			this.setUserServiceInformation(usi);
310			break;
311		case UserToUserIndicators._PARAMETER_CODE:
312			UserToUserIndicators utui = parameterFactory.createUserToUserIndicators();
313			((AbstractISUPParameter) utui).decode(parameterBody);
314			this.setU2UIndicators(utui);
315			break;
316		case GenericNumber._PARAMETER_CODE:
317			GenericNumber gn = parameterFactory.createGenericNumber();
318			((AbstractISUPParameter) gn).decode(parameterBody);
319			this.setGenericNumber(gn);
320			break;
321		case PropagationDelayCounter._PARAMETER_CODE:
322			PropagationDelayCounter pdc = parameterFactory.createPropagationDelayCounter();
323			((AbstractISUPParameter) pdc).decode(parameterBody);
324			this.setPropagationDelayCounter(pdc);
325			break;
326		case UserServiceInformationPrime._PARAMETER_CODE:
327			UserServiceInformationPrime usip = parameterFactory.createUserServiceInformationPrime();
328			((AbstractISUPParameter) usip).decode(parameterBody);
329			this.setUserServiceInformationPrime(usip);
330			break;
331		case NetworkSpecificFacility._PARAMETER_CODE:
332			NetworkSpecificFacility nsf = parameterFactory.createNetworkSpecificFacility();
333			((AbstractISUPParameter) nsf).decode(parameterBody);
334			this.setNetworkSpecificFacility(nsf);
335			break;
336		case GenericDigits._PARAMETER_CODE:
337			GenericDigits gd = parameterFactory.createGenericDigits();
338			((AbstractISUPParameter) gd).decode(parameterBody);
339			this.setGenericDigits(gd);
340			break;
341		case OriginatingISCPointCode._PARAMETER_CODE:
342			OriginatingISCPointCode vv = parameterFactory.createOriginatingISCPointCode();
343			((AbstractISUPParameter) vv).decode(parameterBody);
344			this.setOriginatingISCPointCode(vv);
345			break;
346		case UserTeleserviceInformation._PARAMETER_CODE:
347			UserTeleserviceInformation uti = parameterFactory.createUserTeleserviceInformation();
348			((AbstractISUPParameter) uti).decode(parameterBody);
349			this.setUserTeleserviceInformation(uti);
350			break;
351		case RemoteOperations._PARAMETER_CODE:
352			RemoteOperations ro = parameterFactory.createRemoteOperations();
353			((AbstractISUPParameter) ro).decode(parameterBody);
354			this.setRemoteOperations(ro);
355			break;
356		case ParameterCompatibilityInformation._PARAMETER_CODE:
357			ParameterCompatibilityInformation pci = parameterFactory.createParameterCompatibilityInformation();
358			((AbstractISUPParameter) pci).decode(parameterBody);
359			this.setParameterCompatibilityInformation(pci);
360			break;
361		case GenericNotificationIndicator._PARAMETER_CODE:
362			GenericNotificationIndicator gni = parameterFactory.createGenericNotificationIndicator();
363			((AbstractISUPParameter) gni).decode(parameterBody);
364			this.setGenericNotificationIndicator(gni);
365			break;
366		case ServiceActivation._PARAMETER_CODE:
367			ServiceActivation sa = parameterFactory.createServiceActivation();
368			((AbstractISUPParameter) sa).decode(parameterBody);
369			this.setServiceActivation(sa);
370			break;
371		case GenericReference._PARAMETER_CODE:
372			GenericReference gr = parameterFactory.createGenericReference();
373			((AbstractISUPParameter) gr).decode(parameterBody);
374			this.setGenericReference(gr);
375			break;
376		case MLPPPrecedence._PARAMETER_CODE:
377			MLPPPrecedence mlpp = parameterFactory.createMLPPPrecedence();
378			((AbstractISUPParameter) mlpp).decode(parameterBody);
379			this.setMLPPPrecedence(mlpp);
380			break;
381		case TransmissionMediumRequirement._PARAMETER_CODE:
382			TransmissionMediumRequirement tmr = parameterFactory.createTransmissionMediumRequirement();
383			((AbstractISUPParameter) tmr).decode(parameterBody);
384			this.setTransmissionMediumRequirement(tmr);
385			break;
386		case LocationNumber._PARAMETER_CODE:
387			LocationNumber ln = parameterFactory.createLocationNumber();
388			((AbstractISUPParameter) ln).decode(parameterBody);
389			this.setLocationNumber(ln);
390			break;
391		case ForwardGVNS._PARAMETER_CODE:
392			ForwardGVNS fgvns = parameterFactory.createForwardGVNS();
393			((AbstractISUPParameter) fgvns).decode(parameterBody);
394			this.setForwardGVNS(fgvns);
395			break;
396		case CCSS._PARAMETER_CODE:
397			CCSS ccss = parameterFactory.createCCSS();
398			((AbstractISUPParameter) ccss).decode(parameterBody);
399			this.setCCSS(ccss);
400			break;
401		case NetworkManagementControls._PARAMETER_CODE:
402			NetworkManagementControls nmc = parameterFactory.createNetworkManagementControls();
403			((AbstractISUPParameter) nmc).decode(parameterBody);
404			this.setNetworkManagementControls(nmc);
405			break;
406		default:
407			throw new ParameterException("Unrecognized parameter code for optional part: " + parameterCode);
408		}
409	}
410
411	/*
412	 * (non-Javadoc)
413	 * 
414	 * @seeorg.mobicents.isup.messages.ISUPMessage#
415	 * getNumberOfMandatoryVariableLengthParameters()
416	 */
417	
418	protected int getNumberOfMandatoryVariableLengthParameters() {
419
420		return _MANDATORY_VAR_COUNT;
421	}
422
423	/*
424	 * (non-Javadoc)
425	 * 
426	 * @see org.mobicents.isup.messages.ISUPMessage#getMessageType()
427	 */
428	
429	public MessageType getMessageType() {
430		return this._MESSAGE_TYPE;
431	}
432
433	/*
434	 * (non-Javadoc)
435	 * 
436	 * @see org.mobicents.isup.messages.ISUPMessage#hasAllMandatoryParameters()
437	 */
438	
439	public boolean hasAllMandatoryParameters() {
440		if (!super.f_Parameters.keySet().containsAll(mandatoryParam) || super.f_Parameters.values().contains(null)) {
441			return false;
442		}
443		if (!super.v_Parameters.containsKey(_INDEX_V_CalledPartyNumber) || super.v_Parameters.get(_INDEX_V_CalledPartyNumber) == null) {
444			return false;
445		}
446		return true;
447	}
448
449	public NatureOfConnectionIndicators getNatureOfConnectionIndicators() {
450		return (NatureOfConnectionIndicators) super.f_Parameters.get(_INDEX_F_NatureOfConnectionIndicators);
451	}
452
453	public void setNatureOfConnectionIndicators(NatureOfConnectionIndicators v) {
454		super.f_Parameters.put(_INDEX_F_NatureOfConnectionIndicators, v);
455	}
456
457	public ForwardCallIndicators getForwardCallIndicators() {
458		return (ForwardCallIndicators) super.f_Parameters.get(_INDEX_F_ForwardCallIndicators);
459	}
460
461	public void setForwardCallIndicators(ForwardCallIndicators v) {
462		super.f_Parameters.put(_INDEX_F_ForwardCallIndicators, v);
463	}
464
465	public CallingPartyCategory getCallingPartCategory() {
466		return (CallingPartyCategory) super.f_Parameters.get(_INDEX_F_CallingPartyCategory);
467	}
468
469	public void setCallingPartCategory(CallingPartyCategory v) {
470		super.f_Parameters.put(_INDEX_F_CallingPartyCategory, v);
471	}
472
473	public TransmissionMediumRequirement getTransmissionMediumRequirement() {
474		return (TransmissionMediumRequirement) super.f_Parameters.get(_INDEX_F_TransmissionMediumRequirement);
475	}
476
477	public void setTransmissionMediumRequirement(TransmissionMediumRequirement v) {
478		super.f_Parameters.put(_INDEX_F_TransmissionMediumRequirement, v);
479	}
480
481	public CalledPartyNumber getCalledPartyNumber() {
482		return (CalledPartyNumber) super.v_Parameters.get(_INDEX_V_CalledPartyNumber);
483	}
484
485	public void setCalledPartyNumber(CalledPartyNumber v) {
486		super.v_Parameters.put(_INDEX_V_CalledPartyNumber, v);
487	}
488
489	public TransitNetworkSelection getTransitNetworkSelection() {
490		return (TransitNetworkSelection) super.o_Parameters.get(_INDEX_O_TransitNetworkSelection);
491	}
492
493	public void setTransitNetworkSelection(TransitNetworkSelection v) {
494		super.o_Parameters.put(_INDEX_O_TransitNetworkSelection, v);
495	}
496
497	public CallReference getCallReference() {
498		return (CallReference) super.o_Parameters.get(_INDEX_O_CallReference);
499	}
500
501	public void setCallReference(CallReference v) {
502		super.o_Parameters.put(_INDEX_O_CallReference, v);
503	}
504
505	public CallingPartyNumber getCallingPartyNumber() {
506		return (CallingPartyNumber) super.o_Parameters.get(_INDEX_O_CallingPartyNumber);
507	}
508
509	public void setCallingPartyNumber(CallingPartyNumber v) {
510		super.o_Parameters.put(_INDEX_O_CallingPartyNumber, v);
511	}
512
513	public OptionalForwardCallIndicators getOptForwardCallIndicators() {
514		return (OptionalForwardCallIndicators) super.o_Parameters.get(_INDEX_O_OptionalForwardCallIndicators);
515	}
516
517	public void setOptForwardCallIndicators(OptionalForwardCallIndicators v) {
518		super.o_Parameters.put(_INDEX_O_OptionalForwardCallIndicators, v);
519	}
520
521	public RedirectingNumber getRedirectingNumber() {
522		return (RedirectingNumber) super.o_Parameters.get(_INDEX_O_RedirectingNumber);
523	}
524
525	public void setRedirectingNumber(RedirectingNumber v) {
526		super.o_Parameters.put(_INDEX_O_RedirectingNumber, v);
527	}
528
529	public RedirectionInformation getRedirectionInformation() {
530		return (RedirectionInformation) super.o_Parameters.get(_INDEX_O_RedirectionInformation);
531	}
532
533	public void setRedirectionInformation(RedirectionInformation v) {
534		super.o_Parameters.put(_INDEX_O_RedirectionInformation, v);
535	}
536
537	public ClosedUserGroupInterlockCode getCUserGroupInterlockCode() {
538		return (ClosedUserGroupInterlockCode) super.o_Parameters.get(_INDEX_O_ClosedUserGroupInterlockCode);
539	}
540
541	public void setCUserGroupInterlockCode(ClosedUserGroupInterlockCode v) {
542		super.o_Parameters.put(_INDEX_O_ClosedUserGroupInterlockCode, v);
543	}
544
545	public ConnectionRequest getConnectionRequest() {
546		return (ConnectionRequest) super.o_Parameters.get(_INDEX_O_ConnectionRequest);
547	}
548
549	public void setConnectionRequest(ConnectionRequest v) {
550		super.o_Parameters.put(_INDEX_O_ConnectionRequest, v);
551	}
552
553	public OriginalCalledNumber getOriginalCalledNumber() {
554		return (OriginalCalledNumber) super.o_Parameters.get(_INDEX_O_OriginalCalledNumber);
555	}
556
557	public void setOriginalCalledNumber(OriginalCalledNumber v) {
558		super.o_Parameters.put(_INDEX_O_OriginalCalledNumber, v);
559	}
560
561	public UserToUserInformation getU2UInformation() {
562		return (UserToUserInformation) super.o_Parameters.get(_INDEX_O_UserToUserInformation);
563	}
564
565	public void setU2UInformation(UserToUserInformation v) {
566		super.o_Parameters.put(_INDEX_O_UserToUserInformation, v);
567	}
568
569	public UserServiceInformation getUserServiceInformation() {
570		return (UserServiceInformation) super.o_Parameters.get(_INDEX_O_UserServiceInformation);
571	}
572
573	public void setUserServiceInformation(UserServiceInformation v) {
574		super.o_Parameters.put(_INDEX_O_UserServiceInformation, v);
575	}
576
577	public NetworkSpecificFacility getNetworkSpecificFacility() {
578		return (NetworkSpecificFacility) super.o_Parameters.get(_INDEX_O_NetworkSPecificFacility);
579	}
580
581	public void setNetworkSpecificFacility(NetworkSpecificFacility v) {
582		super.o_Parameters.put(_INDEX_O_NetworkSPecificFacility, v);
583	}
584
585	public GenericDigits getGenericDigits() {
586		return (GenericDigits) super.o_Parameters.get(_INDEX_O_GenericDigits);
587	}
588
589	public void setGenericDigits(GenericDigits v) {
590		super.o_Parameters.put(_INDEX_O_GenericDigits, v);
591	}
592
593	public OriginatingISCPointCode getOriginatingISCPointCode() {
594		return (OriginatingISCPointCode) super.o_Parameters.get(_INDEX_O_OriginatingISCPointCode);
595	}
596
597	public void setOriginatingISCPointCode(OriginatingISCPointCode v) {
598		super.o_Parameters.put(_INDEX_O_OriginatingISCPointCode, v);
599	}
600
601	public UserTeleserviceInformation getUserTeleserviceInformation() {
602		return (UserTeleserviceInformation) super.o_Parameters.get(_INDEX_O_UserTeleserviceInformation);
603	}
604
605	public void setUserTeleserviceInformation(UserTeleserviceInformation v) {
606		super.o_Parameters.put(_INDEX_O_UserTeleserviceInformation, v);
607	}
608
609	public RemoteOperations getRemoteOperations() {
610		return (RemoteOperations) super.o_Parameters.get(_INDEX_O_RemoteOperations);
611	}
612
613	public void setRemoteOperations(RemoteOperations v) {
614		super.o_Parameters.put(_INDEX_O_RemoteOperations, v);
615	}
616
617	public ParameterCompatibilityInformation getParameterCompatibilityInformation() {
618		return (ParameterCompatibilityInformation) super.o_Parameters.get(_INDEX_O_ParameterCompatibilityInformation);
619	}
620
621	public void setParameterCompatibilityInformation(ParameterCompatibilityInformation v) {
622		super.o_Parameters.put(_INDEX_O_ParameterCompatibilityInformation, v);
623	}
624
625	public GenericNotificationIndicator getGenericNotificationIndicator() {
626		return (GenericNotificationIndicator) super.o_Parameters.get(_INDEX_O_GenericNotificationIndicator);
627	}
628
629	public void setGenericNotificationIndicator(GenericNotificationIndicator v) {
630		super.o_Parameters.put(_INDEX_O_GenericNotificationIndicator, v);
631	}
632
633	public ServiceActivation getServiceActivation() {
634		return (ServiceActivation) super.o_Parameters.get(_INDEX_O_ServiceActivation);
635	}
636
637	public void setServiceActivation(ServiceActivation v) {
638		super.o_Parameters.put(_INDEX_O_ServiceActivation, v);
639	}
640
641	public GenericReference getGenericReference() {
642		return (GenericReference) super.o_Parameters.get(_INDEX_O_GenericReference);
643	}
644
645	public void setGenericReference(GenericReference v) {
646		super.o_Parameters.put(_INDEX_O_GenericReference, v);
647	}
648
649	public MLPPPrecedence getMLPPPrecedence() {
650		return (MLPPPrecedence) super.o_Parameters.get(_INDEX_O_MLPPPrecedence);
651	}
652
653	public void setMLPPPrecedence(MLPPPrecedence v) {
654		super.o_Parameters.put(_INDEX_O_MLPPPrecedence, v);
655	}
656
657	public TransimissionMediumRequierementPrime getTransimissionMediumReqPrime() {
658		return (TransimissionMediumRequierementPrime) super.o_Parameters.get(_INDEX_O_TransimissionMediumRequierementPrime);
659	}
660
661	public void setTransimissionMediumReqPrime(TransimissionMediumRequierementPrime v) {
662		super.o_Parameters.put(_INDEX_O_TransimissionMediumRequierementPrime, v);
663	}
664
665	public LocationNumber getLocationNumber() {
666		return (LocationNumber) super.o_Parameters.get(_INDEX_O_LocationNumber);
667	}
668
669	public void setLocationNumber(LocationNumber v) {
670		super.o_Parameters.put(_INDEX_O_LocationNumber, v);
671	}
672
673	public ForwardGVNS getForwardGVNS() {
674		return (ForwardGVNS) super.o_Parameters.get(_INDEX_O_ForwardGVNS);
675	}
676
677	public void setForwardGVNS(ForwardGVNS v) {
678		super.o_Parameters.put(_INDEX_O_ForwardGVNS, v);
679	}
680
681	public CCSS getCCSS() {
682		return (CCSS) super.o_Parameters.get(_INDEX_O_CCSS);
683	}
684
685	public void setCCSS(CCSS v) {
686		super.o_Parameters.put(_INDEX_O_CCSS, v);
687	}
688
689	public NetworkManagementControls getNetworkManagementControls() {
690		return (NetworkManagementControls) super.o_Parameters.get(_INDEX_O_NetworkManagementControls);
691	}
692
693	public void setNetworkManagementControls(NetworkManagementControls v) {
694		super.o_Parameters.put(_INDEX_O_NetworkManagementControls, v);
695	}
696
697	/**
698	 * @param usip
699	 */
700	public void setUserServiceInformationPrime(UserServiceInformationPrime v) {
701		super.o_Parameters.put(_INDEX_O_UserServiceInformationPrime, v);
702	}
703
704	public UserServiceInformationPrime getUserServiceInformationPrime() {
705		return (UserServiceInformationPrime) super.o_Parameters.get(_INDEX_O_UserServiceInformationPrime);
706	}
707
708	/**
709	 * @param pdc
710	 */
711	public void setPropagationDelayCounter(PropagationDelayCounter v) {
712		super.o_Parameters.put(_INDEX_O_PropagationDelayCounter, v);
713
714	}
715
716	public PropagationDelayCounter getPropagationDelayCounter() {
717		return (PropagationDelayCounter) super.o_Parameters.get(_INDEX_O_PropagationDelayCounter);
718	}
719
720	/**
721	 * @param gn
722	 */
723	public void setGenericNumber(GenericNumber v) {
724		super.o_Parameters.put(_INDEX_O_GenericNumber, v);
725
726	}
727
728	public GenericNumber getGenericNumber() {
729		return (GenericNumber) super.o_Parameters.get(_INDEX_O_GenericNumber);
730	}
731
732	/**
733	 * @param utui
734	 */
735	public void setU2UIndicators(UserToUserIndicators v) {
736		super.o_Parameters.put(_INDEX_O_User2UIndicators, v);
737
738	}
739
740	public UserToUserIndicators getU2UIndicators() {
741		return (UserToUserIndicators) super.o_Parameters.get(_INDEX_O_User2UIndicators);
742	}
743
744	/**
745	 * @param at
746	 */
747	public void setAccessTransport(AccessTransport v) {
748		super.o_Parameters.put(_INDEX_O_AccessTransport, v);
749
750	}
751
752	public AccessTransport getAccessTransport() {
753		return (AccessTransport) super.o_Parameters.get(_INDEX_O_AccessTransport);
754	}
755
756	/*
757	 * (non-Javadoc)
758	 * 
759	 * @see org.mobicents.protocols.ss7.isup.impl.ISUPMessageImpl#
760	 * mandatoryVariablePartPossible()
761	 */
762	
763	protected boolean mandatoryVariablePartPossible() {
764
765		return this.getNumberOfMandatoryVariableLengthParameters() != 0;
766	}
767
768	/*
769	 * (non-Javadoc)
770	 * 
771	 * @see
772	 * org.mobicents.protocols.ss7.isup.impl.ISUPMessageImpl#optionalPartIsPossible
773	 * ()
774	 */
775	
776	protected boolean optionalPartIsPossible() {
777
778		return true;
779	}
780}