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 AA73717F26 for ; Sat, 13 Jun 2015 20:28:35 +0000 (UTC) Received: (qmail 21213 invoked by uid 500); 13 Jun 2015 20:28:35 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 21082 invoked by uid 500); 13 Jun 2015 20:28:35 -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 20619 invoked by uid 99); 13 Jun 2015 20:28:35 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Jun 2015 20:28:35 +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 360D5AC0A57 for ; Sat, 13 Jun 2015 20:28:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1685321 [14/16] - /manifoldcf/trunk/framework/crawler-ui/src/main/webapp/ Date: Sat, 13 Jun 2015 20:28:33 -0000 To: commits@manifoldcf.apache.org From: kishore@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150613202835.360D5AC0A57@hades.apache.org> Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp?rev=1685321&r1=1685320&r2=1685321&view=diff ============================================================================== --- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp (original) +++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/simplereport.jsp Sat Jun 13 20:28:32 2015 @@ -30,97 +30,97 @@ boolean maintenanceUnderway = org.apache - - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ApacheManifoldCFSimpleHistoryReport")%> - - - + //--> + @@ -131,653 +131,653 @@ boolean maintenanceUnderway = org.apache -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.SimpleHistoryReport")%>

+

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.SimpleHistoryReport")%>

<% if (maintenanceUnderway == false) { - int k; + int k; - // Read the parameters. - String reportConnection = variableContext.getParameter("reportconnection"); - if (reportConnection == null) - reportConnection = ""; - String[] reportActivities; - if (variableContext.getParameter("reportactivities_posted") != null) - { - reportActivities = variableContext.getParameterValues("reportactivities"); - if (reportActivities == null) - reportActivities = new String[0]; - } - else - reportActivities = null; - - // Get the current time, so we can fill in default values where possible. - long currentTime = System.currentTimeMillis(); - - Long startTime = null; - Long endTime = null; - - // Get start time, if selected - String startYear = variableContext.getParameter("reportstartyear"); - String startMonth = variableContext.getParameter("reportstartmonth"); - String startDay = variableContext.getParameter("reportstartday"); - String startHour = variableContext.getParameter("reportstarthour"); - String startMinute = variableContext.getParameter("reportstartminute"); - - // Get end time, if selected. - String endYear = variableContext.getParameter("reportendyear"); - String endMonth = variableContext.getParameter("reportendmonth"); - String endDay = variableContext.getParameter("reportendday"); - String endHour = variableContext.getParameter("reportendhour"); - String endMinute = variableContext.getParameter("reportendminute"); - - if (startYear == null && startMonth == null && startDay == null && startHour == null && startMinute == null && - endYear == null && endMonth == null && endDay == null && endHour == null && endMinute == null) - { - // Nobody has selected a time range yet. Pick the last hour. - endTime = null; - startTime = new Long(currentTime - 1000L * 60L * 60L); - } - else - { - // Get start time, if selected - if (startYear == null) - startYear = ""; - if (startMonth == null) - startMonth = ""; - if (startDay == null) - startDay = ""; - if (startHour == null) - startHour = ""; - if (startMinute == null) - startMinute = ""; - - // Get end time, if selected. - if (endYear == null) - endYear = ""; - if (endMonth == null) - endMonth = ""; - if (endDay == null) - endDay = ""; - if (endHour == null) - endHour = ""; - if (endMinute == null) - endMinute = ""; - - if (startYear.length() == 0 || startMonth.length() == 0 || startDay.length() == 0 || startHour.length() == 0 || startMinute.length() == 0) - { - // Undetermined start - startTime = null; - } - else - { - // Convert the specified times to a long. - Calendar c = new GregorianCalendar(); - c.set(Calendar.YEAR,Integer.parseInt(startYear)); - c.set(Calendar.MONTH,Integer.parseInt(startMonth)); - c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(startDay) + 1); - c.set(Calendar.HOUR_OF_DAY,Integer.parseInt(startHour)); - c.set(Calendar.MINUTE,Integer.parseInt(startMinute)); - startTime = new Long(c.getTimeInMillis()); - } - if (endYear.length() == 0 || endMonth.length() == 0 || endDay.length() == 0 || endHour.length() == 0 || endMinute.length() == 0) - { - // Undetermined end - endTime = null; - } - else - { - // Convert the specified times to a long. - Calendar c = new GregorianCalendar(); - c.set(Calendar.YEAR,Integer.parseInt(endYear)); - c.set(Calendar.MONTH,Integer.parseInt(endMonth)); - c.set(Calendar.DAY_OF_MONTH,Integer.parseInt(endDay) + 1); - c.set(Calendar.HOUR_OF_DAY,Integer.parseInt(endHour)); - c.set(Calendar.MINUTE,Integer.parseInt(endMinute)); - endTime = new Long(c.getTimeInMillis()); - } - } - - // Now, turn the startTime and endTime back into fielded values. The values will be blank where there is no limit. - if (startTime == null) - { - startYear = ""; - startMonth = ""; - startDay = ""; - startHour = ""; - startMinute = ""; - } - else - { - // Do the conversion - Calendar c = new GregorianCalendar(); - c.setTimeInMillis(startTime.longValue()); - startYear = Integer.toString(c.get(Calendar.YEAR)); - startMonth = Integer.toString(c.get(Calendar.MONTH)); - startDay = Integer.toString(c.get(Calendar.DAY_OF_MONTH)-1); - startHour = Integer.toString(c.get(Calendar.HOUR_OF_DAY)); - startMinute = Integer.toString(c.get(Calendar.MINUTE)); - } - - if (endTime == null) - { - endYear = ""; - endMonth = ""; - endDay = ""; - endHour = ""; - endMinute = ""; - } - else - { - // Do the conversion - Calendar c = new GregorianCalendar(); - c.setTimeInMillis(endTime.longValue()); - endYear = Integer.toString(c.get(Calendar.YEAR)); - endMonth = Integer.toString(c.get(Calendar.MONTH)); - endDay = Integer.toString(c.get(Calendar.DAY_OF_MONTH)-1); - endHour = Integer.toString(c.get(Calendar.HOUR_OF_DAY)); - endMinute = Integer.toString(c.get(Calendar.MINUTE)); - } - - // Get the entity match string. - String entityMatch = variableContext.getParameter("reportentitymatch"); - if (entityMatch == null) - entityMatch = ""; - - // Get the resultcode match string. - String resultCodeMatch = variableContext.getParameter("reportresultcodematch"); - if (resultCodeMatch == null) - resultCodeMatch = ""; - - - // Read the other data we need. - IRepositoryConnectionManager connMgr = RepositoryConnectionManagerFactory.make(threadContext); - IRepositoryConnection[] connList = connMgr.getAllConnections(); - - // Query the legal list of activities. This will depend on the connection has been chosen, if any. - Map selectedActivities = null; - String[] activityList = null; - if (reportConnection.length() > 0) - { - activityList = org.apache.manifoldcf.crawler.system.ManifoldCF.getActivitiesList(threadContext,reportConnection); - if (activityList == null) - reportConnection = ""; - else - { - selectedActivities = new HashMap(); - String[] activitiesToNote; - int j = 0; - if (reportActivities == null) - activitiesToNote = activityList; - else - activitiesToNote = reportActivities; - - while (j < activitiesToNote.length) - { - String activity = activitiesToNote[j++]; - selectedActivities.put(activity,activity); - } - } - } - -%> - -
- - - - - - - - -<% - if (reportConnection.length() > 0) - { -%> - -<% - } - else - { -%> - -<% - } -%> - - - - - - - - + + + + + + + + + + + + + + + + + + +

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

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.StartTime")%> - + + + + + + + +<% + if (reportConnection.length() > 0) + { +%> + +<% + } + else + { +%> + +<% + } +%> + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Connection")%> + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Activities")%> + + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.StartTime")%> + : - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.on")%> - - , - -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.EndTime")%> - : + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.on")%> + + , + +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.EndTime")%> + : - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.on")%> - - , - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.EntityMatch")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ResultCodeMatch")%>

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

