Package org.jdesktop.wonderland.modules.contentrepo.common

Examples of org.jdesktop.wonderland.modules.contentrepo.common.ContentCollection.removeChild()


            ContentCollection c = repo.getUserRoot();
            try {
                /*
                 * Remove file if it exists.
                 */
                ContentResource r = (ContentResource) c.removeChild(image.getName());
            } catch (Exception e) {
            }
           
            ContentResource r = (ContentResource) c.createChild(
                image.getName(), ContentNode.Type.RESOURCE);
View Full Code Here


        String recordingName = audioFile.getName();
        logger.info("recording name: " + recordingName);
        node = dirNode.getChild(recordingName);
        if (node != null) {
            logger.info("recording already exists, so removing: " + recordingName);
            dirNode.removeChild(recordingName);
        }
        node = dirNode.createChild(recordingName, Type.RESOURCE);
        ContentResource resource = (ContentResource) node;
        logger.info("created a node for the audio file: " + resource);
        resource.put(audioFile);
View Full Code Here

            ContentCollection c = repo.getUserRoot();
            try {
                /*
                 * Remove file if it exists.
                 */
                ContentResource r = (ContentResource) c.removeChild(image.getName());
            } catch (Exception e) {
            }
           
            ContentResource r = (ContentResource) c.createChild(
                image.getName(), ContentNode.Type.RESOURCE);
View Full Code Here

                csColl = (ContentCollection) grpusrs.createChild("LoginCoverScreen", Type.COLLECTION);
            }
           
            ArrayList<ContentNode> resources = (ArrayList<ContentNode>)csColl.getChildren();
            if (resources != null && resources.size()!=0) {
                csColl.removeChild(resources.get(0).getName());
            }
            ContentResource resource = (ContentResource)csColl.createChild("LoginCoverScreen"+new Date().getTime()+".xml", Type.RESOURCE);

            // Write the new list to the resource
            ByteArrayOutputStream os = new ByteArrayOutputStream();
View Full Code Here

            if(csColl==null) {
                csColl = (ContentCollection) grpusrs.createChild("GoToCoverScreen", Type.COLLECTION);
            }
            ArrayList<ContentNode> resources = (ArrayList<ContentNode>)csColl.getChildren();
            if (resources != null && resources.size()!=0) {
                csColl.removeChild(resources.get(0).getName());
            }
            ContentResource resource = (ContentResource)csColl.createChild("GoToCoverScreen"+new Date().getTime()+".xml", Type.RESOURCE);
          
            // Write the new list to the resource
            ByteArrayOutputStream os = new ByteArrayOutputStream();
View Full Code Here

        // in the same.
        if (existingAvatar != null) {
            ContentResource resource = existingAvatar.getResource();
            ContentCollection parent = resource.getParent();
            try {
                parent.removeChild(resource.getName());
            } catch (ContentRepositoryException excp) {
                logger.log(Level.WARNING, "Unable to remove local avatar " +
                        resource.getPath(), excp);
            }
        }
View Full Code Here

            ImiServerAvatar serverAvatar = serverAvatars.get(avatarName);
            if (serverAvatar != null) {
                ContentResource resource = serverAvatar.resource;
                ContentCollection parent = resource.getParent();
                try {
                    parent.removeChild(resource.getName());
                } catch (ContentRepositoryException excp) {
                    logger.log(Level.WARNING, "Unable to delete avatar from" +
                            " server " + avatar, excp);
                }
                serverAvatars.remove(avatarName);
View Full Code Here

        // and look for the file <app name>.xml.
        ContentCollection userNode = getUserXAppContentCollection();
        String nodeName = item.getAppName() + ".xml";
        ContentNode appNode = userNode.getChild(nodeName);
        if (appNode != null) {
            userNode.removeChild(nodeName);
        }
    }

    /**
     * Returns the content collection for the system-wide X App Registry items.
View Full Code Here

            ContentCollection c = repo.getUserRoot();
            try {
                /*
                 * Remove file if it exists.
                 */
                ContentResource r = (ContentResource) c.removeChild(image.getName());
            } catch (Exception e) {
            }
           
            ContentResource r = (ContentResource) c.createChild(
                image.getName(), ContentNode.Type.RESOURCE);
View Full Code Here

    private void deleteCollectionButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteCollectionButtonActionPerformed

        try {
            ContentCollection parent = tableSelectedNode.getParent();
            parent.removeChild(tableSelectedNode.getName());
            jtable.setContentCollection(parent);
            jtree.refresh();
        } catch (java.lang.Exception excp) {
            String nodeName = tableSelectedNode.getName();
            logger.log(Level.WARNING, "Unable to delete " + nodeName, excp);
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.