/* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/7.0.69 * Generated at: 2018-10-26 21:28:05 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp.submit; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import java.util.HashMap; import java.util.Set; import java.util.Iterator; import org.dspace.app.webui.servlet.SubmissionController; import org.dspace.app.webui.submit.JSPStepManager; import org.dspace.submit.AbstractProcessingStep; import org.dspace.core.Context; import org.dspace.app.webui.util.UIUtil; import org.dspace.app.util.SubmissionInfo; import org.dspace.app.util.SubmissionConfig; import org.dspace.app.util.SubmissionStepConfig; import javax.servlet.jsp.jstl.fmt.LocaleSupport; import org.apache.log4j.Logger; public final class progressbar_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map _jspx_dependants; static { _jspx_dependants = new java.util.HashMap(2); _jspx_dependants.put("/WEB-INF/fmt.tld", Long.valueOf(1504816158000L)); _jspx_dependants.put("/WEB-INF/dspace-tags.tld", Long.valueOf(1504816158000L)); } private volatile javax.el.ExpressionFactory _el_expressionfactory; private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map getDependants() { return _jspx_dependants; } public javax.el.ExpressionFactory _jsp_getExpressionFactory() { if (_el_expressionfactory == null) { synchronized (this) { if (_el_expressionfactory == null) { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); } } } return _el_expressionfactory; } public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() { if (_jsp_instancemanager == null) { synchronized (this) { if (_jsp_instancemanager == null) { _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } } } return _jsp_instancemanager; } public void _jspInit() { } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write('\n'); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); request.setAttribute("LanguageSwitch", "hide"); /** log4j logger */ Logger log = Logger.getLogger("progressbar.jsp"); // Obtain DSpace context Context context = UIUtil.obtainContext(request); //get submission information object SubmissionInfo subInfo = SubmissionController.getSubmissionInfo(context, request); //get configuration for our current Submission process SubmissionConfig subConfig = subInfo.getSubmissionConfig(); //get configuration for our current step & page in submission process SubmissionStepConfig currentStepConfig = SubmissionController.getCurrentStepConfig(request, subInfo); int currentPage = AbstractProcessingStep.getCurrentPage(request); //get last step & page reached int stepReached = SubmissionController.getStepReached(subInfo); int pageReached = JSPStepManager.getPageReached(subInfo); // Are we in workflow mode? boolean workflowMode = false; if (stepReached == -1) { workflowMode = true; } out.write("\n"); out.write("\n"); out.write("\n"); out.write("
\n"); //get progress bar info, used to build progress bar HashMap progressBarInfo = (HashMap) subInfo.getProgressBarInfo(); if((progressBarInfo!=null) && (progressBarInfo.keySet()!=null)) { //get iterator Set keys = progressBarInfo.keySet(); Iterator barIterator = keys.iterator(); //loop through all steps & print out info while(barIterator.hasNext()) { //this is a string of the form: stepNum.pageNum String stepAndPage = (String) barIterator.next(); //get heading from hashmap String heading = (String) progressBarInfo.get(stepAndPage); //if the heading contains a period (.), then assume //it is referencing a key in Messages.properties if(heading.indexOf(".") >= 0) { //prepend the existing key with "jsp." since we are using JSP-UI heading = LocaleSupport.getLocalizedMessage(pageContext, "jsp." + heading); } //split into stepNum and pageNum String[] fields = stepAndPage.split("\\."); //split on period int stepNum = Integer.parseInt(fields[0]); int pageNum = Integer.parseInt(fields[1]); //if anywhere in last step (i.e. submission is completed), disable EVERYTHING (not allowed to jump back) if(stepReached >= subConfig.getNumberOfSteps()) { if(stepNum==subConfig.getNumberOfSteps()) { // Show "Complete" step as the current step out.write("\n"); out.write(" \n"); out.write(" "); } else { // submission is completed, so cannot jump back to any steps out.write("\n"); out.write(" \n"); out.write(" "); } } //if this is the current step & page, highlight it as "current" else if((stepNum == currentStepConfig.getStepNumber()) && (pageNum == currentPage)) { out.write("\n"); out.write("\t\t \n"); out.write(" \t "); } else if(workflowMode) //if in workflow mode, can jump to any step/page { out.write("\n"); out.write(" \n"); out.write("\t\t\t "); } //else if this step & page has been completed else if( (stepNum < stepReached) || ((stepNum == stepReached) && (pageNum <= pageReached)) ) { out.write("\n"); out.write(" \n"); } else //else this is a step that has not been done, yet { // Stage hasn't been completed yet (can't be jumped to) out.write("\n"); out.write("\t\t \n"); } }//end while } out.write("\n"); out.write("
\n"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { if (response.isCommitted()) { out.flush(); } else { out.clearBuffer(); } } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }