public DevelopmentInstallationLogic( GeneralInstallationLogic generalInstallationLogic, ExistingInstallationLogic existingInstallationLogic, RecognizedInstallationLogic recognizedInstallationLogic) { this.generalInstallationLogic = generalInstallationLogic; this.existingInstallationLogic = existingInstallationLogic; var developmentConfiguration = existingInstallationLogic.RuntimeConfiguration.SystemDevelopmentConfiguration; databasesForCodeGeneration = new List <DatabaseAbstraction.Database>(); if (developmentConfiguration.database != null) { DatabasesForCodeGeneration.Add(existingInstallationLogic.Database); } if (developmentConfiguration.secondaryDatabases != null) { foreach (var secondaryDatabaseInDevelopmentConfiguration in developmentConfiguration.secondaryDatabases) { DatabasesForCodeGeneration.Add( (recognizedInstallationLogic != null ? recognizedInstallationLogic.SecondaryDatabasesIncludedInDataPackages.SingleOrDefault( sd => sd.SecondaryDatabaseName == secondaryDatabaseInDevelopmentConfiguration.name) : null) ?? DatabaseAbstraction.DatabaseOps.CreateDatabase( this.existingInstallationLogic.RuntimeConfiguration.GetSecondaryDatabaseInfo(secondaryDatabaseInDevelopmentConfiguration.name))); } } }
public DevelopmentInstallationLogic( GeneralInstallationLogic generalInstallationLogic, ExistingInstallationLogic existingInstallationLogic, RecognizedInstallationLogic recognizedInstallationLogic) { this.generalInstallationLogic = generalInstallationLogic; this.existingInstallationLogic = existingInstallationLogic; database = recognizedInstallationLogic != null ? recognizedInstallationLogic.Database : DatabaseAbstraction.DatabaseOps.CreateDatabase( existingInstallationLogic.RuntimeConfiguration.PrimaryDatabaseInfo, new List<string>() ); var developmentConfiguration = existingInstallationLogic.RuntimeConfiguration.SystemDevelopmentConfiguration; databasesForCodeGeneration = new List<DatabaseAbstraction.Database>(); if( developmentConfiguration.database != null ) DatabasesForCodeGeneration.Add( database ); if( developmentConfiguration.secondaryDatabases != null ) { foreach( var secondaryDatabaseInDevelopmentConfiguration in developmentConfiguration.secondaryDatabases ) { DatabasesForCodeGeneration.Add( ( recognizedInstallationLogic != null ? recognizedInstallationLogic.SecondaryDatabasesIncludedInDataPackages.SingleOrDefault( sd => sd.SecondaryDatabaseName == secondaryDatabaseInDevelopmentConfiguration.name ) : null ) ?? DatabaseAbstraction.DatabaseOps.CreateDatabase( this.existingInstallationLogic.RuntimeConfiguration.GetSecondaryDatabaseInfo( secondaryDatabaseInDevelopmentConfiguration.name ), new List<string>() ) ); } } }
public RecognizedInstallationLogic( ExistingInstallationLogic existingInstallationLogic, KnownSystemLogic knownSystemLogic ) { this.existingInstallationLogic = existingInstallationLogic; this.knownSystemLogic = knownSystemLogic; var rsisSystem = this.knownSystemLogic.RsisSystem; database = DatabaseAbstraction.DatabaseOps.CreateDatabase( existingInstallationLogic.RuntimeConfiguration.PrimaryDatabaseInfo, rsisSystem.PrimaryDatabaseOracleTableSpaces ); var rsisSecondaryDatabases = rsisSystem.SecondaryDatabases.Where( sd => sd.DataPackageRank.HasValue ).OrderBy( sd => sd.DataPackageRank.Value ); secondaryDatabasesIncludedInDataPackages = new List<DatabaseAbstraction.Database>(); foreach( var rsisSecondaryDatabase in rsisSecondaryDatabases ) { var secondaryDatabaseInfo = this.existingInstallationLogic.RuntimeConfiguration.GetSecondaryDatabaseInfo( rsisSecondaryDatabase.Name ); secondaryDatabasesIncludedInDataPackages.Add( DatabaseAbstraction.DatabaseOps.CreateDatabase( secondaryDatabaseInfo, rsisSecondaryDatabase.OracleTableSpaces ) ); } }
public RecognizedInstallationLogic(ExistingInstallationLogic existingInstallationLogic, KnownSystemLogic knownSystemLogic) { this.existingInstallationLogic = existingInstallationLogic; this.knownSystemLogic = knownSystemLogic; var rsisSystem = this.knownSystemLogic.RsisSystem; var rsisSecondaryDatabases = rsisSystem.SecondaryDatabases.Where(sd => sd.DataPackageRank.HasValue).OrderBy(sd => sd.DataPackageRank.Value); secondaryDatabasesIncludedInDataPackages = new List <DatabaseAbstraction.Database>(); foreach (var rsisSecondaryDatabase in rsisSecondaryDatabases) { var secondaryDatabaseInfo = this.existingInstallationLogic.RuntimeConfiguration.GetSecondaryDatabaseInfo(rsisSecondaryDatabase.Name); secondaryDatabasesIncludedInDataPackages.Add(DatabaseAbstraction.DatabaseOps.CreateDatabase(secondaryDatabaseInfo)); } }
private static DevelopmentInstallation getInstallation( string path ) { var generalInstallationLogic = new GeneralInstallationLogic( path ); var existingInstallationLogic = new ExistingInstallationLogic( generalInstallationLogic, new InstallationConfiguration( ConfigurationStatics.MachineIsStandbyServer, path, true ) ); if( existingInstallationLogic.RuntimeConfiguration.RsisInstallationId.HasValue ) { ConfigurationLogic.Init2(); SystemListStatics.RefreshSystemList(); var knownSystemLogic = new KnownSystemLogic( SystemListStatics.RsisSystemList.Systems.Single( i => i.DevelopmentInstallationId == existingInstallationLogic.RuntimeConfiguration.RsisInstallationId.Value ) ); var recognizedInstallationLogic = new RecognizedInstallationLogic( existingInstallationLogic, knownSystemLogic ); return new RecognizedDevelopmentInstallation( generalInstallationLogic, existingInstallationLogic, knownSystemLogic, recognizedInstallationLogic ); } return new UnrecognizedDevelopmentInstallation( generalInstallationLogic, existingInstallationLogic ); }
public ExistingInstalledInstallationLogic( ExistingInstallationLogic existingInstallationLogic ) { this.existingInstallationLogic = existingInstallationLogic; }
public ExistingInstalledInstallationLogic( ExistingInstallationLogic existingInstallationLogic ) { this.existingInstallationLogic = existingInstallationLogic; }