Provides methods for creating views, for templating, returning JSON, and redirects


Properties

NameReturnsNotes
instanceViewsBuilder

Methods

SignatureReturnsNotes
templateView(String template)TemplateView
jsonView(String attribute)JsonView
jsonView(boolean status, String message)JsonView
jsonObjectView(Object o)JsonView
redirectView(String uri)RedirectView
redirectView(String uri, boolean permanent)RedirectView
textTemplateView(String template, String contentType)TextTemplateView
fileView(String hash, String contentType)FileHashView
fileView(String hash, String contentType, boolean isPerTenant)FileHashViewIf isPerTenant is true the content will be retrieved from the per tenant blobstore
contentFileView(String contentName, String contentType)ContentFileView
contentFileView(String dir, String contentName, String contentType)ContentFileView
binaryView(byte[] fileContent, String contentTpe)BinaryViewRender a binary file from byte array (byte[]) with given content type
binaryView(InputStream fileContent, String contentTpe)BinaryViewRender a binary file from an InputStream with given content type
textView(String text)TextView
textView(String text, String contentType)TextView
jsonResult(boolean result)JsonResult
jsonResult(boolean result, String message)JsonResult
jsonResult(boolean result, List<String> messages)JsonResult
jsonResult(boolean result, String[] messages)JsonResult
jsonResult(boolean result, String message, String nextHref)JsonResult
jsonDataResult(Object data, String message)JsonResultReturn a json result with success status and data
jsonDataResult(Object data)JsonResultReturn a json result with success status and data
searchResponseView(ElasticSearchManager.KSearchResponse r)SearchResponseView
csvView(List<List> rows)CsvView
rowsResultCsvView(Table.RowsResult rowsResult)RowsResultCsvView
rowsResultCsvView(String[] headers, Table.RowsResult rowsResult)RowsResultCsvView
throwNotAuthorizedException(String message, Resource page)void
throwBadRequestException(String message, Resource page)void
throwNotFoundException(String message)void
throwServerException(String message)void
throwPasswordInvalidException(String message)void
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.