[Ils-source] r1612 - in branches/1.6/webapp: . WEB-INF WEB-INF/lib

scribe at crosswire.org scribe at crosswire.org
Mon Jul 30 13:43:15 MST 2018


Author: scribe
Date: 2018-07-30 13:43:15 -0700 (Mon, 30 Jul 2018)
New Revision: 1612

Modified:
   branches/1.6/webapp/WEB-INF/lib/ils.jar
   branches/1.6/webapp/WEB-INF/web.xml
   branches/1.6/webapp/admin_coursenew.jsp
   branches/1.6/webapp/admin_curricnew.jsp
   branches/1.6/webapp/admin_groupedit.jsp
   branches/1.6/webapp/admin_profile.jsp
   branches/1.6/webapp/admin_profilemanagement.jsp
   branches/1.6/webapp/admin_roleedit.jsp
   branches/1.6/webapp/admin_studentrecords.jsp
Log:
Dropped back to JDK 1.7 source conformance.


Modified: branches/1.6/webapp/WEB-INF/lib/ils.jar
===================================================================
(Binary files differ)

Modified: branches/1.6/webapp/WEB-INF/web.xml
===================================================================
--- branches/1.6/webapp/WEB-INF/web.xml	2018-07-29 11:35:12 UTC (rev 1611)
+++ branches/1.6/webapp/WEB-INF/web.xml	2018-07-30 20:43:15 UTC (rev 1612)
@@ -41,11 +41,11 @@
 		<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
 		<init-param>
 			<param-name>compilerSourceVM</param-name>
-			<param-value>1.8</param-value>
+			<param-value>1.7</param-value>
 		</init-param>
 		<init-param>
 			<param-name>compilerTargetVM</param-name>
-			<param-value>1.8</param-value>
+			<param-value>1.7</param-value>
 		</init-param>
 		<init-param>
 			<param-name>fork</param-name>
@@ -59,7 +59,7 @@
 	</servlet>
 
     <servlet>
-        <servlet-name>default</servlet-name>
+        <servlet-name>default2</servlet-name>
         <servlet-class>
             org.apache.catalina.servlets.DefaultServlet
         </servlet-class>

Modified: branches/1.6/webapp/admin_coursenew.jsp
===================================================================
--- branches/1.6/webapp/admin_coursenew.jsp	2018-07-29 11:35:12 UTC (rev 1611)
+++ branches/1.6/webapp/admin_coursenew.jsp	2018-07-30 20:43:15 UTC (rev 1612)
@@ -5,7 +5,6 @@
 <%@ page import="com.resolutions.ils.*" %>
 <%@ page import="com.resolutions.ils.data.*" %>
 <%@ page import="java.util.Comparator" %>
-<%@ page import="java.util.stream.Collectors" %>
 <%@ page import="java.util.Date" %>
 <%@ page import="java.io.File" %>
 <%@ page import="java.util.List" %>
@@ -555,7 +554,7 @@
                 });
         }
     }
-    List<Integer> inCourse = Group.getCourseGroups(ilsSession, current.getCourseID()).stream().map(Group::getGroupID).collect(Collectors.toList());
+    List<Integer> inCourse = new ArrayList<Integer>(); for (Group g : Group.getCourseGroups(ilsSession, current.getCourseID())) { inCourse.add(g.getGroupID()); }
 %>
 <form name="courserolesave" method="post" action="admin_coursenew.jsp">
     <input type="hidden" name="action" value="SaveRoles"/>

Modified: branches/1.6/webapp/admin_curricnew.jsp
===================================================================
--- branches/1.6/webapp/admin_curricnew.jsp	2018-07-29 11:35:12 UTC (rev 1611)
+++ branches/1.6/webapp/admin_curricnew.jsp	2018-07-30 20:43:15 UTC (rev 1612)
@@ -5,7 +5,7 @@
 <%@ page import="com.resolutions.ils.*" %>
 <%@ page import="com.resolutions.ils.data.*" %>
 <%@ page import="java.util.List" %>
