@DELETE
    public void deleteObject() throws GuacamoleException {
        try {
            directory.remove(object.getIdentifier());
            fireDirectorySuccessEvent(DirectoryEvent.Operation.REMOVE);
        }
        catch (GuacamoleException | RuntimeException | Error e) {
            fireDirectoryFailureEvent(DirectoryEvent.Operation.REMOVE, e);
            throw e;
        }
    }
Removes this object from the containing directory.

@throws GuacamoleException
    If an error occurs while removing the object.
guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryObjectResource.java