remove terms of use controller
This commit is contained in:
parent
2e682e6f38
commit
7857968f2c
2 changed files with 0 additions and 50 deletions
|
@ -21,7 +21,6 @@ public class Controllers {
|
|||
|
||||
public static final String ABOUT = "/about";
|
||||
public static final String CONTACT_URL = "/comments";
|
||||
public static final String TERMS_OF_USE_URL = "/termsOfUse";
|
||||
public static final String SEARCH_URL = "/search";
|
||||
public static final String ENTITY = "/entity";
|
||||
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
/* $This file is distributed under the terms of the license in LICENSE$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.controller.freemarker;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
|
||||
@WebServlet(name = "TermsOfUseController", urlPatterns = {"/termsOfUse"} )
|
||||
public class TermsOfUseController extends FreemarkerHttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Log log = LogFactory.getLog(TermsOfUseController.class);
|
||||
private static final String TEMPLATE_DEFAULT = "termsOfUse.ftl";
|
||||
|
||||
@Override
|
||||
protected ResponseValues processRequest(VitroRequest vreq) {
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
Map<String, String> termsOfUse = new HashMap<String, String>();
|
||||
|
||||
ApplicationBean appBean = vreq.getAppBean();
|
||||
|
||||
termsOfUse.put("siteName", appBean.getApplicationName());
|
||||
|
||||
String siteHost = appBean.getCopyrightAnchor();
|
||||
if (siteHost == null) {
|
||||
siteHost = "the hosting institution";
|
||||
}
|
||||
termsOfUse.put("siteHost", siteHost);
|
||||
|
||||
map.put("termsOfUse", termsOfUse);
|
||||
return new TemplateResponseValues(TEMPLATE_DEFAULT, map);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTitle(String siteName, VitroRequest vreq) {
|
||||
return siteName + " Terms of Use";
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue