geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r549707 - in /geronimo/server/trunk: applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/ modules/geronimo-system/src/...
Date Fri, 22 Jun 2007 04:54:06 GMT
Author: dwoods
Date: Thu Jun 21 21:54:05 2007
New Revision: 549707

URL: http://svn.apache.org/viewvc?view=rev&rev=549707
Log:
GERONIMO-2757 Enhance plugin schema to allow for multiple versions of a plugin - Part 2

Modified:
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp
    geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
    geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginMetadata.java

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java?view=diff&rev=549707&r1=549706&r2=549707
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ExportConfigHandler.java
Thu Jun 21 21:54:05 2007
@@ -85,14 +85,19 @@
                 if (ver.getModuleId() != null) {
                     request.setAttribute(prefix +"ModuleID", ver.getModuleId().toString());
                 }
-                if (ver.getRepository() != null) {
-                    request.setAttribute(prefix +"Repo", ver.getRepository());
+                String[] repos = ver.getRepository();
+                if (repos != null && repos.length > 0) {
+                	for ( int j=0; j < repos.length; j++ ) {
+                		String repo = repos[j];
+                		String prefixes = "repo" + (j+1);
+                		request.setAttribute(prefixes, repo);
+                	}
                 }
-                PluginMetadata.Prerequisite[] reqs = ver.getPrerequisite();
+                PluginMetadata.Prerequisite[] reqs = ver.getPreReqs();
                 if(reqs != null && reqs.length > 0) {
-                    for (int j = 0; i < reqs.length; i++) {
-                        PluginMetadata.Prerequisite req = reqs[i];
-                        String prefixes = "prereq" + (i+1);
+                    for (int j = 0; j < reqs.length; j++) {
+                        PluginMetadata.Prerequisite req = reqs[j];
+                        String prefixes = "prereq" + (j+1);
                         request.setAttribute(prefixes, req.getModuleId().toString());
                         if (req.getResourceType() != null) {
                             request.setAttribute(prefixes +"type", req.getResourceType());
@@ -161,11 +166,23 @@
         	String version = request.getParameter(prefix+"Version");
         	String moduleId = request.getParameter(prefix+"ModuleID");
         	String repository = request.getParameter(prefix+"Repo");
+        	List repos = new ArrayList();
+        	int repoCounter = 1;
+        	while(true) {
+        		String prefixes = "repo" + repoCounter;
+        		++repoCounter;
+        		String versionRepo = request.getParameter(prefixes);
+        		if(versionRepo == null || versionRepo.trim().equals("")) {
+        			break;
+        		}
+        		repos.add(versionRepo);
+        	}
+        		
         	int preCounter = 1;
         	List prereqs = new ArrayList();
             while(true) {
                 String prefixes = "prereq" + preCounter;
-                ++counter;
+                ++preCounter;
                 String prereq = request.getParameter(prefixes);
                 if(prereq == null || prereq.trim().equals("")) {
                     break;
@@ -180,7 +197,7 @@
                 }
                 prereqs.add(new PluginMetadata.Prerequisite(Artifact.create(id), false, type,
desc));
             }
-            gerVersions.add(new PluginMetadata.geronimoVersions(version, moduleId, repository,
(PluginMetadata.Prerequisite[])prereqs.toArray(new PluginMetadata.Prerequisite[prereqs.size()])));
     	
+            gerVersions.add(new PluginMetadata.geronimoVersions(version, moduleId, (String[])repos.toArray(new
String[repos.size()]), (PluginMetadata.Prerequisite[])prereqs.toArray(new PluginMetadata.Prerequisite[prereqs.size()])));
     	
         }
         metadata.setGeronimoVersions((PluginMetadata.geronimoVersions[])gerVersions.toArray(new
PluginMetadata.geronimoVersions[gerVersions.size()]));
         List prereqs = new ArrayList();

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java?view=diff&rev=549707&r1=549706&r2=549707
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/GeronimoAsMavenServlet.java
Thu Jun 21 21:54:05 2007
@@ -321,9 +321,15 @@
         if (ver.getModuleId() != null){
         	createText(doc, ger, "module-id", ver.getModuleId());
         }
-        if (ver.getPrerequisite() != null){
-            for (int j = 0; j < ver.getPrerequisite().length; j++) {
-                PluginMetadata.Prerequisite prereq = ver.getPrerequisite()[j];
+        if (ver.getRepository() != null) {
+        	String[] repos = ver.getRepository();
+        	for ( int i=0; i < repos.length; i++ ) {
+        		createText(doc, ger, "source-repository", repos[i]);
+        	}
+        }
+        if (ver.getPreReqs() != null){
+            for (int j = 0; j < ver.getPreReqs().length; j++) {
+                PluginMetadata.Prerequisite prereq = ver.getPreReqs()[j];
                 Element pre = doc.createElement("prerequisite");
                 createText(doc, pre, "id", prereq.getModuleId().toString());
                 if(prereq.getResourceType() != null) {

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java?view=diff&rev=549707&r1=549706&r2=549707
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/car/ViewPluginDownloadHandler.java
Thu Jun 21 21:54:05 2007
@@ -84,6 +84,7 @@
         }
         request.setAttribute("configId", configId);
         request.setAttribute("plugin", config);
+        request.setAttribute("gerVersions",config.getGeronimoVersions());
         request.setAttribute("repository", repo);
         request.setAttribute("repouser", user);
         request.setAttribute("repopass", pass);

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp?view=diff&rev=549707&r1=549706&r2=549707
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/car/viewForDownload.jsp
Thu Jun 21 21:54:05 2007
@@ -63,12 +63,12 @@
     <th align="right" valign="top">Geronimo-Versions:</th>
     <td>
       <c:choose>
-        <c:when test="${empty plugin.geronimoVersions}">
+        <c:when test="${empty gerVersions}">
           <i>None</i>
         </c:when>
         <c:otherwise>
-          <c:forEach var="gerVersions" items="${plugin.geronimoVersions}">
-            <b>${gerVersions.version}</b>
+          <c:forEach var="geronimoVersions" items="${gerVersions}">
+            <b>${geronimoVersions.version}</b>
           </c:forEach>
         </c:otherwise>
       </c:choose>
@@ -115,6 +115,35 @@
       </c:choose>
     </td>
   </tr>
+  <tr>
+	<th align="right" valign="top">Version Specific Prerequisites:</th>
+	<td>
+	  <c:choose>
+		<c:when test="${empty gerVersions}">
+		  <i>None</i>
+		</c:when>
+		<c:otherwise>
+		  <c:forEach var="version" items="${gerVersions}">
+		    Version: ${version.version}:<br/>
+			<c:choose>
+			  <c:when test="${empty version.preReqs}">
+			    <i>None</i><br/>
+			  </c:when>
+			  <c:otherwise>
+			    <c:forEach var="preReq" items="${version.preReqs}">
+				  <b>${preReq.moduleIdWithStars}</b> (${preReq.resourceType})<br/>
+				  ${preReq.description}
+				  <c:if test="${!preReq.present}">
+                    <br /><b><font color="red">NOT AVAILABLE</font></b>
+				  </c:if>
+			    </c:forEach>
+			  </c:otherwise>
+			</c:choose>
+		  </c:forEach>
+		</c:otherwise>
+	  </c:choose>
+	</td>
+  </tr>		
   <tr>
     <th align="right" valign="top">Obsoletes:</th>
     <td>

Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?view=diff&rev=549707&r1=549706&r2=549707
==============================================================================
--- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Thu Jun 21 21:54:05 2007
@@ -38,6 +38,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.SortedSet;
+import java.util.Vector;
 import java.util.Enumeration;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
@@ -1291,17 +1292,51 @@
             PluginMetadata data = processPlugin(config);
             results.add(data);
         }
+        PluginMetadata[] data = (PluginMetadata[]) results.toArray(new PluginMetadata[results.size()]);
+        Vector<String> versionsRepos = new Vector<String>();
+        for (int i = 0; i < data.length; i++) {
+        	URL[] pluginRepos = data[i].getRepositories();
+        	for ( int j=0; j < pluginRepos.length; j++ ) {
+        		versionsRepos.add(pluginRepos[j].toString());
+        	}
+        }
         String[] repos = getChildrenText(root, "default-repository");
-        URL[] repoURLs = new URL[repos.length];
-        for(int i = 0; i < repos.length; i++) {
-            if(repos[i].trim().endsWith("/")) {
-                repoURLs[i] = new URL(repos[i].trim());
-            } else {
-                repoURLs[i] = new URL(repos[i].trim()+"/");
-            }
+        URL[] repoURLs;
+        if ( versionsRepos.size() > 0 && repos.length > 0) { //If we have both
the default repositories as well as the repositories from the plugins.
+        	repoURLs = new URL[repos.length + versionsRepos.size()];
+	        for ( int i = 0; i < versionsRepos.size(); i++ ) {
+	        	if(versionsRepos.elementAt(i).trim().endsWith("/")){
+	        		repoURLs[i] = new URL(versionsRepos.elementAt(i).trim());
+	        	} else {
+	        		repoURLs[i] = new URL(versionsRepos.elementAt(i).trim() + "/");
+	        	}
+	        }
+	        for ( int i = versionsRepos.size(); i < repoURLs.length; i++ ) {
+	            if(repos[i-versionsRepos.size()].trim().endsWith("/")) {
+	                repoURLs[i] = new URL(repos[i-versionsRepos.size()].trim());
+	            } else {
+	                repoURLs[i] = new URL(repos[i-versionsRepos.size()].trim()+"/");
+	            }
+	        }  
+        } else if (versionsRepos.size() > 0) { //If we only have versionsRepos elements
+        	repoURLs = new URL[versionsRepos.size()];
+        	for ( int i=0; i < repos.length; i++ ) {
+        		if( repos[i].trim().endsWith("/") ) {
+        			repoURLs[i] = new URL(versionsRepos.get(i).trim());
+        		} else {
+        			repoURLs[i] = new URL(versionsRepos.get(i).trim()+"/");
+        		}
+        	}
+        } else { //If we have either only the default repository or none at all
+        	repoURLs = new URL[repos.length];
+        	for ( int i=0; i < repos.length; i++ ) {
+        		if( repos[i].trim().endsWith("/") ) {
+        			repoURLs[i] = new URL(repos[i].trim());
+        		} else {
+        			repoURLs[i] = new URL(repos[i].trim()+"/");
+        		}
+        	}
         }
-
-        PluginMetadata[] data = (PluginMetadata[]) results.toArray(new PluginMetadata[results.size()]);
         return new PluginList(repoURLs, data);
     }
 
@@ -1384,10 +1419,10 @@
             }
         }
         boolean eligible = true;
-        NodeList preNodes = plugin.getElementsByTagName("prerequisite");
-        PluginMetadata.Prerequisite[] prereqs = new PluginMetadata.Prerequisite[preNodes.getLength()];
-        for(int j=0; j<preNodes.getLength(); j++) {
-            Element node = (Element) preNodes.item(j);
+        ArrayList preNodes = getChildren(plugin, "prerequisite");
+        PluginMetadata.Prerequisite[] prereqs = new PluginMetadata.Prerequisite[preNodes.size()];
+        for(int j=0; j<preNodes.size(); j++) {
+            Element node = (Element) preNodes.get(j);
             String originalConfigId = getChildText(node, "id");
             if(originalConfigId == null) {
                 throw new SAXException("Prerequisite requires <id>");
@@ -1409,49 +1444,56 @@
             if(!match) {
             	eligible = false;
             }
-            	gerVersions = new PluginMetadata.geronimoVersions[gerVersion.length];
-            	for(int i=0; i < gerVersion.length; i++) {
-            		gerVersions[i] = new PluginMetadata.geronimoVersions(gerVersion[i], null, null,
null);
-            	}
+            gerVersions = new PluginMetadata.geronimoVersions[gerVersion.length];
+            for(int i=0; i < gerVersion.length; i++) {
+            	gerVersions[i] = new PluginMetadata.geronimoVersions(gerVersion[i], null, null,
null);
+            }
         }
         //Process the new geronimo version elements.
         NodeList gerNodes = plugin.getElementsByTagName("geronimo-versions");
+        String[] versionsRepos = null;
         if (gerNodes.getLength() > 0) {
         	gerVersions = new PluginMetadata.geronimoVersions[gerNodes.getLength()];
         	for ( int i = 0; i < gerNodes.getLength(); i++ ) {
         		Element node = (Element) gerNodes.item(i);
         		String version = getChildText(node, "version");
+        		boolean versionMatch = (version.trim().equals(serverInfo.getVersion().trim()))?
true: false; //Is this the versions element for the instance version?
         		if (version == null) {
         			throw new SAXException("geronimo-versions requires <version> ");
         		}
         		String moduleID = getChildText(node, "module-id");
-        		String sourceRepo = getChildText(node, "source-repository");
-        		
+        		if ( versionMatch && (moduleID != null)) { //If this is the correct version
and there's a new moduleID, overwrite the previous moduleId element
+        			moduleId = moduleID;
+        		}
+        		String[] sourceRepo = getChildrenText(node, "source-repository");
+        		if ( versionMatch ) {
+        			versionsRepos = sourceRepo;
+        		}
+        			
         		//Process the prerequisite elements
                 NodeList preReqNode = node.getElementsByTagName("prerequisite");
                 PluginMetadata.Prerequisite[] preReqs = new PluginMetadata.Prerequisite[preReqNode.getLength()];
-                for(int j=0; j < preReqNode.getLength(); j++) {
-                    Element preNode = (Element) preReqNode.item(j);
-                    String originalConfigId = getChildText(preNode, "id");
-                    if(originalConfigId == null) {
-                        throw new SAXException("Prerequisite requires <id>");
-                    }
-                    Artifact artifact = Artifact.create(originalConfigId.replaceAll("\\*",
""));
-                    boolean present = resolver.queryArtifacts(artifact).length > 0;
-                    preReqs[j] = new PluginMetadata.Prerequisite(artifact, present,
-                            getChildText(node, "resource-type"), getChildText(preNode, "description"));
-                    if(!present) {
-                        log.debug(moduleId+" is not eligible due to missing "+prereqs[j].getModuleId());
-                        eligible = false;
-                    }
-                }
-                gerVersions[i] = new PluginMetadata.geronimoVersions(version, moduleID, sourceRepo,
preReqs);
-                
-        	}
-        	boolean match = checkGeronimoVersions(gerVersions);
-        	if (!match){
-        		eligible = false;
+	            for(int j=0; j < preReqNode.getLength(); j++) {
+	                Element preNode = (Element) preReqNode.item(j);
+	                String originalConfigId = getChildText(preNode, "id");
+	                if(originalConfigId == null) {
+	                    throw new SAXException("Prerequisite requires <id>");
+	                }
+	                Artifact artifact = Artifact.create(originalConfigId.replaceAll("\\*", ""));
+	                boolean present = resolver.queryArtifacts(artifact).length > 0;
+	                preReqs[j] = new PluginMetadata.Prerequisite(artifact, present,
+	                        getChildText(node, "resource-type"), getChildText(preNode, "description"));
+	                if(!present && versionMatch) { //We only care if the preReq is missing
if this version element is for the instance version
+	                    log.debug(moduleId+" is not eligible due to missing "+prereqs[j].getModuleId());
+	                    eligible = false;
+	                }
+	            }
+	            gerVersions[i] = new PluginMetadata.geronimoVersions(version, moduleID, sourceRepo,
preReqs);
         	}
+            boolean match = checkGeronimoVersions(gerVersions);
+            if (!match){
+            	eligible = false;
+            }
         }
         String[] jvmVersions = getChildrenText(plugin, "jvm-version");
         if(jvmVersions.length > 0) {
@@ -1459,9 +1501,25 @@
             if(!match) eligible = false;
         }
         String[] repoNames = getChildrenText(plugin, "source-repository");
-        URL[] repos = new URL[repoNames.length];
-        for (int i = 0; i < repos.length; i++) {
-            repos[i] = new URL(repoNames[i].trim());
+        URL[] repos;
+        if ( versionsRepos != null && repoNames.length > 0 ) { //If we have repos
in both the geronimo-versions element and for the plugin as a whole
+        	repos = new URL[repoNames.length + versionsRepos.length];
+	        for (int i = 0; i < repos.length; i++) {
+	            repos[i] = new URL(repoNames[i].trim());
+	        }
+	        for (int i = repoNames.length; i < repos.length; i++ ) {
+	        	repos[i] = new URL(versionsRepos[i-repoNames.length]);
+	        }
+        } else if (versionsRepos != null) { //If we only have repos defined in the geronimo-versions
element
+        	repos = new URL[versionsRepos.length];
+        	for( int i=0; i < versionsRepos.length; i++ ) {
+        		repos[i] = new URL(versionsRepos[i].trim());
+        	}
+        } else {                            //If we only have repos defined for the plugin
as a whole, or there are none defined
+	        repos = new URL[repoNames.length];
+	        for (int i = 0; i < repos.length; i++) {
+	            repos[i] = new URL(repoNames[i].trim());
+	        }
         }
         Artifact artifact = null;
         boolean installed = false;
@@ -1630,6 +1688,25 @@
     }
 
     /**
+     *Gets all the children nodes of a certain type.  The result array has one
+     *element for each child of the specified DOM element that has the specified
+     *name.  This works similar to Element.getElementsByTagName(String) except that
+     *it only returns nodes that are the immediate child of the parent node instead of
+     *any elements with that tag name regardless of generation gap. 
+     */
+    private static ArrayList getChildren(Element root, String property) {
+    	NodeList children = root.getChildNodes();
+    	ArrayList results = new ArrayList();
+    	for ( int i=0; i < children.getLength(); i++ ) {
+    		Node check = children.item(i);
+    		if ( check.getNodeType() == Node.ELEMENT_NODE && check.getNodeName().equals(property)
) {
+    			results.add(check);
+    		}
+    	}
+    	return results;
+    }
+    
+    /**
      * Gets the text out of all the child nodes of a certain type.  The result
      * array has one element for each child of the specified DOM element that
      * has the specified name.
@@ -1733,9 +1810,9 @@
             if (gerVersions.getModuleId() != null){
             	addTextChild(doc, ger, "module-id", gerVersions.getModuleId());
             }
-            if (gerVersions.getPrerequisite() != null){
-                for (int j = 0; j < gerVersions.getPrerequisite().length; j++) {
-                    PluginMetadata.Prerequisite prereq = gerVersions.getPrerequisite()[j];
+            if (gerVersions.getPreReqs() != null){
+                for (int j = 0; j < gerVersions.getPreReqs().length; j++) {
+                    PluginMetadata.Prerequisite prereq = gerVersions.getPreReqs()[j];
                     Element pre = doc.createElement("prerequisite");
                     addTextChild(doc, pre, "id", prereq.getModuleId().toString());
                     if(prereq.getResourceType() != null) {
@@ -1747,8 +1824,11 @@
                     ger.appendChild(pre);
                 }
             }
-            if (gerVersions.getRepository() != null) {
-            	addTextChild(doc, ger, "repository", gerVersions.getRepository());
+            if (gerVersions.getRepository().length > 0) {
+            	String[] repos = gerVersions.getRepository();
+            	for ( int j=0; j < repos.length; j++) {
+            		addTextChild(doc, ger, "repository", repos[j]);
+            	}
             }
             config.appendChild(ger);
         }

Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginMetadata.java?view=diff&rev=549707&r1=549706&r2=549707
==============================================================================
--- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginMetadata.java
(original)
+++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginMetadata.java
Thu Jun 21 21:54:05 2007
@@ -418,10 +418,10 @@
     	
     	private String version;
     	private String moduleId;
-    	private String repository;
+    	private String[] repository;
     	private Prerequisite[] preReqs;
     	
-    	public geronimoVersions( String version, String moduleId, String repository, Prerequisite[]
preReqs) {
+    	public geronimoVersions( String version, String moduleId, String[] repository, Prerequisite[]
preReqs) {
     			this.version = version;
     			this.moduleId = moduleId;
     			this.repository = repository;
@@ -440,12 +440,16 @@
     		return moduleId;
     	}
     	
-    	public String getRepository() {
+    	public String[] getRepository() {
     		return repository;
     	}
     	
-    	public Prerequisite[] getPrerequisite() {
+    	public Prerequisite[] getPreReqs() {
     		return preReqs;
+    	}
+    	
+    	public void setPreReqs(Prerequisite[] prereqs) {
+    		preReqs = prereqs;
     	}
     }
 }



Mime
View raw message