Package org.jdesktop.wonderland.common.cell.messages

Examples of org.jdesktop.wonderland.common.cell.messages.CellDeleteMessage


                break;
            case DELETE_CELL:
                {
                    // delete requires permission from both the cell being
                    // deleted and the parent cell
                    CellDeleteMessage cdm = (CellDeleteMessage) editMessage;
                    CellMO deleteMO = CellManagerMO.getCell(cdm.getCellID());
                    if (deleteMO == null ||
                            deleteMO.getCellID().equals(CellID.getEnvironmentCellID()))
                    {
                        break;
                    }
                    Resource child = crm.getCellResource(cdm.getCellID());
                    Resource parent = null;

                    // get the cell's parent, if any
                    CellMO parentMO = deleteMO.getParent();
                    if (parentMO != null) {
                        parent = crm.getCellResource(parentMO.getCellID());
                    }

                    // now create a delete resource with child & parent
                    if (child != null || parent != null) {
                        out = new DeleteCellResource(cdm.getCellID().toString(),
                                                     child, parent);
                    }
                }
                break;
            case DUPLICATE_CELL:
View Full Code Here


     */
    public static boolean deleteCell (Cell cell) {
        WonderlandSession session = cell.getCellCache().getSession();
        CellEditChannelConnection connection = (CellEditChannelConnection)
            session.getConnection(CellEditConnectionType.CLIENT_TYPE);
        CellDeleteMessage msg = new CellDeleteMessage(cell.getCellID());
        connection.send(msg);

        // TODO: there really really should be an OK/Error response from the server!

        return true;
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.cell.messages.CellDeleteMessage

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.