Package org.jahia.services.sites

Examples of org.jahia.services.sites.JahiaSitesService.addSite()


            JahiaUserManagerService jums = ServicesRegistry.getInstance().getJahiaUserManagerService();
            JahiaSitesService jsms = ServicesRegistry.getInstance().getJahiaSitesService();

            JahiaUser currentUser = jums.lookupUser((String) session.getAttribute(CLASS_NAME + "jahiaLoginUsername"));
            // add the site in siteManager...
            site = jsms.addSite(currentUser, site.getTitle(), site.getServerName(), site.getSiteKey(), site.getDescr(),
                    selectedLocale, (String) request.getAttribute("selectedTmplSet"),
                    (String) request.getAttribute("firstImport"), (File) request.getAttribute("fileImport"),
                    (String) request.getAttribute("fileImportName"), (Boolean) request.getAttribute("asAJob"),
                    (Boolean) request.getAttribute("doImportServerPermissions"), (String) request.getAttribute("originatingJahiaRelease"));
            if (site != null) {
View Full Code Here


                        if ("".equals(tpl)) {
                            tpl = null;
                        }
                        Locale defaultLocale = determineDefaultLocale(jParams, infos);
                        try {
                            JahiaSite site = jahiaSitesService
                                    .addSite(jParams.getUser(), (String) infos.get("sitetitle"),
                                            (String) infos.get("siteservername"), (String) infos.get("sitekey"), "",
                                            defaultLocale, tpl, "fileImport", file,
                                            (String) infos.get("importFileName"), false, false, (String) infos.get("originatingJahiaRelease"));
                            session.setAttribute(ProcessingContext.SESSION_SITE, site);
View Full Code Here

                    ImportExportBaseService.getInstance().importSiteZip(sharedZIPFile, null, null);
                } catch (RepositoryException e) {
                    logger.warn("shared.zip could not be imported", e);
                }
            }
            site = service.addSite(admin, name, serverName, name, name, ctx.getLocale(),
                    templateSet, siteZIPFile == null ? "noImport" : "fileImport", siteZIPFile,
                    null, false, false, null);
            ctx.setSite(site);
        } finally {
            if (sharedZIPFile != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.