-<%@ page import="java.util.stream.Collectors" %>
+<%@ page import="java.util.ArrayList" %>
 <%@ page import="java.util.HashMap" %>
 <%@ page import="java.util.Comparator" %>
 <%@ page import="java.util.Date" %>
@@ -422,7 +422,7 @@
         }
     }
 
-    List<Integer> inCourse = Group.getCourseGroups(ilsSession, current.getCourseID()).stream().map(Group::getGroupID).collect(Collectors.toList());
+    List<Integer> inCourse = new ArrayList<Integer>(); for (Group g : Group.getCourseGroups(ilsSession, current.getCourseID())) { inCourse.add(g.getGroupID()); }
 %>
 <form name="courserolesave" method="post" action="admin_curricnew.jsp">
     <input type="hidden" name="action" value="SaveRoles"/>

Modified: branches/1.6/webapp/admin_groupedit.jsp
===================================================================
--- branches/1.6/webapp/admin_groupedit.jsp	2018-07-29 11:35:12 UTC (rev 1611)
+++ branches/1.6/webapp/admin_groupedit.jsp	2018-07-30 20:43:15 UTC (rev 1612)
@@ -5,8 +5,8 @@
 <%@ page import="com.resolutions.ils.*" %>
 <%@ page import="com.resolutions.ils.data.*" %>
 <%@ page import="java.util.List" %>
+<%@ page import="java.util.ArrayList" %>
 <%@ page import="java.util.Comparator" %>
-<%@ page import="java.util.stream.Collectors" %>
 <%@ page import="java.util.Date" %>
 <%@ page import="java.io.File" %>
 <%@ page import="java.net.URL" %>
@@ -157,7 +157,7 @@
         }
     }
     courses.addAll(Course.getAllCurricula(ilsSession));
-    List<Integer> inGroup = Course.getGroupCourses(ilsSession, current.getGroupID()).stream().map(Course::getCourseID).collect(Collectors.toList());
+    List<Integer> inGroup = new ArrayList<Integer>(); for (Course c : Course.getGroupCourses(ilsSession, current.getGroupID())) { inGroup.add(c.getCourseID()); }
 %>
                                             </p>
     <form name="groupcoursesave" method="post" action="admin_groupedit.jsp">

Modified: branches/1.6/webapp/admin_profile.jsp
===================================================================
--- branches/1.6/webapp/admin_profile.jsp	2018-07-29 11:35:12 UTC (rev 1611)
+++ branches/1.6/webapp/admin_profile.jsp	2018-07-30 20:43:15 UTC (rev 1612)
@@ -7,7 +7,6 @@
 <%@ page import="com.resolutions.ils.*" %>
 <%@ page import="com.resolutions.ils.data.*" %>
 <%@ page import="java.util.List" %>
-<%@ page import="java.util.stream.Collectors" %>
 <%@ page import="java.util.Set" %>
 <%@ page import="java.util.Arrays" %>
 <%@ page import="java.util.ArrayList" %>
@@ -69,13 +68,15 @@
 	List<Integer> currentRoles = null;
 	List<Group> tmp = Group.getUserGroups(ilsSession, Group.GROUPTYPE_ROLE, current.getUserProfileID());
 	if (tmp != null && !tmp.isEmpty()) {
-		currentRoles = tmp.stream().map(Group::getGroupID).collect(Collectors.toList());
+		currentRoles = new ArrayList<Integer>();
+		for (Group g: tmp) currentRoles.add(g.getGroupID());
 		if (currentRoles.isEmpty()) currentRoles = null;
 	}
 	List<Integer> currentLocations = null;
 	tmp = Group.getUserGroups(ilsSession, Group.GROUPTYPE_LOCATION, current.getUserProfileID());
 	if (tmp != null && tmp.size() > 0) {
-		currentLocations = tmp.stream().map(Group::getGroupID).collect(Collectors.toList());
+		currentLocations = new ArrayList<Integer>();
+		for (Group g: tmp) currentLocations.add(g.getGroupID());
 		if (currentLocations.isEmpty()) currentLocations = null;
 	}
 
