Examples of WebContentRepository


Examples of org.jdesktop.wonderland.modules.contentrepo.web.spi.WebContentRepository

     * Guarantee that the content repo path we need is available.
     * @return false if the content repository is not available yet
     */
    private boolean createRepoPath() throws ContentRepositoryException {
        WebContentRepositoryRegistry reg = WebContentRepositoryRegistry.getInstance();
        WebContentRepository repo = reg.getRepository(context);
   
        if (repo == null) {
            // not ready yet
            return false;
        }
       
        // create directory if it doesn't exist
        ContentCollection groups = (ContentCollection) repo.getRoot().getChild("groups");
        if (groups == null) {
            groups = (ContentCollection)
                    repo.getRoot().createChild("groups", ContentNode.Type.COLLECTION);
        }

        ContentCollection users = (ContentCollection) groups.getChild("users");
        if (users == null) {
            users = (ContentCollection)
View Full Code Here

Examples of org.jdesktop.wonderland.modules.contentrepo.web.spi.WebContentRepository

        throws ServletException, IOException
    {
        // Get the repository
        ServletContext sc = getServletContext();
        WebContentRepositoryRegistry reg = WebContentRepositoryRegistry.getInstance();
        WebContentRepository wcr = reg.getRepository(sc);
        if (wcr == null) {
            error(request, response, "No content repositories found. <br>" +
                  "Please contact your system administrator for assistance.");
            return;
        }

        // Fetch the content node for the "x-apps" directory under "system". If
        // "x-apps" isn't there, then create it.
        ContentCollection xAppsCollection = null;
        try {
            ContentCollection sysRoot = wcr.getSystemRoot();
            ContentNode xappsNode = sysRoot.getChild("x-apps");
            if (xappsNode == null) {
                xappsNode = sysRoot.createChild("x-apps", Type.COLLECTION);
            }
            xAppsCollection = (ContentCollection)xappsNode;
View Full Code Here

Examples of org.jdesktop.wonderland.modules.contentrepo.web.spi.WebContentRepository

    {
        ServletContext sc = getServletContext();

        // get the repository
        WebContentRepositoryRegistry reg = WebContentRepositoryRegistry.getInstance();
        WebContentRepository wcr = reg.getRepository(sc);
        if (wcr == null) {
            error(request, response, "No content repositories found. <br>" +
                  "Please contact your system administrator for assistance.");
            return;
        }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.contentrepo.web.spi.WebContentRepository

            throw new IOException("No current context opening " +
                                  url.toExternalForm());
        }
               
        try {
            WebContentRepository repo =
                    WebContentRepositoryRegistry.getInstance().getRepository(context);
            ContentCollection root = repo.getRoot();
            ContentResource obj = (ContentResource) root.getChild(url.getHost() + "/" + url.getPath());
           
            return new WlContentURLConnection(url, obj);
           
        } catch (ContentRepositoryException ce) {
View Full Code Here

Examples of org.jdesktop.wonderland.modules.contentrepo.web.spi.WebContentRepository

     */
    private ContentResource getPlacemarksResource() throws ContentRepositoryException, JAXBException {
        // Get the repository
        ServletContext sc = getServletContext();
        WebContentRepositoryRegistry reg = WebContentRepositoryRegistry.getInstance();
        WebContentRepository wcr = reg.getRepository(sc);
        if (wcr == null) {
            return null;
        }

        // Fetch the content node for the "placemarks/" directory under "system".
        // If "placemarks/" isn't there, then create it.
        ContentCollection sysRoot = wcr.getSystemRoot();
        ContentCollection c = (ContentCollection)sysRoot.getChild("placemarks");
        if (c == null) {
            c = (ContentCollection)sysRoot.createChild("placemarks", Type.COLLECTION);
        }

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.