Changeset 310

Show
Ignore:
Timestamp:
03/30/06 11:51:14
Author:
douglm
Message:

Set of changes to move privileges xml rendering out of caldav and into a common place.

Moved some classes to enable that, new package davdefs to make tags and othre definitions commonly available.

Fixed up the caldav test package and added some tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/access/build.xml

    r2 r310  
    11<?xml version="1.0"?> 
    22 
    3 <!-- This is the ant build file for the access control suite of the UW Calendar
     3<!-- This is the ant build file for the access control suite
    44 
    55     This file will probably need no modification as it is assumed that the 
     
    3333 
    3434  <target name="build" depends="init" 
    35           description="Compile UW calendar access control classes"> 
     35          description="Compile access control classes"> 
    3636    <!-- ==================== Sources and classes ====================== --> 
    3737 
     
    4747 
    4848    <path id="compile.classpath"> 
    49       <pathelement location="${org.bedework.calfacadeshared.jar}"/> 
     49      <pathelement location="${org.bedework.common.jar}"/> 
    5050      <pathelement location="${org.bedework.locale.jar}"/> 
    5151      <pathelement location="${log4j.jar}"/> 
  • trunk/calendar3/access/src/edu/rpi/cct/uwcal/access/Access.java

    r2 r310  
    5656import java.io.Serializable; 
    5757 
    58 /** Class to handle access control for the calendar. Because we may be 
    59  * evaluating access frequently we try do so without creating (many) objects. 
     58/** Class to handle access control. Because we may be evaluating access  
     59 * frequently we try do so without creating (many) objects. 
    6060 * 
    6161 * <p>This class is created for a session or perhaps a thread and reused to 
     
    6464 * will normally represent the access as a  number of objects. 
    6565 * 
    66  *  @author Mike Douglass   douglm@rpi.edu 
     66 *  @author Mike Douglass   douglm @ rpi.edu 
    6767 */ 
    6868public class Access implements Serializable { 
     
    151151  } 
    152152 
     153  /** Get the Privileges object from the defautl acl 
     154   * 
     155   * @param privs Privileges  
     156   * @return Privilege object defining access 
     157   */ 
     158  public static Privileges getPrivs() { 
     159    return acl.getPrivs(); 
     160  } 
     161 
    153162  /** Evaluating an ACL 
    154163   * 
  • trunk/calendar3/appcommon/build.xml

    r18 r310  
    3535      <pathelement location="${ical4j.jar}"/> 
    3636      <pathelement location="${log4j.jar}"/> 
     37      <pathelement location="${org.bedework.access.jar}"/> 
    3738      <pathelement location="${org.bedework.common.jar}"/> 
    3839      <pathelement location="${org.bedework.calsvci.jar}"/> 
    3940      <pathelement location="${org.bedework.calfacadeshared.jar}"/> 
     41      <pathelement location="${org.bedework.davdefs.jar}"/> 
    4042      <pathelement location="${org.bedework.ical.jar}"/> 
    4143      <pathelement location="${org.bedework.locale.jar}"/> 
  • trunk/calendar3/bldfiles/buildwar.xml

    r297 r310  
    234234    <copy todir="${app.dest.lib}" file="${org.bedework.ical.jar}" /> 
    235235    <copy todir="${app.dest.lib}" file="${org.bedework.common.jar}" /> 
     236    <copy todir="${app.dest.lib}" file="${org.bedework.davdefs.jar}" /> 
    236237    <copy todir="${app.dest.lib}" file="${org.bedework.appcommon.jar}" /> 
    237238    <copy todir="${app.dest.lib}" file="${org.bedework.webcommon.jar}" /> 
  • trunk/calendar3/bldfiles/defjars.properties

    r296 r310  
    126126org.bedework.config.jar=${org.bedework.temp.jars}/${org.bedework.config.jar.name} 
    127127 
     128org.bedework.davdefs.jar.name=bwdavdefs-${product.version}.jar 
     129org.bedework.davdefs.jar=${org.bedework.temp.jars}/${org.bedework.davdefs.jar.name} 
     130 
    128131org.bedework.deployment.jar.name=bwdeployment-${product.version}.jar 
    129132org.bedework.deployment.jar=${org.bedework.temp.jars}/${org.bedework.deployment.jar.name} 
  • trunk/calendar3/bldfiles/globalDefs.xml

    r235 r310  
    8181    <property name="org.bedework.config.base" location="${calendar.dir}/config" /> 
    8282    <property name="org.bedework.core.base" location="${calendar.dir}/calCore" /> 
     83    <property name="org.bedework.davdefs.base" location="${calendar.dir}/davdefs" /> 
    8384    <property name="org.bedework.deployment.base" location="${calendar.dir}/deployment" /> 
    8485    <property name="org.bedework.dumprestore.base" location="${calendar.dir}/dumprestore" /> 
  • trunk/calendar3/build.xml

    r260 r310  
    102102 
    103103  <target name="bld.all" 
    104           depends="bld.locale,bld.access,bld.calfacade, 
    105                    bld.calenv,bld.ical,bld.common,bld.core, 
     104          depends="bld.locale,bld.common,bld.access,bld.davdefs,bld.calfacade, 
     105                   bld.calenv,bld.ical,bld.core, 
    106106                   bld.http,bld.caldavclientapi, 
    107107                   bld.calsvci,bld.mail,bld.logging, 
     
    247247                         ${org.bedework.common.base}/src: 
    248248                         ${org.bedework.config.base}/src: 
     249                         ${org.bedework.davdefs.base}/src: 
    249250                         ${org.bedework.dumprestore.base}/src: 
    250251                         ${org.bedework.http.base}/src: 
     
    277278  </target> 
    278279 
     280  <!-- ======================== appcommon target ======================= 
     281       This builds a jar file which provides application support. 
     282       ================================================================= --> 
     283 
     284  <target name="bld.appcommon" 
     285          depends="init,bld.access,bld.calsvci,bld.davdefs" 
     286          description="Build calendar service interface classes jar"> 
     287      <ant antfile="${org.bedework.appcommon.base}/build.xml" inheritrefs="true" 
     288           target="build" /> 
     289  </target> 
     290 
    279291  <!-- ======================== calfacade target ========================= 
    280292       This builds the back end facade for the core of the calendar. 
     
    339351 
    340352  <target name="bld.common" 
    341           depends="init,bld.calfacade,bld.locale" 
     353          depends="init,bld.locale" 
    342354          description="Build calendar common classes jar"> 
    343355      <ant antfile="${org.bedework.common.base}/build.xml" inheritrefs="true" 
     356           target="build" /> 
     357  </target> 
     358 
     359  <!-- ======================== davdefs target ========================= 
     360       This builds some global webdav and caldav definitions 
     361       ================================================================= --> 
     362 
     363  <target name="bld.davdefs" 
     364          depends="bld.common" 
     365          description="Build calendar davdefs jars" > 
     366      <ant antfile="${org.bedework.davdefs.base}/build.xml" inheritrefs="true" 
    344367           target="build" /> 
    345368  </target> 
     
    361384 
    362385  <target name="bld.caldavclientapi" 
    363           depends="init,bld.http,bld.calfacade" 
     386          depends="init,bld.http,bld.davdefs,bld.calfacade" 
    364387          description="Build calendar caldav client api classes jar"> 
    365388      <ant antfile="${org.bedework.caldavClientApi.base}/build.xml" inheritrefs="true" 
     
    419442          description="Build icalendar classes jar"> 
    420443      <ant antfile="${org.bedework.ical.base}/build.xml" inheritrefs="true" 
    421            target="build" /> 
    422   </target> 
    423  
    424   <!-- ======================== appcommon target ======================= 
    425        This builds a jar file which provides application support. 
    426        ================================================================= --> 
    427  
    428   <target name="bld.appcommon" 
    429           depends="init,bld.calsvci" 
    430           description="Build calendar service interface classes jar"> 
    431       <ant antfile="${org.bedework.appcommon.base}/build.xml" inheritrefs="true" 
    432444           target="build" /> 
    433445  </target> 
     
    503515 
    504516  <target name="bld.caldav" if="org.bedework.build.caldav" 
    505           depends="init,bld.appcommon" 
     517          depends="init,bld.davdefs,bld.appcommon" 
    506518          description="Build calendar caldav suite"> 
    507519    <ant antfile="${org.bedework.caldav.base}/build.xml" inheritrefs="true" 
  • trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/AccessUtil.java

    r301 r310  
    163163  /** Change the access to the given calendar entity using the supplied aces. 
    164164   * 
    165    * @param o        Calendar object 
     165   * @param ent      BwShareableDbentity  
    166166   * @param aces     Collection of ace objects 
    167167   * @throws CalFacadeException 
    168168   */ 
    169   public void changeAccess(Object o, Collection aces) throws CalFacadeException { 
    170     Collection oldAces = getAces(o); 
     169  public void changeAccess(BwShareableDbentity ent,  
     170                           Collection aces) throws CalFacadeException { 
     171    Collection oldAces = getAces(ent); 
    171172 
    172173    try { 
     
    182183      } 
    183184 
    184       BwShareableDbentity sdbe = (BwShareableDbentity)o; 
    185  
    186       sdbe.setAccess(new String(acl.encode())); 
     185      ent.setAccess(new String(acl.encode())); 
    187186    } catch (Throwable t) { 
    188187      throw new CalFacadeException(t); 
     
    197196   * @throws CalFacadeException 
    198197   */ 
    199   public Collection getAces(Object o) throws CalFacadeException { 
    200     if (!(o instanceof BwShareableDbentity)) { 
    201       throw new CalFacadeException(CalFacadeException.illegalObjectClass); 
    202     } 
    203  
    204     BwShareableDbentity sdbe = (BwShareableDbentity)o; 
    205  
    206     return getAces(sdbe, privWriteAcl); 
     198  public Collection getAces(BwShareableDbentity ent) throws CalFacadeException { 
     199    return getAces(ent, privWriteAcl); 
    207200  } 
    208201 
  • trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/CalintfImpl.java

    r301 r310  
    7575import org.bedework.calfacade.CalFacadeDefs; 
    7676import org.bedework.calfacade.CalFacadeException; 
     77import org.bedework.calfacade.base.BwShareableDbentity; 
    7778import org.bedework.calfacade.filter.BwFilter; 
    7879import org.bedework.calfacade.ifs.CalTimezones; 
     
    684685   * ==================================================================== */ 
    685686 
    686   public void changeAccess(Object o, Collection aces) throws CalFacadeException { 
    687     checkOpen(); 
    688     access.changeAccess(o, aces); 
    689     sess.saveOrUpdate(o); 
    690   } 
    691  
    692   public Collection getAces(Object o) throws CalFacadeException { 
    693     checkOpen(); 
    694     return access.getAces(o); 
     687  public void changeAccess(BwShareableDbentity ent,  
     688                           Collection aces) throws CalFacadeException { 
     689    checkOpen(); 
     690    access.changeAccess(ent, aces); 
     691    sess.saveOrUpdate(ent); 
     692  } 
     693 
     694  public Collection getAces(BwShareableDbentity ent) throws CalFacadeException { 
     695    checkOpen(); 
     696    return access.getAces(ent); 
    695697  } 
    696698 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/base/CalintfBase.java

    r301 r310  
    369369   * ==================================================================== */ 
    370370 
    371   public void changeAccess(Object o, Collection aces) throws CalFacadeException { 
    372     checkOpen(); 
    373     throw new CalFacadeUnimplementedException(); 
    374   } 
    375  
    376   public Collection getAces(Object o) throws CalFacadeException { 
     371  public void changeAccess(BwShareableDbentity ent,  
     372                           Collection aces) throws CalFacadeException { 
     373    checkOpen(); 
     374    throw new CalFacadeUnimplementedException(); 
     375  } 
     376 
     377  public Collection getAces(BwShareableDbentity ent) throws CalFacadeException { 
    377378    checkOpen(); 
    378379    throw new CalFacadeUnimplementedException(); 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/ifs/Calintf.java

    r301 r310  
    6565import org.bedework.calfacade.BwUser; 
    6666import org.bedework.calfacade.CalFacadeException; 
     67import org.bedework.calfacade.base.BwShareableDbentity; 
    6768import org.bedework.calfacade.filter.BwFilter; 
    6869import org.bedework.calfacade.ifs.Groups; 
     
    355356  /** Change the access to the given calendar entity. 
    356357   * 
    357    * @param o        Calendar object 
     358   * @param ent      BwShareableDbentity  
    358359   * @param aces     Collection of ace 
    359360   * @throws CalFacadeException 
    360361   */ 
    361   public void changeAccess(Object o, Collection aces) throws CalFacadeException; 
     362  public void changeAccess(BwShareableDbentity ent,  
     363                           Collection aces) throws CalFacadeException; 
    362364 
    363365  /** Return the ace representing the allowed access for the given object. This 
    364366   * may be derived from an object higher up the tree. 
    365367   * 
    366    * @param o 
     368   * @param ent 
    367369   * @return Collection 
    368370   * @throws CalFacadeException 
    369371   */ 
    370   public Collection getAces(Object o) throws CalFacadeException; 
     372  public Collection getAces(BwShareableDbentity ent) throws CalFacadeException; 
    371373 
    372374  /* ==================================================================== 
  • trunk/calendar3/caldav/build.xml

    r2 r310  
    4545 
    4646      <!-- Include the location of the compiled calendar classes --> 
     47      <pathelement location="${org.bedework.appcommon.jar}"/> 
    4748      <pathelement location="${org.bedework.calenv.jar}"/> 
    4849      <pathelement location="${org.bedework.access.jar}"/> 
     
    5152      <pathelement location="${org.bedework.calsvci.jar}"/> 
    5253      <pathelement location="${org.bedework.calsvc.jar}"/> 
     54      <pathelement location="${org.bedework.davdefs.jar}"/> 
    5355      <pathelement location="${org.bedework.ical.jar}"/> 
    5456    </path> 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CDMkcolMethod.java

    r2 r310  
    6161import javax.servlet.http.HttpServletResponse; 
    6262 
     63import org.bedework.davdefs.CaldavTags; 
    6364import org.w3c.dom.Document; 
    6465import org.w3c.dom.Element; 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWIntf.java

    r301 r310  
    5252    to the maximum extent the law permits. 
    5353*/ 
    54  
    5554package edu.rpi.cct.uwcal.caldav; 
    5655 
     56import org.bedework.appcommon.AccessUtil; 
    5757import org.bedework.calfacade.BwCalendar; 
    5858import org.bedework.calfacade.BwEvent; 
     
    6464import org.bedework.calsvci.CalSvcI; 
    6565import org.bedework.calsvci.CalSvcIPars; 
     66import org.bedework.davdefs.CaldavDefs; 
     67import org.bedework.davdefs.CaldavTags; 
     68import org.bedework.davdefs.WebdavTags; 
    6669import org.bedework.icalendar.IcalMalformedException; 
    6770import org.bedework.icalendar.IcalTranslator; 
     
    6972import edu.rpi.cct.uwcal.access.Ace; 
    7073import edu.rpi.cct.uwcal.access.Acl; 
    71 import edu.rpi.cct.uwcal.access.Privilege; 
    7274 
    7375import edu.rpi.cct.uwcal.caldav.filter.Filter; 
    7476import edu.rpi.cct.uwcal.caldav.calquery.FreeBusyQuery; 
    75 //import edu.rpi.cct.uwcal.common.URIgen; 
    76  
    77 //import edu.rpi.cct.uwcal.webcommon.UWCalWebURIgen; 
    7877 
    7978import edu.rpi.cct.webdav.servlet.common.MethodBase; 
     
    8584import edu.rpi.cct.webdav.servlet.shared.WebdavNsNode; 
    8685import edu.rpi.cct.webdav.servlet.shared.WebdavProperty; 
    87 import edu.rpi.cct.webdav.servlet.shared.WebdavTags; 
    88  
    89 import edu.rpi.sss.util.xml.QName; 
    9086 
    9187import java.io.IOException; 
     
    127123   */ 
    128124  private String namespacePrefix; 
     125   
     126  private EmitAccess emitAccess; 
    129127 
    130128  /* Prefix for out properties */ 
     
    194192      publicCalendarRoot = getSvci().getSyspars().getPublicCalendarRoot(); 
    195193      userCalendarRoot = getSvci().getSyspars().getUserCalendarRoot(); 
     194       
     195      emitAccess = new EmitAccess(namespacePrefix, xml); 
    196196    } catch (Throwable t) { 
    197197      throw new WebdavIntfException(t); 
     
    218218  public void addNamespace() throws WebdavIntfException { 
    219219    try { 
    220       xml.addNs(CaldavUWDef.caldavNamespace); 
    221       xml.addNs(CaldavUWDef.icalNamespace); 
     220      xml.addNs(CaldavDefs.caldavNamespace); 
     221      xml.addNs(CaldavDefs.icalNamespace); 
    222222    } catch (Throwable t) { 
    223223      throw new WebdavIntfException(t); 
     
    769769  } 
    770770 
    771   private static final QName[] privTags = { 
    772     WebdavTags.all,              // privAll = 0; 
    773     WebdavTags.read,             // privRead = 1; 
    774     WebdavTags.readAcl,          // privReadAcl = 2; 
    775     WebdavTags.readCurrentUserPrivilegeSet,  // privReadCurrentUserPrivilegeSet = 3; 
    776     CaldavTags.readFreeBusy,     // privReadFreeBusy = 4; 
    777     WebdavTags.write,            // privWrite = 5; 
    778     WebdavTags.writeAcl,         // privWriteAcl = 6; 
    779     WebdavTags.writeProperties,  // privWriteProperties = 7; 
    780     WebdavTags.writeContent,     // privWriteContent = 8; 
    781     WebdavTags.bind,             // privBind = 9; 
    782     WebdavTags.unbind,           // privUnbind = 10; 
    783     WebdavTags.unlock,           // privUnlock = 11; 
    784     null                         // privNone = 12; 
    785   }; 
    786  
    787771  public void parsePrivilege(AclInfo ainfo, Node nd, 
    788772                             boolean grant) throws WebdavIntfException { 
     
    799783 
    800784    findPriv: { 
    801       for (priv = 0; priv < privTags.length; priv++) { 
    802         if (MethodBase.nodeMatches(el, privTags[priv])) { 
     785      // ENUM 
     786      for (priv = 0; priv < AccessUtil.privTags.length; priv++) { 
     787        if (MethodBase.nodeMatches(el, AccessUtil.privTags[priv])) { 
    803788          break findPriv; 
    804789        } 
     
    836821  } 
    837822 
     823  public void emitAcl(WebdavNsNode node) throws WebdavIntfException { 
     824    CaldavBwNode uwnode = getBwnode(node); 
     825    CaldavURI cdUri = uwnode.getCDURI(); 
     826    Collection aces = null; 
     827 
     828    try { 
     829      if (cdUri.isCalendar()) { 
     830        aces = getSvci().getAces(cdUri.getCal()); 
     831      } else { 
     832        aces = getSvci().getAces(((CaldavComponentNode)node).getEvent()); 
     833      } 
     834 
     835      emitAccess.emitAces(aces); 
     836    } catch (Throwable t) { 
     837      throw new WebdavIntfException(t); 
     838    } 
     839  } 
     840   
     841  public void emitSupportedPrivSet(WebdavNsNode node) throws WebdavIntfException { 
     842    try { 
     843      emitAccess.emitSupportedPrivSet(); 
     844    } catch (Throwable t) { 
     845      throw new WebdavIntfException(t); 
     846    } 
     847  } 
     848 
     849  /* 
    838850  public void emitAcl(WebdavNsNode node) throws WebdavIntfException { 
    839851    CaldavBwNode uwnode = getBwnode(node); 
     
    920932                  | all | authenticated | unauthenticated 
    921933                  | property | self)> 
    922     *
     934    *
    923935 
    924936    if (whoType == Ace.whoTypeUser) { 
     
    948960    } 
    949961  } 
     962  */ 
    950963 
    951964  /** This class is the result of interpreting a principal url 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWServlet.java

    r309 r310  
    6969 * @author Mike Douglass   douglm@rpi.edu 
    7070 */ 
    71 public class CaldavUWServlet extends WebdavServlet { 
     71public class CaldavBWServlet extends WebdavServlet { 
    7272//  private ServletConfig config; 
    7373 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/ICalTags.java

    r2 r310  
    5555package edu.rpi.cct.uwcal.caldav; 
    5656 
     57import org.bedework.davdefs.CaldavDefs; 
     58 
    5759import edu.rpi.sss.util.xml.QName; 
    5860 
     
    6365public class ICalTags { 
    6466  /** */ 
    65   public static final String namespace = CaldavUWDef.icalNamespace; 
     67  public static final String namespace = CaldavDefs.icalNamespace; 
    6668 
    6769  /** */ 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/ReportMethod.java

    r2 r310  
    5656 
    5757import org.bedework.calfacade.CalFacadeDefs; 
     58import org.bedework.davdefs.CaldavTags; 
     59import org.bedework.davdefs.WebdavTags; 
    5860 
    5961import edu.rpi.cct.uwcal.caldav.calquery.CalendarData; 
     
    6971import edu.rpi.cct.webdav.servlet.shared.WebdavNsNode; 
    7072import edu.rpi.cct.webdav.servlet.shared.WebdavStatusCode; 
    71 import edu.rpi.cct.webdav.servlet.shared.WebdavTags; 
    7273import edu.rpi.sss.util.xml.XmlUtil; 
    7374 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/calquery/CalendarData.java

    r2 r310  
    5757import org.bedework.calfacade.BwDateTime; 
    5858import org.bedework.calfacade.CalFacadeUtil; 
     59import org.bedework.davdefs.CaldavTags; 
    5960 
    6061import edu.rpi.cct.uwcal.caldav.CaldavComponentNode; 
    61 import edu.rpi.cct.uwcal.caldav.CaldavTags; 
    6262import edu.rpi.cct.uwcal.caldav.TimeRange; 
    6363import edu.rpi.cct.webdav.servlet.common.MethodBase; 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/calquery/FreeBusyQuery.java

    r119 r310  
    5858import org.bedework.calfacade.BwUser; 
    5959import org.bedework.calsvci.CalSvcI; 
     60import org.bedework.davdefs.CaldavTags; 
    6061 
    6162 
    6263import edu.rpi.cct.uwcal.caldav.CalDavParseUtil; 
    6364import edu.rpi.cct.uwcal.caldav.CaldavBWIntf; 
    64 import edu.rpi.cct.uwcal.caldav.CaldavTags; 
    6565import edu.rpi.cct.uwcal.caldav.TimeRange; 
    6666import edu.rpi.cct.webdav.servlet.common.MethodBase; 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/filter/Filter.java

    r119 r310  
    5656import org.bedework.calfacade.svc.BwSubscription; 
    5757import org.bedework.calsvci.CalSvcI; 
     58import org.bedework.davdefs.CaldavTags; 
    5859 
    5960import edu.rpi.cct.uwcal.caldav.CaldavBWIntf; 
    6061import edu.rpi.cct.uwcal.caldav.CaldavComponentNode; 
    6162import edu.rpi.cct.uwcal.caldav.CalDavParseUtil; 
    62 import edu.rpi.cct.uwcal.caldav.CaldavTags; 
    6363import edu.rpi.cct.uwcal.caldav.CaldavBwNode; 
    6464import edu.rpi.cct.uwcal.caldav.TimeRange; 
  • trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/common/AclMethod.java

    r2 r310  
    5555package edu.rpi.cct.webdav.servlet.common; 
    5656 
     57import org.bedework.davdefs.WebdavTags; 
     58 
    5759import edu.rpi.cct.webdav.servlet.shared.WebdavBadRequest; 
    5860import edu.rpi.cct.webdav.servlet.shared.WebdavException; 
    5961import edu.rpi.cct.webdav.servlet.shared.WebdavIntfException; 
    6062import edu.rpi.cct.webdav.servlet.shared.WebdavNsIntf; 
    61 import edu.rpi.cct.webdav.servlet.shared.WebdavTags; 
    6263 
    6364import javax.servlet.http.HttpServletRequest; 
  • trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/common/PropFindMethod.java

    r2 r310  
    5555package edu.rpi.cct.webdav.servlet.common; 
    5656 
     57import org.bedework.davdefs.WebdavTags; 
     58 
    5759import edu.rpi.cct.webdav.servlet.shared.WebdavException; 
    5860import edu.rpi.cct.webdav.servlet.shared.WebdavNsNode; 
    5961import edu.rpi.cct.webdav.servlet.shared.WebdavProperty; 
    6062import edu.rpi.cct.webdav.servlet.shared.WebdavStatusCode; 
    61 import edu.rpi.cct.webdav.servlet.shared.WebdavTags; 
    6263import edu.rpi.sss.util.xml.QName; 
    6364 
     
    376377        } else if (tag.equals(WebdavTags.supportedPrivilegeSet)) { 
    377378          // access 5.2 
     379          getNsIntf().emitSupportedPrivSet(node); 
    378380        } else if (tag.equals(WebdavTags.currentUserPrivilegeSet)) { 
    379381          // access 5.3 
  • trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsIntf.java

    r2 r310  
    5454 
    5555package edu.rpi.cct.webdav.servlet.shared; 
     56 
     57import org.bedework.davdefs.WebdavTags; 
    5658 
    5759import edu.rpi.sss.util.xml.XmlEmit; 
     
    537539  public abstract void emitAcl(WebdavNsNode node) throws WebdavIntfException; 
    538540 
     541  /** 
     542   * @param node 
     543   * @throws WebdavIntfException 
     544   */ 
     545  public abstract void emitSupportedPrivSet(WebdavNsNode node) throws WebdavIntfException; 
     546 
    539547  /* ==================================================================== 
    540548   *                Property value methods 
  • trunk/calendar3/caldav/war/WEB-INF/publicweb.xml

    r293 r310  
    2020    <servlet-name>action</servlet-name> 
    2121    <servlet-class> 
    22       edu.rpi.cct.uwcal.caldav.CaldavUWServlet 
     22      edu.rpi.cct.uwcal.caldav.CaldavBWServlet 
    2323    </servlet-class> 
    2424    <init-param> 
  • trunk/calendar3/caldav/war/WEB-INF/userweb.xml

    r293 r310  
    2020    <servlet-name>action</servlet-name> 
    2121    <servlet-class> 
    22       edu.rpi.cct.uwcal.caldav.CaldavUWServlet 
     22      edu.rpi.cct.uwcal.caldav.CaldavBWServlet 
    2323    </servlet-class> 
    2424    <init-param> 
  • trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java

    r301 r310  
    9494import org.bedework.icalendar.IcalCallback; 
    9595import org.bedework.icalendar.TimeZoneRegistryImpl; 
     96import org.bedework.icalendar.URIgen; 
    9697//import org.bedework.mail.MailerIntf; 
    9798 
    98 import edu.rpi.cct.uwcal.common.URIgen; 
    9999import edu.rpi.cct.uwcal.resources.Resources; 
    100100 
     
    563563   * ==================================================================== */ 
    564564 
    565   public void changeAccess(Object o, Collection aces) throws CalFacadeException { 
    566     getCal().changeAccess(o, aces); 
    567   } 
    568  
    569   public Collection getAces(Object o) throws CalFacadeException { 
    570     return getCal().getAces(o); 
     565  public void changeAccess(BwShareableDbentity ent,  
     566                           Collection aces) throws CalFacadeException { 
     567    getCal().changeAccess(ent, aces); 
     568  } 
     569 
     570  public Collection getAces(BwShareableDbentity ent) throws CalFacadeException { 
     571    return getCal().getAces(ent); 
    571572  } 
    572573 
  • trunk/calendar3/calsvci/src/org/bedework/calsvci/CalSvcI.java

    r301 r310  
    7171import org.bedework.calfacade.BwUser; 
    7272import org.bedework.calfacade.CalFacadeException; 
     73import org.bedework.calfacade.base.BwShareableDbentity; 
    7374import org.bedework.calfacade.filter.BwFilter; 
    7475import org.bedework.calfacade.ifs.CalTimezones; 
     
    401402 
    402403  /** Change the access to the given calendar entity. 
    403  
    404   * @param o        Calendar object 
    405   * @param aces     Collection of ace 
    406   * @throws CalFacadeException 
    407   */ 
    408   public abstract void changeAccess(Object o, Collection aces) 
    409       throws CalFacadeException; 
    410  
    411   /** Return the ace representing the allowed access for the given object. This 
    412   * may be derived from an object higher up the tree. 
    413  
    414   * @param o 
    415   * @return Collection of ace objects 
    416   * @throws CalFacadeException 
    417   */ 
    418   public abstract Collection getAces(Object o) throws CalFacadeException; 
     404 
     405  * @param ent      BwShareableDbentity  
     406  * @param aces     Collection of ace 
     407  * @throws CalFacadeException 
     408  */ 
     409 public abstract void changeAccess(BwShareableDbentity ent,  
     410                                   Collection aces) throws CalFacadeException; 
     411 
     412 /** Return the ace representing the allowed access for the given object. This 
     413  * may be derived from an object higher up the tree. 
     414 
     415  * @param ent 
     416  * @return Collection 
     417  * @throws CalFacadeException 
     418  */ 
     419 public abstract Collection getAces(BwShareableDbentity ent) throws CalFacadeException; 
    419420 
    420421  /* ==================================================================== 
  • trunk/calendar3/common/build.xml

    r2 r310  
    3636      <pathelement location="${logkit.jar}"/> 
    3737      <pathelement location="${jtidy.jar}"/> 
    38       <pathelement location="${org.bedework.calfacadeshared.jar}"/> 
    3938    </path> 
    4039 
  • trunk/calendar3/common/src/edu/rpi/sss/util/xml/XmlEmit.java

    r2 r310  
    163163   * @throws IOException 
    164164   */ 
     165  public void closeTagNoblanks(QName tag) throws IOException { 
     166    indent -= 2; 
     167    if (indent < 0) { 
     168      indent = 0; 
     169    } 
     170    closeTagSameLine(tag); 
     171    newline(); 
     172  } 
     173 
     174  /** 
     175   * @param tag 
     176   * @throws IOException 
     177   */ 
    165178  public void closeTagSameLine(QName tag) throws IOException { 
    166179    lb(); 
     
    265278  } 
    266279 
     280  public void newline() throws IOException { 
     281    wtr.write("\n"); 
     282  } 
     283 
    267284  /* Write out the tag name, adding the ns abbreviation. 
    268285   * Also add the namespace declarations if this is the first tag 
     
    328345  private void rb() throws IOException { 
    329346    wtr.write(">"); 
    330   } 
    331  
    332   private void newline() throws IOException { 
    333     wtr.write("\n"); 
    334347  } 
    335348 
  • trunk/calendar3/davdefs/src/org/bedework/davdefs/CaldavTags.java

    r309 r310  
    5353*/ 
    5454 
    55 package edu.rpi.cct.uwcal.caldav
     55package org.bedework.davdefs
    5656 
    5757import edu.rpi.sss.util.xml.QName; 
     
    6161 * @author Mike Douglass   douglm@rpi.edu 
    6262 */ 
    63 public class CaldavTags implements CaldavUWDef
     63public class CaldavTags implements CaldavDefs
    6464  /**   */ 
    6565  public static final QName allcomp = new QName(caldavNamespace, 
  • trunk/calendar3/http/src/org/bedework/http/client/DepthHttpMethod.java

    r2 r310  
    8888  public void addRequestHeaders(HttpState st, HttpConnection conn) 
    8989          throws IOException, HttpException { 
     90    super.addRequestHeaders(st, conn); 
    9091    setRequestHeader("Depth", String.valueOf(depth)); 
    9192  } 
  • trunk/calendar3/http/src/org/bedework/http/client/HttpManager.java

    r2 r310  
    5454package org.bedework.http.client; 
    5555 
    56 import org.bedework.calenv.CalEnv; 
     56//import org.bedework.calenv.CalEnv; 
    5757import org.bedework.calfacade.CalFacadeException; 
    5858 
     
    6969 */ 
    7070public class HttpManager extends MultiThreadedHttpConnectionManager { 
    71   private int maxConnectionsPerUser; 
    72   private int maxConnectionsPerHost; 
    73   private int maxConnections; 
     71//  private int maxConnectionsPerUser; 
     72//  private int maxConnectionsPerHost; 
     73//  private int maxConnections; 
    7474 
    7575  private String clientClassName; 
     
    8181  public HttpManager(String clientClassName) throws CalFacadeException { 
    8282    try { 
     83      /* XXX These are system parameters - make them constructor pars 
    8384      maxConnectionsPerUser = CalEnv.getGlobalIntProperty("http.connections.peruser"); 
    8485      maxConnectionsPerHost = CalEnv.getGlobalIntProperty("http.connections.perhost"); 
    8586      maxConnections = CalEnv.getGlobalIntProperty("http.connections"); 
     87      */ 
    8688 
    8789      this.clientClassName = clientClassName; 
  • trunk/calendar3/http/src/org/bedework/http/client/caldav/CaldavClient.java

    r2 r310  
    8080    if ("REPORT".equals(name)) { 
    8181      setMethod(new ReportMethod(uri)); 
     82    } else if ("PROPFIND".equals(name)) { 
     83      setMethod(new PropFindMethod(uri)); 
    8284    } else { 
    8385      super.setMethodName(name, uri); 
  • trunk/calendar3/icalendar/src/org/bedework/icalendar/IcalCallback.java

    r207 r310  
    6262import org.bedework.calfacade.ifs.CalTimezones; 
    6363 
    64 import edu.rpi.cct.uwcal.common.URIgen; 
    6564 
    6665import net.fortuna.ical4j.model.component.VTimeZone; 
  • trunk/calendar3/icalendar/src/org/bedework/icalendar/VEventUtil.java

    r2 r310  
    6464import org.bedework.calfacade.CalFacadeException; 
    6565 
    66 import edu.rpi.cct.uwcal.common.URIgen; 
    6766 
    6867import net.fortuna.ical4j.model.CategoryList; 
  • trunk/calendar3/synchml/src/edu/rpi/cct/uwcal/synchml/common/Synchml.java

    r301 r310  
    6969import org.bedework.icalendar.BwEventUtil; 
    7070import org.bedework.icalendar.IcalTranslator; 
    71  
    72 import edu.rpi.cct.uwcal.common.URIgen; 
     71import org.bedework.icalendar.URIgen; 
     72 
    7373 
    7474import net.fortuna.ical4j.model.component.VEvent; 
  • trunk/calendar3/test/build.xml

    r2 r310  
    1111 
    1212     Authors: Mike Douglass   douglm@rpi.edu 
    13              Greg Barnes 
     13            Greg Barnes 
    1414     =================================================================== --> 
    1515 
    16 <project name="uwcal.testsuite" default="test"> 
     16<project name="bedework.testsuite" default="test"> 
    1717  <property name="source.home" location="${org.bedework.testsuite.base}/src"/> 
    1818  <property name="base.name" value="test"/> 
  • trunk/calendar3/test/src/org/bedework/tests/caldav/CaldavClientIo.java

    r2 r310  
    130130   */ 
    131131  public int sendRequest(String method, String url, String user, String pw, 
    132                           Header[] hdrs, String contentType, int contentLen, 
    133                           byte[] content) throws Throwable { 
     132                         Header[] hdrs, String contentType, int contentLen, 
     133                         byte[] content) throws Throwable { 
     134    int sz = 0; 
     135    if (content != null) { 
     136      sz = content.length; 
     137    } 
     138     
     139    System.out.println("About to send request: method=" + method + 
     140                       " contentLen=" + contentLen + 
     141                       " content.length=" + sz); 
     142     
    134143    client.setMethodName(method, url); 
    135144 
     
    153162      contentType = "text/xml"; 
    154163    } 
    155  
    156164 
    157165    if (content != null) { 
  • trunk/calendar3/test/src/org/bedework/tests/caldav/TestCalDav.java

    r2 r310  
    9696 
    9797  private static String user = "douglm"; 
    98   private static String pw= "bedework"; 
     98  private static String pw = "bedework"; 
    9999 
    100100  private static final String fileRepository = "/home/douglm/calendar3/test/caldavTestData/eg"; 
  • trunk/calendar3/test/src/org/bedework/tests/synchml/SynchmlTest.java

    r2 r310  
    5656 
    5757import org.bedework.calfacade.BwEvent; 
     58import org.bedework.icalendar.URIgen; 
    5859import org.bedework.webcommon.BwWebURIgen; 
    5960 
    60 import edu.rpi.cct.uwcal.common.URIgen; 
    6161import edu.rpi.cct.uwcal.synchml.common.IcalSynchState; 
    6262import edu.rpi.cct.uwcal.synchml.common.Synchml; 
  • trunk/calendar3/test/src/org/bedework/tests/webcommon/UWCalWebURIgenTest.java

    r2 r310  
    5757import org.bedework.calfacade.BwLocation; 
    5858import org.bedework.calfacade.BwSponsor; 
     59import org.bedework.icalendar.URIgen; 
    5960import org.bedework.webcommon.BwWebURIgen; 
    6061 
    61 import edu.rpi.cct.uwcal.common.URIgen; 
    6262 
    6363 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/BwWebURIgen.java

    r2 r310  
    5858import org.bedework.calfacade.BwSponsor; 
    5959import org.bedework.calfacade.CalFacadeException; 
     60import org.bedework.icalendar.URIgen; 
    6061 
    61 import edu.rpi.cct.uwcal.common.URIgen; 
    6262 
    6363import java.net.URI;