-<% - if (reportConnection.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); - - String[] ourActivities = new String[selectedActivities.size()]; - Iterator iter = selectedActivities.keySet().iterator(); - int zz = 0; - while (iter.hasNext()) - { - ourActivities[zz++] = (String)iter.next(); - } - - RegExpCriteria entityMatchObject = null; - if (entityMatch.length() > 0) - entityMatchObject = new RegExpCriteria(entityMatch,true); - RegExpCriteria resultCodeMatchObject = null; - if (resultCodeMatch.length() > 0) - resultCodeMatchObject = new RegExpCriteria(resultCodeMatch,true); - FilterCriteria criteria = new FilterCriteria(ourActivities,startTime,endTime,entityMatchObject,resultCodeMatchObject); - - IResultSet set = connMgr.genHistorySimple(reportConnection,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); - String startTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(Converter.asLong(row.getValue("starttime"))); - String resultCode = ""; - Object resultCodeObject = row.getValue("resultcode"); - if (resultCodeObject != null) - resultCode = resultCodeObject.toString(); - String resultDescription = ""; - Object resultDescriptionObject = row.getValue("resultdesc"); - resultDescriptionObject = row.getValue("resultdesc"); - if (resultDescriptionObject != null) - resultDescription = resultDescriptionObject.toString(); - String[] identifierBreakdown = org.apache.manifoldcf.ui.util.Formatter.formatString(row.getValue("identifier").toString(),64,true,true); -%> - > - - - - - - - - -<% - zz++; - } -%> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.StartTime")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Activity")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Identifier")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ResultCode")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Bytes")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Time")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ResultDescription")%>
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(startTimeString)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("activity").toString())%> -<% - int q = 0; - while (q < identifierBreakdown.length) - { -%> - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(identifierBreakdown[q++])%>
-<% - } -%> -
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(resultCode)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("bytes").toString())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("elapsedtime").toString())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(resultDescription)%>
- - - - - - -
- -<% - if (startRow == 0) - { -%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Previous")%> -<% - } - else - { -%> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Previous")%> -<% - } -%> - - -<% - if (hasMoreRows == false) - { -%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Next")%> -<% - } - else - { -%> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Next")%> -<% - } -%> - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Rows")%> - <%=Integer.toString(startRow)%>-<%=(hasMoreRows?Integer.toString(startRow+rowCount-1):"END")%> - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.RowsPerPage")%> - -
- -<% - } - else - { + : + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.on")%> + + , + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.EntityMatch")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ResultCodeMatch")%>

