Removed Portal class and almost everything related to portals and flags for NIHVIVO-2248
This commit is contained in:
parent
de5c5ff7de
commit
eb00f1cd43
189 changed files with 928 additions and 6859 deletions
|
@ -34,7 +34,6 @@ if (LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.EDITOR))
|
|||
log.debug("curator editing inactive");
|
||||
}%>
|
||||
<c:set var='entity' value='${requestScope.entity}'/><%-- just moving this into page scope for easy use --%>
|
||||
<c:set var='portal' value='${requestScope.portalBean}'/><%-- likewise --%>
|
||||
<%
|
||||
log.debug("Starting dashboardPropsList.jsp");
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %>
|
||||
<%@ page import="java.util.HashMap" %>
|
||||
<%@ page import="org.apache.commons.logging.Log" %>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %>
|
||||
<%@ page import="java.util.HashMap" %>
|
||||
<%@ page import="org.apache.commons.logging.Log" %>
|
||||
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<%@ page errorPage="/error.jsp"%>
|
||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal"%>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet" %>
|
||||
|
||||
<%
|
||||
|
@ -16,21 +15,17 @@ FreemarkerHttpServlet.getFreemarkerComponentsForJsp(request);
|
|||
|
||||
<%
|
||||
VitroRequest vreq = new VitroRequest(request);
|
||||
Portal portal = vreq.getPortal();
|
||||
|
||||
String contextRoot = vreq.getContextPath();
|
||||
String themeDir = vreq.getAppBean().getThemeDir();
|
||||
|
||||
String themeDir = portal != null ? portal.getThemeDir() : Portal.DEFAULT_THEME_DIR_FROM_CONTEXT;
|
||||
themeDir = contextRoot + '/' + themeDir;
|
||||
%>
|
||||
|
||||
|
||||
<c:set var="portal" value="${requestScope.portalBean}"/>
|
||||
<c:set var="themeDir"><c:out value="${themeDir}" /></c:set>
|
||||
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
|
||||
<c:set var="title"><c:out value="${requestScope.title}" /></c:set>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head> <!-- formPrefix.jsp -->
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<%@ page errorPage="/error.jsp"%>
|
||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal"%>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet" %>
|
||||
|
||||
<% /* Prepare Freemarker components to allow .ftl templates to be included from jsp */
|
||||
|
@ -16,16 +15,13 @@
|
|||
|
||||
<%
|
||||
VitroRequest vreq = new VitroRequest(request);
|
||||
Portal portal = vreq.getPortal();
|
||||
|
||||
String contextRoot = vreq.getContextPath();
|
||||
String contextRoot = vreq.getContextPath();
|
||||
String themeDir = vreq.getAppBean().getThemeDir();
|
||||
|
||||
String themeDir = portal != null ? portal.getThemeDir() : Portal.DEFAULT_THEME_DIR_FROM_CONTEXT;
|
||||
themeDir = contextRoot + '/' + themeDir;
|
||||
%>
|
||||
|
||||
|
||||
<c:set var="portal" value="${requestScope.portalBean}"/>
|
||||
<c:set var="themeDir"><c:out value="${themeDir}" /></c:set>
|
||||
<c:set var="bodyJsp"><c:out value="${requestScope.bodyJsp}" default="/debug.jsp"/></c:set>
|
||||
<c:set var="title"><c:out value="${requestScope.title}" /></c:set>
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
vreq.setAttribute("rangeClassUri",prop.getRangeVClassURI());
|
||||
vreq.setAttribute("curatorReviewUri","http://vivo.library.cornell.edu/ns/0.1#CuratorReview");
|
||||
|
||||
//get the current portal and make this new individual a member of that portal
|
||||
vreq.setAttribute("portalUri", vreq.getPortal().getTypeUri());
|
||||
%>
|
||||
|
||||
<v:jsonset var="queryForInverse" >
|
||||
|
@ -106,12 +104,6 @@
|
|||
?newIndividual vitro:moniker ?moniker .
|
||||
</v:jsonset>
|
||||
|
||||
<%-- set the portal of the new individual to the current portal. --%>
|
||||
<v:jsonset var="n3portal">
|
||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||
?newIndividual rdf:type <${portalUri}> .
|
||||
</v:jsonset>
|
||||
|
||||
<%-- note that it's safer to have multiple distinct optional blocks so that a failure in one
|
||||
will not prevent correct sections from being inserted --%>
|
||||
<v:jsonset var="n3link" >
|
||||
|
@ -138,7 +130,7 @@
|
|||
"object" : [ "newIndividual", "${objectUriJson}", "URI" ],
|
||||
|
||||
"n3required" : [ "${n3ForEdit}" ],
|
||||
"n3optional" : [ "${n3optional}", "${n3Inverse}", "${n3link}", "${n3portal}" ],
|
||||
"n3optional" : [ "${n3optional}", "${n3Inverse}", "${n3link}" ],
|
||||
"newResources" : {
|
||||
"newIndividual" : "http://vivo.library.cornell.edu/ns/0.1#individual",
|
||||
"newLink" : "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Link"
|
||||
|
|
|
@ -74,15 +74,7 @@
|
|||
//}
|
||||
vreq.setAttribute("n3AssertedTypesUnescaped",n3AssertedTypesUnescapedBuffer.toString());
|
||||
|
||||
// if we don't check it into the portal, we won't be able to see it
|
||||
vreq.setAttribute("portalUri", vreq.getPortal().getTypeUri());
|
||||
|
||||
String flagURI = null;
|
||||
if (vreq.getAppBean().isFlag1Active()) {
|
||||
flagURI = VitroVocabulary.vitroURI+"Flag1Value"+vreq.getPortal().getPortalId()+"Thing";
|
||||
} else {
|
||||
flagURI = wdf.getVClassDao().getTopConcept().getURI(); // fall back to owl:Thing if not portal filtering
|
||||
}
|
||||
String flagURI = wdf.getVClassDao().getTopConcept().getURI();
|
||||
vreq.setAttribute("flagURI",flagURI);
|
||||
|
||||
VClass rangeClass = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue