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: