Changeset 55

Show
Ignore:
Timestamp:
01/31/06 11:16:27
Author:
douglm
Message:

Renamed form property from getCalSvcI to fetchSvci to hide it from struts
(Changed over 100 refs)

Add new webadmin package org.bedework.webadmin.system to fetch a copy
of the system parameters and update selected values. Updated the struts.config
so that a request like:

http://localhost:8080/caladmin/syspars/update.do?defaultUserQuota=1234567
but the forwarding and jsp needs to be fixed/created and the stylesheets need to
handle this new stuff

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/CalintfImpl.java

    r54 r55  
    384384  } 
    385385 
     386  public void updateSyspars(BwSystem val) throws CalFacadeException { 
     387    checkOpen(); 
     388    sess.update(val); 
     389  } 
     390 
    386391  public CalTimezones getTimezones() throws CalFacadeException { 
    387392    return timezones; 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/BwSystem.java

    r54 r55  
    524524    sb.append("userOutbox="); 
    525525    sb.append(getUserOutbox()); 
     526    sb.append("defaultUserViewName="); 
     527    sb.append(getDefaultUserViewName()); 
    526528 
    527529    sb.append("publicUser="); 
     
    536538    sb.append("httpConnections="); 
    537539    sb.append(getHttpConnections()); 
     540 
     541    sb.append("maxPublicDescriptionLength="); 
     542    sb.append(getMaxPublicDescriptionLength()); 
     543    sb.append("maxUserDescriptionLength="); 
     544    sb.append(getMaxUserDescriptionLength()); 
     545    sb.append("maxUserEntitySize="); 
     546    sb.append(getMaxUserEntitySize()); 
     547    sb.append("defaultUserQuota="); 
     548    sb.append(getDefaultUserQuota()); 
    538549 
    539550    sb.append("userauthClass="); 
     
    550561    return sb.toString(); 
    551562  } 
     563 
     564  public Object clone() { 
     565    BwSystem clone = new BwSystem(); 
     566 
     567    clone.setName(getName()); 
     568    clone.setTzid(getTzid()); 
     569    clone.setSystemid(getSystemid()); 
     570    clone.setPublicCalendarRoot(getPublicCalendarRoot()); 
     571    clone.setUserCalendarRoot(getUserCalendarRoot()); 
     572    clone.setUserDefaultCalendar(getUserDefaultCalendar()); 
     573    clone.setDefaultTrashCalendar(getDefaultTrashCalendar()); 
     574    clone.setUserInbox(getUserInbox()); 
     575    clone.setUserOutbox(getUserOutbox()); 
     576    clone.setDefaultUserViewName(getDefaultUserViewName()); 
     577    clone.setPublicUser(getPublicUser()); 
     578    clone.setDirectoryBrowsingDisallowed(getDirectoryBrowsingDisallowed()); 
     579 
     580    clone.setHttpConnectionsPerUser(getHttpConnectionsPerUser()); 
     581    clone.setHttpConnectionsPerHost(getHttpConnectionsPerHost()); 
     582    clone.setHttpConnections(getHttpConnections()); 
     583 
     584    clone.setMaxPublicDescriptionLength(getMaxPublicDescriptionLength()); 
     585    clone.setMaxUserDescriptionLength(getMaxUserDescriptionLength()); 
     586    clone.setMaxUserEntitySize(getMaxUserEntitySize()); 
     587    clone.setDefaultUserQuota(getDefaultUserQuota()); 
     588 
     589    clone.setUserauthClass(getUserauthClass()); 
     590    clone.setMailerClass(getMailerClass()); 
     591    clone.setAdmingroupsClass(getAdmingroupsClass()); 
     592    clone.setUsergroupsClass(getUsergroupsClass()); 
     593 
     594    return clone(); 
     595  } 
    552596} 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/base/CalintfBase.java

    r18 r55  
    173173  } 
    174174 
     175  public void updateSyspars(BwSystem val) throws CalFacadeException { 
     176  } 
     177 
    175178  /** Get the timezones cache object 
    176179   * 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/ifs/Calintf.java

    r18 r55  
    129129  public BwSystem getSyspars() throws CalFacadeException; 
    130130 
     131  /** Update the system pars 
     132   * 
     133   * @param val BwSystem object 
     134   * @throws CalFacadeException if not admin 
     135   */ 
     136  public void updateSyspars(BwSystem val) throws CalFacadeException; 
     137 
    131138  /** Get the timezones cache object 
    132139   * 
  • trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java

    r54 r55  
    333333  } 
    334334 
     335  public void updateSyspars(BwSystem val) throws CalFacadeException { 
     336    if (!isSuper()) { 
     337      throw new CalFacadeAccessException(); 
     338    } 
     339    getCal().updateSyspars(val); 
     340  } 
     341 
    335342  public CalTimezones getTimezones() throws CalFacadeException { 
    336343    return getCal().getTimezones(); 
  • trunk/calendar3/calsvci/src/org/bedework/calsvci/CalSvcI.java

    r47 r55  
    121121  public abstract BwSystem getSyspars() throws CalFacadeException; 
    122122 
     123  /** Update the system pars 
     124   * 
     125   * @param val BwSystem object 
     126   * @throws CalFacadeException if not admin 
     127   */ 
     128  public abstract void updateSyspars(BwSystem val) throws CalFacadeException; 
     129 
    123130  /** Get the timezones cache object 
    124131   * 
  • trunk/calendar3/common/src/edu/rpi/sss/util/jsp/UtilAbstractAction.java

    r21 r55  
    11331133  } 
    11341134 
     1135  /** Get an long valued request parameter. 
     1136   * 
     1137   * @param req 
     1138   * @param name    name of parameter 
     1139   * @return  long  value 
     1140   */ 
     1141  protected long getLongReqPar(HttpServletRequest req, String name, 
     1142                             long defaultVal) throws Throwable { 
     1143    String reqpar = req.getParameter(name); 
     1144 
     1145    if (reqpar == null) { 
     1146      return defaultVal; 
     1147    } 
     1148 
     1149    try { 
     1150      return Long.parseLong(reqpar); 
     1151    } catch (Throwable t) { 
     1152      return defaultVal; // XXX exception? 
     1153    } 
     1154  } 
     1155 
    11351156  /** Get a boolean valued request parameter. 
    11361157   * 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/PEActionForm.java

    r42 r55  
    366366    try { 
    367367      if (val == null) { 
    368         getEventDates().setNewEvent(getEvent(), getCalSvcI().getTimezones()); 
     368        getEventDates().setNewEvent(getEvent(), fetchSvci().getTimezones()); 
    369369      } else { 
    370         getEventDates().setFromEvent(getEvent(), getCalSvcI().getTimezones()); 
     370        getEventDates().setFromEvent(getEvent(), fetchSvci().getTimezones()); 
    371371      } 
    372372    } catch (Throwable t) { 
     
    567567  public Collection getCategories() { 
    568568    try { 
    569       Collection ks = getCalSvcI().getCategories(); 
     569      Collection ks = fetchSvci().getCategories(); 
    570570      if (ks == null) { 
    571571        return new Vector(); 
     
    985985  public boolean getAdminGroupMaintOK() { 
    986986    try { 
    987       return getCalSvcI().getAdminGroups().getGroupMaintOK(); 
     987      return fetchSvci().getAdminGroups().getGroupMaintOK(); 
    988988   } catch (Throwable t) { 
    989989      err.emit(t); 
     
    997997  public Collection getAdminGroups() { 
    998998    try { 
    999       return getCalSvcI().getAdminGroups().getAll(showAgMembers); 
     999      return fetchSvci().getAdminGroups().getAll(showAgMembers); 
    10001000   } catch (Throwable t) { 
    10011001      err.emit(t); 
     
    11061106 
    11071107    try { 
    1108       BwCategory k = getCalSvcI().getCategory(id); 
     1108      BwCategory k = fetchSvci().getCategory(id); 
    11091109 
    11101110      if (k == null) { 
     
    11511151        } 
    11521152 
    1153         getCalSvcI().ensureSponsorExists(s); 
     1153        fetchSvci().ensureSponsorExists(s); 
    11541154 
    11551155        setSponsor(s); 
     
    11691169 
    11701170    try { 
    1171       BwSponsor s = getCalSvcI().getSponsor(id); 
     1171      BwSponsor s = fetchSvci().getSponsor(id); 
    11721172      if (s == null) { 
    11731173        // Somebody's faking 
     
    12051205 
    12061206 
    1207         getCalSvcI().ensureLocationExists(l); 
     1207        fetchSvci().ensureLocationExists(l); 
    12081208 
    12091209        setLocation(l); 
     
    12231223    try { 
    12241224      int id = locId.getVal(); 
    1225       BwLocation l = getCalSvcI().getLocation(id); 
     1225      BwLocation l = fetchSvci().getLocation(id); 
    12261226 
    12271227      if ((l == null) || !l.getPublick()) { 
     
    12641264      int id = calendarId.getVal(); 
    12651265 
    1266       BwCalendar c = getCalSvcI().getCalendar(id); 
     1266      BwCalendar c = fetchSvci().getCalendar(id); 
    12671267 
    12681268      if ((c == null) || !c.getPublick() || !c.getCalendarCollection()) { 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/admingroup/PEDeleteAGAction.java

    r37 r55  
    8888    } 
    8989 
    90     Groups adgrps = form.getCalSvcI().getGroups(); 
     90    Groups adgrps = form.fetchSvci().getGroups(); 
    9191    form.assignChoosingGroup(false); // reset 
    9292 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/admingroup/PEFetchAGAction.java

    r2 r55  
    8888    } 
    8989 
    90     Groups adgrps = form.getCalSvcI().getAdminGroups(); 
     90    Groups adgrps = form.fetchSvci().getAdminGroups(); 
    9191    form.assignChoosingGroup(false); // reset 
    9292 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/admingroup/PEUpdateAGAction.java

    r29 r55  
    9999    } 
    100100 
    101     Groups adgrps = form.getCalSvcI().getGroups(); 
     101    Groups adgrps = form.fetchSvci().getGroups(); 
    102102    form.assignChoosingGroup(false); // reset 
    103103    boolean add = form.getAddingAdmingroup(); 
     
    110110    } 
    111111 
    112     CalSvcI svci = form.getCalSvcI(); 
     112    CalSvcI svci = form.fetchSvci(); 
    113113 
    114114    if (request.getParameter("addGroupMember") != null) { 
     
    147147 
    148148      if (mbr != null) { 
    149         BwUser u = form.getCalSvcI().findUser(mbr); 
     149        BwUser u = form.fetchSvci().findUser(mbr); 
    150150 
    151151        if (u != null) { 
     
    185185  private boolean validateNewAdminGroup(PEActionForm form) throws Throwable { 
    186186    boolean ok = true; 
    187     CalSvcI svci = form.getCalSvcI(); 
     187    CalSvcI svci = form.fetchSvci(); 
    188188 
    189189    BwAdminGroup updAdminGroup = form.getUpdAdminGroup(); 
     
    241241  private boolean validateAdminGroup(PEActionForm form) throws Throwable { 
    242242    boolean ok = true; 
    243     CalSvcI svci = form.getCalSvcI(); 
     243    CalSvcI svci = form.fetchSvci(); 
    244244 
    245245    BwAdminGroup updAdminGroup = form.getUpdAdminGroup(); 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/authuser/PEDeleteAuthAction.java

    r24 r55  
    8585    } 
    8686 
    87     CalSvcI svci = form.getCalSvcI(); 
     87    CalSvcI svci = form.fetchSvci(); 
    8888 
    8989    svci.getUserAuth().removeAuth(getAuthUser(form)); 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/authuser/PEFetchAuthAction.java

    r16 r55  
    8888    } 
    8989 
    90     CalSvcI svci = form.getCalSvcI(); 
     90    CalSvcI svci = form.fetchSvci(); 
    9191 
    9292    /** User requested a user from the list or by entering the id. 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/authuser/PEUpdateAuthAction.java

    r24 r55  
    8686    } 
    8787 
    88     CalSvcI svci = form.getCalSvcI(); 
     88    CalSvcI svci = form.fetchSvci(); 
    8989 
    9090    /** We are just updating from the current form values. 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/category/PEDeleteCategoryAction.java

    r24 r55  
    8888 
    8989    BwCategory key = form.getCategory(); 
    90     int delResult = form.getCalSvcI().deleteCategory(key); 
     90    int delResult = form.fetchSvci().deleteCategory(key); 
    9191 
    9292    if (delResult == 2) { 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/category/PEFetchCategoryAction.java

    r24 r55  
    8888    } 
    8989 
    90     CalSvcI svci = form.getCalSvcI(); 
     90    CalSvcI svci = form.fetchSvci(); 
    9191 
    9292    /** User requested a category from the list. Retrieve it, embed it in 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/category/PEUpdateCategoryAction.java

    r24 r55  
    9494    } 
    9595 
    96     CalSvcI svci = form.getCalSvcI(); 
     96    CalSvcI svci = form.fetchSvci(); 
    9797    boolean add = form.getAddingCategory(); 
    9898 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/event/PEDeleteEventAction.java

    r24 r55  
    8080                         BwSession sess, 
    8181                         PEActionForm form) throws Throwable { 
    82     CalSvcI svci = form.getCalSvcI(); 
     82    CalSvcI svci = form.fetchSvci(); 
    8383    boolean alerts = form.getAlertEvent(); 
    8484 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/event/PEDeleteSelectedEventAction.java

    r2 r55  
    8181                         BwSession sess, 
    8282                         PEActionForm form) throws Throwable { 
    83     CalSvcI svci = form.getCalSvcI(); 
     83    CalSvcI svci = form.fetchSvci(); 
    8484    boolean alerts = form.getAlertEvent(); 
    8585 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/event/PEFetchEventAction.java

    r24 r55  
    8282                         BwSession sess, 
    8383                         PEActionForm form) throws Throwable { 
    84     CalSvcI svci = form.getCalSvcI(); 
     84    CalSvcI svci = form.fetchSvci(); 
    8585    boolean alerts = form.getAlertEvent(); 
    8686 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/event/PEGetFormattedEventsAction.java

    r27 r55  
    9898    form.setFormattedEvents(new FormattedEvents(getEvents(false, form), 
    9999                                                form.getCalInfo(), 
    100                                                 form.getCalSvcI().getTimezones())); 
     100                                                form.fetchSvci().getTimezones())); 
    101101 
    102102    return "continue"; 
     
    123123    } 
    124124 
    125     return form.getCalSvcI().getEvents(null, filter, fromDate, null, 
     125    return form.fetchSvci().getEvents(null, filter, fromDate, null, 
    126126                                       CalFacadeDefs.retrieveRecurExpanded); 
    127127  } 
     
    130130    return CalFacadeUtil.getDateTime(new java.util.Date(System.currentTimeMillis()), 
    131131                                     true, false, 
    132                                      form.getCalSvcI().getTimezones()); 
     132                                     form.fetchSvci().getTimezones()); 
    133133  } 
    134134} 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/event/PEUpdateEventAction.java

    r42 r55  
    121121    } 
    122122 
    123     CalSvcI svci = form.getCalSvcI(); 
     123    CalSvcI svci = form.fetchSvci(); 
    124124    if (!validateEvent(form)) { 
    125125      return "retry"; 
     
    165165    boolean ok = form.validateEventCategory(); 
    166166    BwEvent ev = form.getEvent(); 
    167     CalSvcI svci = form.getCalSvcI(); 
     167    CalSvcI svci = form.fetchSvci(); 
    168168 
    169169    if (!form.validateEventSponsor()) { 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/location/PEDeleteLocationAction.java

    r24 r55  
    8888 
    8989    BwLocation loc = form.getLocation(); 
    90     int delResult = form.getCalSvcI().deleteLocation(loc); 
     90    int delResult = form.fetchSvci().deleteLocation(loc); 
    9191 
    9292    if (delResult == 2) { 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/location/PEFetchLocationAction.java

    r24 r55  
    9494    BwLocation location = null; 
    9595    if (id >= 0) { 
    96       location = form.getCalSvcI().getLocation(id); 
     96      location = form.fetchSvci().getLocation(id); 
    9797    } 
    9898 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/location/PEUpdateLocationAction.java

    r24 r55  
    9797    } 
    9898 
    99     CalSvcI svci = form.getCalSvcI(); 
     99    CalSvcI svci = form.fetchSvci(); 
    100100    boolean add = form.getAddingLocation(); 
    101101 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/sponsor/PEDeleteSponsorAction.java

    r24 r55  
    8888 
    8989    BwSponsor sp = form.getSponsor(); 
    90     int delResult = form.getCalSvcI().deleteSponsor(sp); 
     90    int delResult = form.fetchSvci().deleteSponsor(sp); 
    9191 
    9292    if (delResult == 2) { 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/sponsor/PEFetchSponsorAction.java

    r24 r55  
    9494    BwSponsor sponsor = null; 
    9595    if (id >= 0) { 
    96       sponsor = form.getCalSvcI().getSponsor(id); 
     96      sponsor = form.fetchSvci().getSponsor(id); 
    9797    } 
    9898 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/sponsor/PEUpdateSponsorAction.java

    r24 r55  
    9797    } 
    9898 
    99     CalSvcI svci = form.getCalSvcI(); 
     99    CalSvcI svci = form.fetchSvci(); 
    100100    boolean add = form.getAddingSponsor(); 
    101101 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/timezones/PEUploadTimezonesAction.java

    r24 r55  
    101101    Collection tzis = tzp.getTimeZones(); 
    102102 
    103     CalSvcI svci = form.getCalSvcI(); 
     103    CalSvcI svci = form.fetchSvci(); 
    104104 
    105105    Iterator it = tzis.iterator(); 
  • trunk/calendar3/webadmin/war/WEB-INF/struts-config.xml

    r39 r55  
    409409 
    410410    <!-- =============================================================== 
     411                         Syspars Actions 
     412         =============================================================== --> 
     413 
     414    <action    path="/syspars/show" 
     415               type="org.bedework.webadmin.PERenderAction" 
     416               name="peForm" 
     417               scope="session" 
     418               validate="false"> 
     419      <forward name="success" path="/docs/syspars/syspars.jsp"/> 
     420    </action> 
     421 
     422    <action    path="/syspars/fetch" 
     423               type="org.bedework.webadmin.system.FetchSysparsAction" 
     424               name="peForm" 
     425               scope="session" 
     426               validate="false"> 
     427      <forward name="continue" path="/syspars/show.rdo" redirect="true" /> 
     428    </action> 
     429 
     430    <action    path="/syspars/update" 
     431               type="org.bedework.webadmin.system.UpdateSysparsAction" 
     432               name="peForm" 
     433               scope="session" 
     434               validate="false"> 
     435      <forward name="continue" path="/syspars/show.rdo" redirect="true" /> 
     436    </action> 
     437 
     438    <!-- =============================================================== 
    411439                         Timezone Actions 
    412440         =============================================================== --> 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwAccessAction.java

    r24 r55  
    127127    } 
    128128 
    129     CalSvcI svci = form.getCalSvcI(); 
     129    CalSvcI svci = form.fetchSvci(); 
    130130    BwCalendar cal = null; 
    131131    BwEvent ev = null; 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwActionForm.java

    r2 r55  
    174174  public String getSearch() { 
    175175    try { 
    176       return getCalSvcI().getSearch(); 
     176      return fetchSvci().getSearch(); 
    177177    } catch (Throwable t) { 
    178178      err.emit(t); 
     
    192192  public boolean getSubscribed(int i) { 
    193193    try { 
    194       BwCalendar cal = getCalSvcI().getCalendar(i); 
     194      BwCalendar cal = fetchSvci().getCalendar(i); 
    195195 
    196196      if (cal == null) { 
    197197        return false; 
    198198      } 
    199       return getCalSvcI().getSubscribed(cal); 
     199      return fetchSvci().getSubscribed(cal); 
    200200    } catch (Throwable t) { 
    201201      err.emit(t); 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwAddCategoryAction.java

    r2 r55  
    8484    } 
    8585 
    86     form.getCalSvcI().addCategory(cat); 
     86    form.fetchSvci().addCategory(cat); 
    8787 
    8888    return "success"; 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwAddEventAction.java

    r2 r55  
    8989    } 
    9090 
    91     CalSvcI svci = form.getCalSvcI(); 
     91    CalSvcI svci = form.fetchSvci(); 
    9292 
    9393    if (!form.getEventDates().updateEvent(ev, svci.getTimezones()) || 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwAddEventRefAction.java

    r24 r55  
    9191    } 
    9292 
    93     CalSvcI svci = form.getCalSvcI(); 
     93    CalSvcI svci = form.fetchSvci(); 
    9494 
    9595    EventInfo ei = svci.getEvent(id); 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwAddLocationAction.java

    r24 r55  
    8484    } 
    8585 
    86     form.getCalSvcI().addLocation(l); 
     86    form.fetchSvci().addLocation(l); 
    8787 
    8888    form.getMsg().emit("org.bedework.client.message.added.locations", 1); 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwAddSponsorAction.java

    r2 r55  
    8484    } 
    8585 
    86     form.getCalSvcI().addSponsor(s); 
     86    form.fetchSvci().addSponsor(s); 
    8787 
    8888    return "success"; 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwCalendarAction.java

    r2 r55  
    7070  public String doAction(HttpServletRequest request, 
    7171                         BwActionForm form) throws Throwable { 
    72     CalSvcI svci = form.getCalSvcI(); 
     72    CalSvcI svci = form.fetchSvci(); 
    7373    String reqpar = request.getParameter("searchString"); 
    7474 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwDelEventAction.java

    r24 r55  
    9595    } 
    9696 
    97     CalSvcI svci = form.getCalSvcI(); 
     97    CalSvcI svci = form.fetchSvci(); 
    9898 
    9999    EventInfo ei = svci.getEvent(id); 
     
    105105    } 
    106106 
    107     CalSvcI.DelEventResult delResult = form.getCalSvcI().deleteEvent(ei.getEvent(), true); 
     107    CalSvcI.DelEventResult delResult = form.fetchSvci().deleteEvent(ei.getEvent(), true); 
    108108 
    109109    if (!delResult.eventDeleted) { 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwDelLocationAction.java

    r24 r55  
    9999    } 
    100100 
    101     CalSvcI svci = form.getCalSvcI(); 
     101    CalSvcI svci = form.fetchSvci(); 
    102102 
    103103    BwLocation loc = svci.getLocation(id); 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwEditEventAction.java

    r24 r55  
    153153  public String updateEvent(HttpServletRequest request, 
    154154                            BwActionForm form) throws Throwable { 
    155     CalSvcI svci = form.getCalSvcI(); 
     155    CalSvcI svci = form.fetchSvci(); 
    156156    BwEvent ev = form.getEditEvent(); 
    157157 
     
    173173    if (loc == null) { 
    174174      if (form.getEventLocationId() != CalFacadeDefs.defaultLocationId) { 
    175         loc = form.getCalSvcI().getLocation(form.getEventLocationId()); 
     175        loc = form.fetchSvci().getLocation(form.getEventLocationId()); 
    176176      } 
    177177    } 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwEditLocationAction.java

    r24 r55  
    104104    } 
    105105 
    106     BwLocation loc = form.getCalSvcI().getLocation(locationId); 
     106    BwLocation loc = form.fetchSvci().getLocation(locationId); 
    107107 
    108108    if (loc == null) { 
     
    129129  public String updateLocation(HttpServletRequest request, 
    130130                               BwActionForm form) throws Throwable { 
    131     CalSvcI svci = form.getCalSvcI(); 
     131    CalSvcI svci = form.fetchSvci(); 
    132132    BwLocation loc = form.getEditLocation(); 
    133133 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwEventAction.java

    r27 r55  
    8989                                           form.getCurTimeView(), 
    9090                                           form.getCalInfo(), 
    91                                            form.getCalSvcI().getTimezones()); 
     91                                           form.fetchSvci().getTimezones()); 
    9292 
    9393    form.setCurEventFmt(ef); 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwFetchEventAction.java

    r24 r55  
    8686    } 
    8787 
    88     EventInfo ei = form.getCalSvcI().getEvent(eventId); 
     88    EventInfo ei = form.fetchSvci().getEvent(eventId); 
    8989    BwEvent ev = null; 
    9090 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwFreeBusyAction.java

    r24 r55  
    9898    String userId = request.getParameter("userid"); 
    9999    BwUser user; 
    100     CalSvcI svci = form.getCalSvcI(); 
     100    CalSvcI svci = form.fetchSvci(); 
    101101 
    102102    if (userId != null) { 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwMailEventAction.java

    r24 r55  
    100100    String[] to = new String[]{recipient}; 
    101101 
    102     CalSvcI svci = form.getCalSvcI(); 
     102    CalSvcI svci = form.fetchSvci(); 
    103103 
    104104    emsg.setMailTo(to); 
     
    140140    if (val.getFrom() == null) { 
    141141      // This should be a property 
    142       val.setFrom("donotreply-" + form.getCalSvcI().getSysid()); 
     142      val.setFrom("donotreply-" + form.fetchSvci().getSysid()); 
    143143    } 
    144144 
  • trunk/calendar3/webclient/src/org/bedework/webclient/BwSetAlarmAction.java

    r24 r55  
    8989    } 
    9090 
    91     CalSvcI svci = form.getCalSvcI(); 
     91    CalSvcI svci = form.fetchSvci(); 
    9292 
    9393    BwEventAlarm alarm = new BwEventAlarm(); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/BwAbstractAction.java

    r24 r55  
    186186 
    187187      /** Show the owner we are administering */ 
    188       form.setAdminUserId(form.getCalSvcI().getUser().getAccount()); 
     188      form.setAdminUserId(form.fetchSvci().getUser().getAccount()); 
    189189 
    190190      if (debug) { 
     
    288288    } 
    289289 
    290     CalSvcI svci = form.getCalSvcI(); 
     290    CalSvcI svci = form.fetchSvci(); 
    291291 
    292292    BwSubscription sub = svci.getSubscription(subid); 
     
    343343    } 
    344344 
    345     CalSvcI svci = form.getCalSvcI(); 
     345    CalSvcI svci = form.fetchSvci(); 
    346346 
    347347    try { 
     
    495495    } 
    496496 
    497     form.setAdminUserId(form.getCalSvcI().getUser().getAccount()); 
     497    form.setAdminUserId(form.fetchSvci().getUser().getAccount()); 
    498498 
    499499    return null; 
     
    678678 
    679679    try { 
    680       ua = form.getCalSvcI().getUserAuth(s.getUser(), par); 
     680      ua = form.fetchSvci().getUserAuth(s.getUser(), par); 
    681681 
    682682      form.assignAuthorisedUser(ua.getUsertype() != UserAuth.noPrivileges); 
     
    884884   */ 
    885885  protected UserAuth retrieveUserAuth(BwActionFormBase form) throws CalFacadeException { 
    886     return form.getCalSvcI().getUserAuth(); 
     886    return form.fetchSvci().getUserAuth(); 
    887887  } 
    888888 
     
    999999    public void in(boolean actionUrl) throws Throwable { 
    10001000      synchronized (form) { 
    1001         CalSvcI svci = form.getCalSvcI(); 
     1001        CalSvcI svci = form.fetchSvci(); 
    10021002        if (svci != null) { 
    10031003          if (svci.isOpen()) { 
     
    10211021     */ 
    10221022    public void out() throws Throwable { 
    1023       CalSvcI svci = form.getCalSvcI(); 
     1023      CalSvcI svci = form.fetchSvci(); 
    10241024      if (svci != null) { 
    10251025        svci.endTransaction(); 
     
    10351035 
    10361036      try { 
    1037         CalSvcI svci = form.getCalSvcI(); 
     1037        CalSvcI svci = form.fetchSvci(); 
    10381038        if (svci != null) { 
    10391039          svci.close(); 
     
    10561056    if (!form.isRefreshNeeded()){ 
    10571057      try { 
    1058         if (!form.getCalSvcI().refreshNeeded()) { 
     1058        if (!form.fetchSvci().refreshNeeded()) { 
    10591059          return; 
    10601060        } 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/BwActionFormBase.java

    r27 r55  
    7070import org.bedework.calfacade.BwLocation; 
    7171import org.bedework.calfacade.BwSponsor; 
     72import org.bedework.calfacade.BwSystem; 
    7273import org.bedework.calfacade.BwUser; 
    7374import org.bedework.calfacade.CalFacadeDefs; 
     
    103104  private CalEnv env; 
    104105 
     106  /* This should be a cloned copy only */ 
     107  private BwSystem syspars; 
     108 
    105109  private transient MailerIntf mailer; 
    106110 
     
    366370   * ==================================================================== */ 
    367371 
     372  /** Set a (cloned) copy of the system parameters 
     373   * @param val 
     374   */ 
     375  public void setSyspars(BwSystem val) { 
     376    syspars = (BwSystem)val.clone(); 
     377  } 
     378 
     379  /** 
     380   * @return BwSystem object 
     381   */ 
     382  public BwSystem getSyspars() { 
     383    return syspars; 
     384  } 
     385 
    368386  /** This will default to the current user. Superusers will be able to 
    369387   * specify a creator. 
     
    387405  public Collection getInstanceOwners() { 
    388406    try { 
    389       return getCalSvcI().getInstanceOwners(); 
     407      return fetchSvci().getInstanceOwners(); 
    390408    } catch (Throwable t) { 
    391409      err.emit(t); 
     
    626644      mailer = (MailerIntf)CalEnv.getGlobalObject("mailerclass", 
    627645                                                  MailerIntf.class); 
    628       mailer.init(getCalSvcI(), debug); 
     646      mailer.init(fetchSvci(), debug); 
    629647    } catch (Throwable t) { 
    630648      err.emit(t); 
     
    709727   * @return svci 
    710728   */ 
    711   public CalSvcI getCalSvcI() { 
     729  public CalSvcI fetchSvci() { 
    712730    return calsvci; 
    713731  } 
     
    719737  public UserAuth getUserAuth() { 
    720738    try { 
    721       return getCalSvcI().getUserAuth().getUserAuthRO(); 
     739      return fetchSvci().getUserAuth().getUserAuthRO(); 
    722740    } catch (Throwable t) { 
    723741      err.emit(t); 
     
    733751  public UserAuth retrieveUserAuth() { 
    734752    try { 
    735       return getCalSvcI().getUserAuth(); 
     753      return fetchSvci().getUserAuth(); 
    736754    } catch (Throwable t) { 
    737755      err.emit(t); 
     
    11031121 
    11041122    try { 
    1105       getCalSvcI().refreshEvents(); 
     1123      fetchSvci().refreshEvents(); 
    11061124 
    11071125      switch (curViewPeriod) { 
    11081126      case BedeworkDefs.dayView: 
    1109         setCurTimeView(new DayView(getCalInfo(), viewMcDate, getCalSvcI(), debug)); 
     1127        setCurTimeView(new DayView(getCalInfo(), viewMcDate, fetchSvci(), debug)); 
    11101128        break; 
    11111129      case BedeworkDefs.weekView: 
    1112         setCurTimeView(new WeekView(getCalInfo(), viewMcDate, getCalSvcI(), debug)); 
     1130        setCurTimeView(new WeekView(getCalInfo(), viewMcDate, fetchSvci(), debug)); 
    11131131        break; 
    11141132      case BedeworkDefs.monthView: 
    1115         setCurTimeView(new MonthView(getCalInfo(), viewMcDate, getCalSvcI(), debug)); 
     1133        setCurTimeView(new MonthView(getCalInfo(), viewMcDate, fetchSvci(), debug)); 
    11161134        break; 
    11171135      case BedeworkDefs.yearView: 
    1118         setCurTimeView(new YearView(getCalInfo(), viewMcDate, getCalSvcI(), 
     1136        setCurTimeView(new YearView(getCalInfo(), viewMcDate, fetchSvci(), 
    11191137                       getShowYearData(), debug)); 
    11201138        break; 
     
    11861204  public Collection getViews() { 
    11871205    try { 
    1188       return getCalSvcI().getViews(); 
     1206      return fetchSvci().getViews(); 
    11891207    } catch (Throwable t) { 
    11901208      err.emit(t); 
     
    11991217  public BwView getCurrentView() { 
    12001218    try { 
    1201       return getCalSvcI().getCurrentView(); 
     1219      return fetchSvci().getCurrentView(); 
    12021220    } catch (Throwable t) { 
    12031221      err.emit(t); 
     
    12651283  public BwCalendar getPublicCalendars() { 
    12661284    try { 
    1267       return getCalSvcI().getPublicCalendars(); 
     1285      return fetchSvci().getPublicCalendars(); 
    12681286    } catch (Throwable t) { 
    12691287      err.emit(t); 
     
    12821300  public Collection getPublicCalendarCollections() { 
    12831301    try { 
    1284       return getCalSvcI().getPublicCalendarCollections(); 
     1302      return fetchSvci().getPublicCalendarCollections(); 
    12851303    } catch (Throwable t) { 
    12861304      err.emit(t); 
     
    12961314  public BwCalendar getCalendars() { 
    12971315    try { 
    1298       return getCalSvcI().getCalendars(); 
     1316      return fetchSvci().getCalendars(); 
    12991317    } catch (Throwable t) { 
    13001318      err.emit(t); 
     
    13131331  public Collection getCalendarCollections() { 
    13141332    try { 
    1315       return getCalSvcI().getCalendarCollections(); 
     1333      return fetchSvci().getCalendarCollections(); 
    13161334    } catch (Throwable t) { 
    13171335      err.emit(t); 
     
    13301348  public Collection getAddContentCalendarCollections() { 
    13311349    try { 
    1332       return getCalSvcI().getAddContentCalendarCollections(); 
     1350      return fetchSvci().getAddContentCalendarCollections(); 
    13331351    } catch (Throwable t) { 
    13341352      err.emit(t); 
     
    14351453    if (preferences == null) { 
    14361454      try { 
    1437         preferences = getCalSvcI().getUserPrefs(); 
     1455        preferences = fetchSvci().getUserPrefs(); 
    14381456      } catch (Throwable t) { 
    14391457        err.emit(t); 
     
    17351753 
    17361754      if (val != null) { 
    1737         getEventDates().setFromEvent(val, getCalSvcI().getTimezones()); 
     1755        getEventDates().setFromEvent(val, fetchSvci().getTimezones()); 
    17381756      } 
    17391757    } catch (Throwable t) { 
     
    17911809  public EventDates getEventDates() { 
    17921810    if (eventDates == null) { 
    1793       eventDates = new EventDates(getCalSvcI(), getCalInfo(), 
     1811      eventDates = new EventDates(fetchSvci(), getCalInfo(), 
    17941812                                  hour24, minIncrement, err, debug); 
    17951813    } 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/BwWebUtil.java

    r42 r55  
    238238  public static void deleteEvent(BwActionFormBase form, 
    239239                          BwEvent event) throws Throwable { 
    240     CalSvcI svci = form.getCalSvcI(); 
     240    CalSvcI svci = form.fetchSvci(); 
    241241 
    242242    svci.deleteEvent(event, false); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/calendars/DeleteCalendarAction.java

    r24 r55  
    8383 
    8484    BwCalendar cal = form.getCalendar(); 
    85     int delResult = form.getCalSvcI().deleteCalendar(cal); 
     85    int delResult = form.fetchSvci().deleteCalendar(cal); 
    8686 
    8787    if (delResult == 2) { 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/calendars/FetchCalendarAction.java

    r2 r55  
    9595    } 
    9696 
    97     BwCalendar calendar = form.getCalSvcI().getCalendar(id); 
     97    BwCalendar calendar = form.fetchSvci().getCalendar(id); 
    9898 
    9999    if (debug) { 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/calendars/InitAddCalendarAction.java

    r2 r55  
    9191    int id = getIntReqPar(request, "calId", -1); 
    9292 
    93     BwCalendar calendar = form.getCalSvcI().getCalendar(id); 
     93    BwCalendar calendar = form.fetchSvci().getCalendar(id); 
    9494 
    9595    if ((calendar == null) || calendar.getCalendarCollection()) { 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/calendars/UpdateCalendarAction.java

    r24 r55  
    102102    } 
    103103 
    104     CalSvcI svci = form.getCalSvcI(); 
     104    CalSvcI svci = form.fetchSvci(); 
    105105    boolean add = form.getAddingCalendar(); 
    106106 
     
    161161          // Can only change for an empty object. 
    162162          if ((cal.getChildren().size() != 0) || 
    163               form.getCalSvcI().getCalendarInuse(cal)) { 
     163              form.fetchSvci().getCalendarInuse(cal)) { 
    164164            form.getErr().emit("org.bedework.validation.error.forbidden.calmode"); 
    165165            return false; 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/misc/ExportAction.java

    r2 r55  
    9999    int calid = getIntReqPar(request, "calid", -1); 
    100100    int subid = getIntReqPar(request, "subid", -1); 
    101     CalSvcI svci = form.getCalSvcI(); 
     101    CalSvcI svci = form.fetchSvci(); 
    102102 
    103103    EventInfo ev = null; 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/misc/UploadAction.java

    r24 r55  
    105105    InputStream is = upFile.getInputStream(); 
    106106 
    107     CalSvcI svci = form.getCalSvcI(); 
     107    CalSvcI svci = form.fetchSvci(); 
    108108 
    109109    IcalTranslator trans = new IcalTranslator(svci.getIcalCallback(), debug); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/pref/FetchPrefsAction.java

    r21 r55  
    9191    } 
    9292 
    93     CalSvcI svc = form.getCalSvcI(); 
     93    CalSvcI svc = form.fetchSvci(); 
    9494 
    9595    String str = getReqPar(request, "user"); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/pref/UpdatePrefsAction.java

    r24 r55  
    9797    } 
    9898 
    99     CalSvcI svc = form.getCalSvcI(); 
     99    CalSvcI svc = form.fetchSvci(); 
    100100 
    101101    String str = getReqPar(request, "user"); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/subs/FetchSubscriptionAction.java

    r2 r55  
    7979                         BwSession sess, 
    8080                         BwActionFormBase form) throws Throwable { 
    81     CalSvcI svc = form.getCalSvcI(); 
     81    CalSvcI svc = form.fetchSvci(); 
    8282 
    8383    /** User requested a subscription. Retrieve it, embed it in 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/subs/GetSubscriptionsAction.java

    r2 r55  
    7878                         BwSession sess, 
    7979                         BwActionFormBase form) throws Throwable { 
    80     CalSvcI svc = form.getCalSvcI(); 
     80    CalSvcI svc = form.fetchSvci(); 
    8181 
    8282    form.setSubscriptions(svc.getSubscriptions()); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/subs/InitSubscribeAction.java

    r24 r55  
    9696    BwCalendar cal = null; 
    9797 
    98     CalSvcI svc = form.getCalSvcI(); 
     98    CalSvcI svc = form.fetchSvci(); 
    9999 
    100100    BwSubscription sub; 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/subs/SubscribeAction.java

    r36 r55  
    100100    BwSubscription sub = form.getSubscription(); 
    101101 
    102     CalSvcI svc = form.getCalSvcI(); 
     102    CalSvcI svc = form.fetchSvci(); 
    103103 
    104104    String viewName = getReqPar(request, "view"); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/subs/UnsubscribeAction.java

    r37 r55  
    9090    } 
    9191 
    92     CalSvcI svc = form.getCalSvcI(); 
     92    CalSvcI svc = form.fetchSvci(); 
    9393 
    9494    String name = request.getParameter("name"); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/views/AddViewAction.java

    r24 r55  
    9191    } 
    9292 
    93     CalSvcI svc = form.getCalSvcI(); 
     93    CalSvcI svc = form.fetchSvci(); 
    9494    String name = request.getParameter("name"); 
    9595 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/views/DeleteViewAction.java

    r35 r55  
    9090    } 
    9191 
    92     CalSvcI svc = form.getCalSvcI(); 
     92    CalSvcI svc = form.fetchSvci(); 
    9393 
    9494    String name = request.getParameter("name"); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/views/FetchViewAction.java

    r30 r55  
    8686                         BwSession sess, 
    8787                         BwActionFormBase form) throws Throwable { 
    88     CalSvcI svc = form.getCalSvcI(); 
     88    CalSvcI svc = form.fetchSvci(); 
    8989 
    9090    String name = request.getParameter("name"); 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/views/UpdateViewAction.java

    r24 r55  
    9696    } 
    9797 
    98     CalSvcI svc = form.getCalSvcI(); 
     98    CalSvcI svc = form.fetchSvci(); 
    9999    String name = Util.checkNull(request.getParameter("name")); 
    100100    if (name == null) {