171. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/10/2017 1:01:48 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

171.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\VixInstallerSolution2013.root\VixInstallerSolution2013\VixInstallerBusiness VixConfigurationParameters.cs Thu Jun 29 17:22:28 2017 UTC
2 C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\VixInstallerSolution2013.root\VixInstallerSolution2013\VixInstallerBusiness VixConfigurationParameters.cs Mon Jul 10 17:11:06 2017 UTC

171.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 2506
Changed 2 6
Inserted 0 0
Removed 0 0

171.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

171.4 Active regular expressions

No regular expressions were active.

171.5 Comparison detail

  1   using Syst em;
  2   using Syst em.Collect ions.Gener ic;
  3   using Syst em.Text;
  4   using Syst em.IO;
  5   using Syst em.Xml;
  6   using Syst em.Xml.Ser ialization ;
  7   using Syst em.Diagnos tics;
  8   using log4 net;
  9   using Syst em.Securit y.Cryptogr aphy;
  10   using Syst em.Securit y.Cryptogr aphy.Xml;
  11  
  12   namespace  gov.va.med .imaging.e xchange.Vi xInstaller .business
  13   {
  14       /// <s ummary>
  15       /// Th is class h olds all t he configu ration inf ormation n eeded to i nstall the  VIX servi ce.
  16       /// </ summary>
  17       public  class Vix Configurat ionParamet ers : gov. va.med.ima ging.excha nge.VixIns taller.bus iness.IVix Configurat ionParamet ers
  18       {
  19           pr ivate stat ic readonl y String V IX_INSTALL ER_CONFIG_ FILENAME =  @"VixInst allerConfi g.xml";
  20  
  21           pr ivate stat ic ILog Lo gger()
  22           {
  23                return L ogManager. GetLogger( typeof(Vix Configurat ionParamet ers).Name) ;
  24           }
  25  
  26           pu blic VixCo nfiguratio nParameter s() // for  use by th e FromXml  method
  27           {
  28           }
  29  
  30           pu blic VixCo nfiguratio nParameter s(string p roductVers ion, strin g keyStore Password,  string tru stStorePas sword) //  for use wi th a new V IX install ation
  31           {
  32                this.Vix ServerName Prop = Env ironment.M achineName ; // must  happen fir st
  33                this.Pro ductVersio nProp = pr oductVersi on;
  34                this.fed erationKey storePassw ord = keyS torePasswo rd;
  35                this.fed erationTru ststorePas sword = tr ustStorePa ssword;
  36                this.Vix Deployment Option = D etermineDe ploymentTy peForServe r();
  37                this.vix CacheOptio n = GetVix CacheTypeB yDeploymen tOption(th is.VixDepl oymentOpti on);
  38                // This  is bad in  that we ar e dependen t on the F acades to  have had t heir manif est field  initialize d (which i s always d one before  the manif est gets l oaded).
  39                // It is  less bad  than havin g to initi alize the  VixRole in  the Wizar dForm load  event
  40                VixDeplo ymentConfi guration[]  deployCon figs = Vix Facade.Man ifest.VixD eploymentC onfigurati ons; 
  41                this.Vix Role = dep loyConfigs [0].VixRol e; // DKB  5/10/2011  - first de ployment c onfigurati on role is  the defau lt
  42                if (this .VixRole = = VixRoleT ype.Enterp riseGatewa y)
  43                {
  44                      this.HttpC onnectorPo rt =  PORT ; // one t ime defaul t change o n port for  the CVIX
  45                }
  46                // initi alize depr ecated fie lds as dep orecated
  47                this.Pro ductVersio n = "depre cated";
  48                this.Pre viousProdu ctVersion  = "depreca ted";
  49           }
  50  
  51           pr ivate Stri ng siteSer viceUri =  null;
  52           pr ivate Stri ng siteNum ber = null ;
  53           pr ivate Stri ng vistaSe rverName =  null;
  54           pr ivate Stri ng vistaSe rverPort =  null;
  55           pr ivate Stri ng localCa cheDir = n ull;
  56           pr ivate Stri ng network FileShare  = null;
  57           pr ivate Stri ng network FileShareU sername =  null;
  58           pr ivate Stri ng network FileShareP assword =  null;
  59           pr ivate Stri ng configD ir = null;
  60           pr ivate Stri ng biaUser name = Bus inessFacad e.GetProdu ctionBiaUs ername();  // product ion defaul t
  61           pr ivate Stri ng biaPass word = Bus inessFacad e.GetProdu ctionBiaPa ssword();  // product ion defaul t
  62           pr ivate Stri ng siteNam e = null;
  63           pr ivate Stri ng siteAbb reviation  = null;
  64  
  65           pu blic  Stri ng Product Version =  null; // d eprecated  by still e nabled for  migration  to produc tVersion1  and produc tVersion2  fields
  66           pu blic  Stri ng Previou sProductVe rsion = nu ll; // dep recated by  still ena bled for m igration t o productV ersion1 an d productV ersion2 fi elds
  67  
  68           pr ivate Stri ng federat ionKeystor ePassword  = null;
  69           pr ivate Stri ng federat ionTrustst orePasswor d = null;
  70           //  local DoD  connectio n
  71           pr ivate Stri ng localDo dServer =  null;
  72           pr ivate Stri ng localDo dServerPor t = null;
  73           pr ivate Stri ng localDo dSiteNumbe r = null;
  74           pr ivate Stri ng localDo dUsername  = null;
  75           pr ivate Stri ng localDo dPassword  = null;
  76           pr ivate Stri ng vixServ erName1 =  null; // p opulated f or Single  Server and  Fail Over  Clusters
  77           pr ivate Stri ng vixServ erName2 =  null; // n ot populat ed except  for Fail O ver Cluste rs
  78           pr ivate VixD eploymentT ype vixDep loymentOpt ionServer1  = VixDepl oymentType .Deprecate d; // popu lated for  Single Ser ver and Fa il Over Cl usters
  79           pr ivate VixD eploymentT ype vixDep loymentOpt ionServer2  = VixDepl oymentType .Deprecate d; // not  populated  except for  Fail Over  Clusters
  80           pr ivate VixC acheType v ixCacheOpt ion = VixC acheType.N otSpecifie d;
  81           pr ivate int  vixCacheSi ze = VixFa cade.MINIM UM_VIX_CAC HE_SIZE_GB ; // cache  size in G B
  82           pr ivate Stri ng product Version1 =  null;
  83           pr ivate Stri ng product Version2 =  null;
  84           pr ivate Stri ng previou sProductVe rsion1 = n ull;
  85           pr ivate Stri ng previou sProductVe rsion2 = n ull;
  86           pr ivate VixD eploymentT ype vixDep loymentOpt ion = VixD eploymentT ype.NotSpe cified;
  87           pr ivate Stri ng tomcatA dminPasswo rd = null;
  88           pr ivate Stri ng apachet omcatpassw ord1 = nul l;
  89           pr ivate Stri ng apachet omcatpassw ord2 = nul l;
  90           pr ivate VixR oleType vi xRole = Vi xRoleType. NotSpecifi ed;
  91           // private Vi xDeploymen tConfigura tion[] dep loyConfigs  = null;
  92           pr ivate bool  isPatch =  false; //  if true t he Vixpatc hingUtilit y console  app will b e used
  93  
  94           //  HDIG supp ort
  95           pr ivate stri ng vdigAcc essor = nu ll;
  96           pr ivate stri ng vdigVer ifier = nu ll;
  97           pr ivate stri ng dicomIm ageGateway Server = n ull;
  98           pr ivate stri ng dicomIm ageGateway Port = nul l;
  99           pr ivate stri ng divisio nNumber =  null;
  100           pr ivate bool  dicomList enerEnable d = true;
  101           pr ivate bool  archiveEn abled = tr ue;
  102           pr ivate bool  iconGener ationEnabl ed = true;
  103  
  104           //  CVIX supp ort
  105           pr ivate stri ng sitesFi le = null;
  106           pr ivate stri ng bhieUse rName = nu ll;
  107           pr ivate stri ng bhiePas sword = nu ll;
  108           pr ivate stri ng bhiePro tocol = nu ll;
  109           pr ivate stri ng haimsUs erName = n ull;
  110           pr ivate stri ng haimsPa ssword = n ull;
  111           pr ivate stri ng haimsPr otocol = n ull;
  112           pr ivate stri ng ncatUse rName = nu ll;
  113           pr ivate stri ng ncatPas sword = nu ll;
  114           pr ivate stri ng ncatPro tocol = nu ll;
  115             private in t xcaConne ctorPort =   PORT ;
  116             private in t httpConn ectorPort  PORT ;
  117           pr ivate stri ng station 200UserNam e = null;
  118           pr ivate bool  useOpenSs lForXCACon nector = t rue;
  119  
  120           //  LB DCF en terprise l icensing s upport
  121           pr ivate stri ng renamed Deprecated DcfRoot =  null;
  122  
  123           //  email not ifications
  124           pr ivate stri ng notific ationEmail Addresses  = null;
  125  
  126           //  DKB - rem ember to a dd any new  private m embers to  the Copy m ethod
  127  
  128           //  ROI suppo rt
  129           pr ivate stri ng roiAcce ssor = nul l;
  130           pr ivate stri ng roiVeri fier = nul l;
  131  
  132           //  non peris table deve loper over ride for f orcing Lau rel Bridge  not to be  required.
  133           pr ivate bool  isLaurelB ridgeRequi red = true ;
  134  
  135           #r egion prop erties
  136  
  137           pu blic strin g RenamedD eprecatedD cfRoot
  138           {
  139                get { re turn renam edDeprecat edDcfRoot;  }
  140                set { re namedDepre catedDcfRo ot = value ; }
  141           }
  142  
  143           pu blic bool  UseOpenSsl ForXCAConn ector
  144           {
  145                get { re turn useOp enSslForXC AConnector ; }
  146                set { us eOpenSslFo rXCAConnec tor = valu e; }
  147           }
  148  
  149           pu blic strin g Station2 00UserName
  150           {
  151                get { re turn stati on200UserN ame; }
  152                set { st ation200Us erName = v alue; }
  153           }
  154  
  155           pu blic int H ttpConnect orPort
  156           {
  157                get { re turn httpC onnectorPo rt; }
  158                set { ht tpConnecto rPort = va lue; }
  159           }
  160  
  161           pu blic int X caConnecto rPort
  162           {
  163                get { re turn xcaCo nnectorPor t; }
  164                set { xc aConnector Port = val ue; }
  165           }
  166  
  167           pu blic strin g NcatProt ocol
  168           {
  169                get { re turn ncatP rotocol; }
  170                set { nc atProtocol  = value;  }
  171           }
  172  
  173           pu blic strin g NcatPass word
  174           {
  175                get { re turn ncatP assword; }
  176                set { nc atPassword  = value;  }
  177           }
  178  
  179           pu blic strin g NcatUser Name
  180           {
  181                get { re turn ncatU serName; }
  182                set { nc atUserName  = value;  }
  183           }
  184  
  185           pu blic strin g HaimsPro tocol
  186           {
  187                get { re turn haims Protocol;  }
  188                set { ha imsProtoco l = value;  }
  189           }
  190  
  191           pu blic strin g HaimsPas sword
  192           {
  193                get { re turn haims Password;  }
  194                set { ha imsPasswor d = value;  }
  195           }
  196  
  197           pu blic strin g HaimsUse rName
  198           {
  199                get { re turn haims UserName;  }
  200                set { ha imsUserNam e = value;  }
  201           }
  202  
  203           pu blic strin g BhieProt ocol
  204           {
  205                get { re turn bhieP rotocol; }
  206                set { bh ieProtocol  = value;  }
  207           }
  208  
  209           pu blic strin g BhiePass word
  210           {
  211                get { re turn bhieP assword; }
  212                set { bh iePassword  = value;  }
  213           }
  214  
  215  
  216           pu blic strin g BhieUser Name
  217           {
  218                get { re turn bhieU serName; }
  219                set { bh ieUserName  = value;  }
  220           }
  221  
  222           pu blic strin g SitesFil e
  223           {
  224                get { re turn sites File; }
  225                set { si tesFile =  value; }
  226           }
  227  
  228           pu blic bool  DicomListe nerEnabled
  229           {
  230                get { re turn dicom ListenerEn abled; }
  231                set { di comListene rEnabled =  value; }
  232           }
  233  
  234           pu blic bool  ArchiveEna bled
  235           {
  236                get { re turn archi veEnabled;  }
  237                set { ar chiveEnabl ed = value ; }
  238           }
  239  
  240           pu blic bool  IconGenera tionEnable d
  241           {
  242                get { re turn iconG enerationE nabled; }
  243                set { ic onGenerati onEnabled  = value; }
  244           }
  245  
  246           pu blic strin g Division Number
  247           {
  248                get { re turn divis ionNumber;  }
  249                set { di visionNumb er = value ; }
  250           }
  251  
  252           pu blic strin g VdigAcce ssor
  253           {
  254                get { re turn vdigA ccessor; }
  255                set { vd igAccessor  = value;  }
  256           }
  257  
  258           pu blic strin g VdigVeri fier
  259           {
  260                get { re turn vdigV erifier; }
  261                set { vd igVerifier  = value;  }
  262           }
  263  
  264           pu blic strin g DicomIma geGatewayS erver
  265           {
  266                get { re turn dicom ImageGatew ayServer;  }
  267                set { di comImageGa tewayServe r = value;  }
  268           }
  269  
  270           pu blic strin g DicomIma geGatewayP ort
  271           {
  272                get { re turn dicom ImageGatew ayPort; }
  273                set { di comImageGa tewayPort  = value; }
  274           }
  275  
  276           [X mlIgnore]
  277           pu blic bool  IsPatch
  278           {
  279                get { re turn isPat ch; }
  280                set { is Patch = va lue; }
  281           }
  282  
  283           pu blic VixRo leType Vix Role
  284           {
  285                get { re turn vixRo le; }
  286                set { vi xRole = va lue; }
  287           }
  288  
  289           pu blic Strin g Apacheto mcatpasswo rd1
  290           {
  291                get { re turn apach etomcatpas sword1; }
  292                set { ap achetomcat password1  = value; }
  293           }
  294  
  295           pu blic Strin g Apacheto mcatpasswo rd2
  296           {
  297                get { re turn apach etomcatpas sword2; }
  298                set { ap achetomcat password2  = value; }
  299           }
  300  
  301           pu blic int V ixCacheSiz e
  302           {
  303                get { re turn vixCa cheSize; }
  304                set { vi xCacheSize  = value;  }
  305           }
  306  
  307           pu blic VixCa cheType Vi xCacheOpti on
  308           {
  309                get { re turn vixCa cheOption;  }
  310                set { vi xCacheOpti on = value ; }
  311           }
  312  
  313           pu blic VixDe ploymentTy pe VixDepl oymentOpti on
  314           {
  315                get { re turn vixDe ploymentOp tion; }
  316                set { vi xDeploymen tOption =  value; }
  317           }
  318           
  319           pu blic Strin g VixServe rName1
  320           {
  321                get { re turn vixSe rverName1;  }
  322                set { vi xServerNam e1 = value ; }
  323           }
  324  
  325           pu blic Strin g VixServe rName2
  326           {
  327                get { re turn vixSe rverName2;  }
  328                set { vi xServerNam e2 = value ; }
  329           }
  330  
  331           pu blic VixDe ploymentTy pe VixDepl oymentOpti onServer1
  332           {
  333                get { re turn vixDe ploymentOp tionServer 1; }
  334                set { vi xDeploymen tOptionSer ver1 = val ue; }
  335           }
  336  
  337           pu blic VixDe ploymentTy pe VixDepl oymentOpti onServer2
  338           {
  339                get { re turn vixDe ploymentOp tionServer 2; }
  340                set { vi xDeploymen tOptionSer ver2 = val ue; }
  341           }
  342  
  343           pu blic Strin g LocalDod Server
  344           {
  345                get { re turn local DodServer;  }
  346                set { lo calDodServ er = value ; }
  347           }
  348  
  349           pu blic Strin g LocalDod ServerPort
  350           {
  351                get { re turn local DodServerP ort; }
  352                set { lo calDodServ erPort = v alue; }
  353           }
  354  
  355           pu blic Strin g LocalDod SiteNumber
  356           {
  357                get { re turn local DodSiteNum ber; }
  358                set { lo calDodSite Number = v alue; }
  359           }
  360  
  361           pu blic Strin g LocalDod Username
  362           {
  363                get { re turn local DodUsernam e; }
  364                set { lo calDodUser name = val ue; }
  365           }
  366  
  367           pu blic Strin g LocalDod Password
  368           {
  369                get { re turn local DodPasswor d; }
  370                set { lo calDodPass word = val ue; }
  371           }
  372  
  373           pu blic Strin g Federati onKeystore Password
  374           {
  375                get { re turn feder ationKeyst orePasswor d; }
  376                set { fe derationKe ystorePass word = val ue; }
  377           }
  378  
  379           pu blic Strin g Federati onTruststo rePassword
  380           {
  381                get { re turn feder ationTrust storePassw ord; }
  382                set { fe derationTr uststorePa ssword = v alue; }
  383           }
  384  
  385           [X mlIgnore]
  386           pu blic Strin g VixServe rNameProp
  387           {
  388                get
  389                {
  390                    Debu g.Assert(t his.vixSer verName1 = = Environm ent.Machin eName || t his.vixSer verName2 = = Environm ent.Machin eName);
  391                    retu rn Environ ment.Machi neName;
  392                }
  393                set
  394                {
  395                    if ( this.vixSe rverName1  == null)
  396                    {
  397                         this.vixSe rverName1  = value;
  398                    }
  399                    else  if (this. vixServerN ame1 != nu ll && this .vixServer Name2 == n ull && thi s.vixServe rName1 !=  value)
  400                    {
  401                         this.vixSe rverName2  = value;
  402                    }
  403                    else
  404                    {
  405                         Debug.Asse rt(this.vi xServerNam e1 == valu e || this. vixServerN ame2 == va lue);
  406                    }
  407                }
  408           }
  409  
  410           [X mlIgnore]
  411           pu blic Strin g Previous ProductVer sionProp
  412           {
  413                get
  414                {
  415                    if ( this.vixSe rverName1  == Environ ment.Machi neName)
  416                    {
  417                         return pre viousProdu ctVersion1 ;
  418                    }
  419                    else  if (this. vixServerN ame2 == En vironment. MachineNam e)
  420                    {
  421                         return pre viousProdu ctVersion2 ;
  422                    }
  423                    else
  424                    {
  425                         throw new  Exception( "PreviousP roductVers ionProp ge t: machine name misma tch");
  426                    }
  427                }
  428                set
  429                {
  430                    if ( this.vixSe rverName1  == Environ ment.Machi neName)
  431                    {
  432                         this.previ ousProduct Version1 =  value;
  433                    }
  434                    else  if (this. vixServerN ame2 == En vironment. MachineNam e)
  435                    {
  436                         this.previ ousProduct Version2 =  value;
  437                    }
  438                    else
  439                    {
  440                         throw new  Exception( "PreviousP roductVers ionProp se t : machin e name mis match");
  441                    }
  442                }
  443           }
  444  
  445  
  446           [X mlIgnore]
  447           pu blic Strin g ApacheTo mcatPasswo rd
  448           {
  449                get
  450                {
  451                    if ( this.vixSe rverName1  == Environ ment.Machi neName)
  452                    {
  453                         return apa chetomcatp assword1;
  454                    }
  455                    else  if (this. vixServerN ame2 == En vironment. MachineNam e)
  456                    {
  457                         return apa chetomcatp assword2;
  458                    }
  459                    else
  460                    {
  461                         throw new  Exception( "ApacheTom catPasswor d get: mac hinename m ismatch");
  462                    }
  463                }
  464                set
  465                {
  466                    if ( this.vixSe rverName1  == Environ ment.Machi neName)
  467                    {
  468                         this.apach etomcatpas sword1 = v alue;
  469                    }
  470                    else  if (this. vixServerN ame2 == En vironment. MachineNam e)
  471                    {
  472                         this.apach etomcatpas sword2 = v alue;
  473                    }
  474                    else
  475                    {
  476                         throw new  Exception( "ApacheTom catPasswor d set : ma chine name  mismatch" );
  477                    }
  478                }
  479           }
  480  
  481           [X mlIgnore]
  482           pu blic Strin g ProductV ersionProp
  483           {
  484                get
  485                {
  486                    if ( this.vixSe rverName1  == Environ ment.Machi neName)
  487                    {
  488                         return pro ductVersio n1;
  489                    }
  490                    else  if (this. vixServerN ame2 == En vironment. MachineNam e)
  491                    {
  492                         return pro ductVersio n2;
  493                    }
  494                    else
  495                    {
  496                         throw new  Exception( "ProductVe rsionProp  get: machi nename mis match");
  497                    }
  498                }
  499                set
  500                {
  501                    if ( this.vixSe rverName1  == Environ ment.Machi neName)
  502                    {
  503                         this.produ ctVersion1  = value;
  504                    }
  505                    else  if (this. vixServerN ame2 == En vironment. MachineNam e)
  506                    {
  507                         this.produ ctVersion2  = value;
  508                    }
  509                    else
  510                    {
  511                         throw new  Exception( "ProductVe rsionProp  set: machi nename mis match");
  512                    }
  513                }
  514           }
  515  
  516           pu blic Strin g SiteAbbr eviation
  517           {
  518                get { re turn siteA bbreviatio n; }
  519                set { si teAbbrevia tion = val ue; }
  520           }
  521  
  522           pu blic Strin g SiteName
  523           {
  524                get { re turn siteN ame; }
  525                set { si teName = v alue; }
  526           }
  527  
  528           pu blic Strin g BiaPassw ord
  529           {
  530                get { re turn biaPa ssword; }
  531                set { bi aPassword  = value; }
  532           }
  533  
  534           pu blic Strin g BiaUsern ame
  535           {
  536                get { re turn biaUs ername; }
  537                set { bi aUsername  = value; }
  538           }
  539  
  540           pu blic Strin g ConfigDi r
  541           {
  542                get { re turn confi gDir; }
  543                set { co nfigDir =  value; }
  544           }
  545  
  546           pu blic Strin g NetworkF ileSharePa ssword
  547           {
  548                get { re turn netwo rkFileShar ePassword;  }
  549                set { ne tworkFileS harePasswo rd = value ; }
  550           }
  551  
  552           pu blic Strin g NetworkF ileShareUs ername
  553           {
  554                get { re turn netwo rkFileShar eUsername;  }
  555                set { ne tworkFileS hareUserna me = value ; }
  556           }
  557  
  558           pu blic Strin g NetworkF ileShare
  559           {
  560                get { re turn netwo rkFileShar e; }
  561                set { ne tworkFileS hare = val ue; }
  562           }
  563  
  564           pu blic Strin g LocalCac heDir
  565           {
  566                get { re turn local CacheDir;  }
  567                set { lo calCacheDi r = value;  }
  568           }
  569  
  570           pu blic Strin g SiteServ iceUri
  571           {
  572                get { re turn siteS erviceUri;  }
  573                set { si teServiceU ri = value ; }
  574           }
  575  
  576           pu blic Strin g SiteNumb er
  577           {
  578                get { re turn siteN umber; }
  579                set { si teNumber =  value; }
  580           }
  581  
  582           pu blic Strin g VistaSer verName
  583           {
  584                get { re turn vista ServerName ; }
  585                set { vi staServerN ame = valu e; }
  586           }
  587  
  588           pu blic Strin g VistaSer verPort
  589           {
  590                get { re turn vista ServerPort ; }
  591                set { vi staServerP ort = valu e; }
  592           }
  593  
  594           pu blic Strin g ProductV ersion1
  595           {
  596                get { re turn produ ctVersion1 ; }
  597                set { pr oductVersi on1 = valu e; }
  598           }
  599  
  600           pu blic Strin g ProductV ersion2
  601           {
  602                get { re turn produ ctVersion2 ; }
  603                set { pr oductVersi on2 = valu e; }
  604           }
  605  
  606           pu blic Strin g Previous ProductVer sion1
  607           {
  608                get { re turn previ ousProduct Version1;  }
  609                set { pr eviousProd uctVersion 1 = value;  }
  610           }
  611  
  612           pu blic Strin g Previous ProductVer sion2
  613           {
  614                get { re turn previ ousProduct Version2;  }
  615                set { pr eviousProd uctVersion 2 = value;  }
  616           }
  617  
  618           pu blic Strin g TomcatAd minPasswor d
  619           {
  620                get { re turn tomca tAdminPass word; }
  621                set { to mcatAdminP assword =  value; }
  622           }
  623  
  624           pu blic strin g Notifica tionEmailA ddresses
  625           {
  626                get { re turn this. notificati onEmailAdd resses; }
  627                set { th is.notific ationEmail Addresses  = value; }
  628           }
  629  
  630           pu blic strin g RoiAcces sor
  631           {
  632                get { re turn this. roiAccesso r; }
  633                set { th is.roiAcce ssor = val ue; }
  634           }
  635  
  636           pu blic strin g RoiVerif ier
  637           {
  638                get { re turn this. roiVerifie r; }
  639                set { th is.roiVeri fier = val ue; }
  640           }
  641  
  642           [X mlIgnore]
  643           pu blic bool  IsLaurelBr idgeRequir ed
  644           {
  645                get { re turn this. isLaurelBr idgeRequir ed; }
  646                set { th is.isLaure lBridgeReq uired = va lue; }
  647           }
  648  
  649           #e ndregion
  650  
  651           #r egion publ ic methods
  652           // / <summary >
  653           //
  654           // / </summar y>
  655           // / <returns >return tr ue if the  VIX instal ler is ins talling a  VIX for th e first ti me, false  otherwise< /returns>
  656           pu blic bool  IsNewVixIn stallation ()
  657           {
  658                return t his.Previo usProductV ersionProp  == null ?  true : fa lse;
  659           }
  660  
  661           // / <summary >
  662           // / Check to  see if bo th nodes o f a cluste r are inst alled
  663           // / </summar y>
  664           // / <returns >true if b oth nodes  have a VIX  </returns >
  665           pu blic bool  AreBothNod esInstalle d()
  666           {
  667                Debug.As sert(Clust erFacade.I sServerClu sterNode() );
  668                return ( this.produ ctVersion1  != null & & this.pro ductVersio n2 != null ) ? true :  false;
  669           }
  670  
  671           // / <summary >
  672           // / Get the  machine na me of the  other node  in the cl uster.
  673           // / </summar y>
  674           // / <returns >the machi ne name of  the other  node in t he cluster </returns>
  675           pu blic strin g GetOther Node()
  676           {
  677                Debug.As sert(this. vixServerN ame1 != nu ll && this .vixServer Name2 != n ull);
  678                if (this .vixServer Name1 == E nvironment .MachineNa me)
  679                {
  680                    retu rn this.vi xServerNam e2;
  681                }
  682                else
  683                {
  684                    retu rn this.vi xServerNam e1;
  685                }
  686           }
  687  
  688  
  689           // / <summary >
  690           // / Check to  see if bo th nodes o f a cluste r are the  same softw are versio n
  691           // / </summar y>
  692           // / <returns >true if b oth nodes  are the sa me softwar e version,  false oth erwise</re turns>
  693           pu blic bool  AreBothNod esUpdated( )
  694           {
  695                Debug.As sert(Clust erFacade.I sServerClu sterNode() );
  696                //Debug. Assert(Are BothNodesI nstalled() );
  697                return ( this.produ ctVersion1  == this.p roductVers ion2) ? tr ue : false ;
  698           }
  699  
  700           pu blic void  Copy(VixCo nfiguratio nParameter s config)
  701           {
  702                this.sit eServiceUr i = config .siteServi ceUri;
  703                this.sit eNumber =  config.sit eNumber;
  704                this.vis taServerNa me = confi g.vistaSer verName;
  705                this.vis taServerPo rt = confi g.vistaSer verPort;
  706                this.loc alCacheDir  = config. localCache Dir;
  707                this.net workFileSh are = conf ig.network FileShare;
  708                this.net workFileSh areUsernam e = config .networkFi leShareUse rname;
  709                this.net workFileSh arePasswor d = config .networkFi leSharePas sword;
  710                this.con figDir = c onfig.conf igDir;
  711                this.bia Username =  config.bi aUsername;
  712                this.bia Password =  config.bi aPassword;
  713                this.sit eName = co nfig.siteN ame;
  714                this.sit eAbbreviat ion = conf ig.siteAbb reviation;
  715                this.Pro ductVersio n = config .ProductVe rsion; //  TODO: depr ecated but  still act ive for mi gration pu rposes
  716                this.Pre viousProdu ctVersion  = config.P reviousPro ductVersio n; // TODO : deprecat ed but sti ll active  for migrat ion purpos es
  717                this.fed erationKey storePassw ord = conf ig.federat ionKeystor ePassword;
  718                this.fed erationTru ststorePas sword = co nfig.feder ationTrust storePassw ord;
  719                //this.v ixCertific ateInstall ZipFilespe c = config .vixCertif icateInsta llZipFiles pec;
  720                this.loc alDodServe r = config .localDodS erver;
  721                this.loc alDodServe rPort = co nfig.local DodServerP ort;
  722                this.loc alDodSiteN umber = co nfig.local DodSiteNum ber;
  723                this.loc alDodUsern ame = conf ig.localDo dUsername;
  724                this.loc alDodPassw ord = conf ig.localDo dPassword;
  725                this.vix Deployment OptionServ er1 = conf ig.vixDepl oymentOpti onServer1;  // TODO:  deprecated  but still  active fo r migratio n purposes
  726                this.vix Deployment OptionServ er2 = conf ig.vixDepl oymentOpti onServer2;  // TODO:  deprecated  but still  active fo r migratio n purposes
  727                this.vix ServerName 1 = config .vixServer Name1;
  728                this.vix ServerName 2 = config .vixServer Name2;
  729                this.con figDir = c onfig.conf igDir;
  730                this.vix CacheOptio n = config .vixCacheO ption;
  731                this.vix CacheSize  = config.v ixCacheSiz e;
  732                this.pro ductVersio n1 = confi g.productV ersion1;
  733                this.pro ductVersio n2 = confi g.productV ersion2;
  734                this.pre viousProdu ctVersion1  = config. previousPr oductVersi on1;
  735                this.pre viousProdu ctVersion2  = config. previousPr oductVersi on2;
  736                this.vix Deployment Option = c onfig.vixD eploymentO ption;
  737                this.tom catAdminPa ssword = c onfig.tomc atAdminPas sword;
  738                //this.i sPatch90or Patch101In stalled =  config.isP atch90orPa tch101Inst alled;
  739                this.apa chetomcatp assword1 =  config.ap achetomcat password1;
  740                this.apa chetomcatp assword2 =  config.ap achetomcat password2;
  741                this.vix Role = con fig.vixRol e;
  742                this.isP atch = con fig.isPatc h;
  743                this.vdi gAccessor  = config.v digAccesso r;
  744                this.vdi gVerifier  = config.v digVerifie r;
  745                this.dic omImageGat ewayServer  = config. dicomImage GatewaySer ver;
  746                this.dic omImageGat ewayPort =  config.di comImageGa tewayPort;
  747                this.div isionNumbe r = config .divisionN umber;
  748                this.dic omListener Enabled =  config.dic omListener Enabled;
  749                this.arc hiveEnable d = config .archiveEn abled;
  750                this.ico nGeneratio nEnabled =  config.ic onGenerati onEnabled;
  751                this.bhi eUserName  = config.b hieUserNam e;
  752                this.bhi ePassword  = config.b hiePasswor d;
  753                this.bhi eProtocol  = config.b hieProtoco l;
  754                this.hai msUserName  = config. haimsUserN ame;
  755                this.hai msPassword  = config. haimsPassw ord;
  756                this.hai msProtocol  = config. haimsProto col;
  757                this.nca tUserName  = config.n catUserNam e;
  758                this.nca tPassword  = config.n catPasswor d;
  759                this.nca tProtocol  = config.n catProtoco l;
  760                this.sta tion200Use rName = co nfig.stati on200UserN ame;
  761                this.use OpenSslFor XCAConnect or = confi g.useOpenS slForXCACo nnector;
  762                this.ren amedDeprec atedDcfRoo t = config .renamedDe precatedDc fRoot;
  763                this.not ificationE mailAddres ses = conf ig.notific ationEmail Addresses;
  764                this.roi Accessor =  config.ro iAccessor;
  765                this.roi Verifier =  config.ro iVerifier;
  766                this.isL aurelBridg eRequired  = config.i sLaurelBri dgeRequire d;
  767                //this.d eployConfi gs = confi g.deployCo nfigs;
  768           }
  769  
  770           pu blic void  LogConfigS tate()
  771           {
  772                Logger() .Info("sit eServiceUr i = " + th is.siteSer viceUri);
  773                Logger() .Info("sit eNumber =  " + this.s iteNumber) ;
  774                Logger() .Info("vis taServerNa me = " + t his.vistaS erverName) ;
  775                Logger() .Info("vis taServerPo rt = " + t his.vistaS erverPort) ;
  776                Logger() .Info("loc alCacheDir  = " + thi s.localCac heDir);
  777                Logger() .Info("net workFileSh are = " +  this.netwo rkFileShar e);
  778                Logger() .Info("net workFileSh areUsernam e = " + th is.network FileShareU sername);
  779                Logger() .Info("net workFileSh arePasswor d = " + th is.network FileShareP assword);
  780                Logger() .Info("con figDir = "  + this.co nfigDir);
  781                Logger() .Info("bia Username =  <not show n>");
  782                Logger() .Info("bia Password =  <not show n>");
  783                Logger() .Info("sit eName = "  + this.sit eName);
  784                Logger() .Info("sit eAbbreviat ion = " +  this.siteA bbreviatio n);
  785                Logger() .Info("pro ductVersio n = " + th is.Product Version);
  786                Logger() .Info("pre viousProdu ctVersion  = " + this .PreviousP roductVers ion);
  787                Logger() .Info("fed erationKey storePassw ord = <not  shown>");
  788                Logger() .Info("fed erationTru ststorePas sword = <n ot shown>" );
  789                //Logger ().Info("v ixCertific ateInstall ZipFilespe c = " + th is.vixCert ificateIns tallZipFil espec);
  790                Logger() .Info("loc alDodServe r = " + th is.localDo dServer);
  791                Logger() .Info("loc alDodServe rPort = "  + this.loc alDodServe rPort);
  792                Logger() .Info("loc alDodSiteN umber = "  + this.loc alDodSiteN umber);
  793                Logger() .Info("loc alDodUsern ame = <not  shown>");
  794                Logger() .Info("loc alDodPassw ord = <not  shown>");
  795                Logger() .Info("vix Deployment OptionServ er1 = " +  this.vixDe ploymentOp tionServer 1);
  796                Logger() .Info("vix Deployment OptionServ er2 = " +  this.vixDe ploymentOp tionServer 2);
  797                Logger() .Info("vix ServerName 1 = " + th is.vixServ erName1);
  798                Logger() .Info("vix ServerName 2 = " + th is.vixServ erName2);
  799                Logger() .Info("con figDir = "  + this.co nfigDir);
  800                Logger() .Info("vix CacheOptio n = " + th is.vixCach eOption);
  801                Logger() .Info("vix CacheSize  = " + this .vixCacheS ize);
  802                Logger() .Info("isN ewVixInsta llation =  " + this.I sNewVixIns tallation( ));
  803                Logger() .Info("pro ductVersio n1 = " + t his.produc tVersion1) ;
  804                Logger() .Info("pro ductVersio n2 = " + t his.produc tVersion2) ;
  805                Logger() .Info("pre viousProdu ctVersion1  = " + thi s.previous ProductVer sion1);
  806                Logger() .Info("pre viousProdu ctVersion2  = " + thi s.previous ProductVer sion2);
  807                Logger() .Info("vix Deployment Option = "  + this.vi xDeploymen tOption);
  808                Logger() .Info("tom catAdminPa ssowrd = < not shown> ");
  809                //Logger ().Info("i sPatch90or Patch101In stalled =  " + this.i sPatch90or Patch101In stalled);
  810                Logger() .Info("apa chetomcatp assword1 =  <not show n>");
  811                Logger() .Info("apa chetomcatp assword2 =  <not show n>");
  812                Logger() .Info("vix Role = " +  this.vixR ole);
  813                Logger() .Info("isP atch = " +  this.isPa tch);
  814                Logger() .Info("vdi gAccessor  = <not sho wn>");
  815                Logger() .Info("vdi gVerifier  = <not sho wn>");
  816                Logger() .Info("dic omImageGat ewayServer  = " + thi s.dicomIma geGatewayS erver);
  817                Logger() .Info("dic omImageGat ewayPort =  " + this. dicomImage GatewayPor t);
  818                Logger() .Info("div isionNumbe r = " + th is.divisio nNumber);
  819                Logger() .Info("dic omListener Enabled =  " + this.d icomListen erEnabled) ;
  820                Logger() .Info("arc hiveEnable d = " + th is.archive Enabled);
  821                Logger() .Info("ico nGeneratio nEnabled =  " + this. iconGenera tionEnable d);
  822                Logger() .Info("bhi eUserName  =  <not sh own>");
  823                Logger() .Info("bhi ePassword  =  <not sh own>");
  824                Logger() .Info("bhi eProtocol  = " + this .bhieProto col);
  825                Logger() .Info("hai msUserName  =  <not s hown>");
  826                Logger() .Info("hai msPassword  =  <not s hown>");
  827                Logger() .Info("hai msProtocol  = " + thi s.haimsPro tocol);
  828                Logger() .Info("nca tUserName  =  <not sh own>");
  829                Logger() .Info("nca tPassword  =  <not sh own>");
  830                Logger() .Info("nca tProtocol  = " + this .ncatProto col);
  831                Logger() .Info("sta tion200Use rName = "  + this.sta tion200Use rName);
  832                Logger() .Info("use OpenSslFor XCAConnect or = " + t his.useOpe nSslForXCA Connector) ;
  833                Logger() .Info("ren amedDeprec atedDcfRoo t = " + th is.renamed Deprecated DcfRoot);
  834                Logger() .Info("not ificationE mailAddres ess = " +  this.notif icationEma ilAddresse s);
  835                Logger() .Info("roi Accessor =   <not sho wn>");
  836                Logger() .Info("roi Verifier =   <not sho wn>");
  837                Logger() .Info("isL aurelBridg eRequired  = " + this .isLaurelB ridgeRequi red);
  838           }
  839  
  840           pu blic bool  HasRoiConf iguration( )
  841           {
  842                if (this .roiAccess or != null  && this.r oiVerifier  != null & & notifica tionEmailA ddresses ! = null)
  843                {
  844                    retu rn true;
  845                }
  846                else
  847                {
  848                    retu rn false;
  849                }
  850           }
  851  
  852           pu blic bool  HasLocalDo dConfigura tion()
  853           {
  854                if (loca lDodServer  != null & & localDod ServerPort  != null & & localDod SiteNumber  != null & &
  855                    loca lDodUserna me != null  && localD odPassword  != null)
  856                {
  857                    retu rn true;
  858                }
  859                else
  860                {
  861                    retu rn false;
  862                }
  863           }
  864  
  865           pu blic bool  HasDicomCo nfiguratio n()
  866           {
  867                if (dico mImageGate wayServer  != null &&  dicomImag eGatewayPo rt != null  && vdigAc cessor !=  null && vd igVerifier  != null & & notifica tionEmailA ddresses ! = null)
  868                {
  869                    retu rn true;
  870                }
  871                else
  872                {
  873                    retu rn false;
  874                }
  875           }
  876  
  877           pu blic bool  HasXcaConf iguration( )
  878           {
  879                bool con figured =  true;
  880                if (bhie Protocol = = null ||  haimsProto col == nul l || ncatP rotocol ==  null)
  881                {
  882                    conf igured = f alse;
  883                }
  884                if (bhie UserName ! = null &&  bhiePasswo rd == null )
  885                {
  886                    conf igured = f alse;
  887                }
  888                if (haim sUserName  != null &&  haimsPass word == nu ll)
  889                {
  890                    conf igured = f alse;
  891                }
  892                if (ncat UserName ! = null &&  ncatPasswo rd == null )
  893                {
  894                    conf igured = f alse;
  895                }
  896  
  897                return c onfigured;
  898           }
  899  
  900           pu blic void  ToXml()
  901           {
  902                //Logger ().Info("C onfigurati on state b efore pers isting");
  903                //this.L ogConfigSt ate();
  904                XmlSeria lizer seri alizer = n ull;
  905                //FileSt ream strea m = null;
  906                Debug.As sert(this. configDir  != null);
  907                Debug.As sert(Direc tory.Exist s(this.con figDir));
  908                String f ilepsec =  Path.Combi ne(this.co nfigDir, V IX_INSTALL ER_CONFIG_ FILENAME);
  909                XmlDocum ent doc =  new XmlDoc ument();
  910                doc.Pres erveWhites pace = tru e;
  911                TripleDE SDocumentE ncryption  cryptotron  = null;
  912                MemorySt ream strea m = null;
  913  
  914                try
  915                {
  916                    // C reate a se rializer f or the Sai lboat type
  917                    seri alizer = n ew XmlSeri alizer(thi s.GetType( ));
  918                    // C reate a ne w writable  FileStrea m, using t he path pa ssed
  919                    // a s a parame ter.
  920                    //st ream = new  FileStrea m(filepsec , FileMode .Create, F ileAccess. Write);
  921                    stre am = new M emoryStrea m();
  922                    seri alizer.Ser ialize(str eam, this) ;
  923                    stre am.Positio n = 0;
  924                    doc. Load(strea m);
  925                    cryp totron = n ew TripleD ESDocument Encryption (doc);
  926                    cryp totron.Enc rypt("Fede rationKeys torePasswo rd");
  927                    cryp totron.Enc rypt("Fede rationTrus tstorePass word");
  928                    cryp totron.Enc rypt("BiaP assword");
  929                    cryp totron.Enc rypt("BiaU sername");
  930                    cryp totron.Enc rypt("Apac hetomcatpa ssword1");
  931                    cryp totron.Enc rypt("Apac hetomcatpa ssword2");
  932                    cryp totron.Enc rypt("Tomc atAdminPas sword");
  933                    cryp totron.Enc rypt("Vdig Accessor") ;
  934                    cryp totron.Enc rypt("Vdig Verifier") ;
  935                    cryp totron.Enc rypt("Bhie UserName") ;
  936                    cryp totron.Enc rypt("Bhie Password") ;
  937                    cryp totron.Enc rypt("Haim sUserName" );
  938                    cryp totron.Enc rypt("Haim sPassword" );
  939                    cryp totron.Enc rypt("Ncat UserName") ;
  940                    cryp totron.Enc rypt("Ncat Password") ;
  941                    cryp totron.Enc rypt("Stat ion200User Name");
  942                    cryp totron.Enc rypt("roiV erifier");
  943                    cryp totron.Enc rypt("roiA ccessor");
  944                    doc. Save(filep sec);
  945                }
  946                finally
  947                {
  948                    if ( stream !=  null)
  949                    {
  950                         stream.Clo se();
  951                    }
  952                }
  953           }
  954  
  955  
  956           #e ndregion
  957  
  958           #r egion publ ic static  methods
  959           // / <summary >
  960           //
  961           // / </summar y>
  962           // / <param n ame="newPr oductVersi on"></para m>
  963           // / <param n ame="keySt orePasswor d"></param >
  964           // / <param n ame="trust StorePassw ord"></par am>
  965           // / <returns ></returns >
  966           pu blic stati c VixConfi gurationPa rameters G etVixConfi guration(s tring newP roductVers ion, strin g keyStore Password,  string tru stStorePas sword, boo l isPatch)
  967           {
  968                VixConfi gurationPa rameters c onfig = nu ll;
  969  
  970   ///             if (V ixFacade.I sVixConfig ured() ||  VixConfigu rationPara meters.IsV ixInstalle rConfigure d()) // us e the exis ting ViX c onfigurati on if it e xists
  971                if (VixC onfigurati onParamete rs.IsVixIn stallerCon figured())  // use th e existing  ViX confi guration i f it exist s
  972                    {
  973                    if ( ClusterFac ade.IsServ erClusterN ode())
  974                    {
  975                         Logger().I nfo(Enviro nment.Mach ineName +  " belongs  to a High  Availibili ty Cluster ");
  976                    }
  977                    else
  978                    {
  979                         Logger().I nfo(Enviro nment.Mach ineName +  " is a Sin gle Server  VIX insta llation");
  980                    }
  981                    conf ig = VixCo nfiguratio nParameter s.FromXml( VixFacade. GetVixConf igurationD irectory() ); //, key StorePassw ord, trust StorePassw ord);
  982                    conf ig.Previou sProductVe rsionProp  = config.P roductVers ionProp;
  983                    conf ig.Product VersionPro p = newPro ductVersio n;
  984                    Logg er().Info( "Existing  VIX deploy ment of ty pe " + con fig.VixDep loymentOpt ion.ToStri ng() + " f or server  " + Enviro nment.Mach ineName);
  985                }
  986                else if  (ClusterFa cade.IsSer verCluster Node() &&  VixFacade. GetExistin gFocVixCon figuration Dir() != n ull)
  987                {
  988                    //De bug.Assert (VixConfig urationPar ameters.Is VixInstall erConfigur ed()); - n ot true fo r initial  install of  2nf foc n ode
  989                    Logg er().Info( Environmen t.MachineN ame + " be longs to a  High Avai libility C luster - s econd node  new insta llation");
  990                    stri ng configD ir = VixFa cade.GetEx istingFocV ixConfigur ationDir() ;
  991                    Debu g.Assert(c onfigDir ! = null);
  992                    conf ig = VixCo nfiguratio nParameter s.FromXml( configDir) ; //, keyS torePasswo rd, trustS torePasswo rd);
  993                    conf ig.VixServ erNameProp  = Environ ment.Machi neName;
  994                    conf ig.Product VersionPro p = newPro ductVersio n; //Previ ousProduct Version ==  null
  995                }
  996                else //  new instal lation
  997                {
  998                    conf ig = new V ixConfigur ationParam eters(newP roductVers ion, keySt orePasswor d, trustSt orePasswor d);
  999                }
  1000                config.I sPatch = i sPatch;
  1001  
  1002                // null  out site i nformation  (except f or number)  informati on so we m ust prompt  for it ag ain (site  service re fresh)
  1003                // this  is not don e if he Vi xPatchingU tility is  used
  1004                if (!con fig.isPatc h)
  1005                {
  1006                    conf ig.vistaSe rverName =  null;
  1007                    conf ig.vistaSe rverPort =  null;
  1008                    conf ig.siteAbb reviation  = null;
  1009                    conf ig.siteNam e = null;
  1010                }
  1011  
  1012                // chang e existing  VIXen ove r to the V ixLimitedS izePrototy pe
  1013                if (conf ig.vixCach eOption ==  VixCacheT ype.NotSpe cified)
  1014                {
  1015                    conf ig.vixCach eOption =  GetVixCach eTypeByDep loymentOpt ion(config .VixDeploy mentOption ); // use  property t hat gets t he deploym ent option  based on  machine na me
  1016                }
  1017  
  1018                Logger() .Info("Con figuration  state aft er initial ization");
  1019                config.L ogConfigSt ate();
  1020                return c onfig;
  1021           }
  1022  
  1023           #e ndregion
  1024  
  1025           #r egion priv ate method s
  1026  
  1027           // / <summary >
  1028           // / Migrate  between ol der versio ns of the  VixConfigu rationPara meters to  the curren t version.
  1029           // / </summar y>
  1030           pr ivate void  migrate()
  1031           {
  1032                if (this .vixRole = = VixRoleT ype.NotSpe cified)
  1033                {
  1034                    if ( this.Produ ctVersionP rop.Starts With("30.8 3"))
  1035                    {
  1036                         this.vixRo le = VixRo leType.Sit eVix;
  1037                    }
  1038                }
  1039           }
  1040  
  1041           // / <summary >
  1042           //
  1043           // / </summar y>
  1044           // / <param n ame="deplo ymentOptio n"></param >
  1045           // / <returns ></returns >
  1046           pr ivate stat ic VixCach eType GetV ixCacheTyp eByDeploym entOption( VixDeploym entType de ploymentOp tion)
  1047           {
  1048                VixCache Type vixCa cheOption  = VixCache Type.NotSp ecified;
  1049                switch ( deployment Option)
  1050                {
  1051                    case  VixDeploy mentType.S ingleServe r:
  1052                    case  VixDeploy mentType.F ocClusterN ode:
  1053                    //ca se VixDepl oymentType .CvixFocCl usterNode:
  1054                         vixCacheOp tion = Vix CacheType. ExchangeTi meEviction LocalFiles ystem;
  1055                         break;
  1056                }
  1057                Debug.As sert(vixCa cheOption  != VixCach eType.NotS pecified);
  1058                return v ixCacheOpt ion;
  1059           }
  1060  
  1061           // / <summary >
  1062           // / For new  installati ons, deter mine the d eployment  type from  the curren t server.  We are sma rt.
  1063           // / </summar y>
  1064           // / <returns ></returns >
  1065           pr ivate stat ic VixDepl oymentType  Determine Deployment TypeForSer ver()
  1066           {
  1067                VixDeplo ymentType  deployment Type = Vix Deployment Type.NotSp ecified;
  1068  
  1069                if (Busi nessFacade .IsWindows XP())
  1070                {
  1071                    depl oymentType  = VixDepl oymentType .SingleSer ver;
  1072                }
  1073                else if  (ClusterFa cade.IsSer verCluster Node())
  1074                {
  1075                    depl oymentType  = VixDepl oymentType .FocCluste rNode; //  DKB - 5/10 /2011 - re move last  vestiges o f pre-mani fest insta ller
  1076                }
  1077                else
  1078                {
  1079                    depl oymentType  = VixDepl oymentType .SingleSer ver; // DK B - 5/10/2 011 - remo ve last ve stiges of  pre-manife st install er
  1080                }
  1081  
  1082                return d eploymentT ype;
  1083           }
  1084  
  1085           // / <summary >
  1086           // / Loads th e persiste d state of  the VixCo nfiguratio nParameter s object
  1087           // / </summar y>
  1088           // / <param n ame="vixCo nfigDir">< /param>
  1089           // / <returns >an initia lized VixC onfigurati onParamete rs object  or null if  persisted  state cou ld not be  found </re turns>
  1090           pu blic stati c VixConfi gurationPa rameters F romXml(Str ing vixCon figDir) // , string k eyStorePas sword, str ing trustS torePasswo rd)
  1091           {
  1092                XmlSeria lizer seri alizer = n ull;
  1093                VixConfi gurationPa rameters c onfig = nu ll;
  1094                String f ilespec =  Path.Combi ne(vixConf igDir, VIX _INSTALLER _CONFIG_FI LENAME);
  1095  
  1096                if (File .Exists(fi lespec)) / / no encry ption
  1097                {
  1098                    XmlD ocument do c = new Xm lDocument( );
  1099                    doc. PreserveWh itespace =  true;
  1100                    Trip leDESDocum entEncrypt ion crypto tron = nul l;
  1101                    Memo ryStream s tream = nu ll;
  1102  
  1103                    try
  1104                    {
  1105                         config = n ew VixConf igurationP arameters( );
  1106                         doc.Load(f ilespec);
  1107                         cryptotron  = new Tri pleDESDocu mentEncryp tion(doc);
  1108                         cryptotron .Decrypt() ;
  1109                         stream = n ew MemoryS tream();
  1110                         //doc.Save (Path.Comb ine(vixCon figDir, "f oo.xml"));
  1111                         doc.Save(s tream);
  1112                         stream.Pos ition = 0;
  1113                         serializer  = new Xml Serializer (config.Ge tType());
  1114                         config = ( VixConfigu rationPara meters)ser ializer.De serialize( stream);
  1115                    }
  1116                    fina lly
  1117                    {
  1118                         if (stream  != null)
  1119                         {
  1120                             stream .Close();
  1121                         }
  1122                    }
  1123                    conf ig.migrate ();
  1124                }
  1125  
  1126                return c onfig;
  1127           }
  1128  
  1129           // / <summary >
  1130           //
  1131           // / </summar y>
  1132           // / <param n ame="vixCo nfigDir">< /param>
  1133           // / <returns ></returns >
  1134           pu blic stati c void Fro mXmlToFile (String vi xConfigDir )
  1135           {
  1136                String f ilespec =  Path.Combi ne(vixConf igDir, VIX _INSTALLER _CONFIG_FI LENAME);
  1137  
  1138                if (File .Exists(fi lespec)) / / no encry ption
  1139                {
  1140                    XmlD ocument do c = new Xm lDocument( );
  1141                    doc. PreserveWh itespace =  true;
  1142                    Trip leDESDocum entEncrypt ion crypto tron = nul l;
  1143                    doc. Load(files pec);
  1144                    cryp totron = n ew TripleD ESDocument Encryption (doc);
  1145                    cryp totron.Dec rypt();
  1146                    doc. Save(Path. Combine(vi xConfigDir , "foo.xml "));
  1147                }
  1148           }
  1149  
  1150           // / <summary >
  1151           //
  1152           // / </summar y>
  1153           // / <returns ></returns >
  1154           pr ivate stat ic bool Is VixInstall erConfigur ed()
  1155           {
  1156                bool isC onfigured  = false;
  1157  
  1158                String v ixConfigDi r = Enviro nment.GetE nvironment Variable(" vixconfig" , Environm entVariabl eTarget.Ma chine);
  1159                if (vixC onfigDir ! = null)
  1160                {
  1161                    Stri ng vixConf igPlainTex tFilepath  = Path.Com bine(vixCo nfigDir, V IX_INSTALL ER_CONFIG_ FILENAME);
  1162                    Stri ng vixConf igFilepath  = Path.Co mbine(vixC onfigDir,  VIX_INSTAL LER_CONFIG _FILENAME) ;
  1163                    if ( File.Exist s(vixConfi gPlainText Filepath)  || File.Ex ists(vixCo nfigFilepa th))
  1164                    {
  1165                         isConfigur ed = true;
  1166                    }
  1167                }
  1168  
  1169                return i sConfigure d;
  1170           }
  1171           #e ndregion
  1172  
  1173           cl ass Triple DESDocumen tEncryptio n
  1174           {
  1175                private  XmlDocumen t xmlDoc;
  1176                private  TripleDES  algorithm;
  1177  
  1178                public T ripleDESDo cumentEncr yption(Xml Document d oc)
  1179                {
  1180                    byte [] key = {  58, 250,  251, 44, 1 87, 30, 17 6, 28, 199 , 140, 220 , 19, 159,  244, 226,  217, 38,  217, 231,  178, 117,  188, 225,  43 };
  1181                    byte [] iv = {  34, 15, 64 , 79, 93,  70, 14, 16 1 };
  1182                    if ( doc != nul l)
  1183                    {
  1184                         xmlDoc = d oc;
  1185                    }
  1186                    else
  1187                    {
  1188                         throw new  ArgumentNu llExceptio n("Doc");
  1189                    }
  1190  
  1191                    algo rithm = ne w TripleDE SCryptoSer viceProvid er();
  1192                    algo rithm.Key  = key;
  1193                    algo rithm.IV =  iv;
  1194                }
  1195  
  1196                public v oid Encryp t(string e lementName )
  1197                {
  1198                    // F ind the el ement by n ame and cr eate a new
  1199                    // X mlElement  object.
  1200                    XmlE lement inp utElement  = xmlDoc.G etElements ByTagName( elementNam e)[0] as X mlElement;
  1201  
  1202                    // I f the elem ent was no t found, w e're done.
  1203                    if ( inputEleme nt == null )
  1204                    {
  1205                         return; //  this is b ecause the  XmlSerial izer does  not create  elements  with defau lt values
  1206                    }
  1207  
  1208                    // C reate a ne w Encrypte dXml objec t.
  1209                    Encr yptedXml e xml = new  EncryptedX ml(xmlDoc) ;
  1210  
  1211                    // E ncrypt the  element u sing the s ymmetric k ey.
  1212                    byte [] rgbOutp ut = exml. EncryptDat a(inputEle ment, algo rithm, fal se);
  1213  
  1214                    // C reate an E ncryptedDa ta object  and popula te it.
  1215                    Encr yptedData  ed = new E ncryptedDa ta();
  1216  
  1217                    // S pecify the  namespace  URI for X ML encrypt ion elemen ts.
  1218                    ed.T ype = Encr yptedXml.X mlEncEleme ntUrl;
  1219  
  1220                    // S pecify the  namespace  URI for t he Tripple DES algori thm.
  1221                    ed.E ncryptionM ethod = ne w Encrypti onMethod(E ncryptedXm l.XmlEncTr ipleDESUrl );
  1222  
  1223                    // C reate a Ci pherData e lement.
  1224                    ed.C ipherData  = new Ciph erData();
  1225  
  1226                    // S et the Cip herData el ement to t he value o f the encr ypted XML  element.
  1227                    ed.C ipherData. CipherValu e = rgbOut put;
  1228  
  1229                    // R eplace the  plaintext  XML elemn t with an  EncryptedD ata elemen t.
  1230                    Encr yptedXml.R eplaceElem ent(inputE lement, ed , false);
  1231                }
  1232  
  1233                public v oid Decryp t()
  1234                {
  1235                    XmlE lement enc ryptedElem ent = null ;
  1236                    whil e ((encryp tedElement  = xmlDoc. GetElement sByTagName ("Encrypte dData")[0]  as XmlEle ment) != n ull)
  1237                    {
  1238                         // Create  an Encrypt edData obj ect and po pulate it.
  1239                         EncryptedD ata ed = n ew Encrypt edData();
  1240                         ed.LoadXml (encrypted Element);
  1241  
  1242                         // Create  a new Encr yptedXml o bject.
  1243                         EncryptedX ml exml =  new Encryp tedXml();
  1244  
  1245                         // Decrypt  the eleme nt using t he symmetr ic key.
  1246                         byte[] rgb Output = e xml.Decryp tData(ed,  algorithm) ;
  1247  
  1248                         // Replace  the encry ptedData e lement wit h the plai ntext XML  elemnt.
  1249                         exml.Repla ceData(enc ryptedElem ent, rgbOu tput);
  1250                    }
  1251                }
  1252  
  1253           }
  1254  
  1255       }
  1256   }