/**********************************************************************************
* $URL$
* $Id$
***********************************************************************************
*
* Copyright (c) 2004-2005 The Regents of the University of Michigan, Trustees of Indiana University,
*                  Board of Trustees of the Leland Stanford, Jr., University, and The MIT Corporation
*
* Licensed under the Educational Community License Version 1.0 (the "License");
* By obtaining, using and/or copying this Original Work, you agree that you have read,
* understand, and will comply with the terms and conditions of the Educational Community License.
* You may obtain a copy of the License at:
*
*      http://cvs.sakaiproject.org/licenses/license_1_0.html
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**********************************************************************************/
package org.sakaiproject.tool.assessment.facade;
import java.io.Serializable;

public class GradebookFacade implements Serializable {

  //return Gradebook #10
  public static String getGradebookUId(){
    return "QA_8";
  }

  // return Gradebook #1
  public static String getDefaultGradebookUId(){
    return "QA_1";
  }

 }

@@ -1395,89 +1395,933 @@
 le;%0A
-%0Apublic class GradebookFacade implements Serializable %7B%0A%0A  //return Gradebook #10
+import org.apache.commons.logging.Log;%0Aimport org.apache.commons.logging.LogFactory;%0Aimport org.sakaiproject.tool.assessment.integration.helper.ifc.GradebookHelper;%0Aimport org.sakaiproject.tool.assessment.integration.context.IntegrationContextFactory;%0A%0A/**%0A * %3Cp%3EDescription: Implements the internal gradebook information.%0A * Uses helper to determine integration context impelmentation.%3C/p%3E%0A * %3Cp%3ESakai Project Copyright (c) 2005%3C/p%3E%0A * %3Cp%3E %3C/p%3E%0A * @author Ed Smiley %3Cesmiley@stanford.edu%3E%0A *%0A */%0Apublic class GradebookFacade implements Serializable%0A%7B%0A  private static Log log = LogFactory.getLog(GradebookFacade.class);%0A  private static final GradebookHelper helper =%0A      IntegrationContextFactory.getInstance().getGradebookHelper();%0A  private static final boolean integrated =%0A    IntegrationContextFactory.getInstance().isIntegrated();%0A%0A  /**%0A   * Get current gradebook uid.%0A   * @return the current gradebook uid.%0A   */
 %0A  p
@@ -2349,32 +2349,35 @@
 etGradebookUId()
+%0A  
 %7B%0A    return %22QA
@@ -2377,33 +2377,96 @@
 urn 
-%22QA_8%22;%0A  %7D%0A%0A  // 
+helper.getGradebookUId();%0A  %7D%0A%0A  /**%0A * Get the default gradebook uid.%0A * @
 return 
+%22Test 
 Grad
@@ -2473,16 +2473,30 @@
 ebook #1
+%22 (always)%0A */
 %0A  publi
@@ -2535,16 +2535,19 @@
 ookUId()
+%0A  
 %7B%0A    re
@@ -2555,14 +2555,711 @@
 urn 
-%22QA_1%22
+helper.getDefaultGradebookUId();%0A  %7D%0A%0A  /**%0A   * Call unit test.%0A   * @param args ignored%0A   */%0A  public static void main (String%5B%5D args)%0A  %7B%0A    unitTest();%0A  %7D%0A%0A  /**%0A   * Unit test can be run from command line.%0A   * Needs integrationContext.xml in classpath at org.sakaiproject.spring%0A   */%0A%0A  public static void unitTest()%0A  %7B%0A    System.out.println(%22integrated=%22+integrated);%0A    if (!integrated)%0A    %7B%0A      System.out.println(%22getGradebookUId()=%22+getGradebookUId());%0A    %7D%0A    else%0A    %7B%0A      System.out.println(%22running integrated version standalone, bypassing %22 +%0A                         %22getGradebookUId()%22);%0A    %7D%0A    System.out.println(%22getDefaultGradebookUId()=%22+getDefaultGradebookUId())
 ;%0A  

use integration context helper class