class AgendaItemBo implements AgendaItemDefinitionContract, Versioned, Serializable {

    public String getUlHelper(AgendaItemBo item) {
        StringBuilder sb = new StringBuilder();
        sb.append("<li>" + getRuleId() + "</li>");

        if (whenTrue != null) {
            sb.append("<ul><li>when true</li><ul>");
            sb.append(getUlHelper(whenTrue));
            sb.append("</ul></ul>");
        }
        if (whenFalse != null) {
            sb.append("<ul><li>when false</li><ul>");
            sb.append(getUlHelper(whenFalse));
            sb.append("</ul></ul>");
        }
        if (always != null) {
            sb.append(getUlHelper(always));
        }

        return sb.toString();
    }

}