+<% + if (reportConnection.length() > 0) + { +%> + " onClick="javascript:Go()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"simplereport.ExecuteThisQuery")%>"/> +<% + } + else + { +%> + " onClick="javascript:Continue()" alt="<%=Messages.getAttributeString(pageContext.getRequest().getLocale(),"simplereport.Continue")%>"/> +<% + } +%> +

+<% + if (reportConnection.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); + + String[] ourActivities = new String[selectedActivities.size()]; + Iterator iter = selectedActivities.keySet().iterator(); + int zz = 0; + while (iter.hasNext()) + { + ourActivities[zz++] = (String)iter.next(); + } + + RegExpCriteria entityMatchObject = null; + if (entityMatch.length() > 0) + entityMatchObject = new RegExpCriteria(entityMatch,true); + RegExpCriteria resultCodeMatchObject = null; + if (resultCodeMatch.length() > 0) + resultCodeMatchObject = new RegExpCriteria(resultCodeMatch,true); + FilterCriteria criteria = new FilterCriteria(ourActivities,startTime,endTime,entityMatchObject,resultCodeMatchObject); + + IResultSet set = connMgr.genHistorySimple(reportConnection,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); + String startTimeString = org.apache.manifoldcf.ui.util.Formatter.formatTime(Converter.asLong(row.getValue("starttime"))); + String resultCode = ""; + Object resultCodeObject = row.getValue("resultcode"); + if (resultCodeObject != null) + resultCode = resultCodeObject.toString(); + String resultDescription = ""; + Object resultDescriptionObject = row.getValue("resultdesc"); + resultDescriptionObject = row.getValue("resultdesc"); + if (resultDescriptionObject != null) + resultDescription = resultDescriptionObject.toString(); + String[] identifierBreakdown = org.apache.manifoldcf.ui.util.Formatter.formatString(row.getValue("identifier").toString(),64,true,true); +%> + > + + + + + + + + +<% + zz++; + } +%> +
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.StartTime")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Activity")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Identifier")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ResultCode")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Bytes")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Time")%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.ResultDescription")%>
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(startTimeString)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("activity").toString())%> +<% + int q = 0; + while (q < identifierBreakdown.length) + { +%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(identifierBreakdown[q++])%>
+<% + } +%> +
<%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(resultCode)%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("bytes").toString())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(row.getValue("elapsedtime").toString())%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(resultDescription)%>
+ + + + + + +
+ +<% + if (startRow == 0) + { +%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Previous")%> +<% + } + else + { +%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Previous")%> +<% + } +%> + + +<% + if (hasMoreRows == false) + { +%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Next")%> +<% + } + else + { +%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Next")%> +<% + } +%> + + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.Rows")%> + <%=Integer.toString(startRow)%>-<%=(hasMoreRows?Integer.toString(startRow+rowCount-1):"END")%> + + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.RowsPerPage")%> + +
+ +<% + } + else + { %> -
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.PleaseSelectAConnection")%>
+
<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.PleaseSelectAConnection")%>
<% - } + } %> -
+ <% } else { %> - - - -

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

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"simplereport.PleaseTryAgainLater")%>
<% } %> Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewauthority.jsp URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewauthority.jsp?rev=1685321&r1=1685320&r2=1685321&view=diff ============================================================================== --- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewauthority.jsp (original) +++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewauthority.jsp Sat Jun 13 20:28:32 2015 @@ -28,27 +28,27 @@ - - - - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.ApacheManifoldCFViewAuthorityConnectionStatus")%> - - - + //--> + @@ -58,166 +58,166 @@ -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.ViewAuthorityConnectionStatus")%>

