Removing the OLD SiteAdminController and the JSP files under siteAdmin. These have been replaced by freemarker versions.

This commit is contained in:
bdc34 2010-12-16 20:09:51 +00:00
parent 0876360ec8
commit e5da2a557a
9 changed files with 0 additions and 296 deletions

View file

@ -1,92 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.webapp.controller.edit;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections.map.ListOrderedMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import edu.cornell.mannlib.vedit.beans.EditProcessObject;
import edu.cornell.mannlib.vedit.beans.FormObject;
import edu.cornell.mannlib.vedit.beans.LoginStatusBean;
import edu.cornell.mannlib.vedit.controller.BaseEditController;
import edu.cornell.mannlib.vedit.util.FormUtils;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
import edu.cornell.mannlib.vitro.webapp.beans.VClassGroup;
import edu.cornell.mannlib.vitro.webapp.controller.Controllers;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
public class SiteAdminController extends BaseEditController {
private static final Log log = LogFactory.getLog(SiteAdminController.class.getName());
public void doGet(HttpServletRequest request, HttpServletResponse response) {
try {
super.doGet(request,response);
} catch (Exception e) {
e.printStackTrace();
}
VitroRequest vreq = new VitroRequest(request);
EditProcessObject epo = super.createEpo(request);
FormObject foo = new FormObject();
HashMap optionMap = new HashMap();
List classGroups = vreq.getFullWebappDaoFactory().getVClassGroupDao().getPublicGroupsWithVClasses(true,true,false); // order by displayRank, include uninstantiated classes, don't get the counts of individuals
Iterator classGroupIt = classGroups.iterator();
ListOrderedMap optGroupMap = new ListOrderedMap();
while (classGroupIt.hasNext()) {
VClassGroup group = (VClassGroup)classGroupIt.next();
List classes = group.getVitroClassList();
optGroupMap.put(group.getPublicName(),FormUtils.makeOptionListFromBeans(classes,"URI","PickListName",null,null,false));
}
optionMap.put("VClassId", optGroupMap);
foo.setOptionLists(optionMap);
epo.setFormObject(foo);
if ( (200 <= vreq.getFullWebappDaoFactory().getLanguageProfile()) && (vreq.getFullWebappDaoFactory().getLanguageProfile() < 300) ) {
request.setAttribute("languageModeStr", "OWL Mode" );
} else if ( 100 == vreq.getFullWebappDaoFactory().getLanguageProfile() ) {
request.setAttribute("languageModeStr", "RDF Schema Mode" );
}
if (LoginStatusBean.getBean(vreq).isLoggedInAtLeast(LoginStatusBean.CURATOR)) {
String verbose = request.getParameter("verbose");
if ("true".equals(verbose)) {
request.getSession().setAttribute(VERBOSE, Boolean.TRUE);
} else if ("false".equals(verbose)) {
request.getSession().setAttribute(VERBOSE, Boolean.FALSE);
}
}
request.setAttribute("singlePortal",new Boolean(vreq.getFullWebappDaoFactory().getPortalDao().isSinglePortal()));
RequestDispatcher rd = request.getRequestDispatcher(Controllers.BASIC_JSP);
request.setAttribute("bodyJsp","/siteAdmin/siteAdminMain.jsp");
request.setAttribute("scripts","/siteAdmin/siteAdminHeadContent.jsp");
request.setAttribute("title",((Portal)request.getAttribute("portalBean")).getAppName() + " Site Administration");
request.setAttribute("epoKey",epo.getKey());
try {
rd.forward(request, response);
} catch (Exception e) {
log.error("SiteAdminController could not forward to view.");
log.error(e.getMessage());
log.error(e.getStackTrace());
}
}
public void doPost(HttpServletRequest request, HttpServletResponse response) {
doGet(request,response);
}
public static final String VERBOSE = "verbosePropertyListing";
}

View file

@ -1,17 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<% if (loginBean.isLoggedInAtLeast(LoginStatusBean.DBA)) { %>
<div class="pageBodyGroup">
<h3>Advanced Data Tools</h3>
<ul>
<li><a href="ingest">Ingest tools</a></li>
<li><a href="uploadRDFForm?home=<%=portal.getPortalId()%>">Add/Remove RDF data</a></li>
<li><a href="export?home=<%=portal.getPortalId()%>">RDF export</a></li>
<%-- <li><a href="refactorOp?home=<%=portal.getPortalId()%>&amp;modeStr=fixDataTypes">Datatype literal realignment</a></li> --%>
<li><a href="admin/sparqlquery">SPARQL query</a></li>
<li><a href="admin/sparqlquerybuilder">SPARQL query builder</a></li>
</ul>
</div>
<% } %>

View file

@ -1,3 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<!--If your product contains custom reports, then overwrite this page-->

View file

@ -1,27 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<% if (loginBean.isLoggedInAtLeast(LoginStatusBean.EDITOR)) { %>
<div class="pageBodyGroup">
<h3>Data Input</h3>
<%-- <form action="editForm" method="get">
<select id="VClassURI" name="VClassURI" class="form-item">
<form:option name="VClassId"/>
</select>
<input type="submit" class="add-action-button" value="Add individual of this class"/>
<input type="hidden" name="home" value="<%=portal.getPortalId()%>" />
<input type="hidden" name="controller" value="Entity"/>
</form> --%>
<c:url var="editRequestDisUrl" value="/edit/editRequestDispatch.jsp"/>
<form action="${editRequestDisUrl}" method="get">
<select id="VClassURI" name="typeOfNew" class="form-item">
<form:option name="VClassId"/>
</select>
<input type="hidden" name="editform" value="newIndividualForm.jsp"/>
<input type="submit" class="add-action-button" value="Add individual of this class"/>
</form>
</div>
<% } %>

