Help and Privacy policy pages

Valid as of Datafari 5.1

The documentation below is valid starting from Datafari 5.1 onwards

The Help and Privacy Policy pages are accessible in the built-in UI and through the Datafari REST API (that is used by DatafariUI). Their default content can be changed, and in the case of the REST API access, i18n can be handled. This documentation gives information about the files to edit or create to change their content.

Built-in or Legacy UI Content (default content for the REST API)

The files DATAFARI_HOME/tomcat/webapps/Datafari/resources/helpAssets/helpContent.jsp and DATAFARI_HOME/tomcat/webapps/Datafari/resources/privacyPolicyAssets/privacyPolicyContent.jsp are the default content for the help page and the privacy policy page respectively.

They are the only file used to present the content of these pages in the ajaxfrancelabs (or legacy) datafari UI.

In the case of the REST API (used by the datafariUI React app), they are used if the file corresponding to the required locale does not exist.

Those files must start by a character encoding definition expressed on one line like so:

<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

This is extremely important that this declaration is made on one line. This line is stripped from the content when it is required from the API. If the declaration is made on more than one line, everything after the first line will appear in the output given from the API which would be incorrect.

Likewise, if this declaration is absent and the content starts from the first line, the first line will be stripped from the API output. Therefore put this declaration. It will ensure that the output is correct when required from the API and also ensure the servlet renders the page correctly in case you are using a specific encoding.

Beside this first line, please use only HTML to format your page. Do not use any jsp specific features (those would not work when querying the content from the API anyway) and do not use javascript or CSS. This could break the apps receiving the data and is overall a bad idea.

Datafari REST API

The Rest API endpoint to query the content of the Help and Privacy Policy pages are respectively:

DATAFARI_WEBAPP_URL/rest/v1.0/help/{locale} DATAFARI_WEBAPP_URL/rest/v1.0/privacy/{locale}

Both those API endpoints require to specify the preferred locale in which the result must be given.

To do so, they look into the folders

DATAFARI_HOME/tomcat/webapps/Datafari/resources/helpAssets/ DATAFARI_HOME/tomcat/webapps/Datafari/resources/privacyPolicyAssets/

for files named:

If they exist, they are used to build the response, else, the default files presented above are used.

Keep in mind that those files must respect the same format (constraint about the first line included) as the above default files.

Â