@@ -96,18 +97,20 @@
 	String vals[] = request.getParameterValues("role");
 	List<Integer> requestedRoles = null;
 	if (vals != null && vals.length > 0) {
-		requestedRoles = Arrays.stream(vals)
-			.map(s -> { try { return Integer.parseInt(s); } catch(Exception e) { return null; }})
-			.filter(i -> i != null).collect(Collectors.toList());
+		requestedRoles = new ArrayList<Integer>();
+		for (String s : vals) {
+			try { requestedRoles.add(Integer.parseInt(s)); } catch(Exception e) {}
+		}
 		if (requestedRoles.isEmpty()) requestedRoles = null;
 	}
 
 	vals = request.getParameterValues("location");
 	List<Integer> requestedLocations = null;
 	if (vals != null && vals.length > 0) {
-		requestedLocations = Arrays.stream(vals)
-			.map(s -> { try { return Integer.parseInt(s); } catch(Exception e) { return null; }})
-			.filter(i -> i != null).collect(Collectors.toList());
+		requestedLocations = new ArrayList<Integer>();
+		for (String s : vals) {
+			try { requestedLocations.add(Integer.parseInt(s)); } catch(Exception e) {}
+		}
 		if (requestedLocations.isEmpty()) requestedLocations = null;
 	}
 
@@ -312,14 +315,16 @@
 	currentRoles = null;
 	tmp = Group.getUserGroups(ilsSession, Group.GROUPTYPE_ROLE, current.getUserProfileID());
 	if (tmp != null && !tmp.isEmpty()) {
-		currentRoles = tmp.stream().map(Group::getGroupID).collect(Collectors.toList());
+		currentRoles = new ArrayList<Integer>();
+		for (Group g: tmp) currentRoles.add(g.getGroupID());
 		if (currentRoles.isEmpty()) currentRoles = null;
 	}
 
 	currentLocations = null;
 	tmp = Group.getUserGroups(ilsSession, Group.GROUPTYPE_LOCATION, current.getUserProfileID());
 	if (tmp != null && !tmp.isEmpty()) {
-		currentLocations = tmp.stream().map(Group::getGroupID).collect(Collectors.toList());
+		currentLocations = new ArrayList<Integer>();
+		for (Group g: tmp) currentLocations.add(g.getGroupID());
 		if (currentLocations.isEmpty()) currentLocations = null;
 	}
 
