Package org.structr.core.graph

Examples of org.structr.core.graph.DeleteNodeCommand


  @Override
  public void onNodeDeletion() {

    try {

      DeleteNodeCommand deleteCommand = StructrApp.getInstance(securityContext).command(DeleteNodeCommand.class);

      for (AbstractNode contentNode : contentNodes.values()) {

        deleteCommand.execute(contentNode);

      }

    } catch (Throwable t) {
      logger.log(Level.SEVERE, "Exception while deleting nested Components: {0}", t.getMessage());
View Full Code Here


   *
   * @param node
   */
  private void deleteRecursively(final DOMNode node) throws FrameworkException {
   
    final DeleteNodeCommand deleteNode = StructrApp.getInstance(getWebSocket().getSecurityContext()).command(DeleteNodeCommand.class);
   
    // Delete original node recursively
    Set<DOMNode> allChildren = DOMNode.getAllChildNodes(node);

    for (DOMNode n : allChildren) {
      deleteNode.execute(n);
    }

    deleteNode.execute(node);
   
  }
View Full Code Here

TOP

Related Classes of org.structr.core.graph.DeleteNodeCommand

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.