internal static void RemoveAppInTenantAndEav(IZoneMapper zoneMapper, int zoneId, int appId, ITenant tenant, int userId, Log parentLog) { // check portal assignment and that it's not the default app if (zoneId != zoneMapper.GetZoneId(tenant.Id)) { throw new Exception("This app does not belong to portal " + tenant.Id); } if (appId == new ZoneRuntime(zoneId, parentLog).DefaultAppId) { throw new Exception("The default app of a zone cannot be removed."); } // Prepare to Delete folder in dnn - this must be done, before deleting the app in the DB var sexyApp = App.LightWithoutData(tenant, zoneId, appId, null); var folder = sexyApp.Folder; var physPath = sexyApp.PhysicalPath; // now remove from DB. This sometimes fails, so we do this before trying to clean the files // as the db part should be in a transaction, and if it fails, everything should stay as is new ZoneManager(zoneId, parentLog).DeleteApp(appId); // now really delete the files - if the DB didn't end up throwing an error if (!IsNullOrEmpty(folder) && Directory.Exists(physPath)) { Directory.Delete(physPath, true); } }
public ImportApp(IZoneMapper zoneMapper, IServerPaths serverPaths, IEnvironmentLogger envLogger, ZipImport zipImport, IGlobalConfiguration globalConfiguration) : base("Bck.Export") { _zoneMapper = zoneMapper; _serverPaths = serverPaths; _envLogger = envLogger; _zipImport = zipImport; _globalConfiguration = globalConfiguration; }
public ResetApp(IZoneMapper zoneMapper, Lazy <XmlImportWithFiles> xmlImportWithFilesLazy, ImpExpHelpers impExpHelpers, CmsZones cmsZones) : base("Bck.Export") { _zoneMapper = zoneMapper; _xmlImportWithFilesLazy = xmlImportWithFilesLazy; _impExpHelpers = impExpHelpers; _cmsZones = cmsZones; }
public ImportContent(IZoneMapper zoneMapper, IServerPaths serverPaths, IEnvironmentLogger envLogger, Lazy <Import> importerLazy, Lazy <XmlImportWithFiles> xmlImportWithFilesLazy, ZipImport zipImport, Lazy <JsonSerializer> jsonSerializerLazy, IGlobalConfiguration globalConfiguration) : base("Bck.Export") { _zoneMapper = zoneMapper; _serverPaths = serverPaths; _envLogger = envLogger; _importerLazy = importerLazy; _xmlImportWithFilesLazy = xmlImportWithFilesLazy; _zipImport = zipImport; _jsonSerializerLazy = jsonSerializerLazy; _globalConfiguration = globalConfiguration; }
public StatefulControllerDependencies(IZoneMapper zoneMapper, ITenantResolver tenantResolver, IUserResolver userResolver, //IModuleDefinitionRepository moduleDefinitionRepository, IModuleRepository moduleRepository, //ISettingRepository settingRepository, //OqtaneContainer oqtaneContainer, OqtTempInstanceContext oqtTempInstanceContext, IServiceProvider serviceProvider, IContextResolver ctxResolver ) { ServiceProvider = serviceProvider; CtxResolver = ctxResolver; ZoneMapper = zoneMapper; TenantResolver = tenantResolver; UserResolver = userResolver; //ModuleDefinitionRepository = moduleDefinitionRepository; ModuleRepository = moduleRepository; //SettingRepository = settingRepository; //_oqtaneContainer = oqtaneContainer; OqtTempInstanceContext = oqtTempInstanceContext; }
// Todo: leave this helper class/message in till 2sxc 09.00, then either extract into an own DLL // - we might also write some SQL to update existing pipelines, but it's not likely to have been used much... // - and otherwise im might be in razor-code, which we couldn't auto-update public DnnUserProfileDataSource(ITenant tenant, IZoneMapper zoneMapper) : base(tenant, zoneMapper) { }
public FeaturesBackend(IServerPaths serverPaths, IZoneMapper zoneMapper, IServiceProvider serviceProvider, IGlobalConfiguration globalConfiguration) : base(serviceProvider, "Bck.Feats") { _serverPaths = serverPaths; _zoneMapper = zoneMapper; _globalConfiguration = globalConfiguration; }
public ExportApp(IZoneMapper zoneMapper, ZipExport zipExport) : base("Bck.Export") { _zoneMapper = zoneMapper; _zipExport = zipExport; }
public ImportApp(IZoneMapper zoneMapper, IHttp http) : base("Bck.Export") { _zoneMapper = zoneMapper; _http = http; }
public LanguagesBackend(IZoneMapper zoneMapper) : base("Bck.Admin") { _zoneMapper = zoneMapper; }
// Todo: leave this helper class/message in till 2sxc 09.00, then either extract into an own DLL // - we might also write some SQL to update existing pipelines, but it's not likely to have been used much... // - and otherwise im might be in razor-code, which we couldn't auto-update public DnnUserProfileDataSource(ISite site, IZoneMapper zoneMapper) : base(site, zoneMapper) { }
/// <summary> /// Constructor for DI - you must always call Init(...) afterwards /// </summary> /// <param name="tenant">DI injected param</param> /// <param name="zoneMapper">DI injected param</param> public DnnAppFileSystemLoader(ITenant tenant, IZoneMapper zoneMapper) : base("Dnn.AppStf") { Tenant = tenant; ZoneMapper = zoneMapper; }
/// <summary> /// Empty constructor for DI /// </summary> // ReSharper disable once UnusedMember.Global public DnnModuleUpdater(Lazy <CmsRuntime> cmsRuntimeLazy, IZoneMapper zoneMapper) : base("Dnn.MapA2I") { _cmsRuntimeLazy = cmsRuntimeLazy; _zoneMapper = zoneMapper.Init(Log); }
public AppFinder(PortalSettings portal, IZoneMapper zoneMapper, HttpControllerContext controllerContext, ILog parentLog) : base("Api.FindAp", parentLog, null, "AppForApiCall") { ZoneMapper = zoneMapper; Portal = portal; ControllerContext = controllerContext; }
public ExportContent(IZoneMapper zoneMapper, XmlExporter xmlExporter, Lazy <CmsRuntime> cmsRuntime) : base("Bck.Export") { _zoneMapper = zoneMapper; _xmlExporter = xmlExporter; _cmsRuntime = cmsRuntime; }
/// <summary> /// Constructor for DI - you must always call Init(...) afterwards /// </summary> /// <param name="site">DI injected param</param> /// <param name="zoneMapper">DI injected param</param> public DnnAppFileSystemLoader(ISite site, IZoneMapper zoneMapper) : base("Dnn.AppStf") { Site = site; ZoneMapper = zoneMapper; }
public AppOfRequest(IHttp http, ITenant tenant, IZoneMapper zoneMapper) : base("Api.FindAp") { _http = http; _tenantId = tenant.Id; _zoneMapper = zoneMapper; }
public ExportContent(IZoneMapper zoneMapper, XmlExporter xmlExporter) : base("Bck.Export") { _zoneMapper = zoneMapper; _xmlExporter = xmlExporter; }
public LanguagesBackend(IZoneMapper zoneMapper, ZoneManager zoneManager) : base("Bck.Admin") { _zoneManager = zoneManager; _zoneMapper = zoneMapper.Init(Log); }
public ExportApp(IZoneMapper zoneMapper, ZipExport zipExport, CmsRuntime cmsRuntime) : base("Bck.Export") { _zoneMapper = zoneMapper; _zipExport = zipExport; _cmsRuntime = cmsRuntime; }
/// <summary> /// Constructor for DI, you must always call Init(...) afterwards /// </summary> public DnnEnvironment(IHttp http, ITenant tenant, IPagePublishing publishing, IZoneMapper zoneMapper) : base("DNN.Enviro") { _http = http; _tenant = tenant; PagePublishing = publishing.Init(Log); ZoneMapper = zoneMapper.Init(Log); }
public FeaturesBackend(IHttp http, IZoneMapper zoneMapper) : base("Bck.Feats") { _http = http; _zoneMapper = zoneMapper; }