Changeset 161

Show
Ignore:
Timestamp:
02/15/06 15:29:11
Author:
douglm
Message:

1. Start of webtest stuff
2. Fix create subscription. Still have to fix delete
3. Fix some possible null pointer exceptions
4. Change use of IntSelectId? objects in admin client code

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/appcommon/src/org/bedework/appcommon/IntSelectId.java

    r2 r161  
    102102   */ 
    103103  public IntSelectId(int originalValue, int preferred) { 
     104    reset(originalValue, preferred); 
     105  } 
     106 
     107  /** Reset an object with the given original value indicating which of A 
     108   * or B have preference. 
     109   * 
     110   * @param originalValue 
     111   * @param preferred 
     112   */ 
     113  public void reset(int originalValue, int preferred) { 
    104114    this.originalValue = originalValue; 
    105115    this.newValue = originalValue; 
  • trunk/calendar3/bldfiles/globalDefs.xml

    r59 r161  
    5555 
    5656    <property name="uwcal.home" location="${calendar.dir}" /> 
     57 
     58    <!-- This is the default location for the canoo files. 
     59      --> 
     60    <property name="webtest.home" location="${calendar.dir}/../webtest" /> 
    5761 
    5862    <!-- Where the web-apps skeletons, build files etc reside --> 
     
    9094    <property name="org.bedework.webclient.base" location="${calendar.dir}/webclient" /> 
    9195    <property name="org.bedework.webcommon.base" location="${calendar.dir}/webcommon" /> 
     96    <property name="org.bedework.webtest.base" location="${calendar.dir}/webtest" /> 
    9297 
    9398    <!-- =============================================================== 
  • trunk/calendar3/build.xml

    r59 r161  
    588588       ================================================================= --> 
    589589 
     590  <target name="webtest.all" depends="init" 
     591          description="Run the full webtest suite"> 
     592      <ant antfile="${org.bedework.webtest.base}/build.xml" inheritrefs="true" 
     593           target="all" /> 
     594  </target> 
     595 
    590596  <target name="bld.test" 
    591597          depends="init,bld.core,bld.appcommon,bld.synchml" 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/BwCalendar.java

    r111 r161  
    383383 
    384384  public int hashCode() { 
     385        if (getPath() == null) { 
     386                return 1; 
     387        } 
    385388    return getPath().hashCode(); 
    386389  } 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/base/BwOwnedDbentity.java

    r128 r161  
    147147    */ 
    148148  public void copyTo(BwOwnedDbentity val) { 
    149     val.setOwner((BwUser)getOwner().clone()); 
     149        if (getOwner() != null) { 
     150      val.setOwner((BwUser)getOwner().clone()); 
     151        } 
    150152    val.setPublick(getPublick()); 
    151153  } 
  • trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java

    r145 r161  
    889889    checkOwnerOrSuper(prefs); 
    890890 
     891    // XXX clone?   val = (BwSubscription)val.clone(); // Avoid hibernate 
    891892    setupOwnedEntity(val); 
    892     val = (BwSubscription)val.clone(); // Avoid hibernate 
    893  
     893 
     894    trace("************* add subscription " + val); 
    894895    prefs.addSubscription(val); 
    895  
    896     dbi.updatePreferences(prefs); 
    897896  } 
    898897 
  • trunk/calendar3/docs/todo.txt

    r145 r161  
    22 
    33-------------------------------------------------------------------------------- 
    4 -------------------------------------------------------------------------------- 
    5 -------------------------------------------------------------------------------- 
     4Installing webtest 
     5 
     61. Download build.zip from http://webtest.canoo.com/webtest/manual/Downloads.html 
     7 
     82. Create a directory webtest in the quickstart at the same level as calendar3 
     9 
     103. Unzip build.zip into that directory 
     11 
     12++++++++++++ 
     13into svn 
     14calendar3/webtest   (recurse) 
     15 
     16-------------------------------------------------------------------------------- 
     17update quickstart stuff 
     18-------------------------------------------------------------------------------- 
     19-------------------------------------------------------------------------------- 
     20Admin delete event button doesn't work. 
    621-------------------------------------------------------------------------------- 
    722When duplicating event - set creator 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/PEAbstractAction.java

    r128 r161  
    135135 
    136136    /* A is the All box, B is the user preferred values. */ 
    137     form.assignCategoryId(new IntSelectId(id, IntSelectId.AHasPrecedence)); 
     137    form.retrieveCategoryId().reset(id, IntSelectId.AHasPrecedence); 
    138138 
    139139    BwSponsor s = event.getSponsor(); 
     
    144144    } 
    145145 
    146     form.assignSpId(new IntSelectId(id, IntSelectId.AHasPrecedence)); 
     146    form.retrieveSpId().reset(id, IntSelectId.AHasPrecedence); 
    147147 
    148148    BwLocation l = event.getLocation(); 
     
    153153    } 
    154154 
    155     form.assignLocId(new IntSelectId(id, IntSelectId.AHasPrecedence)); 
     155    form.retrieveLocId().reset(id, IntSelectId.AHasPrecedence); 
    156156 
    157157    BwCalendar c = event.getCalendar(); 
     
    162162    } 
    163163 
    164     form.assignCalendarId(new IntSelectId(id, IntSelectId.AHasPrecedence)); 
     164    form.retrieveCalendarId().reset(id, IntSelectId.AHasPrecedence); 
    165165  } 
    166166 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/PEActionForm.java

    r128 r161  
    139139   */ 
    140140 
    141   private IntSelectId categoryId
     141  private IntSelectId categoryId = new IntSelectId(-1, IntSelectId.AHasPrecedence)
    142142 
    143143  /* .................................................................... 
     
    147147  private BwSponsor sponsor; 
    148148 
    149   private IntSelectId spId
     149  private IntSelectId spId = new IntSelectId(-1, IntSelectId.AHasPrecedence)
    150150 
    151151  /* .................................................................... 
     
    155155  private BwLocation location; 
    156156 
    157   private IntSelectId locId
     157  private IntSelectId locId = new IntSelectId(-1, IntSelectId.AHasPrecedence)
    158158 
    159159  /* .................................................................... 
     
    161161   * .................................................................... */ 
    162162 
    163   private IntSelectId calendarId
     163  private IntSelectId calendarId = new IntSelectId(-1, IntSelectId.AHasPrecedence)
    164164 
    165165  /* .................................................................... 
     
    401401 
    402402    return category; 
    403   } 
    404  
    405   /** 
    406    * @param val IntSelectId id object 
    407    */ 
    408   public void assignCategoryId(IntSelectId val) { 
    409     categoryId = val; 
    410403  } 
    411404 
     
    532525 
    533526  /** 
    534    * @param val IntSelectId id object 
    535    */ 
    536   public void assignSpId(IntSelectId val) { 
    537     spId = val; 
    538   } 
    539  
    540   /** 
    541527   * @return IntSelectId id object 
    542528   */ 
     
    640626 
    641627  /** 
    642    * @param val IntSelectId id object 
    643    */ 
    644   public void assignLocId(IntSelectId val) { 
    645     locId = val; 
    646   } 
    647  
    648   /** 
    649628   * @return IntSelectId id object 
    650629   */ 
     
    706685   *                   Calendars 
    707686   * ==================================================================== */ 
    708  
    709   /** 
    710    * @param val IntSelectId id object 
    711    */ 
    712   public void assignCalendarId(IntSelectId val) { 
    713     calendarId = val; 
    714   } 
    715687 
    716688  /**