-
- - - +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.ViewAuthorityConnectionStatus")%>

+ + + + <% try { - IAuthorityConnectionManager manager = AuthorityConnectionManagerFactory.make(threadContext); - IAuthorityConnectorManager connectorManager = AuthorityConnectorManagerFactory.make(threadContext); - IAuthorityConnectorPool authorityConnectorPool = AuthorityConnectorPoolFactory.make(threadContext); - String connectionName = variableContext.getParameter("connname"); - IAuthorityConnection connection = manager.load(connectionName); - if (connection == null) - { - throw new ManifoldCFException("No such authority: '"+connectionName+"'"); - } - else - { - String description = connection.getDescription(); - if (description == null) - description = ""; - String className = connection.getClassName(); - String connectorName = connectorManager.getDescription(className); - if (connectorName == null) - connectorName = className + Messages.getString(pageContext.getRequest().getLocale(),"viewauthority.uninstalled"); - int maxCount = connection.getMaxConnections(); - String prereq = connection.getPrerequisiteMapping(); - String authDomain = connection.getAuthDomain(); - if (authDomain == null) - authDomain = ""; - String groupName = connection.getAuthGroup(); - if (groupName == null) - groupName = ""; - - ConfigParams parameters = connection.getConfigParams(); - - // Do stuff so we can call out to display the parameters - //String JSPFolder = AuthorityConnectorFactory.getJSPFolder(threadContext,className); - //threadContext.save("Parameters",parameters); - - // Now, test the connection. - String connectionStatus; - try - { - IAuthorityConnector c = authorityConnectorPool.grab(connection); - if (c == null) - { - connectionStatus = Messages.getString(pageContext.getRequest().getLocale(),"viewauthority.Connectorisnotinstalled"); - } - else - { - try - { - connectionStatus = c.check(); - } - finally - { - authorityConnectorPool.release(connection,c); - } - } - } - catch (ManifoldCFException e) - { - connectionStatus = Messages.getString(pageContext.getRequest().getLocale(),"viewauthority.Threwexception")+" '"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(e.getMessage())+"'"; - } -%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.NameColon")%><%=""%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionName)%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.DescriptionColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.AuthorityTypeColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.MaxConnectionsColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(Integer.toString(maxCount))%>

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.AuthorityGroupColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(groupName)%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.AuthorizationDomainColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(authDomain)%>

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.PrerequisiteUserMappingColon")%> -<% - if (prereq != null) - { -%> - <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(prereq)%> -<% - } - else - { -%> - <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.NoPrerequisites")%> -<% - } -%> -