View file

@ -1,12 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%-- Included in siteAdmin/main.jsp to handle login/logout form and processing --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.login.LoginTemplateHelper" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
<%
String themeDir = new VitroRequest(request).getPortal().getThemeDir().replaceAll("/$", "");
%>
<%= new LoginTemplateHelper(request).showLoginPage(request) %>

View file

@ -1,58 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.jena.pellet.PelletListener"%>
<% if (loginBean.isLoggedInAtLeast(LoginStatusBean.CURATOR)) { %>
<div class="pageBodyGroup">
<h3>Ontology Editor</h3>
<%
Object plObj = getServletContext().getAttribute("pelletListener");
if ( (plObj != null) && (plObj instanceof PelletListener) ) {
PelletListener pelletListener = (PelletListener) plObj;
if (!pelletListener.isConsistent()) {
%>
<p class="notice">
INCONSISTENT ONTOLOGY: reasoning halted.
</p>
<p class="notice">
Cause: <%=pelletListener.getExplanation()%>
</p>
<% } else if (pelletListener.isInErrorState()) { %>
<p class="notice">
An error occurred during reasoning;
reasoning has been halted.
See error log for details.
</p>
<% }
}
%>
<ul>
<li><a href="listOntologies?home=<%=portal.getPortalId()%>">Ontology list</a></li>
</ul>
<h4>Class Management</h4>
<ul>
<li><a href="showClassHierarchy?home=<%=portal.getPortalId()%>">Class hierarchy</a></li>
<li><a href="listGroups?home=<%=portal.getPortalId()%>">Class groups</a></li>
</ul>
<h4>Property Management</h4>
<ul>
<li><a href="showObjectPropertyHierarchy?home=${portalBean.portalId}&amp;iffRoot=true">Object property hierarchy</a></li>
<li><a href="showDataPropertyHierarchy?home=<%=portal.getPortalId()%>">Data property hierarchy</a></li>
<li><a href="listPropertyGroups?home=<%=portal.getPortalId()%>">Property groups</a></li>
</ul>
<c:set var="verbosePropertyListing" value="${verbosePropertyListing == true ? true : false}" />
<form id="verbosePropertyForm" action="${Controllers.SITE_ADMIN}#verbosePropertyForm" method="get">
<input type="hidden" name="verbose" value="${!verbosePropertyListing}" />
<span>Verbose property display for this session is <b>${verbosePropertyListing == true ? 'on' : 'off'}</b>.</span>
<input type="submit" id="submit" value="Turn ${verbosePropertyListing == true ? 'off' : 'on'}" />
</form>
</div>
<% } %>

View file

@ -1,15 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.User" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<c:set var="portal" value="${requestScope.portalBean}"/>
<c:set var="contextPath"><c:out value="${pageContext.request.contextPath}" /></c:set>
<c:set var="themeDir" value="${contextPath}/${portal.themeDir}"/>
<link rel="stylesheet" type="text/css" href="${contextPath}/css/login.css"/>
<link rel="stylesheet" type="text/css" href="${themeDir}css/formedit.css"/>
<script type="text/javascript" src="${contextPath}/js/jquery.js"></script>
<script type="text/javascript" src="${contextPath}/js/login/loginUtils.js"></script>

View file

@ -1,45 +0,0 @@
<%-- $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.beans.Portal" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.jena.pellet.PelletListener"%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.policy.RoleBasedPolicy" %>
<%@ page errorPage="/error.jsp"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<%@ taglib prefix="form" uri="http://vitro.mannlib.cornell.edu/edit/tags" %>
<%
Portal portal = (Portal) request.getAttribute("portalBean");
final String DEFAULT_SEARCH_METHOD = "fulltext"; /* options are fulltext/termlike */
LoginStatusBean loginBean = LoginStatusBean.getBean(request);
%>
<div id="content">
<div class="tab">
<h2>Site Administration</h2>
</div>
<div id="adminDashboard">
<%@ include file="loginForm.jsp" %>
<%@ include file="dataInput.jsp" %>
<%@ include file="siteConfiguration.jsp" %>
<%@ include file="ontologyEditor.jsp" %>
<%@ include file="advancedDataTools.jsp" %>
<%@ include file="customReports.jsp" %>
</div> <!-- end adminDashboard -->
</div> <!-- end content -->

View file

@ -1,27 +0,0 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<% if (loginBean.isLoggedInAtLeast(LoginStatusBean.CURATOR)) { %>
<div class="pageBodyGroup">
<h3>Site Configuration</h3>
<ul>
<c:if test="${requestScope.singlePortal == true }">
<li><a href="editForm?home=<%=portal.getPortalId()%>&amp;controller=Portal&amp;id=<%=portal.getPortalId()%>">Site information</a></li>
</c:if>
<c:if test="${requestScope.singlePortal == false }">
<li><a href="editForm?home=<%=portal.getPortalId()%>&amp;controller=Portal&amp;id=<%=portal.getPortalId()%>">Current portal information</a></li>
<li><a href="listPortals?home=<%=portal.getPortalId()%>">List all portals</a></li>
</c:if>
<li><a href="listTabs?home=<%=portal.getPortalId()%>">Tab management</a></li>
<% if (loginBean.isLoggedInAtLeast(LoginStatusBean.DBA)) { %>
<li><a href="listUsers?home=<%=portal.getPortalId()%>">User accounts</a></li>
<% } %>
</ul>
</div>
<% } %>