public async Task <Dictionary <string, ControllerDetail> > ViewLoadAPIPublished(string pageName, ReuseableParams objReuseableParams, List <ControllerDetail> lstApsExtraCompsInvoker, int siteID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); List <ControllerDetail> objControllersList = objDataProvider.GetAPIListPublished(pageName, siteID); return(await ResultInvoke(objControllersList, objReuseableParams, lstApsExtraCompsInvoker)); }
public async Task <CbuilderView> GetEditDOMByID(WebBuilderInfo webBuilderInfo, ReuseableParams reuseableParams, bool localizationEnabled) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); CbuilderView cbuilderView = await objDataProvider.GetEditDOMByID(webBuilderInfo); if (cbuilderView != null) { Task <IList <WebBuilderPages> > pagesList = objDataProvider.GetPageList(webBuilderInfo.SiteID); Task <IList <WebBuilderPages> > dashboardPages = objDataProvider.GetDashboardPageList(webBuilderInfo.SiteID); Task <IList <WebBuilderPages> > forbiddenPages = objDataProvider.GetForbiddenPageList(webBuilderInfo.SiteID); Task <string> componentList = GetComponent(objDataProvider, webBuilderInfo.SiteID); Task <string> bucketComponents = GetBucketCompoent(objDataProvider, webBuilderInfo.SiteID); Task <IList <ApplicationDetail> > applicationNames = objDataProvider.GetApplicationNames(webBuilderInfo.SiteID); Task <string> apiResultString = InitializeAPI(webBuilderInfo.PageName, reuseableParams, webBuilderInfo.SiteID); Task <IList <LanguageList> > languages = null; if (localizationEnabled) { languages = GetLanguageLists(webBuilderInfo.SiteID); } // await Task.WhenAll(pagesList, dashboardPages, componentList, bucketComponents, applicationNames, apiResultString, forbiddenPages, languages); cbuilderView.PageList = await pagesList; cbuilderView.DashboardPages = await dashboardPages; cbuilderView.ComponentList = await componentList; cbuilderView.BucketComponents = await bucketComponents; //cbuilderView.ApplicationName = await objDataProvider.GetApplicationName().ApplicationName; cbuilderView.ApplicationNames = await applicationNames; cbuilderView.APIResultString = await apiResultString; cbuilderView.ForbiddenPage = await forbiddenPages; if (localizationEnabled) { cbuilderView.Languages = await languages; } } return(cbuilderView); }
public async Task <int> AddUpdate(WebBuilderInfo webBuilderInfo, string rootPath) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); WBCachehelper objCache = new WBCachehelper(); objCache.RemoveCacheByPageName(webBuilderInfo.PageName.ToLower(), false, rootPath); return(await objDataProvider.AddUpdate(webBuilderInfo)); }
public async Task <Dictionary <string, ControllerDetail> > EditLoadAPI(string pageName, ReuseableParams objReuseableParams, List <ControllerDetail> lstApsExtraCompsInvoker, int siteID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); IList <ControllerDetail> objControllersList = await objDataProvider.GetAPIList(pageName, siteID); //objReuseableParams.UrlParameters = objReuseableParams?.UrlParameters?.Skip(1).ToArray(); return(await ResultInvoke(objControllersList, objReuseableParams, lstApsExtraCompsInvoker)); }
private async Task <string> GetBucketCompoent(WebBuilderDataProvider objDataProvider, int siteID) { IList <BuilderComponentJson> objComponentList = await objDataProvider.GetBucketComponents(siteID); string componentList = JsonSerializer.Serialize(objComponentList); componentList = componentList.Length == 0 ? "{}" : componentList; return(componentList); }
public async Task <string> GetAppsExtraComponent(List <ControllerDetail> lstApsCompsInvoker, string PageName, int siteID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); string InvokeParam = AppsExtraInvokeParam(lstApsCompsInvoker); List <BuilderComponentJson> appsExtraComponent = new List <BuilderComponentJson>(); if (!string.IsNullOrEmpty(InvokeParam)) { appsExtraComponent = (List <BuilderComponentJson>) await objDataProvider.GetAppsExtraComponent(InvokeParam, PageName, siteID); } return(JsonSerializer.Serialize(appsExtraComponent)); }
public async Task <int> AddUpdatePublished(WebBuilderInfo webBuilderInfo, string rootPath) { int webBuilderID = await AddUpdate(webBuilderInfo, rootPath); WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); if (webBuilderID > 0) { await objDataProvider.AddUpdatePublished(webBuilderID, webBuilderInfo.SiteID); WBCachehelper objCache = new WBCachehelper(); objCache.RemoveCacheByPageName(webBuilderInfo.PageName.ToLower(), true, rootPath); } return(webBuilderID); }
public async Task <WebbuilderViewInfo> GetPageViewDOM(WebbuilderViewGetInfo webbuilderViewGetInfo, ReuseableParams reuseableParams, int siteID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); WebbuilderViewInfo webbuilderViewInfo = await objDataProvider.GetPageViewDOM(webbuilderViewGetInfo); if (webbuilderViewInfo != null) { List <ControllerDetail> lstApsExtraCompsInvoker = new List <ControllerDetail>(); Task <string> apiResultString = APIStringResult(webbuilderViewGetInfo.PreviewMode, webbuilderViewGetInfo.PageName, reuseableParams, lstApsExtraCompsInvoker, siteID); Task <string> appsExtraComponent = GetAppsExtraComponent(lstApsExtraCompsInvoker, webbuilderViewGetInfo.PageName, siteID); //await Task.WhenAll(apiResultString, appsExtraComponent); webbuilderViewInfo.APIResultString = await apiResultString; webbuilderViewInfo.AppsExtraComponent = await appsExtraComponent; } return(webbuilderViewInfo); }
public async Task <IList <WebBuilderPages> > GetAllPageList(int siteID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.GetAllPageList(siteID)); }
public async Task <int> CheckPage(string pageName, Guid pageID, int siteID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.CheckPage(pageName, pageID, siteID)); }
public async Task <int> DeletePage(DeletePage deletePage) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.DeletePage(deletePage)); }
public async Task <IList <ControllerDetail> > GetMethodDetails(string invokeOn, int siteID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.GetMethodDetails(invokeOn, siteID)); }
public async Task <int> EnableHeadFoot(HeaderFooter headerFooter) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.EnableHeadFoot(headerFooter)); }
public async Task <IList <LanguageList> > GetLanguageLists(int siteID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.GetLanguageLists(siteID)); }
public async Task <int> UpdateComponents(BuilderComponent builderComponent) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.UpdateComponents(builderComponent)); }
public async Task <IList <BuilderComponentJson> > GetComponentViewValue(string pageName, bool isPublished, int siteID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.GetComponentViewValue(pageName, isPublished, siteID)); }
public async Task <int> UpdatePageName(string pageName, int webbuilderID, int cloneWebBuilderID, string culture) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.UpdatePageName(pageName, webbuilderID, cloneWebBuilderID, culture)); }
public async Task <PageDetail> GetPageDetails(Guid pageID) { WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider(); return(await objDataProvider.GetPageDetails(pageID)); }