view src/nabble/view/web/w3c/PolicyHTML.java @ 0:7ecd1a4ef557

add content
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Mar 2019 19:15:52 -0600
parents
children
line wrap: on
line source


package nabble.view.web.w3c;

import fschmidt.util.servlet.JtpContext;
import nabble.view.lib.Cache;
import nabble.view.lib.UrlMappable;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class PolicyHTML extends HttpServlet implements UrlMappable {

	private static final Pattern URL_PATTERN = Pattern.compile("/w3c/policy.html$");

	public Map<String, String[]> getParameterMapFromUrl(HttpServletRequest request,String mappedUrl) {
		Matcher m = URL_PATTERN.matcher(mappedUrl);
		if (!m.find())
			throw new RuntimeException();
		Map<String,String[]> params = new HashMap<String,String[]>();
		return params;
	}

	public Pattern getUrlPattern() {
		return URL_PATTERN;
	}

	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		JtpContext jtpContext = (JtpContext)getServletContext().getAttribute(JtpContext.attrName);
		jtpContext.setEtag(request,response);
		PrintWriter out = response.getWriter();
		response.setContentType("text/html");
		
		out.print( "\r\n<html>\r\n<head>\r\n<STYLE type=\"text/css\">\r\ntitle { color: #3333FF}\r\n</STYLE>\r\n<title>Privacy Statement for Nabble</title>\r\n</head>\r\n<body>\r\n<h1 class=\"title\">Privacy Policy</h1>\r\n<!-- \"About Us\" section of privacy policy -->\r\n<h2>About Us</h2>\r\n<p>This is a privacy policy for Nabble.\r\nOur homepage on the Web is located at <a href=\"https://www.nabble.com\">\r\nhttps://www.nabble.com</a>.\r\nThe full text of our privacy policy is available on the Web at\r\n<a href=\"https://www.nabble.com/w3c/policy.html\">\r\nhttps://www.nabble.com/w3c/policy.html</a>\r\nUsers may go to <a href=\"\">\r\n</a> for information on how to opt-in or opt-out of use of their information.\r\n<p>We invite you to contact us if you have questions about this policy.\r\nYou may contact us by email at\r\n<a href=\"mailto:support@nabble.com\">\r\nsupport@nabble.com</a>.\r\n<!-- \"Privacy Seals\" section of privacy policy -->\r\n<h2>Dispute Resolution and Privacy Seals</h2>\r\n<p>We have the following privacy seals and/or dispute resolution mechanisms.\r\nIf you think we have not followed our privacy policy in some way, they can help you resolve your concern.\r\n<ul>\r\n<li>\r\n<b>Disputes</b>:\r\nIf any question arises regarding the user experience, ability or inability to perform actions with the site, a user is advised to contact Nabble Support.\r\n</ul>\r\n<!-- \"Additional information\" section of privacy policy -->\r\n<h2>Additional Information</h2>\r\n<p>\r\nThis policy is valid for 1 day from the time that it is loaded by a client.\r\n</p>\r\n<!-- \"Data Collection\" section of privacy policy -->\r\n<h2>Data Collection</h2>\r\n<p>P3P policies declare the data they collect in groups (also referred to as \"statements\").\r\nThis policy contains 2 data groups.\r\nThe data practices of each group will be explained separately.\r\n<hr width=\"50%\" align=\"center\">\r\n<h3>Group \"User Information\"</h3>\r\n<p>At the user's option, we will collect the following data:\r\n<ul>\r\n<li>User's Name</li>\r\n<li>Preference data</li>\r\n<li>Home email address</li>\r\n<li>Work email address</li>\r\n</ul>\r\n<p>This data will be used for the following purposes:</p>\r\n<ul>\r\n<li>Other purposes<p>Display the user name</p> The user must <b>opt-in</b> to this usage.</li>\r\n</ul>\r\n<p>This data will be used by ourselves and our agents.\r\n<hr width=\"50%\" align=\"center\">\r\n<h3>Group \"Cookies\"</h3>\r\n<p>At the user's option, we will collect the following data:\r\n<ul>\r\n<li>HTTP cookies</li>\r\n</ul>\r\n<p>This data will be used for the following purposes:</p>\r\n<ul>\r\n<li>One-time tailoring. The user must <b>opt-in</b> to this usage.</li>\r\n<li>Anonymous user analysis. The user must <b>opt-in</b> to this usage.</li>\r\n<li>Anonymous user profiling and decision-making. The user must <b>opt-in</b> to this usage.</li>\r\n</ul>\r\n<p>This data will be used by ourselves and our agents.\r\n<p>The following explanation is provided for why this data is collected:</p>\r\n<blockquote>To keep users logged in and apply their preferences.</blockquote>\r\n<!-- \"Use of Cookies\" section of privacy policy -->\r\n<hr width=\"50%\" align=\"center\">\r\n<h2>Cookies</h2>\r\n<p>Cookies are a technology which can be used to provide you with tailored information from a Web site. A cookie is an element of data that a Web site can send to your browser, which may then store it on your system. You can set your browser to notify you when you receive a cookie, giving you the chance to decide whether to accept it.\r\n<p>Our site makes use of cookies.\r\nCookies are used for the following purposes:\r\n<ul>\r\n<li>User targeting\r\n<li>Pseudononymous analysis\r\n<li>Pseudonym-based decision-making\r\n</ul>\r\n<!-- \"Compact Policy Explanation\" section of privacy policy -->\r\n<hr width=\"50%\" align=\"center\">\r\n<h2>Compact Policy Summary</h2>\r\n<p>The compact policy which corresponds to this policy is:\r\n<pre>\r\n	CP=\"IDC DSP TAIi PSAi PSDi OTPi OUR IND PHY ONL UNI NAV DEM PRE LOC\"\r\n</pre>\r\n<p>The following table explains the meaning of each field in the compact policy.\r\n<center><table width=\"80%\" border=\"1\" cols=\"2\">\r\n<tr><td align=\"center\" valign=\"top\" width=\"20%\"><b>Field</b></td><td align=\"center\" valign=\"top\" width=\"80%\"><b>Meaning</b></td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>CP=</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">This is the compact policy header; it indicates that what follows is a P3P compact policy.</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>IDC</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nAccess is available to contact information.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>DSP</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nThe policy contains at least one dispute-resolution mechanism.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>TAIi</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nThe data is used for tailoring the site, if the user selects it.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>PSAi</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nThe data is used for pseudononymous analysis, if the user selects it.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>PSDi</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nThe data is used for pseudononymous decision-making, if the user selects it.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>OTPi</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nThe data is used for other purposes, if the user selects it.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>OUR</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nThe data is given to ourselves and our agents.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>IND</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nThe data will be kept indefinitely.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>PHY</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nPhysical contact information is collected.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>ONL</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nOnline contact information is collected.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>UNI</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nUnique identifiers are collected.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>NAV</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nNavigation and clickstream data is collected.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>DEM</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nDemographic and socioeconomic data is collected.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>PRE</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nPreference information is collected.\r\n</td></tr>\r\n<tr><td align=\"left\" valign=\"top\" width=\"20%\"><tt>LOC</tt></td>\r\n<td align=\"left\" valign=\"top\" width=\"80%\">\r\nCurrent location information is collected.\r\n</td></tr>\r\n</table></center>\r\n<p>The compact policy is sent by the Web server along with the cookies it describes.\r\nFor more information, see the P3P deployment guide at <a href=\"http://www.w3.org/TR/p3pdeployment\">http://www.w3.org/TR/p3pdeployment</a>.\r\n<!-- \"Policy Evaluation\" section of privacy policy -->\r\n<hr width=\"50%\" align=\"center\">\r\n<h2>Policy Evaluation</h2>\r\n<p>Microsoft Internet Explorer 6 will evaluate this policy's compact policy whenever it is used with a cookie.\r\nThe actions IE will take depend on what privacy level the user has selected in their browser (Low, Medium, Medium High, or High; the default is Medium.\r\nIn addition, IE will examine whether the cookie's policy is considered satisfactory or unsatisfactory, whether the cookie is a session cookie or a persistent cookie, and whether the cookie is used in a first-party or third-party context.\r\nThis section will attempt to evaluate this policy's compact policy against Microsoft's stated behavior for IE6.\r\n<p><b>Note:</b> this evaluation is currently experimental and should not be considered a substitute for testing with a real Web browser.\r\n<p><b>Satisfactory policy</b>: this compact policy is considered <em>satisfactory</em> according to the rules defined by Internet Explorer 6.\r\nIE6 will accept cookies accompanied by this policy under the High, Medium High, Medium, Low, and Accept All Cookies settings.\r\n</body></html>\r\n" );

		}
	}