@@ -958,7 +963,7 @@
 			)
 		)
 	) {
-	List<Integer> inMgrGroup = Group.getManagerGroups(ilsSession, Group.GROUPTYPE_LOCATION, current.getUserProfileID()).stream().map(Group::getGroupID).collect(Collectors.toList());
+	List<Integer> inMgrGroup = new ArrayList<Integer>(); for (Group g : Group.getManagerGroups(ilsSession, Group.GROUPTYPE_LOCATION, current.getUserProfileID())) inMgrGroup.add(g.getGroupID());
 %>
 
 

Modified: branches/1.6/webapp/admin_profilemanagement.jsp
===================================================================
--- branches/1.6/webapp/admin_profilemanagement.jsp	2018-07-29 11:35:12 UTC (rev 1611)
+++ branches/1.6/webapp/admin_profilemanagement.jsp	2018-07-30 20:43:15 UTC (rev 1612)
@@ -11,7 +11,6 @@
 <%@ page import="java.util.List" %>
 <%@ page import="java.util.ArrayList" %>
 <%@ page import="java.util.Arrays" %>
-<%@ page import="java.util.stream.Collectors" %>
 <%@ page import="java.util.Map" %>
 <%@ page import="java.util.HashMap" %>
 <%@ page import="java.lang.Comparable" %>
@@ -164,9 +163,11 @@
     if ("Send Email To Selected Results".equals(modaction)) {
         String []profids = request.getParameterValues("profid");
         if (profids != null) {
-            List<UserProfile> users = Arrays.stream(profids).map(Integer::parseInt).map(i -> UserProfile.getUserProfile(ilsSession, i)).collect(Collectors.toList());
-	        session.setAttribute("lastDataset", users);
-	        session.setAttribute("lastDatasetType", "PMuserProfiles");
+            List<UserProfile> users = new ArrayList<UserProfile>(); for (String pid : profids) {
+		try { users.add(UserProfile.getUserProfile(ilsSession, Integer.parseInt(pid))); } catch (Exception e) {}
+	    }
+	    session.setAttribute("lastDataset", users);
+	    session.setAttribute("lastDatasetType", "PMuserProfiles");
             out.print("<html><head><META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=admin_sendemail.jsp\"></head></html>");
             return;
         }

Modified: branches/1.6/webapp/admin_roleedit.jsp
===================================================================
--- branches/1.6/webapp/admin_roleedit.jsp	2018-07-29 11:35:12 UTC (rev 1611)
+++ branches/1.6/webapp/admin_roleedit.jsp	2018-07-30 20:43:15 UTC (rev 1612)
@@ -5,9 +5,9 @@
 <%@ page import="com.resolutions.ils.*" %>
 <%@ page import="com.resolutions.ils.data.*" %>
 <%@ page import="java.util.List" %>
+<%@ page import="java.util.ArrayList" %>
 <%@ page import="java.util.Comparator" %>
 <%@ page import="java.util.Arrays" %>
-<%@ page import="java.util.stream.Collectors" %>
 <%@ page import="java.util.Date" %>
 <%@ page import="java.io.File" %>
 <%@ page import="java.net.URL" %>
@@ -74,7 +74,9 @@
         String []courseids = request.getParameterValues("courseid");
         if (courseids != null) {
 		final int gid = current.getGroupID();
-		Arrays.stream(courseids).map(Integer::parseInt).forEach(cid -> Group.addCourseGroup(ilsSession, gid, cid));
+		for (String cid : courseids) {
+			try { Group.addCourseGroup(ilsSession, gid, Integer.parseInt(cid)); } catch (Exception e) {}
+		}
         }
         statusMsg = "Your changes have been saved.";
     }
@@ -151,7 +153,7 @@
         }
     }
     courses.addAll(Course.getAllCurricula(ilsSession));
-    List<Integer> inGroup = Course.getGroupCourses(ilsSession, current.getGroupID()).stream().map(Course::getCourseID).collect(Collectors.toList());
+    List<Integer> inGroup = new ArrayList<Integer>(); for (Course c : Course.getGroupCourses(ilsSession, current.getGroupID())) inGroup.add(c.getCourseID()); 
 %>
                             </p>
     <form name="groupcoursesave" method="post" action="admin_roleedit.jsp">

Modified: branches/1.6/webapp/admin_studentrecords.jsp
===================================================================
--- branches/1.6/webapp/admin_studentrecords.jsp	2018-07-29 11:35:12 UTC (rev 1611)
+++ branches/1.6/webapp/admin_studentrecords.jsp	2018-07-30 20:43:15 UTC (rev 1612)
@@ -6,7 +6,6 @@
 <%@ page import="java.util.List" %>
 <%@ page import="java.util.ArrayList" %>
 <%@ page import="java.util.Set" %>
-<%@ page import="java.util.stream.Collectors" %>
 <%@ page import="java.util.HashSet" %>
 <%@ page import="java.util.Comparator" %>
 <%@ page import="java.util.Date" %>
@@ -362,7 +361,8 @@
 
     if (requestedLocations == null) {
         List<Group> tmpg = Group.getUserGroups(ilsSession, Group.GROUPTYPE_LOCATION, user.getUserProfileID());
-        requestedLocations = ((tmpg != null) && (tmpg.size()>0))? tmpg.stream().map(g -> g.getGroupID()).collect(Collectors.toSet()): null;
+        requestedLocations = null;
+        if ((tmpg != null) && (tmpg.size()>0)) { requestedLocations = new HashSet(); for (Group g : tmpg) requestedLocations.add(g.getGroupID()); }
         if (user.getUserProfileAccessLevel() >= UserProfile.ACCESS_MANAGER) {
             requestedLocations = null;
         }




More information about the Ils-source mailing list