Package org.jdesktop.wonderland.modules.xappsconfig.common

Examples of org.jdesktop.wonderland.modules.xappsconfig.common.XAppRegistryItem


        dialog.setVisible(true);

        if (dialog.getReturnStatus() == AddXAppJDialog.RET_OK) {
            String appName = dialog.getAppName();
            String command = dialog.getCommand();
            XAppRegistryItem item = new XAppRegistryItem(appName, command);
            try {
                XAppRegistryItemUtils.addUserXAppRegistryItem(item);
                xAppTableModel.addItem(item);
            } catch (Exception ex) {
                logger.log(Level.WARNING, "Unable to add " + appName + " to " +
View Full Code Here


        // Fetch the selected appName and command from the table row
        String appName = (String)xAppTableModel.getValueAt(row, 0);
        String command = (String)xAppTableModel.getValueAt(row, 1);

        // Remove it permenantly from the user's repository
        XAppRegistryItem item = new XAppRegistryItem(appName, command);
        try {
            XAppRegistryItemUtils.removeUserXAppRegistryItem(item);
        } catch (Exception ex) {
                logger.log(Level.WARNING, "Unable to remove " + appName + " to " +
                        " user's x-apps store", ex);
View Full Code Here

        // Write the XAppRegistryItem object as an XML stream to this new file
        ContentResource resource = (ContentResource)appNode;
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        Writer w = new OutputStreamWriter(os);
        XAppRegistryItem item = new XAppRegistryItem(appName, command);
        item.encode(w);
        byte b[] = os.toByteArray();
        resource.put(b);

        // Tell the config connection that we have added a new X11 App, if
        // the config connection exists (it should)
View Full Code Here

        /**
         * @inheritDoc()
         */
        public Object getValueAt(int rowIndex, int columnIndex) {
            XAppRegistryItem item = itemList.get(rowIndex);
            switch (columnIndex) {
                case 0:
                    return item.getAppName();
                case 1:
                    return item.getCommand();
                default:
                    return "";
            }
        }
View Full Code Here

                ContentResource resource = (ContentResource)child;
                String path = resource.getPath();

                // Use JAXB to parse the item
                Reader r = new InputStreamReader(resource.getInputStream());
                XAppRegistryItem item = XAppRegistryItem.decode(r);

                String appName = item.getAppName();
                String command = item.getCommand();
               
                X11AppEntry entry = new X11AppEntry(appName, command, path);
                String url = "delete&path=" + path + "&appName=" + appName;
                entry.addAction(new X11AppAction("delete", url));
                entries.add(entry);
View Full Code Here

                // Find out the information about the content resource item
                ContentResource resource = (ContentResource)child;

                // Use JAXB to parse the item
                Reader r = new InputStreamReader(resource.getInputStream());
                XAppRegistryItem item = XAppRegistryItem.decode(r);

                if (item.getAppName().equalsIgnoreCase(checkApp)) {
                    response.setContentType("text/plain");

                    PrintWriter pr = new PrintWriter(response.getWriter());
                    pr.println(item.getCommand());
                    pr.close();
                    break;
                }
            }
        }
View Full Code Here

                        " in x-apps collection, ignorning.");
                continue;
            }
            ContentResource resource = (ContentResource)node;
            try {
                XAppRegistryItem item = parseResource(resource);
                itemList.add(item);
            } catch (ContentRepositoryException excp) {
                logger.log(Level.WARNING, "Unable to read entry in x-apps: " +
                        node.getPath(), excp);
            } catch (JAXBException excp) {
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.modules.xappsconfig.common.XAppRegistryItem

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.