public BooksEntityApp() : base("BookStore", CurrentVersion) { //Areas var booksArea = this.AddArea("books"); var infoArea = this.AddArea("info"); var loginArea = this.AddArea("login"); //main module MainModule = new BooksModule(booksArea); //Standard modules var dbInfoModule = new DbInfoModule(infoArea); //Job exec module - disabled for now //var jobExecModule = new Modules.JobExecution.JobExecutionModule(booksArea); // LoginModule var loginStt = new LoginModuleSettings(passwordExpirationPeriod: TimeSpan.FromDays(180)); loginStt.RequiredPasswordStrength = PasswordStrength.Medium; loginStt.DefaultEmailFrom = "*****@*****.**"; var loginModule = new LoginModule(loginArea, loginStt); // Setup encrypted data module. var encrModule = new EncryptedDataModule(booksArea); // Use TestGenerateCryptoKeys test in BasicTests project to generate // and print crypto keys for all algorithms. var cryptoKey = "8E487AD4C490AC43DF15D33AB654E5A222A02C9C904BC51E48C4FE5B7D86F90A"; var cryptoBytes = HexUtil.HexToByteArray(cryptoKey); encrModule.AddChannel(cryptoBytes); //creates default channel Instance = this; }
public BooksEntityApp() : base("BookStore", CurrentVersion) { //Areas var booksArea = this.AddArea("books"); var infoArea = this.AddArea("info"); var loginArea = this.AddArea("login"); //main module MainModule = new BooksModule(booksArea); //Standard modules var dbInfoModule = new DbInfoModule(infoArea); //Job exec module - disabled for now //var jobExecModule = new Modules.JobExecution.JobExecutionModule(booksArea); // LoginModule var loginStt = new LoginModuleSettings(passwordExpirationPeriod: TimeSpan.FromDays(180)); loginStt.RequiredPasswordStrength = PasswordStrength.Medium; loginStt.DefaultEmailFrom = "*****@*****.**"; var loginModule = new LoginModule(loginArea, loginStt); //api config - register controllers defined in Vita.Modules.Login assembly; books controllers are registered by BooksModule base.ApiConfiguration.RegisterControllerTypes( typeof(LoginController), typeof(PasswordResetController), typeof(LoginSelfServiceController), typeof(LoginAdministrationController) ); }
public LoggingEntityApp(string schema = "log", LogModules includeModules = LogModules.All, UserSessionSettings sessionSettings = null) : base("LoggingApp", CurrentVersion) { var area = base.AddArea(schema); ActiveModules = includeModules; // DbInfo module is not shared with main app, it is local for the database var dbInfo = new DbInfoModule(area); // ErrorLog is property in EntityApp, will be set there automatically if (ActiveModules.IsSet(LogModules.ErrorLog)) { var errLog = new ErrorLogModule(area); } if (ActiveModules.IsSet(LogModules.OperationLog)) { OperationLog = new OperationLogModule(area); } if (ActiveModules.IsSet(LogModules.IncidentLog)) { IncidentLog = new IncidentLogModule(area); } if (ActiveModules.IsSet(LogModules.TransactionLog)) { TransactionLog = new TransactionLogModule(area, trackHostApp: false); //do not track changes for LoggingApp itself } if (ActiveModules.IsSet(LogModules.NotificationLog)) { NotificationLog = new NotificationLogModule(area); } if (ActiveModules.IsSet(LogModules.LoginLog)) { LoginLog = new LoginLogModule(area); } if (ActiveModules.IsSet(LogModules.DbUpgradeLog)) { DbUpgradeLog = new DbUpgradeLogModule(area); } if (ActiveModules.IsSet(LogModules.UserSession)) { SessionService = new UserSessionModule(area, sessionSettings); } if (ActiveModules.IsSet(LogModules.EventLog)) { EventLogService = new EventLogModule(area); } if (ActiveModules.IsSet(LogModules.WebCallLog)) { WebCallLog = new WebCallLogModule(area); } if (ActiveModules.IsSet(LogModules.WebClientLog)) { WebClientLogService = new WebClientLogModule(area); } }
// We need to have a parameterless constructor (it might be internal) if we want to use vdbtool to generate DDL scripts internal BooksEntityApp() : base("BookStore", CurrentVersion) { //Areas var booksArea = this.AddArea("books"); var infoArea = this.AddArea("info"); var loginArea = this.AddArea("login"); //main module MainModule = new BooksModule(booksArea); //Standard modules var dbInfoModule = new DbInfoModule(infoArea); // Deprecatedl EncryptedData was used by login module; now only to run migration script var cryptDataModule_Deprecated = new EncryptedDataModule(loginArea); //data history - we track history for book review, it is marked with WithHistory attribute var histModule = new DataHistoryModule(booksArea); // job execution module var jobExecModule = new Modules.JobExecution.JobExecutionModule(booksArea); // LoginModule var loginStt = new LoginModuleSettings(passwordExpirationPeriod: TimeSpan.FromDays(180)); loginStt.RequiredPasswordStrength = PasswordStrength.Medium; loginStt.DefaultEmailFrom = "*****@*****.**"; var loginModule = new LoginModule(loginArea, loginStt); //Notification service var notificationService = new Vita.Modules.Notifications.NotificationService(this); // Authorization object Authorization = new BooksAuthorization(this); //api config - register controllers defined in Vita.Modules assembly; books controllers are registered by BooksModule base.ApiConfiguration.RegisterControllerTypes( typeof(LoginController), typeof(PasswordResetController), typeof(LoginSelfServiceController), typeof(LoginAdministrationController), typeof(LogsDataController), typeof(LogsPostController), typeof(DiagnosticsController), typeof(UserSessionInfoController) ); LogsPostController.EnablePublicEvents = true; //logging app - linked to main app this.LoggingApp = new LoggingEntityApp("log"); LoggingApp.LinkTo(this); //short expir period, just for testing var sessionStt = LoggingApp.GetConfig <UserSessionSettings>(); sessionStt.SessionTimeout = TimeSpan.FromMinutes(5); }
public EntityAppV2() : base("SchemaUpdateApp") { var area = this.AddArea(SchemaName); var module = new EntityModuleV2(area); var dbInfo = new DbInfoModule(area); }