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

Examples of org.jdesktop.wonderland.modules.contentrepo.common.ContentNode


        downloadButton.setEnabled(enableDownload);
        deleteButton.setEnabled(enableDelete);
    }

    private void changeDirectory() {
        ContentNode selected = getSelection();
        if (selected instanceof ContentCollection) {
            setCollection((ContentCollection) selected);
        }
    }
View Full Code Here


            }
        }
    }//GEN-LAST:event_downloadButtonActionPerformed

    private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButtonActionPerformed
        ContentNode selected = getSelection();

        try {
            directory.removeChild(selected.getName());
        } catch (ContentRepositoryException cre) {
            logger.log(Level.WARNING, "Error removing " + selected.getPath(),
                       cre);
        }

        setCollection(directory);
    }//GEN-LAST:event_deleteButtonActionPerformed
View Full Code Here

                  "Please contact your system administrator for assistance.");
            return;
        }

        try {
            ContentNode node = translatePath(wcr, request.getPathInfo());
            if (node == null) {
                error(request, response, "Path " + request.getPathInfo() +
                      " not found.");
                return;
            }

            String action = request.getParameter("action");
            if (action == null && ServletFileUpload.isMultipartContent(request)) {
                action = "upload";
            }
           
            if (action != null) {
                node = handleAction(request, response, node, action);
                if (node == null) {
                    // indicates that the action has handled forwarding on
                    // its own, for example to the error page
                    return;
                }
            }

            DirectoryEntry current = new DirectoryEntry(node);
            request.setAttribute("current", current);

            if (node instanceof ContentCollection) {
                handleCollection(request, response, (ContentCollection) node);
            } else if (node instanceof ContentResource) {
                handleResource(request, response, (ContentResource) node);
            } else {
                error(request, response, "Unknown node type " + node.getClass());
            }
        } catch (ContentRepositoryException cre) {
            throw new ServletException(cre);
        }
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.modules.contentrepo.common.ContentNode

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.