public void rulesDelete(String objectName) {
        String objectPath;
        Folder ruleFolder;
        objectPath = "/TranslateRules/" + objectName;
        try {
            ruleFolder = (Folder) session.getObjectByPath(objectPath);
            ItemIterable<CmisObject> children = ruleFolder.getChildren();
            for (CmisObject o : children) {
                FileableCmisObject child = (FileableCmisObject) o;
                child.removeFromFolder(ruleFolder);
            }
            ruleFolder.delete(true);
        } catch (CmisObjectNotFoundException e) {
            System.out.println("Object not found: " + objectPath);
        } catch (CmisConstraintException e) {
            System.out.println("Could not delete '" + objectPath + "': "
                    + e.getMessage());
        }
    }