شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » SubParty

Public general use code classes and xml files that we've compiled and used over the years:

SubParty support class for Nokia's Next Generation Network (NGN) business model.

   1:  using System;
   2:  using System.Collections.Generic;
   3:   
   4:  namespace Ia.Ngn.Cl.Model.Business.Nokia
   5:  {
   6:      ////////////////////////////////////////////////////////////////////////////
   7:   
   8:      /// <summary publish="true">
   9:      /// SubParty support class for Nokia's Next Generation Network (NGN) business model.
  10:      /// </summary>
  11:      /// 
  12:      /// <remarks> 
  13:      /// Copyright � 2014-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  14:      ///
  15:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  16:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  17:      ///
  18:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  19:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  20:      /// 
  21:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  22:      /// 
  23:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  24:      /// </remarks> 
  25:      public partial class SubParty
  26:      {
  27:          public SubParty() { }
  28:   
  29:          ////////////////////////////////////////////////////////////////////////////
  30:   
  31:          /// <summary>
  32:          ///
  33:          /// </summary>
  34:          public static Ia.Ngn.Cl.Model.Nokia.SubParty ParseFromDictionary(Dictionary<string, string> parameterDictionary)
  35:          {
  36:              int i;
  37:              long l;
  38:              string partyId;
  39:              Ia.Ngn.Cl.Model.Nokia.SubParty subParty;
  40:   
  41:              subParty = new Ia.Ngn.Cl.Model.Nokia.SubParty();
  42:   
  43:              partyId = parameterDictionary["PartyId"].ToString();
  44:   
  45:              subParty.Id = Ia.Ngn.Cl.Model.Nokia.SubParty.SubPartyId(partyId);
  46:   
  47:              subParty.PartyId = partyId;
  48:              subParty.DisplayName = parameterDictionary["DisplayName"].ToString();
  49:              subParty.Category = parameterDictionary["Category"].ToString();
  50:              //subparty.NewPartyId = param["NewPartyId"].ToString();
  51:              subParty.PrimaryPUID = parameterDictionary["PrimaryPUID"].ToString();
  52:              //subparty.NewPrimaryPUID = param["NewPrimaryPUID"].ToString();
  53:              subParty.PrimaryPUIDDomainRequired = Convert.ToBoolean(parameterDictionary["PrimaryPUIDDomainRequired"].ToString());
  54:              subParty.PrimaryPUIDCPEProfileNumber = int.TryParse(parameterDictionary["PrimaryPUIDCPEProfileNumber"].ToString(), out i) ? i : 0;
  55:              subParty.PrimaryPUIDFlashable = Convert.ToBoolean(parameterDictionary["PrimaryPUIDFlashable"].ToString());
  56:              subParty.AssocOtasRealm = parameterDictionary["AssocOtasRealm"].ToString();
  57:              subParty.NetworkProfileName = parameterDictionary["NetworkProfileName"].ToString();
  58:              subParty.NetworkProfileVersion = int.TryParse(parameterDictionary["NetworkProfileVersion"].ToString(), out i) ? i : 0;
  59:              subParty.ServiceProfileName = parameterDictionary["ServiceProfileName"].ToString();
  60:              subParty.ServiceProfileVersion = int.TryParse(parameterDictionary["ServiceProfileVersion"].ToString(), out i) ? i : 0;
  61:              subParty.IsReducedServiceProfile = Convert.ToBoolean(parameterDictionary["IsReducedServiceProfile"].ToString());
  62:              subParty.CallLimit = int.TryParse(parameterDictionary["CallLimit"].ToString(), out i) ? i : 0;
  63:              subParty.ServiceSuspension = Convert.ToBoolean(parameterDictionary["ServiceSuspension"].ToString());
  64:              subParty.OriginationSuspension = Convert.ToBoolean(parameterDictionary["OriginationSuspension"].ToString());
  65:              subParty.TerminationSuspension = Convert.ToBoolean(parameterDictionary["TerminationSuspension"].ToString());
  66:              subParty.SuspensionNotification = Convert.ToBoolean(parameterDictionary["SuspensionNotification"].ToString());
  67:              subParty.UserOrigSuspension = Convert.ToBoolean(parameterDictionary["UserOrigSuspension"].ToString());
  68:              subParty.UserTermSuspension = Convert.ToBoolean(parameterDictionary["UserTermSuspension"].ToString());
  69:              subParty.AssocWpifRealm = parameterDictionary["AssocWpifRealm"].ToString();
  70:              subParty.IddPrefix = parameterDictionary["IddPrefix"].ToString();
  71:              subParty.AlternateFsdbFqdn = parameterDictionary["AlternateFsdbFqdn"].ToString();
  72:              subParty.SharedHssData = Convert.ToBoolean(parameterDictionary["SharedHssData"].ToString());
  73:              subParty.Pin = parameterDictionary["Pin"].ToString();
  74:              subParty.MsnCapability = Convert.ToBoolean(parameterDictionary["MsnCapability"].ToString());
  75:              subParty.VideoProhibit = Convert.ToBoolean(parameterDictionary["VideoProhibit"].ToString());
  76:              subParty.MaxFwdHops = int.TryParse(parameterDictionary["MaxFwdHops"].ToString(), out i) ? i : 0;
  77:              subParty.CsdFlavor = int.TryParse(parameterDictionary["CsdFlavor"].ToString(), out i) ? i : 0;
  78:              subParty.CsdDynamic = Convert.ToBoolean(parameterDictionary["CsdDynamic"].ToString());
  79:              subParty.SipErrorTableId = int.TryParse(parameterDictionary["SipErrorTableId"].ToString(), out i) ? i : 0;
  80:              subParty.TreatmentTableId = int.TryParse(parameterDictionary["TreatmentTableId"].ToString(), out i) ? i : 0;
  81:              subParty.Locale = parameterDictionary["Locale"].ToString();
  82:              subParty.CliPrefixList = parameterDictionary["CliPrefixList"].ToString();
  83:              subParty.IsGroupCPE = Convert.ToBoolean(parameterDictionary["IsGroupCPE"].ToString());
  84:              subParty.Receive181Mode = int.TryParse(parameterDictionary["Receive181Mode"].ToString(), out i) ? i : 0;
  85:              subParty.CcNdcLength = int.TryParse(parameterDictionary["CcNdcLength"].ToString(), out i) ? i : 0;
  86:              subParty.MaxActiveCalls = int.TryParse(parameterDictionary["MaxActiveCalls"].ToString(), out i) ? i : 0;
  87:              subParty.CallingPartyCategory = int.TryParse(parameterDictionary["CallingPartyCategory"].ToString(), out i) ? i : 0;
  88:              subParty.PublicUID1 = parameterDictionary["PublicUID1"].ToString();
  89:              subParty.PublicUID2 = parameterDictionary["PublicUID2"].ToString();
  90:              subParty.PublicUID3 = parameterDictionary["PublicUID3"].ToString();
  91:              subParty.PublicUID4 = parameterDictionary["PublicUID4"].ToString();
  92:              subParty.PublicUID5 = parameterDictionary["PublicUID5"].ToString();
  93:              subParty.PublicUID6 = parameterDictionary["PublicUID6"].ToString();
  94:              subParty.PublicUID7 = parameterDictionary["PublicUID7"].ToString();
  95:              subParty.PublicUID8 = parameterDictionary["PublicUID8"].ToString();
  96:              subParty.PublicUID9 = parameterDictionary["PublicUID9"].ToString();
  97:              subParty.PublicUID1DomainRequired = Convert.ToBoolean(parameterDictionary["PublicUID1DomainRequired"].ToString());
  98:              subParty.PublicUID2DomainRequired = Convert.ToBoolean(parameterDictionary["PublicUID2DomainRequired"].ToString());
  99:              subParty.PublicUID3DomainRequired = Convert.ToBoolean(parameterDictionary["PublicUID3DomainRequired"].ToString());
 100:              subParty.PublicUID4DomainRequired = Convert.ToBoolean(parameterDictionary["PublicUID4DomainRequired"].ToString());
 101:              subParty.PublicUID5DomainRequired = Convert.ToBoolean(parameterDictionary["PublicUID5DomainRequired"].ToString());
 102:              subParty.PublicUID6DomainRequired = Convert.ToBoolean(parameterDictionary["PublicUID6DomainRequired"].ToString());
 103:              subParty.PublicUID7DomainRequired = Convert.ToBoolean(parameterDictionary["PublicUID7DomainRequired"].ToString());
 104:              subParty.PublicUID8DomainRequired = Convert.ToBoolean(parameterDictionary["PublicUID8DomainRequired"].ToString());
 105:              subParty.PublicUID9DomainRequired = Convert.ToBoolean(parameterDictionary["PublicUID9DomainRequired"].ToString());
 106:              subParty.WildCardPUIDStr = parameterDictionary["WildCardPUIDStr"].ToString();
 107:              subParty.AllowCustomAnnouncement = Convert.ToBoolean(parameterDictionary["AllowCustomAnnouncement"].ToString());
 108:              subParty.PtySpareLong1 = long.TryParse(parameterDictionary["PtySpareLong1"].ToString(), out l) ? l : 0;
 109:              subParty.PtySpareString = parameterDictionary["PtySpareString"].ToString();
 110:              subParty.PtySpareString2 = parameterDictionary["PtySpareString2"].ToString();
 111:              subParty.PtySpareShort1 = int.TryParse(parameterDictionary["PtySpareShort1"].ToString(), out i) ? i : 0;
 112:              subParty.PtySpareShort2 = int.TryParse(parameterDictionary["PtySpareShort2"].ToString(), out i) ? i : 0;
 113:              subParty.PtySpareBool1 = Convert.ToBoolean(parameterDictionary["PtySpareBool1"].ToString());
 114:              subParty.PtySpareBool2 = Convert.ToBoolean(parameterDictionary["PtySpareBool2"].ToString());
 115:              subParty.PtySpareBool3 = Convert.ToBoolean(parameterDictionary["PtySpareBool3"].ToString());
 116:              subParty.PtySpareBool4 = Convert.ToBoolean(parameterDictionary["PtySpareBool4"].ToString());
 117:              subParty.PtySpareBool5 = Convert.ToBoolean(parameterDictionary["PtySpareBool5"].ToString());
 118:              subParty.PtySpareBool6 = Convert.ToBoolean(parameterDictionary["PtySpareBool6"].ToString());
 119:              subParty.PtySpareBool7 = Convert.ToBoolean(parameterDictionary["PtySpareBool7"].ToString());
 120:              subParty.PtySpareBool8 = Convert.ToBoolean(parameterDictionary["PtySpareBool8"].ToString());
 121:              subParty.TerminatingTableId = int.TryParse(parameterDictionary["TerminatingTableId"].ToString(), out i) ? i : 0;
 122:              subParty.AllowNonSipTelUri = Convert.ToBoolean(parameterDictionary["AllowNonSipTelUri"].ToString());
 123:              subParty.LocationType = int.TryParse(parameterDictionary["LocationType"].ToString(), out i) ? i : 0;
 124:              subParty.RncID = parameterDictionary["RncID"].ToString();
 125:              subParty.LteMcc = parameterDictionary["LteMcc"].ToString();
 126:              subParty.LteMnc = parameterDictionary["LteMnc"].ToString();
 127:              subParty.LteTac = int.TryParse(parameterDictionary["LteTac"].ToString(), out i) ? i : 0;
 128:              subParty.MarketSID = int.TryParse(parameterDictionary["MarketSID"].ToString(), out i) ? i : 0;
 129:              subParty.SwitchNumber = int.TryParse(parameterDictionary["SwitchNumber"].ToString(), out i) ? i : 0;
 130:              subParty.CallsToWebUserProhibited = Convert.ToBoolean(parameterDictionary["CallsToWebUserProhibited"].ToString());
 131:              subParty.IMSI = parameterDictionary["IMSI"].ToString();
 132:              subParty.IMSNotSupported = Convert.ToBoolean(parameterDictionary["IMSNotSupported"].ToString());
 133:              subParty.ValidateCellID = Convert.ToBoolean(parameterDictionary["ValidateCellID"].ToString());
 134:              subParty.OperatorID = int.TryParse(parameterDictionary["OperatorID"].ToString(), out i) ? i : 0;
 135:              subParty.HomeMTA = int.TryParse(parameterDictionary["HomeMTA"].ToString(), out i) ? i : 0;
 136:              subParty.ForwardDenyNumbers = Convert.ToBoolean(parameterDictionary["ForwardDenyNumbers"].ToString());
 137:              subParty.PlayAnnoFailNotForward = Convert.ToBoolean(parameterDictionary["PlayAnnoFailNotForward"].ToString());
 138:              subParty.MrfPoolID = int.TryParse(parameterDictionary["MrfPoolID"].ToString(), out i) ? i : 0;
 139:              subParty.Custom120x = Convert.ToBoolean(parameterDictionary["Custom120x"].ToString());
 140:   
 141:              subParty.Created = DateTime.UtcNow.AddHours(3);
 142:              subParty.Updated = DateTime.UtcNow.AddHours(3);
 143:              subParty.UserId = Guid.Empty;
 144:   
 145:              return subParty;
 146:          }
 147:   
 148:          ////////////////////////////////////////////////////////////////////////////
 149:   
 150:          /// <summary>
 151:          ///
 152:          /// </summary>
 153:          public static bool IsSip(int primaryPUIDCPEProfileNumber)
 154:          {
 155:              bool isSip;
 156:   
 157:              isSip = (primaryPUIDCPEProfileNumber == Ia.Ngn.Cl.Model.Business.Nokia.Ims.PrimaryPUIDCPEProfileNumberForSip) ? true : false;
 158:   
 159:              return isSip;
 160:          }
 161:   
 162:          ////////////////////////////////////////////////////////////////////////////
 163:          ////////////////////////////////////////////////////////////////////////////
 164:      }
 165:   
 166:      ////////////////////////////////////////////////////////////////////////////
 167:      ////////////////////////////////////////////////////////////////////////////
 168:  }