Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BDD91178AF for ; Fri, 12 Jun 2015 00:55:37 +0000 (UTC) Received: (qmail 4840 invoked by uid 500); 12 Jun 2015 00:55:37 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 4773 invoked by uid 500); 12 Jun 2015 00:55:37 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 4747 invoked by uid 99); 12 Jun 2015 00:55:37 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jun 2015 00:55:37 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 64244AC0296 for ; Fri, 12 Jun 2015 00:55:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1685010 [1/18] - /manifoldcf/trunk/framework/crawler-ui/src/main/webapp/ Date: Fri, 12 Jun 2015 00:55:36 -0000 To: commits@manifoldcf.apache.org From: kishore@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150612005537.64244AC0296@hades.apache.org> Author: kishore Date: Fri Jun 12 00:55:35 2015 New Revision: 1685010 URL: http://svn.apache.org/r1685010 Log: Reformatted all JSPs in crawler-ui/src/main/webapp Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminDefaults.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminHeaders.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/documentstatus.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editauthority.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editconnection.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editgroup.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editmapper.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editnotification.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editoutput.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/edittransformation.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/error.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/execute.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/index.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/listauthorities.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/listconnections.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/listgroups.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/listjobs.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/listmappers.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/listnotifications.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/listoutputs.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/listtransformations.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/login.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/logout.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxactivityreport.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/maxbandwidthreport.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/navigation.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/queuestatus.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/resultreport.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/setupAdminProfile.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/showjobstatus.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/style.css manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewauthority.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewconnection.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewgroup.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewjob.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewmapper.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewnotification.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewoutput.jsp manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewtransformation.jsp Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminDefaults.jsp URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminDefaults.jsp?rev=1685010&r1=1685009&r2=1685010&view=diff ============================================================================== --- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminDefaults.jsp (original) +++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminDefaults.jsp Fri Jun 12 00:55:35 2015 @@ -1,31 +1,27 @@ <%@ page language="java" %> -<%@ page import="org.apache.manifoldcf.core.interfaces.*" %> -<%@ page import="org.apache.manifoldcf.ui.i18n.*" %> -<%@ page import="org.apache.manifoldcf.agents.interfaces.*" %> -<%@ page import="org.apache.manifoldcf.authorities.interfaces.*" %> -<%@ page import="org.apache.manifoldcf.crawler.interfaces.*" %> -<%@ page import="java.util.*" %> +<%@ page import="org.apache.manifoldcf.core.interfaces.IThreadContext" %> +<%@ page import="org.apache.manifoldcf.ui.i18n.Messages" %> <% -/* $Id$ */ + /* $Id$ */ /** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You under the Apache License, Version 2.0 -* (the "License"); you may not use this file except in compliance with -* the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ %> @@ -38,11 +34,10 @@ <% - IThreadContext threadContext = thread.getThreadContext(); - org.apache.manifoldcf.ui.multipart.MultipartWrapper variableContext = (org.apache.manifoldcf.ui.multipart.MultipartWrapper)threadContext.get("__WRAPPER__"); - if (variableContext == null) - { - variableContext = new org.apache.manifoldcf.ui.multipart.MultipartWrapper(request,adminprofile); - threadContext.save("__WRAPPER__",variableContext); - } + IThreadContext threadContext = thread.getThreadContext(); + org.apache.manifoldcf.ui.multipart.MultipartWrapper variableContext = (org.apache.manifoldcf.ui.multipart.MultipartWrapper) threadContext.get("__WRAPPER__"); + if (variableContext == null) { + variableContext = new org.apache.manifoldcf.ui.multipart.MultipartWrapper(request, adminprofile); + threadContext.save("__WRAPPER__", variableContext); + } %> Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminHeaders.jsp URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminHeaders.jsp?rev=1685010&r1=1685009&r2=1685010&view=diff ============================================================================== --- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminHeaders.jsp (original) +++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/adminHeaders.jsp Fri Jun 12 00:55:35 2015 @@ -1,39 +1,40 @@ -<% response.setHeader("Pragma","No-cache"); -response.setDateHeader("Expires",0); -response.setHeader("Cache-Control", "no-cache"); -response.setDateHeader("max-age", 0); -response.setContentType("text/html;charset=utf-8"); +<% response.setHeader("Pragma", "No-cache"); + response.setDateHeader("Expires", 0); + response.setHeader("Cache-Control", "no-cache"); + response.setDateHeader("max-age", 0); + response.setContentType("text/html;charset=utf-8"); %> <% -/* $Id$ */ + /* $Id$ */ /** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You under the Apache License, Version 2.0 -* (the "License"); you may not use this file except in compliance with -* the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ %> <%@ page language="java" %> -<%@ page import="org.apache.manifoldcf.core.interfaces.*" %> -<%@ page import="org.apache.manifoldcf.core.util.*" %> -<%@ page import="org.apache.manifoldcf.ui.i18n.*" %> <%@ page import="org.apache.manifoldcf.agents.interfaces.*" %> -<%@ page import="org.apache.manifoldcf.crawler.interfaces.*" %> <%@ page import="org.apache.manifoldcf.authorities.interfaces.*" %> +<%@ page import="org.apache.manifoldcf.core.interfaces.*" %> +<%@ page import="org.apache.manifoldcf.core.util.Converter" %> +<%@ page import="org.apache.manifoldcf.core.util.URLEncoder" %> +<%@ page import="org.apache.manifoldcf.crawler.interfaces.*" %> +<%@ page import="org.apache.manifoldcf.ui.i18n.Messages" %> <%@ page import="java.util.*" %> @@ -46,18 +47,16 @@ response.setContentType("text/html;chars <% - if (adminprofile.getLoggedOn() == false) - { - response.sendRedirect("login.jsp"); - return; - } - - IThreadContext threadContext = thread.getThreadContext(); - org.apache.manifoldcf.ui.multipart.MultipartWrapper variableContext = (org.apache.manifoldcf.ui.multipart.MultipartWrapper)threadContext.get("__WRAPPER__"); - if (variableContext == null) - { - variableContext = new org.apache.manifoldcf.ui.multipart.MultipartWrapper(request,adminprofile); - threadContext.save("__WRAPPER__",variableContext); - } + if (adminprofile.getLoggedOn() == false) { + response.sendRedirect("login.jsp"); + return; + } + + IThreadContext threadContext = thread.getThreadContext(); + org.apache.manifoldcf.ui.multipart.MultipartWrapper variableContext = (org.apache.manifoldcf.ui.multipart.MultipartWrapper) threadContext.get("__WRAPPER__"); + if (variableContext == null) { + variableContext = new org.apache.manifoldcf.ui.multipart.MultipartWrapper(request, adminprofile); + threadContext.save("__WRAPPER__", variableContext); + } %> Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp?rev=1685010&r1=1685009&r2=1685010&view=diff ============================================================================== --- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp (original) +++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/banner.jsp Fri Jun 12 00:55:35 2015 @@ -2,46 +2,48 @@ <% -/* $Id$ */ + /* $Id$ */ /** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You under the Apache License, Version 2.0 -* (the "License"); you may not use this file except in compliance with -* the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ %> <% - // This module is meant to be called within a table cell, and will drop the - // lcf banner into the cell - String dateString = java.text.DateFormat.getDateTimeInstance().format(new java.util.Date()); + // This module is meant to be called within a table cell, and will drop the + // lcf banner into the cell + String dateString = java.text.DateFormat.getDateTimeInstance().format(new java.util.Date()); %> - - - - + + + +
- - - - - - - -
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(dateString)%>
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"banner.DocumentIngestion")%>
-
+ + + + + + + +
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(dateString)%> +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "banner.DocumentIngestion")%> +
+
Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/documentstatus.jsp URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/documentstatus.jsp?rev=1685010&r1=1685009&r2=1685010&view=diff ============================================================================== --- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/documentstatus.jsp (original) +++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/documentstatus.jsp Fri Jun 12 00:55:35 2015 @@ -2,25 +2,25 @@ <% -/* $Id$ */ + /* $Id$ */ /** -* Licensed to the Apache Software Foundation (ASF) under one or more -* contributor license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright ownership. -* The ASF licenses this file to You under the Apache License, Version 2.0 -* (the "License"); you may not use this file except in compliance with -* the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -boolean maintenanceUnderway = org.apache.manifoldcf.crawler.system.ManifoldCF.checkMaintenanceUnderway(); + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + boolean maintenanceUnderway = org.apache.manifoldcf.crawler.system.ManifoldCF.checkMaintenanceUnderway(); %> @@ -30,563 +30,606 @@ boolean maintenanceUnderway = org.apache - - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.ApacheManifoldCFDocumentStatus")%> - - - + //--> + - - - - - -
-

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.DocumentStatus")%>

-<% -if (maintenanceUnderway == false) -{ - int k; - - // Read the document selection parameters. - - // The status report is connection based, so the connection has to be selected before anything else makes sense. - String statusConnection = variableContext.getParameter("statusconnection"); - if (statusConnection == null) - statusConnection = ""; - - // Which jobs we care about also figure in the selection part of the query. It is the user's responsibility to pick jobs - // that are in desired states. - String[] statusJobIdentifiers = variableContext.getParameterValues("statusjobs"); - if (statusJobIdentifiers == null) - statusJobIdentifiers = new String[0]; - - // We can select documents from the queue based on the earliest time they can be acted upon. This is specified in - // a delta in minutes offset from "now". Empty means that we don't want to select on that criteria. - String activeTimeOffsetMinutes = variableContext.getParameter("statusscheduleoffset"); - if (activeTimeOffsetMinutes == null) - activeTimeOffsetMinutes = ""; - - // There is a selection criteria also based on the document state; these are integers defined in IJobManager. - String[] documentStateTypes; - if (variableContext.getParameter("statusdocumentstates_posted") != null) - { - documentStateTypes = variableContext.getParameterValues("statusdocumentstates"); - if (documentStateTypes == null) - documentStateTypes = new String[0]; - } - else - documentStateTypes = null; - - // There is a selection criteria based on the document status; these are also integers defined in IJobManager. - String[] documentStatusTypes; - if (variableContext.getParameter("statusdocumentstatuses_posted") != null) - { - documentStatusTypes = variableContext.getParameterValues("statusdocumentstatuses"); - if (documentStatusTypes == null) - documentStatusTypes = new String[0]; - } - else - documentStatusTypes = null; - - // Match string for the document identifier - String identifierMatch = variableContext.getParameter("statusidentifiermatch"); - if (identifierMatch == null) - identifierMatch = ""; - - // From the passed-in selection values, calculate the actual selection criteria that we'll use in the queries. - IRepositoryConnectionManager connMgr = RepositoryConnectionManagerFactory.make(threadContext); - IRepositoryConnection[] connList = connMgr.getAllConnections(); - - IJobManager jobManager = JobManagerFactory.make(threadContext); - - // Repository connection name: This simply needs to be mapped to an eligible list of identifiers. - IJobDescription[] eligibleList = null; - HashMap selectedJobs = null; - if (statusConnection.length() > 0) - { - eligibleList = jobManager.findJobsForConnection(statusConnection); - selectedJobs = new HashMap(); - k = 0; - while (k < statusJobIdentifiers.length) - { - Long identifier = new Long(statusJobIdentifiers[k++]); - selectedJobs.put(identifier,identifier); - } - } - - // Time offset: Need to calculate the actual time in ms since epoch to use to query against the "checktime" field. - // Note that the checktime field is actually nullable and will only have a value when the document is in certain states; - // therefore, the query itself will only include checktime for those states where it makes sense. An empty value - // means "from the beginning of time", or is equivalent to time 0. - long nowTime = 0L; - if (activeTimeOffsetMinutes.length() > 0) - { - nowTime = System.currentTimeMillis() + (new Long(activeTimeOffsetMinutes).longValue()) * 60000L; - if (nowTime < 0L) - nowTime = 0L; - } - else - nowTime = System.currentTimeMillis(); - - // Translate the states from a string to a number that will be understood by IJobManager. - int[] matchingStates; - if (documentStateTypes == null) - { - matchingStates = new int[]{IJobManager.DOCSTATE_NEVERPROCESSED,IJobManager.DOCSTATE_PREVIOUSLYPROCESSED, - IJobManager.DOCSTATE_OUTOFSCOPE}; - } - else - { - matchingStates = new int[documentStateTypes.length]; - k = 0; - while (k < matchingStates.length) - { - matchingStates[k] = new Integer(documentStateTypes[k]).intValue(); - k++; - } - } - HashMap matchingStatesHash = new HashMap(); - k = 0; - while (k < matchingStates.length) - { - Integer state = new Integer(matchingStates[k++]); - matchingStatesHash.put(state,state); - } - - // Convert the status from a string to a number that will be understood by IJobManager - int[] matchingStatuses; - if (documentStatusTypes == null) - { - matchingStatuses = new int[]{IJobManager.DOCSTATUS_INACTIVE,IJobManager.DOCSTATUS_PROCESSING,IJobManager.DOCSTATUS_EXPIRING, - IJobManager.DOCSTATUS_DELETING,IJobManager.DOCSTATUS_READYFORPROCESSING,IJobManager.DOCSTATUS_READYFOREXPIRATION, - IJobManager.DOCSTATUS_WAITINGFORPROCESSING,IJobManager.DOCSTATUS_WAITINGFOREXPIRATION,IJobManager.DOCSTATUS_WAITINGFOREVER, - IJobManager.DOCSTATUS_HOPCOUNTEXCEEDED}; - } - else - { - matchingStatuses = new int[documentStatusTypes.length]; - k = 0; - while (k < matchingStatuses.length) - { - matchingStatuses[k] = new Integer(documentStatusTypes[k]).intValue(); - k++; - } - } - HashMap matchingStatusesHash = new HashMap(); - k = 0; - while (k < matchingStatuses.length) - { - Integer status = new Integer(matchingStatuses[k++]); - matchingStatusesHash.put(status,status); - } - -%> -
- - - - - - - - -<% - if (eligibleList != null) - { -%> - -<% - } - else - { -%> - -<% - } -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.Connection")%> - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.Jobs")%> - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.TimeOffsetFromNowMinutes")%> - -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.DocumentState")%> - - -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.DocumentState")%> - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.DocumentIdentifierMatch")%>

-<% - if (statusConnection.length() > 0 && statusJobIdentifiers.length > 0) - { -%> - " onClick="javascript:Go()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"documentstatus.ExecuteThisQuery")%>"/> -<% - } - else - { -%> - " onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"documentstatus.Continue")%>"/> -<% - } -%> -

-<% - if (statusConnection.length() > 0) - { - if (statusJobIdentifiers.length > 0) - { - // Run the report. - - // First, we need to gather the sort order object. - String sortOrderString = variableContext.getParameter("sortorder"); - SortOrder sortOrder; - if (sortOrderString == null || sortOrderString.length() == 0) - sortOrder = new SortOrder(); - else - sortOrder = new SortOrder(sortOrderString); - - // Now, gather the column header that was clicked on (if any) - String clickedColumn = variableContext.getParameter("clickcolumn"); - if (clickedColumn != null && clickedColumn.length() > 0) - sortOrder.clickColumn(clickedColumn); - - // Gather the start - String startRowString = variableContext.getParameter("startrow"); - int startRow = 0; - if (startRowString != null && startRowString.length() > 0) - startRow = Integer.parseInt(startRowString); - - // Gather the max - String maxRowCountString = variableContext.getParameter("rowcount"); - int rowCount = 20; - if (maxRowCountString != null && maxRowCountString.length() > 0) - rowCount = Integer.parseInt(maxRowCountString); - - Long[] ourJobs = new Long[selectedJobs.size()]; - Iterator iter = selectedJobs.keySet().iterator(); - int zz = 0; - while (iter.hasNext()) - { - ourJobs[zz++] = (Long)iter.next(); - } - - RegExpCriteria identifierMatchObject = null; - if (identifierMatch.length() > 0) - identifierMatchObject = new RegExpCriteria(identifierMatch,true); - StatusFilterCriteria criteria = new StatusFilterCriteria(ourJobs,nowTime,identifierMatchObject,matchingStates,matchingStatuses); - - IResultSet set = jobManager.genDocumentStatus(statusConnection,criteria,sortOrder,startRow,rowCount+1); - -%> - - - - - - - - - - - - - - - -<% - zz = 0; - boolean hasMoreRows = (set.getRowCount() > rowCount); - int iterCount = hasMoreRows?rowCount:set.getRowCount(); - while (zz < iterCount) - { - IResultRow row = set.getRow(zz); - - // Translate column values into something that can be reasonably displayed. - // Note that the actual hard work of translating things to human-readable strings largely is done by the query itself; this is because - // we want to sort on the columns, so it has to be that way. - - String[] identifierBreakdown = org.apache.manifoldcf.ui.util.Formatter.formatString(row.getValue("identifier").toString(),64,true,true); - Long scheduleTime = (Long)row.getValue("scheduled"); - String scheduleTimeString = ""; - if (scheduleTime != null) - scheduleTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(scheduleTime.longValue()); - String scheduledActionString = (String)row.getValue("action"); - if (scheduledActionString == null) - scheduledActionString = ""; - Long retryCount = (Long)row.getValue("retrycount"); - String retryCountString = ""; - if (retryCount != null) - retryCountString = retryCount.toString(); - Long retryLimit = (Long)row.getValue("retrylimit"); - String retryLimitString = ""; - if (retryLimit != null) - retryLimitString = org.apache.manifoldcf.ui.util.Formatter.formatTime(retryLimit.longValue()); - -%> - > - - - - - - - - - -<% - zz++; - } -%> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.Identifier")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.Job")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.State")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.Status")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.Scheduled")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.ScheduledAction")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.RetryCount")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.RetryLimit")%>
-<% - int q = 0; - while (q < identifierBreakdown.length) - { -%> - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(identifierBreakdown[q++])%>
-<% - } -%> -
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("job").toString())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("state").toString())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("status").toString())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(scheduleTimeString)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(scheduledActionString)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(retryCountString)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(retryLimitString)%>
- - - - - - - -
- -<% - if (startRow == 0) - { -%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.Previous")%> -<% - } - else - { -%> - Previous -<% - } -%> - - - -<% - if (hasMoreRows == false) - { -%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.Next")%> -<% - } - else - { -%> - Next -<% - } -%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.Rows")%> - <%=Integer.toString(startRow)%>-<%=(hasMoreRows?Integer.toString(startRow+rowCount-1):"END")%> - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.RowsPerPage")%> - -
- -<% - } - else - { -%> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.PleaseSelectAtLeastOneJob")%>
-<% - } - } - else - { -%> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.PleaseSelectaConnection")%>
-<% - } -%> -
-<% -} -else -{ -%> - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"documentstatus.PleaseTryAgainLater")%>
-<% -} -%> -
+ + + + + + + + +
+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.DocumentStatus")%> +

+ <% + if (maintenanceUnderway == false) { + int k; + + // Read the document selection parameters. + + // The status report is connection based, so the connection has to be selected before anything else makes sense. + String statusConnection = variableContext.getParameter("statusconnection"); + if (statusConnection == null) + statusConnection = ""; + + // Which jobs we care about also figure in the selection part of the query. It is the user's responsibility to pick jobs + // that are in desired states. + String[] statusJobIdentifiers = variableContext.getParameterValues("statusjobs"); + if (statusJobIdentifiers == null) + statusJobIdentifiers = new String[0]; + + // We can select documents from the queue based on the earliest time they can be acted upon. This is specified in + // a delta in minutes offset from "now". Empty means that we don't want to select on that criteria. + String activeTimeOffsetMinutes = variableContext.getParameter("statusscheduleoffset"); + if (activeTimeOffsetMinutes == null) + activeTimeOffsetMinutes = ""; + + // There is a selection criteria also based on the document state; these are integers defined in IJobManager. + String[] documentStateTypes; + if (variableContext.getParameter("statusdocumentstates_posted") != null) { + documentStateTypes = variableContext.getParameterValues("statusdocumentstates"); + if (documentStateTypes == null) + documentStateTypes = new String[0]; + } else + documentStateTypes = null; + + // There is a selection criteria based on the document status; these are also integers defined in IJobManager. + String[] documentStatusTypes; + if (variableContext.getParameter("statusdocumentstatuses_posted") != null) { + documentStatusTypes = variableContext.getParameterValues("statusdocumentstatuses"); + if (documentStatusTypes == null) + documentStatusTypes = new String[0]; + } else + documentStatusTypes = null; + + // Match string for the document identifier + String identifierMatch = variableContext.getParameter("statusidentifiermatch"); + if (identifierMatch == null) + identifierMatch = ""; + + // From the passed-in selection values, calculate the actual selection criteria that we'll use in the queries. + IRepositoryConnectionManager connMgr = RepositoryConnectionManagerFactory.make(threadContext); + IRepositoryConnection[] connList = connMgr.getAllConnections(); + + IJobManager jobManager = JobManagerFactory.make(threadContext); + + // Repository connection name: This simply needs to be mapped to an eligible list of identifiers. + IJobDescription[] eligibleList = null; + HashMap selectedJobs = null; + if (statusConnection.length() > 0) { + eligibleList = jobManager.findJobsForConnection(statusConnection); + selectedJobs = new HashMap(); + k = 0; + while (k < statusJobIdentifiers.length) { + Long identifier = new Long(statusJobIdentifiers[k++]); + selectedJobs.put(identifier, identifier); + } + } + + // Time offset: Need to calculate the actual time in ms since epoch to use to query against the "checktime" field. + // Note that the checktime field is actually nullable and will only have a value when the document is in certain states; + // therefore, the query itself will only include checktime for those states where it makes sense. An empty value + // means "from the beginning of time", or is equivalent to time 0. + long nowTime = 0L; + if (activeTimeOffsetMinutes.length() > 0) { + nowTime = System.currentTimeMillis() + (new Long(activeTimeOffsetMinutes).longValue()) * 60000L; + if (nowTime < 0L) + nowTime = 0L; + } else + nowTime = System.currentTimeMillis(); + + // Translate the states from a string to a number that will be understood by IJobManager. + int[] matchingStates; + if (documentStateTypes == null) { + matchingStates = new int[]{IJobManager.DOCSTATE_NEVERPROCESSED, IJobManager.DOCSTATE_PREVIOUSLYPROCESSED, + IJobManager.DOCSTATE_OUTOFSCOPE}; + } else { + matchingStates = new int[documentStateTypes.length]; + k = 0; + while (k < matchingStates.length) { + matchingStates[k] = new Integer(documentStateTypes[k]).intValue(); + k++; + } + } + HashMap matchingStatesHash = new HashMap(); + k = 0; + while (k < matchingStates.length) { + Integer state = new Integer(matchingStates[k++]); + matchingStatesHash.put(state, state); + } + + // Convert the status from a string to a number that will be understood by IJobManager + int[] matchingStatuses; + if (documentStatusTypes == null) { + matchingStatuses = new int[]{IJobManager.DOCSTATUS_INACTIVE, IJobManager.DOCSTATUS_PROCESSING, IJobManager.DOCSTATUS_EXPIRING, + IJobManager.DOCSTATUS_DELETING, IJobManager.DOCSTATUS_READYFORPROCESSING, IJobManager.DOCSTATUS_READYFOREXPIRATION, + IJobManager.DOCSTATUS_WAITINGFORPROCESSING, IJobManager.DOCSTATUS_WAITINGFOREXPIRATION, IJobManager.DOCSTATUS_WAITINGFOREVER, + IJobManager.DOCSTATUS_HOPCOUNTEXCEEDED}; + } else { + matchingStatuses = new int[documentStatusTypes.length]; + k = 0; + while (k < matchingStatuses.length) { + matchingStatuses[k] = new Integer(documentStatusTypes[k]).intValue(); + k++; + } + } + HashMap matchingStatusesHash = new HashMap(); + k = 0; + while (k < matchingStatuses.length) { + Integer status = new Integer(matchingStatuses[k++]); + matchingStatusesHash.put(status, status); + } + + %> +
+ + + + + + + + + + <% + if (eligibleList != null) { + %> + + + <% + } else { + %> + + <% + } + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.Connection")%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.Jobs")%> + + +
+
+
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.TimeOffsetFromNowMinutes")%> + + +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.DocumentState")%> + + + +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.DocumentState")%> + + + +
+
+
+ <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.DocumentIdentifierMatch")%> + + + +
+
+
+ <% + if (statusConnection.length() > 0 && statusJobIdentifiers.length > 0) { + %> + " onClick="javascript:Go()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"documentstatus.ExecuteThisQuery")%>"/> + <% + } else { + %> + " onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"documentstatus.Continue")%>"/> + <% + } + %> +
+
+
+ <% + if (statusConnection.length() > 0) { + if (statusJobIdentifiers.length > 0) { + // Run the report. + + // First, we need to gather the sort order object. + String sortOrderString = variableContext.getParameter("sortorder"); + SortOrder sortOrder; + if (sortOrderString == null || sortOrderString.length() == 0) + sortOrder = new SortOrder(); + else + sortOrder = new SortOrder(sortOrderString); + + // Now, gather the column header that was clicked on (if any) + String clickedColumn = variableContext.getParameter("clickcolumn"); + if (clickedColumn != null && clickedColumn.length() > 0) + sortOrder.clickColumn(clickedColumn); + + // Gather the start + String startRowString = variableContext.getParameter("startrow"); + int startRow = 0; + if (startRowString != null && startRowString.length() > 0) + startRow = Integer.parseInt(startRowString); + + // Gather the max + String maxRowCountString = variableContext.getParameter("rowcount"); + int rowCount = 20; + if (maxRowCountString != null && maxRowCountString.length() > 0) + rowCount = Integer.parseInt(maxRowCountString); + + Long[] ourJobs = new Long[selectedJobs.size()]; + Iterator iter = selectedJobs.keySet().iterator(); + int zz = 0; + while (iter.hasNext()) { + ourJobs[zz++] = (Long) iter.next(); + } + + RegExpCriteria identifierMatchObject = null; + if (identifierMatch.length() > 0) + identifierMatchObject = new RegExpCriteria(identifierMatch, true); + StatusFilterCriteria criteria = new StatusFilterCriteria(ourJobs, nowTime, identifierMatchObject, matchingStates, matchingStatuses); + + IResultSet set = jobManager.genDocumentStatus(statusConnection, criteria, sortOrder, startRow, rowCount + 1); + + %> + + + + + + + + + + + + + + + + <% + zz = 0; + boolean hasMoreRows = (set.getRowCount() > rowCount); + int iterCount = hasMoreRows ? rowCount : set.getRowCount(); + while (zz < iterCount) { + IResultRow row = set.getRow(zz); + + // Translate column values into something that can be reasonably displayed. + // Note that the actual hard work of translating things to human-readable strings largely is done by the query itself; this is because + // we want to sort on the columns, so it has to be that way. + + String[] identifierBreakdown = org.apache.manifoldcf.ui.util.Formatter.formatString(row.getValue("identifier").toString(), 64, true, true); + Long scheduleTime = (Long) row.getValue("scheduled"); + String scheduleTimeString = ""; + if (scheduleTime != null) + scheduleTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(scheduleTime.longValue()); + String scheduledActionString = (String) row.getValue("action"); + if (scheduledActionString == null) + scheduledActionString = ""; + Long retryCount = (Long) row.getValue("retrycount"); + String retryCountString = ""; + if (retryCount != null) + retryCountString = retryCount.toString(); + Long retryLimit = (Long) row.getValue("retrylimit"); + String retryLimitString = ""; + if (retryLimit != null) + retryLimitString = org.apache.manifoldcf.ui.util.Formatter.formatTime(retryLimit.longValue()); + + %> + > + + + + + + + + + + <% + zz++; + } + %> +
+ <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.Identifier")%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.Job")%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.State")%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.Status")%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.Scheduled")%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.ScheduledAction")%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.RetryCount")%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.RetryLimit")%> + +
+ <% + int q = 0; + while (q < identifierBreakdown.length) { + %> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(identifierBreakdown[q++])%> + +
+ <% + } + %> +
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("job").toString())%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("state").toString())%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("status").toString())%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(scheduleTimeString)%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(scheduledActionString)%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(retryCountString)%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(retryLimitString)%> +
+ + + + + + + +
+ + <% + if (startRow == 0) { + %> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.Previous")%> + <% + } else { + %> + Previous + <% + } + %> + + + + <% + if (hasMoreRows == false) { + %> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.Next")%> + <% + } else { + %> + Next + <% + } + %> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.Rows")%> + + <%=Integer.toString(startRow)%>-<%=(hasMoreRows ? Integer.toString(startRow + rowCount - 1) : "END")%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.RowsPerPage")%> + + +
+ + <% + } else { + %> + + + + +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.PleaseSelectAtLeastOneJob")%> +
+ <% + } + } else { + %> + + + + +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.PleaseSelectaConnection")%> +
+ <% + } + %> +
+ <% + } else { + %> + + + + + + + +
+
+
<%=Messages.getBodyString(pageContext.getRequest().getLocale(), "documentstatus.PleaseTryAgainLater")%> +
+ <% + } + %> +