Package net.solarnetwork.service
Interface TemplateRenderer
- All Superinterfaces:
Comparable<String>,Identity<String>
API for a service that can execute a template against some input data to
produce formatted output.
- Since:
- 1.64
- Version:
- 1.0
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptionvoidrender(Locale locale, org.springframework.util.MimeType mimeType, Map<String, ?> parameters, OutputStream out) Render the template.List<org.springframework.util.MimeType>Get the MIME types this service is capable of rendering output as.booleansupportsMimeType(org.springframework.util.MimeType mimeType) Test if this service supports a given MIME type.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
supportsMimeType
boolean supportsMimeType(org.springframework.util.MimeType mimeType) Test if this service supports a given MIME type.- Parameters:
mimeType- the type to check if this service supports- Returns:
- true if this service can render to the given MIME type
-
supportedMimeTypes
List<org.springframework.util.MimeType> supportedMimeTypes()Get the MIME types this service is capable of rendering output as.- Returns:
- the supported MIME type, never null
-
render
void render(Locale locale, org.springframework.util.MimeType mimeType, Map<String, ?> parameters, OutputStream out) throws IOExceptionRender the template.- Parameters:
parameters- the input parametersmimeType- the desired MIME typelocale- the desired localeout- the destination- Throws:
IOException- if any error occurs
-