private void _onRemoveChildResource ( final ModelNode address , final ModelNode selection ) { final ModelNode fqAddress = AddressUtils . toFqAddress ( address , selection . asString ( ) ) ; final ModelNode operation = new ModelNode ( ) ; operation . get ( OP ) . set ( REMOVE ) ; operation . get ( ADDRESS ) . set ( fqAddress ) ; Feedback . confirm ( "Remove Resource" , "Do you really want to remove resource " + fqAddress . toString ( ) , new Feedback . ConfirmationHandler ( ) { @ Override public void onConfirmation ( boolean isConfirmed ) { if ( isConfirmed ) { dispatcher . execute ( new DMRAction ( operation ) , new SimpleCallback < DMRResponse > ( ) { @ Override public void onSuccess ( DMRResponse dmrResponse ) { ModelNode response = dmrResponse . get ( ) ; if ( response . isFailure ( ) ) { Console . error ( "Failed to remove resource " + fqAddress . asString ( ) , response . getFailureDescription ( ) ) ; } else { Console . info ( "Successfully removed resource " + fqAddress . asString ( ) ) ; readChildrenNames ( address ) ; } } } ) ; } } } ) ; }
Remove a child resource