예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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));
        }
예제 #4
0
        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));
        }
예제 #5
0
        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);
        }
예제 #6
0
        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));
        }
예제 #7
0
        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);
        }
예제 #8
0
        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);
        }
예제 #9
0
        public async Task <IList <WebBuilderPages> > GetAllPageList(int siteID)
        {
            WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider();

            return(await objDataProvider.GetAllPageList(siteID));
        }
예제 #10
0
        public async Task <int> CheckPage(string pageName, Guid pageID, int siteID)
        {
            WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider();

            return(await objDataProvider.CheckPage(pageName, pageID, siteID));
        }
예제 #11
0
        public async Task <int> DeletePage(DeletePage deletePage)
        {
            WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider();

            return(await objDataProvider.DeletePage(deletePage));
        }
예제 #12
0
        public async Task <IList <ControllerDetail> > GetMethodDetails(string invokeOn, int siteID)
        {
            WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider();

            return(await objDataProvider.GetMethodDetails(invokeOn, siteID));
        }
예제 #13
0
        public async Task <int> EnableHeadFoot(HeaderFooter headerFooter)
        {
            WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider();

            return(await objDataProvider.EnableHeadFoot(headerFooter));
        }
예제 #14
0
        public async Task <IList <LanguageList> > GetLanguageLists(int siteID)
        {
            WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider();

            return(await objDataProvider.GetLanguageLists(siteID));
        }
예제 #15
0
        public async Task <int> UpdateComponents(BuilderComponent builderComponent)
        {
            WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider();

            return(await objDataProvider.UpdateComponents(builderComponent));
        }
예제 #16
0
        public async Task <IList <BuilderComponentJson> > GetComponentViewValue(string pageName, bool isPublished, int siteID)
        {
            WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider();

            return(await objDataProvider.GetComponentViewValue(pageName, isPublished, siteID));
        }
예제 #17
0
        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));
        }
예제 #18
0
        public async Task <PageDetail> GetPageDetails(Guid pageID)
        {
            WebBuilderDataProvider objDataProvider = new WebBuilderDataProvider();

            return(await objDataProvider.GetPageDetails(pageID));
        }