Package org.brixcms.plugin.site

Examples of org.brixcms.plugin.site.SitePlugin$WebDAVRulesTab


            // we are mounting the cms on the root, and getting the workspace name from the
            // application properties
            UriMapper mapper = new PrefixUriMapper(Path.ROOT) {
                public Workspace getWorkspaceForRequest(RequestCycle requestCycle, Brix brix) {
                    final String name = getProperties().getJcrDefaultWorkspace();
                    SitePlugin sitePlugin = SitePlugin.get(brix);
                    return sitePlugin.getSiteWorkspace(name, getProperties().getWorkspaceDefaultState());
                }
            };

            // create brix configuration
            BrixConfig config = new BrixConfig(sf, wm, mapper);
View Full Code Here


    private void initDefaultWorkspace() {
        try {
            final String defaultState = getProperties().getWorkspaceDefaultState();
            final String wn = getProperties().getJcrDefaultWorkspace();
            final SitePlugin sp = SitePlugin.get(brix);


            if (!sp.siteExists(wn, defaultState)) {
                Workspace w = sp.createSite(wn, defaultState);
                JcrSession session = brix.getCurrentSession(w.getId());

                session.importXML("/", getClass().getResourceAsStream("workspace.xml"),
                        ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
View Full Code Here

        registry.register(JcrNodeWrapperFactory.POINT, RulesNode.FACTORY);

        registry.register(Tile.POINT, new PageTile());

        registry.register(Plugin.POINT, new SitePlugin(this));
        // registry.register(Plugin.POINT, new MenuPlugin(this));
        // registry.register(Plugin.POINT, new SnapshotPlugin(this));
        // registry.register(Plugin.POINT, new PrototypePlugin(this));
        // registry.register(Plugin.POINT, new PublishingPlugin(this));
    }
View Full Code Here

        }
        if (targetState == null) {
            throw new IllegalArgumentException("Argument 'targetState' may not be null.");
        }

        SitePlugin sitePlugin = SitePlugin.get();

        if (!sitePlugin.isSiteWorkspace(workspace)) {
            throw new IllegalStateException("Workspace must be a Site workspace.");
        }
        if (targetState.equals(sitePlugin.getWorkspaceState(workspace))) {
            throw new IllegalStateException("Cannot publish workspace to same state it is already.");
        }

        String name = sitePlugin.getWorkspaceName(workspace);
        Workspace target = sitePlugin.getSiteWorkspace(name, targetState);
        if (target == null) {
            target = sitePlugin.createSite(name, targetState);
        }

        JcrSession sourceSession = brix.getCurrentSession(workspace.getId());
        JcrSession targetSession = brix.getCurrentSession(target.getId());
View Full Code Here

            }
        });
    }

    private int compareNodes(BrixNode n1, BrixNode n2, String property) {
        SitePlugin sp = SitePlugin.get();

        // always put folders first if we sort by name, size or mime type
        if (PROPERTY_NAME.equals(property) || PROPERTY_SIZE.equals(property) || PROPERTY_MIME_TYPE.equals(property)) {
            if (n1.isFolder() && !n2.isFolder()) {
                return -1;
View Full Code Here

TOP

Related Classes of org.brixcms.plugin.site.SitePlugin$WebDAVRulesTab

Copyright © 2018 www.massapicom. 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.