Search in sources :

Example 1 with HippoHtml

use of org.hippoecm.hst.content.beans.standard.HippoHtml in project hippo by NHS-digital-website.

the class Checklist method getListentriesJson.

@JsonProperty("listentries")
public List<String> getListentriesJson() {
    List<HippoHtml> entries = getChildBeansByName("website:listentries", HippoHtml.class);
    List<String> entriesStrings = new ArrayList<>();
    for (HippoHtml entry : entries) {
        if (entry != null) {
            entriesStrings.add(entry.getContent());
        } else {
            entriesStrings.add((String) null);
        }
    }
    return entriesStrings;
}
Also used : HippoHtml(org.hippoecm.hst.content.beans.standard.HippoHtml) ArrayList(java.util.ArrayList) JsonProperty(com.fasterxml.jackson.annotation.JsonProperty)

Example 2 with HippoHtml

use of org.hippoecm.hst.content.beans.standard.HippoHtml in project hippo by NHS-digital-website.

the class NotesForEditors method getHtmlnotes.

public List<HippoHtml> getHtmlnotes() {
    List<HippoHtml> notes = new ArrayList<>();
    for (HippoBean bean : getPreparednotes()) {
        EditorsNotes note = (EditorsNotes) bean;
        notes.add(note.getEditorsnote());
    }
    notes.addAll(this.getCustomnotes());
    return notes;
}
Also used : HippoBean(org.hippoecm.hst.content.beans.standard.HippoBean) HippoHtml(org.hippoecm.hst.content.beans.standard.HippoHtml) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)2 HippoHtml (org.hippoecm.hst.content.beans.standard.HippoHtml)2 JsonProperty (com.fasterxml.jackson.annotation.JsonProperty)1 HippoBean (org.hippoecm.hst.content.beans.standard.HippoBean)1