Package com.pingidentity.sdk.template
Class TemplateRendererUtil
java.lang.Object
com.pingidentity.sdk.template.TemplateRendererUtil
Utility class used to render HTML templates to end users during runtime processing. For example, this class can be used to display
a login form to an end user during an SSO transaction.
- Since:
- 7.1 R2
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidrender(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, String templateFile, Map<String, Object> params) Renders the defined template file to an end user.static voidrender(jakarta.servlet.http.HttpServletResponse resp, String templateFile, Map<String, Object> params) Deprecated.static voidrender(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, String templateFile, Map<String, Object> params) Deprecated, for removal: This API element is subject to removal in a future version.static voidDeprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
render
@Deprecated(since="13.1", forRemoval=true) public static void render(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, String templateFile, Map<String, Object> params) throws TemplateRendererUtilExceptionDeprecated, for removal: This API element is subject to removal in a future version.Renders the defined template file to an end user.- Parameters:
req- TheHttpServletRequestassociated with the current transaction.resp- TheHttpServletResponseassociated with the current transaction.templateFile- The filename of the template to render.params- A map of parameters that is passed into the selected template as variables. PingFederate will add a set of standard parameters to this map as well. If the plugin provides a standard parameter in the map already, the value provided by the plugin will be used.- Throws:
TemplateRendererUtilException- A general exception for any unexpected runtime errors that might occur during template rendering.
-
render
public static void render(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp, String templateFile, Map<String, Object> params) throws TemplateRendererUtilExceptionRenders the defined template file to an end user.- Parameters:
req- TheHttpServletRequestassociated with the current transaction.resp- TheHttpServletResponseassociated with the current transaction.templateFile- The filename of the template to render.params- A map of parameters that is passed into the selected template as variables. PingFederate will add a set of standard parameters to this map as well. If the plugin provides a standard parameter in the map already, the value provided by the plugin will be used.- Throws:
TemplateRendererUtilException- A general exception for any unexpected runtime errors that might occur during template rendering.- Since:
- 13.1
-
render
@Deprecated(forRemoval=true) public static void render(javax.servlet.http.HttpServletResponse resp, String templateFile, Map<String, Object> params) throws TemplateRendererUtilExceptionDeprecated, for removal: This API element is subject to removal in a future version.Renders the defined template file to an end user.The HttpServletRequest is set to
null. As a result, information (such as the Tracking ID) from the HTTP request is not available and the Locale is set to English as the default.- Parameters:
resp- TheHttpServletResponseassociated with the current transaction.templateFile- The filename of the template to render.params- A map of parameters that is passed into the selected template as variables. PingFederate will add a set of standard parameters to this map as well. If the plugin provides a standard parameter in the map already, the value provided by the plugin will be used.- Throws:
TemplateRendererUtilException- A general exception for any unexpected runtime errors that might occur during template rendering.
-
render
@Deprecated public static void render(jakarta.servlet.http.HttpServletResponse resp, String templateFile, Map<String, Object> params) throws TemplateRendererUtilExceptionDeprecated.Renders the defined template file to an end user.The HttpServletRequest is set to
null. As a result, information (such as the Tracking ID) from the HTTP request is not available and the Locale is set to English as the default.- Parameters:
resp- TheHttpServletResponseassociated with the current transaction.templateFile- The filename of the template to render.params- A map of parameters that is passed into the selected template as variables. PingFederate will add a set of standard parameters to this map as well. If the plugin provides a standard parameter in the map already, the value provided by the plugin will be used.- Throws:
TemplateRendererUtilException- A general exception for any unexpected runtime errors that might occur during template rendering.
-
render(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, java.lang.String, java.util.Map).