From 66559f58ab95a98a8469056148898d4cbe4f2ada Mon Sep 17 00:00:00 2001 From: jeb228 Date: Thu, 14 Oct 2010 19:10:21 +0000 Subject: [PATCH] NIHVIVO-736 Modify JSPs to use the custom JSP tag. --- webapp/web/admin/conceptRepair.jsp | 9 ++++---- webapp/web/admin/gotoIndividual.jsp | 10 +++----- webapp/web/admin/log4j.jsp | 9 +++----- webapp/web/admin/removeBadRestrictions.jsp | 8 ++----- .../web/admin/removeResourceDescription.jsp | 12 ++++------ webapp/web/admin/syncSesame.jsp | 10 +++----- webapp/web/admin/temporaryLogin.jsp | 9 ++++---- .../edit/editDatapropStmtRequestDispatch.jsp | 9 ++++---- webapp/web/edit/editRequestDispatch.jsp | 10 ++++---- webapp/web/edit/forms/datapropStmtDelete.jsp | 20 ++++++++-------- webapp/web/edit/forms/propDelete.jsp | 10 +++----- .../datapropertyBackButtonProblems.jsp | 9 ++++---- webapp/web/edit/n3Delete.jsp | 11 ++++----- webapp/web/edit/processDatapropRdfForm.jsp | 11 ++++----- webapp/web/edit/processRdfForm2.jsp | 23 ++++++++----------- .../templates/entity/entityKeywordsList.jsp | 8 +++---- 16 files changed, 68 insertions(+), 110 deletions(-) diff --git a/webapp/web/admin/conceptRepair.jsp b/webapp/web/admin/conceptRepair.jsp index ceaf69ad9..86a716054 100644 --- a/webapp/web/admin/conceptRepair.jsp +++ b/webapp/web/admin/conceptRepair.jsp @@ -2,14 +2,13 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> + + + <% - if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) { - %><% - } - String conceptIdStr = request.getParameter("conceptId"); if (conceptIdStr != null) { diff --git a/webapp/web/admin/gotoIndividual.jsp b/webapp/web/admin/gotoIndividual.jsp index 7ee02c613..efddce14d 100644 --- a/webapp/web/admin/gotoIndividual.jsp +++ b/webapp/web/admin/gotoIndividual.jsp @@ -2,17 +2,13 @@ <%@page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> -<%@page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean"%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> + + <% - -if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.DBA)) { - %><% -} - - if( request.getParameter("uri") != null ){ %> <% return; diff --git a/webapp/web/admin/log4j.jsp b/webapp/web/admin/log4j.jsp index 4d67e744f..c4de3bfce 100644 --- a/webapp/web/admin/log4j.jsp +++ b/webapp/web/admin/log4j.jsp @@ -1,10 +1,9 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="org.apache.log4j.*" %> <%@ page import="java.util.*" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> <%-- This JSP will display all the log4j Logger objects, their @@ -14,11 +13,9 @@ Brian Cauros bdc34@cornell.edu based on work by Volker Mentzner. --%> -<% -if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.DBA)) { - %><% -} + +<% try { String name; Level[] levels = new Level[] diff --git a/webapp/web/admin/removeBadRestrictions.jsp b/webapp/web/admin/removeBadRestrictions.jsp index 4b66b179f..5f620da51 100644 --- a/webapp/web/admin/removeBadRestrictions.jsp +++ b/webapp/web/admin/removeBadRestrictions.jsp @@ -1,15 +1,11 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> - + <% - if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) { - %><% - } - if (request.getParameter("execute") != null) { OntModel ontModel = (OntModel) getServletContext().getAttribute(JenaBaseDao.ASSERTIONS_ONT_MODEL_ATTRIBUTE_NAME); int results = doRemoval(ontModel); diff --git a/webapp/web/admin/removeResourceDescription.jsp b/webapp/web/admin/removeResourceDescription.jsp index 0c2b87c31..40d5dd566 100644 --- a/webapp/web/admin/removeResourceDescription.jsp +++ b/webapp/web/admin/removeResourceDescription.jsp @@ -1,15 +1,13 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> + + + <% - if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) { - %><% - } - String resourceURIStr = request.getParameter("resourceURI"); if (resourceURIStr != null) { diff --git a/webapp/web/admin/syncSesame.jsp b/webapp/web/admin/syncSesame.jsp index 89afb3c38..64bb893be 100644 --- a/webapp/web/admin/syncSesame.jsp +++ b/webapp/web/admin/syncSesame.jsp @@ -9,10 +9,12 @@ <%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.JenaBaseDao"%> <%@page import="java.io.InputStream"%> <%@page import="java.util.Properties"%> -<%@page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> + + <%! @@ -32,12 +34,6 @@ %> <% - if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.DBA)) { - %> - - <% - } - long startTime = System.currentTimeMillis(); Properties sesameProperties = new Properties(); diff --git a/webapp/web/admin/temporaryLogin.jsp b/webapp/web/admin/temporaryLogin.jsp index 452708716..425425ef4 100644 --- a/webapp/web/admin/temporaryLogin.jsp +++ b/webapp/web/admin/temporaryLogin.jsp @@ -1,7 +1,5 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> - <%@ page import="com.hp.hpl.jena.rdf.model.*" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> <%@ page import="java.util.Enumeration" %> @@ -10,11 +8,12 @@ <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> -<% if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) { - %><% - } + + +<% if( request.getParameter("force") != null ){ VitroRequestPrep.forceToSelfEditing(request); String netid = request.getParameter("netid"); diff --git a/webapp/web/edit/editDatapropStmtRequestDispatch.jsp b/webapp/web/edit/editDatapropStmtRequestDispatch.jsp index 8bfc38c23..ae83c88b0 100644 --- a/webapp/web/edit/editDatapropStmtRequestDispatch.jsp +++ b/webapp/web/edit/editDatapropStmtRequestDispatch.jsp @@ -8,7 +8,6 @@ <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.RdfLiteralHash" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ 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" %> @@ -16,11 +15,15 @@ <%@ page import="java.util.HashMap" %> <%@ page import="org.apache.commons.logging.Log" %> <%@ page import="org.apache.commons.logging.LogFactory" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> <% //org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editDatapropStmtRequestDispatch.jsp"); final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editDatapropStmtRequestDispatch.jsp"); %> + + + <% // Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, predicateUriJson in request // Also get the Individual for the subjectUri and put it in the request scope @@ -39,10 +42,6 @@ final String DEFAULT_VITRO_NS_FORM = "defaultVitroNsDataPropForm.jsp"; final String DEFAULT_ERROR_FORM = "error.jsp"; - if (!VitroRequestPrep.isSelfEditing(request) && !LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR)) { - %> <% - } - VitroRequest vreq = new VitroRequest(request); if( EditConfiguration.getEditKey( vreq ) == null ){ vreq.setAttribute("editKey",EditConfiguration.newEditKey(session)); diff --git a/webapp/web/edit/editRequestDispatch.jsp b/webapp/web/edit/editRequestDispatch.jsp index b60360400..6620dcf4c 100644 --- a/webapp/web/edit/editRequestDispatch.jsp +++ b/webapp/web/edit/editRequestDispatch.jsp @@ -7,7 +7,6 @@ <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Portal" %> <%@ page import="java.util.HashMap" %> @@ -15,10 +14,14 @@ <%@ page import="org.apache.commons.logging.LogFactory" %> <%@ page errorPage="/error.jsp" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> <%! public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.editRequestDispatch.jsp"); %> + + + <% /* Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, and predicateUriJson in request. @@ -40,11 +43,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. final String DEFAULT_ERROR_FORM = "error.jsp"; final String DEFAULT_ADD_INDIVIDUAL = "defaultAddMissingIndividualForm.jsp"; - if (!VitroRequestPrep.isSelfEditing(request) - && !LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR)) { - %> <% - } - String editKey = (EditConfiguration.getEditKey(request) == null) ? EditConfiguration.newEditKey(session) : EditConfiguration.getEditKey(request); diff --git a/webapp/web/edit/forms/datapropStmtDelete.jsp b/webapp/web/edit/forms/datapropStmtDelete.jsp index e59645247..810fcaaf3 100644 --- a/webapp/web/edit/forms/datapropStmtDelete.jsp +++ b/webapp/web/edit/forms/datapropStmtDelete.jsp @@ -5,32 +5,30 @@ <%@ page import="com.hp.hpl.jena.rdf.model.Literal" %> <%@ page import="com.hp.hpl.jena.rdf.model.Property" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement" %> -<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%> +<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%> -<%@page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%> +<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.RdfLiteralHash" %> <%@ 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.edit.n3editing.StandardModelSelector"%> +<%@ page import="com.hp.hpl.jena.shared.Lock"%> +<%@ page import="com.hp.hpl.jena.ontology.OntModel"%> +<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent"%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jstl/functions" %> <%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> + + <% org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("edu.cornell.mannlib.vitro.jsp.edit.forms.datapropStmtDelete"); - if (!VitroRequestPrep.isSelfEditing(request) && !LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR)) {%> - -<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.StandardModelSelector"%> -<%@page import="com.hp.hpl.jena.shared.Lock"%> -<%@page import="com.hp.hpl.jena.ontology.OntModel"%> -<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent"%> -<% } - String subjectUri = request.getParameter("subjectUri"); String predicateUri = request.getParameter("predicateUri"); String datapropKeyStr = request.getParameter("datapropKey"); diff --git a/webapp/web/edit/forms/propDelete.jsp b/webapp/web/edit/forms/propDelete.jsp index 4525568fc..65386d323 100644 --- a/webapp/web/edit/forms/propDelete.jsp +++ b/webapp/web/edit/forms/propDelete.jsp @@ -7,7 +7,6 @@ <%@page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.SelfEditingIdentifierFactory"%> <%@page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.RoleIdentifier"%> <%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty"%> @@ -31,6 +30,9 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jstl/functions" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> + + <%! public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.forms.propDelete.jsp"); @@ -48,12 +50,6 @@ public WebappDaoFactory getUnfilteredDaoFactory() { <% - boolean selfEditing = VitroRequestPrep.isSelfEditing(request); - boolean isLoggedIn = LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR); - if (!selfEditing && !isLoggedIn) {%> - -<% } - String subjectUri = request.getParameter("subjectUri"); String predicateUri = request.getParameter("predicateUri"); String objectUri = request.getParameter("objectUri"); diff --git a/webapp/web/edit/messages/datapropertyBackButtonProblems.jsp b/webapp/web/edit/messages/datapropertyBackButtonProblems.jsp index 2c7f3e701..a4dc67718 100644 --- a/webapp/web/edit/messages/datapropertyBackButtonProblems.jsp +++ b/webapp/web/edit/messages/datapropertyBackButtonProblems.jsp @@ -5,7 +5,6 @@ <%@ page import="com.hp.hpl.jena.shared.Lock" %> <%@ page import="com.thoughtworks.xstream.XStream" %> <%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %> @@ -25,6 +24,7 @@ <%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.RdfLiteralHash"%> <%@page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty"%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> <%-- Current stop gap solution for back button problems @@ -41,11 +41,10 @@ and set a flag in the request to indicate "back button confusion" <% log.debug("Starting datapropertyBackButtonProblems.jsp"); %> -<% - if (!VitroRequestPrep.isSelfEditing(request) && !LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) { - %><% - } + + +<% List errorMessages = new ArrayList(); Object sessionOntModel = request.getSession().getAttribute("jenaOntModel"); OntModel jenaOntModel = (sessionOntModel != null && sessionOntModel instanceof OntModel) ? (OntModel)sessionOntModel: diff --git a/webapp/web/edit/n3Delete.jsp b/webapp/web/edit/n3Delete.jsp index a9aba7b1e..b5452451b 100644 --- a/webapp/web/edit/n3Delete.jsp +++ b/webapp/web/edit/n3Delete.jsp @@ -9,7 +9,6 @@ <%@ page import="com.hp.hpl.jena.shared.Lock" %> <%@ page import="com.thoughtworks.xstream.XStream" %> <%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Generator" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditSubmission" %> @@ -39,6 +38,7 @@ <%@page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep"%> <%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.DependentResourceDeleteJena"%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> <%-- N3 based deletion. @@ -48,13 +48,10 @@ build the assertions graph and remove that from the system model. --%> + + + <% - boolean selfEditing = VitroRequestPrep.isSelfEditing(request); - boolean isLoggedIn = LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR); - if (!selfEditing && !isLoggedIn) { - %><% - } - /* the post parameters seem to get consumed by the parsing so * we have to make a copy. */ Map queryParameters = null; diff --git a/webapp/web/edit/processDatapropRdfForm.jsp b/webapp/web/edit/processDatapropRdfForm.jsp index 00d9f6b7b..a2b5fbea9 100644 --- a/webapp/web/edit/processDatapropRdfForm.jsp +++ b/webapp/web/edit/processDatapropRdfForm.jsp @@ -5,7 +5,6 @@ <%@ page import="com.hp.hpl.jena.shared.Lock" %> <%@ page import="com.thoughtworks.xstream.XStream" %> <%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %> @@ -31,6 +30,7 @@ <%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.event.EditEvent"%> <%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Utils"%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> <%-- 2nd prototype of processing, adapted for data property editing @@ -65,15 +65,12 @@ and set a flag in the request to indicate "back button confusion" final Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.processDatapropRdfForm.jsp"); %> + + + <% log.debug("Starting processDatapropRdfForm.jsp"); - boolean selfEditing = VitroRequestPrep.isSelfEditing(request); - boolean isLoggedIn = LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR); - if (!selfEditing && !isLoggedIn) { - %><% - } - List errorMessages = new ArrayList(); //Object sessionOntModel = request.getSession().getAttribute("jenaOntModel"); diff --git a/webapp/web/edit/processRdfForm2.jsp b/webapp/web/edit/processRdfForm2.jsp index 36e60fad1..e7a86fb9f 100644 --- a/webapp/web/edit/processRdfForm2.jsp +++ b/webapp/web/edit/processRdfForm2.jsp @@ -9,7 +9,6 @@ <%@ page import="com.hp.hpl.jena.shared.Lock" %> <%@ page import="com.thoughtworks.xstream.XStream" %> <%@ page import="com.thoughtworks.xstream.io.xml.DomDriver" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditN3Generator" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditSubmission" %> @@ -42,8 +41,14 @@ <%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.ModelChangePreprocessor"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> <%@ page import="java.net.URLDecoder" %> +<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.DependentResourceDeleteJena"%> +<%@page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%> +<%@page import="edu.cornell.mannlib.vitro.webapp.beans.IndividualImpl"%> +<%@page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%> +<%@page import="edu.cornell.mannlib.vitro.webapp.dao.InsertException"%> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> <%-- 2nd prototype of processing. @@ -53,20 +58,10 @@ be processed as n3 by Jena then it is an error in processing the form. The optional n3 blocks will proccessed if their variables are bound and are well formed. --%> -<% - boolean selfEditing = VitroRequestPrep.isSelfEditing(request); - boolean isLoggedIn = LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.NON_EDITOR); - if (!selfEditing && !isLoggedIn) { -%> - -<%@page import="edu.cornell.mannlib.vitro.webapp.dao.jena.DependentResourceDeleteJena"%> -<%@page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%> -<%@page import="edu.cornell.mannlib.vitro.webapp.beans.IndividualImpl"%> -<%@page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%> -<%@page import="edu.cornell.mannlib.vitro.webapp.dao.InsertException"%> + + + <% - } - VitroRequest vreq = new VitroRequest(request); WebappDaoFactory wdf = vreq.getWebappDaoFactory(); diff --git a/webapp/web/templates/entity/entityKeywordsList.jsp b/webapp/web/templates/entity/entityKeywordsList.jsp index ff0c85459..5e3c1d9f1 100644 --- a/webapp/web/templates/entity/entityKeywordsList.jsp +++ b/webapp/web/templates/entity/entityKeywordsList.jsp @@ -3,7 +3,6 @@ <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/PropertyEditLink" prefix="edLnk" %> -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginStatusBean" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %> @@ -19,16 +18,15 @@ <%@ page import="java.util.Iterator" %> <%@ page import="java.util.List" %> <%@ taglib uri="http://vitro.mannlib.cornell.edu/vitro/tags/StringProcessorTag" prefix="p" %> +<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %> <%! public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.templates.entity.entityKeywordsList.jsp"); %> + + <% -if (!LoginStatusBean.getBean(request).isLoggedInAtLeast(LoginStatusBean.CURATOR)) {%> - -<% -} Individual ent = (Individual)request.getAttribute("entity"); if (ent==null) { log.error("No incoming entity in entityKeywordsList.jsp");