Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_admin/src/java/org/lamsfoundation/lams/admin/web/action/FederationWDDXAction.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_admin/web/federation/wddx.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/src/java/org/lamsfoundation/lams/federation/service/FederationService.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/federation/service/Attic/FederationService.java,v diff -u -r1.1.2.3 -r1.1.2.4 --- lams_common/src/java/org/lamsfoundation/lams/federation/service/FederationService.java 5 Jun 2007 04:31:45 -0000 1.1.2.3 +++ lams_common/src/java/org/lamsfoundation/lams/federation/service/FederationService.java 22 Jun 2007 05:17:59 -0000 1.1.2.4 @@ -14,7 +14,6 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; -import org.apache.commons.beanutils.BeanUtils; import org.apache.log4j.Logger; import org.lamsfoundation.lams.federation.FederationException; import org.lamsfoundation.lams.federation.FederationLesson; @@ -78,7 +77,7 @@ return service.findByProperties(FederationLesson.class, properties); } - public void insertFederationServer(FederationServer fedServer) { + public void saveFederationServer(FederationServer fedServer) { service.save(fedServer); } @@ -101,14 +100,14 @@ docBuilderFactory.setValidating(false); return docBuilderFactory.newDocumentBuilder().parse(conn.getInputStream()); } catch (MalformedURLException e) { - log.error(e); + log.error("Invalid URL: "+url, e); } catch (IOException e) { // java.net.ConnectException: Connection refused: connect (server not running) - log.error(e); + log.error("Couldn't connect to URL: "+url, e); } catch (SAXException e) { - log.error(e); + log.error("Encountered SAXException error...", e); } catch (ParserConfigurationException e) { - log.error(e); + log.error("Encountered ParserConfigurationException error...", e); } return null; } @@ -158,7 +157,9 @@ } public String getWDDXFedServerGroups(Integer fedId) throws IOException, FederationException { - FlashMessage flashMessage = new FlashMessage("getFedServerGroups", getFedServerGroups(fedId)); + List fedServerGroups = getFedServerGroups(fedId); + FlashMessage flashMessage = new FlashMessage("getFedServerGroups", fedServerGroups); + log.debug("getWDDXFedServerGroups output..."+flashMessage.serializeMessage()); return flashMessage.serializeMessage(); } @@ -176,12 +177,18 @@ list.add(getExtOrgDTOFromNode(node)); } } catch (MalformedURLException e) { - log.error(e); + log.error("Invalid federation server URL: "+urlText, e); } return list; } + public String getWDDXFedServerLessons(Integer fedId, Integer orgId) throws IOException, FederationException { + FlashMessage flashMessage = new FlashMessage("getFedServerLessons", getFedServerLessons(fedId, orgId)); + log.debug("getWDDXFedServerLessons output..."+flashMessage.serializeMessage()); + return flashMessage.serializeMessage(); + } + public List getFedServerLessons(Integer fedId, Integer orgId) throws FederationException { FederationServer fedServer = getFedServerByFedId(fedId); String fedKey = HashUtil.sha1(fedServer.getPrivateKey()); @@ -196,7 +203,7 @@ list.add(getExtLessonDTOFromNode(node)); } } catch (MalformedURLException e) { - log.error(e); + log.error("Invalid federation server URL: "+urlText, e); } return list; @@ -270,10 +277,10 @@ existing.setPrivateKey(fedServer.getPrivateKey()); service.save(existing); } - // need to delete remoevd fedservers + // TODO need to delete remoevd fedservers } } catch(MalformedURLException e) { - log.error(e); + log.error("Invalid federation registry URL: "+url, e); } } } Index: lams_common/src/java/org/lamsfoundation/lams/federation/service/IFederationService.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/federation/service/Attic/IFederationService.java,v diff -u -r1.1.2.3 -r1.1.2.4 --- lams_common/src/java/org/lamsfoundation/lams/federation/service/IFederationService.java 5 Jun 2007 04:31:45 -0000 1.1.2.3 +++ lams_common/src/java/org/lamsfoundation/lams/federation/service/IFederationService.java 22 Jun 2007 05:17:59 -0000 1.1.2.4 @@ -22,63 +22,73 @@ */ public interface IFederationService { - List getFederationServers(); + public List getFederationServers(); - List getFederationLessons(); + public List getFederationLessons(); - List getCoursesCanJoinSharedLessons(); + public List getCoursesCanJoinSharedLessons(); - List getSharedLessons(FederationServer fedServer, Integer extOrgId); + public List getSharedLessons(FederationServer fedServer, Integer extOrgId); - void insertFederationServer(FederationServer fedServer); + public void saveFederationServer(FederationServer fedServer); /** * * @param url * @return * @throws FederationException */ - Document getXmlDocumentFromUrl(URL url) throws FederationException; + public Document getXmlDocumentFromUrl(URL url) throws FederationException; /** * Used when local teacher has selected external group/s to share their lesson with. * @param fedServer * @param extOrgId * @param lesson */ - void createFederationLesson(FederationServer fedServer, Integer extOrgId, Lesson lesson); + public void createFederationLesson(FederationServer fedServer, Integer extOrgId, Lesson lesson); /** * Wrapper method to return WDDX packet string of getFedServerGroups. * @param fedId - * @return + * @return wddx string. * @throws IOException * @throws FederationException */ - String getWDDXFedServerGroups(Integer fedId) throws IOException, FederationException; + public String getWDDXFedServerGroups(Integer fedId) throws IOException, FederationException; /** * Used when local teacher is looking for external groups to share their lesson with. * @return group ids and names from federation server with given fedId. */ - List getFedServerGroups(Integer fedId) throws FederationException; + public List getFedServerGroups(Integer fedId) throws FederationException; /** + * Wrapper method to return WDDX packet string of getFedServerLessons. + * @param fedId + * @param orgId + * @return wddx string. + * @throws IOException + * @throws FederationException + */ + public String getWDDXFedServerLessons(Integer fedId, Integer orgId) throws IOException, FederationException; + + /** * Used to get list of lessons on remote server (fedId) available to org on this server (orgId). * @param orgId * @return lesson ids and names from federation server with given fed_id, available to org with given orgId. */ - List getFedServerLessons(Integer fedId, Integer orgId) throws FederationException; + public List getFedServerLessons(Integer fedId, Integer orgId) throws FederationException; /** * Get URL used to request updated list of servers from registry * @return URL */ - String getFederationRegistryURL(); + public String getFederationRegistryURL(); /** * Syncs local copy of federation servers with remote registry. * @throws FederationException */ - void updateFederationRegistry() throws FederationException; + public void updateFederationRegistry() throws FederationException; }