use of uk.nhs.digital.nil.beans.Indicator in project hippo by NHS-digital-website.
the class IndicatorComponent method getIndicator.
private Indicator getIndicator(HstRequestContext ctx) throws HstComponentException {
HippoBean content = ctx.getContentBean();
if (content instanceof Indicator) {
return (Indicator) content;
}
log.warn("Cannot find Indicator document for: {}", content.getPath());
throw new HstComponentException("Cannot find Indicator document based on request content");
}
use of uk.nhs.digital.nil.beans.Indicator in project hippo by NHS-digital-website.
the class IndicatorComponent method doBeforeRender.
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) throws HstComponentException {
super.doBeforeRender(request, response);
final HstRequestContext ctx = request.getRequestContext();
Indicator indicator = getIndicator(ctx);
request.setAttribute("indicator", indicator);
}
Aggregations