Changeset 310
- Timestamp:
- 03/30/06 11:51:14
- Files:
-
- trunk/calendar3/access/build.xml (modified) (3 diffs)
- trunk/calendar3/access/src/edu/rpi/cct/uwcal/access/Access.java (modified) (3 diffs)
- trunk/calendar3/appcommon/build.xml (modified) (1 diff)
- trunk/calendar3/appcommon/src/org/bedework/appcommon/AccessUtil.java (added)
- trunk/calendar3/bldfiles/buildwar.xml (modified) (1 diff)
- trunk/calendar3/bldfiles/defjars.properties (modified) (1 diff)
- trunk/calendar3/bldfiles/globalDefs.xml (modified) (1 diff)
- trunk/calendar3/build.xml (modified) (7 diffs)
- trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/AccessUtil.java (modified) (3 diffs)
- trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/CalintfImpl.java (modified) (2 diffs)
- trunk/calendar3/calFacade/src/org/bedework/calfacade/base/CalintfBase.java (modified) (1 diff)
- trunk/calendar3/calFacade/src/org/bedework/calfacade/ifs/Calintf.java (modified) (2 diffs)
- trunk/calendar3/caldav/build.xml (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CDMkcolMethod.java (modified) (1 diff)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWIntf.java (modified) (12 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWServlet.java (moved) (moved from trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavUWServlet.java) (1 diff)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavUWDef.java (deleted)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/EmitAccess.java (added)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/ICalTags.java (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/ReportMethod.java (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/calquery/CalendarData.java (modified) (1 diff)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/calquery/FreeBusyQuery.java (modified) (1 diff)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/filter/Filter.java (modified) (1 diff)
- trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/common/AclMethod.java (modified) (1 diff)
- trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/common/PropFindMethod.java (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsIntf.java (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/shared/WebdavTags.java (deleted)
- trunk/calendar3/caldav/war/WEB-INF/publicweb.xml (modified) (1 diff)
- trunk/calendar3/caldav/war/WEB-INF/userweb.xml (modified) (1 diff)
- trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java (modified) (2 diffs)
- trunk/calendar3/calsvci/src/org/bedework/calsvci/CalSvcI.java (modified) (2 diffs)
- trunk/calendar3/common/build.xml (modified) (1 diff)
- trunk/calendar3/common/src/edu/rpi/cct/uwcal/common/URIgen.java (deleted)
- trunk/calendar3/common/src/edu/rpi/sss/util/xml/XmlEmit.java (modified) (3 diffs)
- trunk/calendar3/davdefs (added)
- trunk/calendar3/davdefs/build.xml (added)
- trunk/calendar3/davdefs/src (added)
- trunk/calendar3/davdefs/src/org (added)
- trunk/calendar3/davdefs/src/org/bedework (added)
- trunk/calendar3/davdefs/src/org/bedework/davdefs (added)
- trunk/calendar3/davdefs/src/org/bedework/davdefs/CaldavDefs.java (added)
- trunk/calendar3/davdefs/src/org/bedework/davdefs/CaldavTags.java (moved) (moved from trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavTags.java) (2 diffs)
- trunk/calendar3/davdefs/src/org/bedework/davdefs/WebdavTags.java (added)
- trunk/calendar3/http/src/org/bedework/http/client/DepthHttpMethod.java (modified) (1 diff)
- trunk/calendar3/http/src/org/bedework/http/client/HttpManager.java (modified) (3 diffs)
- trunk/calendar3/http/src/org/bedework/http/client/caldav/CaldavClient.java (modified) (1 diff)
- trunk/calendar3/http/src/org/bedework/http/client/caldav/PropFindMethod.java (added)
- trunk/calendar3/icalendar/src/org/bedework/icalendar/IcalCallback.java (modified) (1 diff)
- trunk/calendar3/icalendar/src/org/bedework/icalendar/URIgen.java (added)
- trunk/calendar3/icalendar/src/org/bedework/icalendar/VEventUtil.java (modified) (1 diff)
- trunk/calendar3/synchml/src/edu/rpi/cct/uwcal/synchml/common/Synchml.java (modified) (1 diff)
- trunk/calendar3/test/build.xml (modified) (1 diff)
- trunk/calendar3/test/caldavTestData/access (added)
- trunk/calendar3/test/caldavTestData/access/content (added)
- trunk/calendar3/test/caldavTestData/access/content/t1.xml (added)
- trunk/calendar3/test/caldavTestData/access/supportedPriv.txt (added)
- trunk/calendar3/test/caldavTestData/access/t1.test (added)
- trunk/calendar3/test/caldavTestData/access/tests1 (added)
- trunk/calendar3/test/src/org/bedework/tests/caldav/CaldavClientIo.java (modified) (2 diffs)
- trunk/calendar3/test/src/org/bedework/tests/caldav/TestCalDav.java (modified) (1 diff)
- trunk/calendar3/test/src/org/bedework/tests/synchml/SynchmlTest.java (modified) (1 diff)
- trunk/calendar3/test/src/org/bedework/tests/webcommon/UWCalWebURIgenTest.java (modified) (1 diff)
- trunk/calendar3/webcommon/src/org/bedework/webcommon/BwWebURIgen.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar3/access/build.xml
r2 r310 1 1 <?xml version="1.0"?> 2 2 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. 4 4 5 5 This file will probably need no modification as it is assumed that the … … 33 33 34 34 <target name="build" depends="init" 35 description="Compile UW calendaraccess control classes">35 description="Compile access control classes"> 36 36 <!-- ==================== Sources and classes ====================== --> 37 37 … … 47 47 48 48 <path id="compile.classpath"> 49 <pathelement location="${org.bedework.c alfacadeshared.jar}"/>49 <pathelement location="${org.bedework.common.jar}"/> 50 50 <pathelement location="${org.bedework.locale.jar}"/> 51 51 <pathelement location="${log4j.jar}"/> trunk/calendar3/access/src/edu/rpi/cct/uwcal/access/Access.java
r2 r310 56 56 import java.io.Serializable; 57 57 58 /** Class to handle access control for the calendar. Because we may be59 * evaluating accessfrequently 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. 60 60 * 61 61 * <p>This class is created for a session or perhaps a thread and reused to … … 64 64 * will normally represent the access as a number of objects. 65 65 * 66 * @author Mike Douglass douglm @rpi.edu66 * @author Mike Douglass douglm @ rpi.edu 67 67 */ 68 68 public class Access implements Serializable { … … 151 151 } 152 152 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 153 162 /** Evaluating an ACL 154 163 * trunk/calendar3/appcommon/build.xml
r18 r310 35 35 <pathelement location="${ical4j.jar}"/> 36 36 <pathelement location="${log4j.jar}"/> 37 <pathelement location="${org.bedework.access.jar}"/> 37 38 <pathelement location="${org.bedework.common.jar}"/> 38 39 <pathelement location="${org.bedework.calsvci.jar}"/> 39 40 <pathelement location="${org.bedework.calfacadeshared.jar}"/> 41 <pathelement location="${org.bedework.davdefs.jar}"/> 40 42 <pathelement location="${org.bedework.ical.jar}"/> 41 43 <pathelement location="${org.bedework.locale.jar}"/> trunk/calendar3/bldfiles/buildwar.xml
r297 r310 234 234 <copy todir="${app.dest.lib}" file="${org.bedework.ical.jar}" /> 235 235 <copy todir="${app.dest.lib}" file="${org.bedework.common.jar}" /> 236 <copy todir="${app.dest.lib}" file="${org.bedework.davdefs.jar}" /> 236 237 <copy todir="${app.dest.lib}" file="${org.bedework.appcommon.jar}" /> 237 238 <copy todir="${app.dest.lib}" file="${org.bedework.webcommon.jar}" /> trunk/calendar3/bldfiles/defjars.properties
r296 r310 126 126 org.bedework.config.jar=${org.bedework.temp.jars}/${org.bedework.config.jar.name} 127 127 128 org.bedework.davdefs.jar.name=bwdavdefs-${product.version}.jar 129 org.bedework.davdefs.jar=${org.bedework.temp.jars}/${org.bedework.davdefs.jar.name} 130 128 131 org.bedework.deployment.jar.name=bwdeployment-${product.version}.jar 129 132 org.bedework.deployment.jar=${org.bedework.temp.jars}/${org.bedework.deployment.jar.name} trunk/calendar3/bldfiles/globalDefs.xml
r235 r310 81 81 <property name="org.bedework.config.base" location="${calendar.dir}/config" /> 82 82 <property name="org.bedework.core.base" location="${calendar.dir}/calCore" /> 83 <property name="org.bedework.davdefs.base" location="${calendar.dir}/davdefs" /> 83 84 <property name="org.bedework.deployment.base" location="${calendar.dir}/deployment" /> 84 85 <property name="org.bedework.dumprestore.base" location="${calendar.dir}/dumprestore" /> trunk/calendar3/build.xml
r260 r310 102 102 103 103 <target name="bld.all" 104 depends="bld.locale,bld. access,bld.calfacade,105 bld.calenv,bld.ical,bld.co mmon,bld.core,104 depends="bld.locale,bld.common,bld.access,bld.davdefs,bld.calfacade, 105 bld.calenv,bld.ical,bld.core, 106 106 bld.http,bld.caldavclientapi, 107 107 bld.calsvci,bld.mail,bld.logging, … … 247 247 ${org.bedework.common.base}/src: 248 248 ${org.bedework.config.base}/src: 249 ${org.bedework.davdefs.base}/src: 249 250 ${org.bedework.dumprestore.base}/src: 250 251 ${org.bedework.http.base}/src: … … 277 278 </target> 278 279 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 279 291 <!-- ======================== calfacade target ========================= 280 292 This builds the back end facade for the core of the calendar. … … 339 351 340 352 <target name="bld.common" 341 depends="init,bld. calfacade,bld.locale"353 depends="init,bld.locale" 342 354 description="Build calendar common classes jar"> 343 355 <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" 344 367 target="build" /> 345 368 </target> … … 361 384 362 385 <target name="bld.caldavclientapi" 363 depends="init,bld.http,bld. calfacade"386 depends="init,bld.http,bld.davdefs,bld.calfacade" 364 387 description="Build calendar caldav client api classes jar"> 365 388 <ant antfile="${org.bedework.caldavClientApi.base}/build.xml" inheritrefs="true" … … 419 442 description="Build icalendar classes jar"> 420 443 <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"432 444 target="build" /> 433 445 </target> … … 503 515 504 516 <target name="bld.caldav" if="org.bedework.build.caldav" 505 depends="init,bld. appcommon"517 depends="init,bld.davdefs,bld.appcommon" 506 518 description="Build calendar caldav suite"> 507 519 <ant antfile="${org.bedework.caldav.base}/build.xml" inheritrefs="true" trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/AccessUtil.java
r301 r310 163 163 /** Change the access to the given calendar entity using the supplied aces. 164 164 * 165 * @param o Calendar object165 * @param ent BwShareableDbentity 166 166 * @param aces Collection of ace objects 167 167 * @throws CalFacadeException 168 168 */ 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); 171 172 172 173 try { … … 182 183 } 183 184 184 BwShareableDbentity sdbe = (BwShareableDbentity)o; 185 186 sdbe.setAccess(new String(acl.encode())); 185 ent.setAccess(new String(acl.encode())); 187 186 } catch (Throwable t) { 188 187 throw new CalFacadeException(t); … … 197 196 * @throws CalFacadeException 198 197 */ 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); 207 200 } 208 201 trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/CalintfImpl.java
r301 r310 75 75 import org.bedework.calfacade.CalFacadeDefs; 76 76 import org.bedework.calfacade.CalFacadeException; 77 import org.bedework.calfacade.base.BwShareableDbentity; 77 78 import org.bedework.calfacade.filter.BwFilter; 78 79 import org.bedework.calfacade.ifs.CalTimezones; … … 684 685 * ==================================================================== */ 685 686 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); 695 697 } 696 698 trunk/calendar3/calFacade/src/org/bedework/calfacade/base/CalintfBase.java
r301 r310 369 369 * ==================================================================== */ 370 370 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 { 377 378 checkOpen(); 378 379 throw new CalFacadeUnimplementedException(); trunk/calendar3/calFacade/src/org/bedework/calfacade/ifs/Calintf.java
r301 r310 65 65 import org.bedework.calfacade.BwUser; 66 66 import org.bedework.calfacade.CalFacadeException; 67 import org.bedework.calfacade.base.BwShareableDbentity; 67 68 import org.bedework.calfacade.filter.BwFilter; 68 69 import org.bedework.calfacade.ifs.Groups; … … 355 356 /** Change the access to the given calendar entity. 356 357 * 357 * @param o Calendar object358 * @param ent BwShareableDbentity 358 359 * @param aces Collection of ace 359 360 * @throws CalFacadeException 360 361 */ 361 public void changeAccess(Object o, Collection aces) throws CalFacadeException; 362 public void changeAccess(BwShareableDbentity ent, 363 Collection aces) throws CalFacadeException; 362 364 363 365 /** Return the ace representing the allowed access for the given object. This 364 366 * may be derived from an object higher up the tree. 365 367 * 366 * @param o368 * @param ent 367 369 * @return Collection 368 370 * @throws CalFacadeException 369 371 */ 370 public Collection getAces( Object o) throws CalFacadeException;372 public Collection getAces(BwShareableDbentity ent) throws CalFacadeException; 371 373 372 374 /* ==================================================================== trunk/calendar3/caldav/build.xml
r2 r310 45 45 46 46 <!-- Include the location of the compiled calendar classes --> 47 <pathelement location="${org.bedework.appcommon.jar}"/> 47 48 <pathelement location="${org.bedework.calenv.jar}"/> 48 49 <pathelement location="${org.bedework.access.jar}"/> … … 51 52 <pathelement location="${org.bedework.calsvci.jar}"/> 52 53 <pathelement location="${org.bedework.calsvc.jar}"/> 54 <pathelement location="${org.bedework.davdefs.jar}"/> 53 55 <pathelement location="${org.bedework.ical.jar}"/> 54 56 </path> trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CDMkcolMethod.java
r2 r310 61 61 import javax.servlet.http.HttpServletResponse; 62 62 63 import org.bedework.davdefs.CaldavTags; 63 64 import org.w3c.dom.Document; 64 65 import org.w3c.dom.Element; trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWIntf.java
r301 r310 52 52 to the maximum extent the law permits. 53 53 */ 54 55 54 package edu.rpi.cct.uwcal.caldav; 56 55 56 import org.bedework.appcommon.AccessUtil; 57 57 import org.bedework.calfacade.BwCalendar; 58 58 import org.bedework.calfacade.BwEvent; … … 64 64 import org.bedework.calsvci.CalSvcI; 65 65 import org.bedework.calsvci.CalSvcIPars; 66 import org.bedework.davdefs.CaldavDefs; 67 import org.bedework.davdefs.CaldavTags; 68 import org.bedework.davdefs.WebdavTags; 66 69 import org.bedework.icalendar.IcalMalformedException; 67 70 import org.bedework.icalendar.IcalTranslator; … … 69 72 import edu.rpi.cct.uwcal.access.Ace; 70 73 import edu.rpi.cct.uwcal.access.Acl; 71 import edu.rpi.cct.uwcal.access.Privilege;72 74 73 75 import edu.rpi.cct.uwcal.caldav.filter.Filter; 74 76 import edu.rpi.cct.uwcal.caldav.calquery.FreeBusyQuery; 75 //import edu.rpi.cct.uwcal.common.URIgen;76 77 //import edu.rpi.cct.uwcal.webcommon.UWCalWebURIgen;78 77 79 78 import edu.rpi.cct.webdav.servlet.common.MethodBase; … … 85 84 import edu.rpi.cct.webdav.servlet.shared.WebdavNsNode; 86 85 import 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;90 86 91 87 import java.io.IOException; … … 127 123 */ 128 124 private String namespacePrefix; 125 126 private EmitAccess emitAccess; 129 127 130 128 /* Prefix for out properties */ … … 194 192 publicCalendarRoot = getSvci().getSyspars().getPublicCalendarRoot(); 195 193 userCalendarRoot = getSvci().getSyspars().getUserCalendarRoot(); 194 195 emitAccess = new EmitAccess(namespacePrefix, xml); 196 196 } catch (Throwable t) { 197 197 throw new WebdavIntfException(t); … … 218 218 public void addNamespace() throws WebdavIntfException { 219 219 try { 220 xml.addNs(Caldav UWDef.caldavNamespace);221 xml.addNs(Caldav UWDef.icalNamespace);220 xml.addNs(CaldavDefs.caldavNamespace); 221 xml.addNs(CaldavDefs.icalNamespace); 222 222 } catch (Throwable t) { 223 223 throw new WebdavIntfException(t); … … 769 769 } 770 770 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 787 771 public void parsePrivilege(AclInfo ainfo, Node nd, 788 772 boolean grant) throws WebdavIntfException { … … 799 783 800 784 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])) { 803 788 break findPriv; 804 789 } … … 836 821 } 837 822 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 /* 838 850 public void emitAcl(WebdavNsNode node) throws WebdavIntfException { 839 851 CaldavBwNode uwnode = getBwnode(node); … … 920 932 | all | authenticated | unauthenticated 921 933 | property | self)> 922 * /934 * / 923 935 924 936 if (whoType == Ace.whoTypeUser) { … … 948 960 } 949 961 } 962 */ 950 963 951 964 /** This class is the result of interpreting a principal url trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWServlet.java
r309 r310 69 69 * @author Mike Douglass douglm@rpi.edu 70 70 */ 71 public class Caldav UWServlet extends WebdavServlet {71 public class CaldavBWServlet extends WebdavServlet { 72 72 // private ServletConfig config; 73 73 trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/ICalTags.java
r2 r310 55 55 package edu.rpi.cct.uwcal.caldav; 56 56 57 import org.bedework.davdefs.CaldavDefs; 58 57 59 import edu.rpi.sss.util.xml.QName; 58 60 … … 63 65 public class ICalTags { 64 66 /** */ 65 public static final String namespace = Caldav UWDef.icalNamespace;67 public static final String namespace = CaldavDefs.icalNamespace; 66 68 67 69 /** */ trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/ReportMethod.java
r2 r310 56 56 57 57 import org.bedework.calfacade.CalFacadeDefs; 58 import org.bedework.davdefs.CaldavTags; 59 import org.bedework.davdefs.WebdavTags; 58 60 59 61 import edu.rpi.cct.uwcal.caldav.calquery.CalendarData; … … 69 71 import edu.rpi.cct.webdav.servlet.shared.WebdavNsNode; 70 72 import edu.rpi.cct.webdav.servlet.shared.WebdavStatusCode; 71 import edu.rpi.cct.webdav.servlet.shared.WebdavTags;72 73 import edu.rpi.sss.util.xml.XmlUtil; 73 74 trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/calquery/CalendarData.java
r2 r310 57 57 import org.bedework.calfacade.BwDateTime; 58 58 import org.bedework.calfacade.CalFacadeUtil; 59 import org.bedework.davdefs.CaldavTags; 59 60 60 61 import edu.rpi.cct.uwcal.caldav.CaldavComponentNode; 61 import edu.rpi.cct.uwcal.caldav.CaldavTags;62 62 import edu.rpi.cct.uwcal.caldav.TimeRange; 63 63 import edu.rpi.cct.webdav.servlet.common.MethodBase; trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/calquery/FreeBusyQuery.java
r119 r310 58 58 import org.bedework.calfacade.BwUser; 59 59 import org.bedework.calsvci.CalSvcI; 60 import org.bedework.davdefs.CaldavTags; 60 61 61 62 62 63 import edu.rpi.cct.uwcal.caldav.CalDavParseUtil; 63 64 import edu.rpi.cct.uwcal.caldav.CaldavBWIntf; 64 import edu.rpi.cct.uwcal.caldav.CaldavTags;65 65 import edu.rpi.cct.uwcal.caldav.TimeRange; 66 66 import edu.rpi.cct.webdav.servlet.common.MethodBase; trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/filter/Filter.java
r119 r310 56 56 import org.bedework.calfacade.svc.BwSubscription; 57 57 import org.bedework.calsvci.CalSvcI; 58 import org.bedework.davdefs.CaldavTags; 58 59 59 60 import edu.rpi.cct.uwcal.caldav.CaldavBWIntf; 60 61 import edu.rpi.cct.uwcal.caldav.CaldavComponentNode; 61 62 import edu.rpi.cct.uwcal.caldav.CalDavParseUtil; 62 import edu.rpi.cct.uwcal.caldav.CaldavTags;63 63 import edu.rpi.cct.uwcal.caldav.CaldavBwNode; 64 64 import edu.rpi.cct.uwcal.caldav.TimeRange; trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/common/AclMethod.java
r2 r310 55 55 package edu.rpi.cct.webdav.servlet.common; 56 56 57 import org.bedework.davdefs.WebdavTags; 58 57 59 import edu.rpi.cct.webdav.servlet.shared.WebdavBadRequest; 58 60 import edu.rpi.cct.webdav.servlet.shared.WebdavException; 59 61 import edu.rpi.cct.webdav.servlet.shared.WebdavIntfException; 60 62 import edu.rpi.cct.webdav.servlet.shared.WebdavNsIntf; 61 import edu.rpi.cct.webdav.servlet.shared.WebdavTags;62 63 63 64 import javax.servlet.http.HttpServletRequest; trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/common/PropFindMethod.java
r2 r310 55 55 package edu.rpi.cct.webdav.servlet.common; 56 56 57 import org.bedework.davdefs.WebdavTags; 58 57 59 import edu.rpi.cct.webdav.servlet.shared.WebdavException; 58 60 import edu.rpi.cct.webdav.servlet.shared.WebdavNsNode; 59 61 import edu.rpi.cct.webdav.servlet.shared.WebdavProperty; 60 62 import edu.rpi.cct.webdav.servlet.shared.WebdavStatusCode; 61 import edu.rpi.cct.webdav.servlet.shared.WebdavTags;62 63 import edu.rpi.sss.util.xml.QName; 63 64 … … 376 377 } else if (tag.equals(WebdavTags.supportedPrivilegeSet)) { 377 378 // access 5.2 379 getNsIntf().emitSupportedPrivSet(node); 378 380 } else if (tag.equals(WebdavTags.currentUserPrivilegeSet)) { 379 381 // access 5.3 trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsIntf.java
r2 r310 54 54 55 55 package edu.rpi.cct.webdav.servlet.shared; 56 57 import org.bedework.davdefs.WebdavTags; 56 58 57 59 import edu.rpi.sss.util.xml.XmlEmit; … … 537 539 public abstract void emitAcl(WebdavNsNode node) throws WebdavIntfException; 538 540 541 /** 542 * @param node 543 * @throws WebdavIntfException 544 */ 545 public abstract void emitSupportedPrivSet(WebdavNsNode node) throws WebdavIntfException; 546 539 547 /* ==================================================================== 540 548 * Property value methods trunk/calendar3/caldav/war/WEB-INF/publicweb.xml
r293 r310 20 20 <servlet-name>action</servlet-name> 21 21 <servlet-class> 22 edu.rpi.cct.uwcal.caldav.Caldav UWServlet22 edu.rpi.cct.uwcal.caldav.CaldavBWServlet 23 23 </servlet-class> 24 24 <init-param> trunk/calendar3/caldav/war/WEB-INF/userweb.xml
r293 r310 20 20 <servlet-name>action</servlet-name> 21 21 <servlet-class> 22 edu.rpi.cct.uwcal.caldav.Caldav UWServlet22 edu.rpi.cct.uwcal.caldav.CaldavBWServlet 23 23 </servlet-class> 24 24 <init-param> trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java
r301 r310 94 94 import org.bedework.icalendar.IcalCallback; 95 95 import org.bedework.icalendar.TimeZoneRegistryImpl; 96 import org.bedework.icalendar.URIgen; 96 97 //import org.bedework.mail.MailerIntf; 97 98 98 import edu.rpi.cct.uwcal.common.URIgen;99 99 import edu.rpi.cct.uwcal.resources.Resources; 100 100 … … 563 563 * ==================================================================== */ 564 564 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); 571 572 } 572 573 trunk/calendar3/calsvci/src/org/bedework/calsvci/CalSvcI.java
r301 r310 71 71 import org.bedework.calfacade.BwUser; 72 72 import org.bedework.calfacade.CalFacadeException; 73 import org.bedework.calfacade.base.BwShareableDbentity; 73 74 import org.bedework.calfacade.filter.BwFilter; 74 75 import org.bedework.calfacade.ifs.CalTimezones; … … 401 402 402 403 /** Change the access to the given calendar entity. 403 *404 * @param o Calendar object405 * @param aces Collection of ace406 * @throws CalFacadeException407 */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. This412 * may be derived from an object higher up the tree.413 *414 * @param o415 * @return Collection of ace objects416 * @throws CalFacadeException417 */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; 419 420 420 421 /* ==================================================================== trunk/calendar3/common/build.xml
r2 r310 36 36 <pathelement location="${logkit.jar}"/> 37 37 <pathelement location="${jtidy.jar}"/> 38 <pathelement location="${org.bedework.calfacadeshared.jar}"/>39 38 </path> 40 39 trunk/calendar3/common/src/edu/rpi/sss/util/xml/XmlEmit.java
r2 r310 163 163 * @throws IOException 164 164 */ 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 */ 165 178 public void closeTagSameLine(QName tag) throws IOException { 166 179 lb(); … … 265 278 } 266 279 280 public void newline() throws IOException { 281 wtr.write("\n"); 282 } 283 267 284 /* Write out the tag name, adding the ns abbreviation. 268 285 * Also add the namespace declarations if this is the first tag … … 328 345 private void rb() throws IOException { 329 346 wtr.write(">"); 330 }331 332 private void newline() throws IOException {333 wtr.write("\n");334 347 } 335 348 trunk/calendar3/davdefs/src/org/bedework/davdefs/CaldavTags.java
r309 r310 53 53 */ 54 54 55 package edu.rpi.cct.uwcal.caldav;55 package org.bedework.davdefs; 56 56 57 57 import edu.rpi.sss.util.xml.QName; … … 61 61 * @author Mike Douglass douglm@rpi.edu 62 62 */ 63 public class CaldavTags implements Caldav UWDef{63 public class CaldavTags implements CaldavDefs { 64 64 /** */ 65 65 public static final QName allcomp = new QName(caldavNamespace, trunk/calendar3/http/src/org/bedework/http/client/DepthHttpMethod.java
r2 r310 88 88 public void addRequestHeaders(HttpState st, HttpConnection conn) 89 89 throws IOException, HttpException { 90 super.addRequestHeaders(st, conn); 90 91 setRequestHeader("Depth", String.valueOf(depth)); 91 92 } trunk/calendar3/http/src/org/bedework/http/client/HttpManager.java
r2 r310 54 54 package org.bedework.http.client; 55 55 56 import org.bedework.calenv.CalEnv;56 //import org.bedework.calenv.CalEnv; 57 57 import org.bedework.calfacade.CalFacadeException; 58 58 … … 69 69 */ 70 70 public 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; 74 74 75 75 private String clientClassName; … … 81 81 public HttpManager(String clientClassName) throws CalFacadeException { 82 82 try { 83 /* XXX These are system parameters - make them constructor pars 83 84 maxConnectionsPerUser = CalEnv.getGlobalIntProperty("http.connections.peruser"); 84 85 maxConnectionsPerHost = CalEnv.getGlobalIntProperty("http.connections.perhost"); 85 86 maxConnections = CalEnv.getGlobalIntProperty("http.connections"); 87 */ 86 88 87 89 this.clientClassName = clientClassName; trunk/calendar3/http/src/org/bedework/http/client/caldav/CaldavClient.java
r2 r310 80 80 if ("REPORT".equals(name)) { 81 81 setMethod(new ReportMethod(uri)); 82 } else if ("PROPFIND".equals(name)) { 83 setMethod(new PropFindMethod(uri)); 82 84 } else { 83 85 super.setMethodName(name, uri); trunk/calendar3/icalendar/src/org/bedework/icalendar/IcalCallback.java
r207 r310 62 62 import org.bedework.calfacade.ifs.CalTimezones; 63 63 64 import edu.rpi.cct.uwcal.common.URIgen;65 64 66 65 import net.fortuna.ical4j.model.component.VTimeZone; trunk/calendar3/icalendar/src/org/bedework/icalendar/VEventUtil.java
r2 r310 64 64 import org.bedework.calfacade.CalFacadeException; 65 65 66 import edu.rpi.cct.uwcal.common.URIgen;67 66 68 67 import net.fortuna.ical4j.model.CategoryList; trunk/calendar3/synchml/src/edu/rpi/cct/uwcal/synchml/common/Synchml.java
r301 r310 69 69 import org.bedework.icalendar.BwEventUtil; 70 70 import org.bedework.icalendar.IcalTranslator; 71 72 import edu.rpi.cct.uwcal.common.URIgen; 71 import org.bedework.icalendar.URIgen; 72 73 73 74 74 import net.fortuna.ical4j.model.component.VEvent; trunk/calendar3/test/build.xml
r2 r310 11 11 12 12 Authors: Mike Douglass douglm@rpi.edu 13 Greg Barnes13 Greg Barnes 14 14 =================================================================== --> 15 15 16 <project name=" uwcal.testsuite" default="test">16 <project name="bedework.testsuite" default="test"> 17 17 <property name="source.home" location="${org.bedework.testsuite.base}/src"/> 18 18 <property name="base.name" value="test"/> trunk/calendar3/test/src/org/bedework/tests/caldav/CaldavClientIo.java
r2 r310 130 130 */ 131 131 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 134 143 client.setMethodName(method, url); 135 144 … … 153 162 contentType = "text/xml"; 154 163 } 155 156 164 157 165 if (content != null) { trunk/calendar3/test/src/org/bedework/tests/caldav/TestCalDav.java
r2 r310 96 96 97 97 private static String user = "douglm"; 98 private static String pw = "bedework";98 private static String pw = "bedework"; 99 99 100 100 private static final String fileRepository = "/home/douglm/calendar3/test/caldavTestData/eg"; trunk/calendar3/test/src/org/bedework/tests/synchml/SynchmlTest.java
r2 r310 56 56 57 57 import org.bedework.calfacade.BwEvent; 58 import org.bedework.icalendar.URIgen; 58 59 import org.bedework.webcommon.BwWebURIgen; 59 60 60 import edu.rpi.cct.uwcal.common.URIgen;61 61 import edu.rpi.cct.uwcal.synchml.common.IcalSynchState; 62 62 import edu.rpi.cct.uwcal.synchml.common.Synchml; trunk/calendar3/test/src/org/bedework/tests/webcommon/UWCalWebURIgenTest.java
r2 r310 57 57 import org.bedework.calfacade.BwLocation; 58 58 import org.bedework.calfacade.BwSponsor; 59 import org.bedework.icalendar.URIgen; 59 60 import org.bedework.webcommon.BwWebURIgen; 60 61 61 import edu.rpi.cct.uwcal.common.URIgen;62 62 63 63 trunk/calendar3/webcommon/src/org/bedework/webcommon/BwWebURIgen.java
r2 r310 58 58 import org.bedework.calfacade.BwSponsor; 59 59 import org.bedework.calfacade.CalFacadeException; 60 import org.bedework.icalendar.URIgen; 60 61 61 import edu.rpi.cct.uwcal.common.URIgen;62 62 63 63 import java.net.URI;
