Mercurial Hosting > nabble
view src/nabble/view/web/w3c/PolicyXML.jtp @ 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.Jtp; 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 PolicyXML extends HttpServlet implements UrlMappable { private static final Pattern URL_PATTERN = Pattern.compile("/w3c/policy.xml$"); public Map<String, String[]> getParameterMapFromUrl(HttpServletRequest request,String mappedUrl) { Matcher m = URL_PATTERN.matcher(mappedUrl); if (!m.find()) throw new RuntimeException(); return new HashMap<String,String[]>(); } 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(); %> <?xml version="1.0"?> <POLICIES xmlns="http://www.w3.org/2002/01/P3Pv1"> <EXPIRY max-age="86400"/> <POLICY name="Policy" discuri="https://www.nabble.com/w3c/policy.html" xml:lang="en"> <ENTITY> <DATA-GROUP> <DATA ref="#business.contact-info.online.email">support@nabble.com</DATA> <DATA ref="#business.contact-info.online.uri">https://www.nabble.com</DATA> <DATA ref="#business.name">Nabble</DATA> </DATA-GROUP> </ENTITY> <ACCESS><ident-contact/></ACCESS> <DISPUTES-GROUP> <DISPUTES resolution-type="service" service="<%=Jtp.termsUrl(false)%>" short-description="Disputes"> <LONG-DESCRIPTION>If any question arises regarding the user experience, ability or inability to perform actions with the site, a user is advised to contact Nabble Support.</LONG-DESCRIPTION> </DISPUTES> </DISPUTES-GROUP> <STATEMENT> <EXTENSION optional="yes"> <GROUP-INFO xmlns="http://www.software.ibm.com/P3P/editor/extension-1.0.html" name="User Information"/> </EXTENSION> <PURPOSE><other-purpose required="opt-in">Display the user name</other-purpose></PURPOSE> <RECIPIENT><ours/></RECIPIENT> <RETENTION><indefinitely/></RETENTION> <DATA-GROUP> <DATA ref="#user.name" optional="yes"/> <DATA ref="#dynamic.miscdata" optional="yes"><CATEGORIES><preference/></CATEGORIES></DATA> <DATA ref="#user.home-info.online.email" optional="yes"/> <DATA ref="#user.business-info.online.email" optional="yes"/> </DATA-GROUP> </STATEMENT> <STATEMENT> <EXTENSION optional="yes"> <GROUP-INFO xmlns="http://www.software.ibm.com/P3P/editor/extension-1.0.html" name="Cookies"/> </EXTENSION> <CONSEQUENCE> To keep users logged in and apply their preferences.</CONSEQUENCE> <PURPOSE><pseudo-analysis required="opt-in"/><pseudo-decision required="opt-in"/><tailoring required="opt-in"/></PURPOSE> <RECIPIENT><ours/></RECIPIENT> <RETENTION><indefinitely/></RETENTION> <DATA-GROUP> <DATA ref="#dynamic.cookies" optional="yes"><CATEGORIES><location/><navigation/><preference/><uniqueid/></CATEGORIES></DATA> </DATA-GROUP> </STATEMENT> </POLICY> </POLICIES> <% } } %>