Examples of Site


Examples of org.gatein.mop.api.workspace.Site

    public <N> void saveNode(NodeContext<N> context, NodeChangeListener<NodeContext<N>> listener)
            throws NavigationServiceException {
        service.saveNode(context, listener);
        org.gatein.mop.api.workspace.Navigation nav = service.manager.getSession().findObjectById(ObjectType.NAVIGATION,
                context.data.id);
        Site site = nav.getSite();
        SiteKey key = new SiteKey(siteType(site.getObjectType()), site.getName());
        notify(EventType.NAVIGATION_UPDATED, key);
    }
View Full Code Here

Examples of org.gatein.mop.api.workspace.Site

        POMSession session = pomMgr.getSession();

        WorkspaceObject workspaceObject = session.findObjectById(workspaceObjectId);

        if (workspaceObject instanceof UIComponent) {
            Site site = ((UIComponent) workspaceObject).getPage().getSite();
            ObjectType<? extends Site> siteType = site.getObjectType();

            String[] siteInfo = new String[2];

            // Put the siteType on returned map
            if (siteType == ObjectType.PORTAL_SITE) {
                siteInfo[0] = PortalConfig.PORTAL_TYPE;
            } else if (siteType == ObjectType.GROUP_SITE) {
                siteInfo[0] = PortalConfig.GROUP_TYPE;
            } else if (siteType == ObjectType.USER_SITE) {
                siteInfo[0] = PortalConfig.USER_TYPE;
            }

            // Put the siteOwner on returned map
            siteInfo[1] = site.getName();

            return siteInfo;
        }

        throw new Exception("The provided ID is not associated with an application");
View Full Code Here

Examples of org.gatein.mop.api.workspace.Site

            }
        }
    }

    public PageData load(org.gatein.mop.api.workspace.Page src) {
        Site site = src.getSite();
        String ownerType = getOwnerType(site.getObjectType());
        String ownerId = site.getName();
        String name = src.getName();
        List<ComponentData> children = loadChildren(src.getRootComponent());

        List<String> moveAppsPermissions = null;
        List<String> moveContainersPermissions = null;
View Full Code Here

Examples of org.gatein.mop.api.workspace.Site

    }

    protected final NavigationData loadNavigation(POMSession session, SiteKey key) {
        Workspace workspace = session.getWorkspace();
        ObjectType<Site> objectType = objectType(key.getType());
        Site site = workspace.getSite(objectType, key.getName());
        if (site != null) {
            Navigation defaultNavigation = site.getRootNavigation().getChild("default");
            if (defaultNavigation != null) {
                return new NavigationData(key, defaultNavigation);
            } else {
                return NavigationData.EMPTY;
            }
View Full Code Here

Examples of org.gatein.mop.api.workspace.Site

    @Override
    public void importData(ImportMode importMode) throws Exception {
        if (data == null || data.getPages() == null || data.getPages().isEmpty())
            return;

        Site site = siteProvider.getSite(siteKey);
        if (site == null)
            throw new Exception("Cannot import pages because site does not exist for " + siteKey);
        org.gatein.mop.api.workspace.Page pages = site.getRootPage().getChild("pages");
        int size = (pages == null) ? 0 : pages.getChildren().size();

        Page.PageSet dst = null;
        switch (importMode) {
            case CONSERVE:
View Full Code Here

Examples of org.gatein.mop.api.workspace.Site

            if (component instanceof UIContainer) {
                UIContainer srcContainer = (UIContainer) component;
                Attributes attrs = srcContainer.getAttributes();
                String type = attrs.getValue(MappedAttributes.TYPE);
                if ("dashboard".equals(type)) {
                    Site owner = src.getPage().getSite();
                    TransientApplicationState<Portlet> state = new TransientApplicationState<Portlet>(
                            "dashboard/DashboardPortlet", null, getOwnerType(owner.getObjectType()), owner.getName());

                    //
                    boolean showInfoBar = attrs.getValue(MappedAttributes.SHOW_INFO_BAR, false);
                    boolean showMode = attrs.getValue(MappedAttributes.SHOW_MODE, false);
                    boolean showWindowState = attrs.getValue(MappedAttributes.SHOW_WINDOW_STATE, false);
View Full Code Here

Examples of org.gatein.mop.api.workspace.Site

            //
            TransientApplicationState<S> transientState = (TransientApplicationState<S>) instanceState;

            // Attempt to get a site from the instance state
            Site site = null;
            if (transientState.getOwnerType() != null && transientState.getOwnerId() != null) {
                ObjectType<Site> siteType = parseSiteType(transientState.getOwnerType());
                site = session.getWorkspace().getSite(siteType, transientState.getOwnerId());
            }

            // The current site
            Site currentSite = dst.getPage().getSite();

            // If it is the same site than the current page
            // set null
            if (site == dst.getPage().getSite()) {
                site = null;
View Full Code Here

Examples of org.gatein.mop.api.workspace.Site

        }

        if (filter.hasPathTemplate("nav-uri")) {
            filtered.execute(operationContext, resultHandler, filter);
        } else {
            Site site = navigation.getSite();
            String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
            SiteKey siteKey = getSiteKey(site);

            DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(
                    DescriptionService.class);
View Full Code Here

Examples of org.metrapp.domain.files.Site

        try {
            brSite = new BufferedReader(new FileReader(csvSites));

            String[] entry = new String[12];
            Site s;
            while ((lineSite = brSite.readLine()) != null) {
                entry = lineSite.split(csvSiteSplitBy);
                s = new Site(entry[0], entry[1], entry[2]);
                addSite(s);
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
View Full Code Here

Examples of org.opoo.press.Site

    if(indexOfAny > -1){
      ext = name.substring(indexOfAny);
      name = name.substring(0, indexOfAny);
    }
   
    Site siteObject = siteManager.createSite(site);
    String filename = processPostFileName(siteObject, sentDate, name, ext);
    File postFile = new File(siteObject.getSource(), filename);
   
    File tempFile = prepareTempFile(content, sentDate, title);
    FileUtils.copyFile(tempFile, postFile);
    FileUtils.deleteQuietly(tempFile);
   
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.