Changeset 509
- Timestamp:
- 05/28/06 20:16:48
- Files:
-
- trunk/calendar3/appcommon/src/org/bedework/appcommon/AccessAppUtil.java (deleted)
- trunk/calendar3/appcommon/src/org/bedework/appcommon/AccessXmlUtil.java (added)
- trunk/calendar3/appcommon/src/org/bedework/appcommon/EventFormatter.java (modified) (1 diff)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWIntf.java (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavCalNode.java (modified) (3 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavComponentNode.java (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavUserNode.java (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/EmitAccess.java (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsIntf.java (modified) (3 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsNode.java (modified) (2 diffs)
- trunk/calendar3/test/caldavTestData/eg/content/eg15.xml (modified) (1 diff)
- trunk/calendar3/webcommon/src/org/bedework/webcommon/taglib/EmitAclTag.java (modified) (2 diffs)
- trunk/calendar3/webcommon/src/org/bedework/webcommon/taglib/EmitCurrentPrivsTag.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar3/appcommon/src/org/bedework/appcommon/EventFormatter.java
r415 r509 217 217 // Acl acl = svci.getAcl(getEvent()); 218 218 Acl acl = eventInfo.getCurrentAccess().acl; 219 xmlAccess = Access AppUtil.getXmlAclString(acl);219 xmlAccess = AccessXmlUtil.getXmlAclString(acl); 220 220 } 221 221 } catch (Throwable t) { trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWIntf.java
r508 r509 54 54 package edu.rpi.cct.uwcal.caldav; 55 55 56 import org.bedework.appcommon.Access AppUtil;56 import org.bedework.appcommon.AccessXmlUtil; 57 57 import org.bedework.calfacade.BwCalendar; 58 58 import org.bedework.calfacade.BwEvent; … … 785 785 findPriv: { 786 786 // ENUM 787 for (priv = 0; priv < Access AppUtil.privTags.length; priv++) {788 if (MethodBase.nodeMatches(el, Access AppUtil.privTags[priv])) {787 for (priv = 0; priv < AccessXmlUtil.privTags.length; priv++) { 788 if (MethodBase.nodeMatches(el, AccessXmlUtil.privTags[priv])) { 789 789 break findPriv; 790 790 } trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavCalNode.java
r507 r509 63 63 import org.bedework.icalendar.VFreeUtil; 64 64 65 import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 65 66 import edu.rpi.cct.webdav.servlet.shared.WebdavIntfException; 66 67 68 import java.util.ArrayList; 67 69 import java.util.Collection; 68 import java.util.Enumeration;69 import java.util.Vector;70 70 71 71 import net.fortuna.ical4j.model.Calendar; … … 139 139 140 140 if (events == null) { 141 return new Vector();141 return new ArrayList(); 142 142 } 143 143 … … 187 187 * ==================================================================== */ 188 188 189 /** Return all properties special to this namespace for this node. 190 * For example, if there is a creator property there will be a 191 * WebdavProperty object for the property 192 * 193 * @return Enumeration 194 */ 195 public Enumeration properties() { 196 return null; 189 public CurrentAccess getCurrentAccess() throws WebdavIntfException { 190 BwCalendar cal = getCDURI().getCal(); 191 if (cal == null) { 192 return null; 193 } 194 195 return cal.getCurrentAccess(); 197 196 } 198 197 trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavComponentNode.java
r508 r509 64 64 //import org.bedework.icalendar.IcalUtil; 65 65 66 import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 66 67 import edu.rpi.cct.uwcal.caldav.calquery.CalendarData; 67 68 import edu.rpi.cct.webdav.servlet.shared.WebdavIntfException; … … 316 317 * ==================================================================== */ 317 318 319 public CurrentAccess getCurrentAccess() throws WebdavIntfException { 320 if (eventInfo == null) { 321 return null; 322 } 323 324 return eventInfo.getCurrentAccess(); 325 } 326 318 327 public void setLastmodDate(String val) throws WebdavIntfException { 319 328 init(true); trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavUserNode.java
r2 r509 58 58 import org.bedework.icalendar.IcalTranslator; 59 59 60 import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 60 61 import edu.rpi.cct.webdav.servlet.shared.WebdavIntfException; 61 62 62 63 import java.util.Collection; 63 import java.util.Enumeration;64 64 65 65 /** Class to represent a user in caldav. … … 127 127 * ==================================================================== */ 128 128 129 /** Return all properties special to this namespace for this node. 130 * For example, if there is a creator property there will be a 131 * WebdavProperty object for the property 132 * 133 * @return Enumeration 134 */ 135 public Enumeration properties() { 129 public CurrentAccess getCurrentAccess() throws WebdavIntfException { 136 130 return null; 137 131 } trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/EmitAccess.java
r415 r509 54 54 package edu.rpi.cct.uwcal.caldav; 55 55 56 import org.bedework.appcommon.AccessAppUtil; 56 import org.bedework.appcommon.AccessXmlUtil; 57 57 58 import edu.rpi.sss.util.xml.XmlEmit; 58 59 … … 61 62 * 62 63 */ 63 public class EmitAccess extends Access AppUtil {64 public class EmitAccess extends AccessXmlUtil { 64 65 private String namespacePrefix; 65 66 trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsIntf.java
r508 r509 55 55 package edu.rpi.cct.webdav.servlet.shared; 56 56 57 import org.bedework.appcommon.AccessXmlUtil; 57 58 import org.bedework.davdefs.WebdavTags; 58 59 … … 60 61 import edu.rpi.sss.util.xml.XmlEmit; 61 62 import edu.rpi.sss.util.xml.XmlUtil; 63 import edu.rpi.cct.uwcal.access.PrivilegeSet; 64 import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 62 65 import edu.rpi.cct.webdav.servlet.common.MethodBase; 63 66 import edu.rpi.cct.webdav.servlet.common.WebdavServlet; … … 672 675 } else if (tag.equals(WebdavTags.currentUserPrivilegeSet)) { 673 676 // access 5.3 677 CurrentAccess ca = node.getCurrentAccess(); 678 if (ca != null) { 679 PrivilegeSet ps = ca.privileges; 680 char[] privileges = ps.getPrivileges(); 681 682 openPropstat(); 683 AccessXmlUtil.emitCurrentPrivSet(xml, privileges); 684 closePropstat(); 685 } 674 686 } else if (tag.equals(WebdavTags.acl)) { 675 687 // access 5.4 trunk/calendar3/caldav/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsNode.java
r2 r509 55 55 package edu.rpi.cct.webdav.servlet.shared; 56 56 57 import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 58 57 59 import java.io.Serializable; 58 60 import javax.servlet.http.HttpServletResponse; … … 155 157 */ 156 158 public abstract String getOwner() throws WebdavIntfException; 159 160 /** Get the current access granted to this principal for this node. 161 * 162 * @return CurrentAccess 163 * @throws WebdavIntfException 164 */ 165 public abstract CurrentAccess getCurrentAccess() throws WebdavIntfException; 157 166 158 167 /* ==================================================================== trunk/calendar3/test/caldavTestData/eg/content/eg15.xml
r423 r509 5 5 <D:owner/> 6 6 <D:acl/> 7 <D:current-user-privilege-set/> 7 8 <C:calendar-timezone/> 8 9 <C:max-resource-size/> trunk/calendar3/webcommon/src/org/bedework/webcommon/taglib/EmitAclTag.java
r331 r509 54 54 package org.bedework.webcommon.taglib; 55 55 56 import org.bedework.appcommon.AccessAppUtil; 56 57 import org.bedework.appcommon.AccessXmlUtil; 57 58 58 59 import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; … … 105 106 } 106 107 107 return Access AppUtil.getXmlAclString(ca.acl);108 return AccessXmlUtil.getXmlAclString(ca.acl); 108 109 } 109 110 } trunk/calendar3/webcommon/src/org/bedework/webcommon/taglib/EmitCurrentPrivsTag.java
r415 r509 54 54 package org.bedework.webcommon.taglib; 55 55 56 import org.bedework.appcommon.AccessAppUtil; 56 57 import org.bedework.appcommon.AccessXmlUtil; 57 58 58 59 import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; … … 122 123 } 123 124 124 return Access AppUtil.getCurrentPrivSetString(ca.privileges);125 return AccessXmlUtil.getCurrentPrivSetString(ca.privileges); 125 126 } 126 127