-<% - AuthorityConnectorFactory.viewConfiguration(threadContext,className,new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),parameters); -%> - -

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.ConnectionStatusColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionStatus)%>

- "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.Refresh")%> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.Edit")%> - "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.Delete")%> -
+ IAuthorityConnectionManager manager = AuthorityConnectionManagerFactory.make(threadContext); + IAuthorityConnectorManager connectorManager = AuthorityConnectorManagerFactory.make(threadContext); + IAuthorityConnectorPool authorityConnectorPool = AuthorityConnectorPoolFactory.make(threadContext); + String connectionName = variableContext.getParameter("connname"); + IAuthorityConnection connection = manager.load(connectionName); + if (connection == null) + { + throw new ManifoldCFException("No such authority: '"+connectionName+"'"); + } + else + { + String description = connection.getDescription(); + if (description == null) + description = ""; + String className = connection.getClassName(); + String connectorName = connectorManager.getDescription(className); + if (connectorName == null) + connectorName = className + Messages.getString(pageContext.getRequest().getLocale(),"viewauthority.uninstalled"); + int maxCount = connection.getMaxConnections(); + String prereq = connection.getPrerequisiteMapping(); + String authDomain = connection.getAuthDomain(); + if (authDomain == null) + authDomain = ""; + String groupName = connection.getAuthGroup(); + if (groupName == null) + groupName = ""; + + ConfigParams parameters = connection.getConfigParams(); + + // Do stuff so we can call out to display the parameters + //String JSPFolder = AuthorityConnectorFactory.getJSPFolder(threadContext,className); + //threadContext.save("Parameters",parameters); + + // Now, test the connection. + String connectionStatus; + try + { + IAuthorityConnector c = authorityConnectorPool.grab(connection); + if (c == null) + { + connectionStatus = Messages.getString(pageContext.getRequest().getLocale(),"viewauthority.Connectorisnotinstalled"); + } + else + { + try + { + connectionStatus = c.check(); + } + finally + { + authorityConnectorPool.release(connection,c); + } + } + } + catch (ManifoldCFException e) + { + connectionStatus = Messages.getString(pageContext.getRequest().getLocale(),"viewauthority.Threwexception")+" '"+org.apache.manifoldcf.ui.util.Encoder.bodyEscape(e.getMessage())+"'"; + } +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.NameColon")%><%=""%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionName)%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.DescriptionColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(description)%>

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.AuthorityTypeColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectorName)%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.MaxConnectionsColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(Integer.toString(maxCount))%>

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.AuthorityGroupColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(groupName)%><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.AuthorizationDomainColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(authDomain)%>

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.PrerequisiteUserMappingColon")%> +<% + if (prereq != null) + { +%> + <%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(prereq)%> +<% + } + else + { +%> + <%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.NoPrerequisites")%> +<% + } +%> +

+<% + AuthorityConnectorFactory.viewConfiguration(threadContext,className,new org.apache.manifoldcf.ui.jsp.JspWrapper(out,adminprofile),pageContext.getRequest().getLocale(),parameters); +%> + +

<%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.ConnectionStatusColon")%><%=org.apache.manifoldcf.ui.util.Encoder.bodyEscape(connectionStatus)%>

+ "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.Refresh")%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.Edit")%> + "><%=Messages.getBodyString(pageContext.getRequest().getLocale(),"viewauthority.Delete")%> +
<% - } + } } catch (ManifoldCFException e) { - e.printStackTrace(); - variableContext.setParameter("text",e.getMessage()); - variableContext.setParameter("target","listauthorities.jsp"); + e.printStackTrace(); + variableContext.setParameter("text",e.getMessage()); + variableContext.setParameter("target","listauthorities.jsp"); %> - + <% } %> - +