Changeset 843
- Timestamp:
- 07/24/06 17:57:51
- Files:
-
- trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/CalintfImpl.java (modified) (2 diffs)
- trunk/calendar3/calEnv/build.xml (modified) (1 diff)
- trunk/calendar3/calEnv/src/org/bedework/calenv/CalEnv.java (modified) (14 diffs)
- trunk/calendar3/calEnv/src/org/bedework/calenv/CalEnvException.java (deleted)
- trunk/calendar3/calEnv/src/org/bedework/calenv/CalOptions.java (modified) (1 diff)
- trunk/calendar3/calFacade/src/org/bedework/calfacade/CalEnvException.java (added)
- trunk/calendar3/calFacade/src/org/bedework/calfacade/env (added)
- trunk/calendar3/calFacade/src/org/bedework/calfacade/env/CalEnvFactory.java (added)
- trunk/calendar3/calFacade/src/org/bedework/calfacade/env/CalEnvI.java (added)
- trunk/calendar3/calFacade/src/org/bedework/calfacade/ifs/Calintf.java (modified) (2 diffs)
- trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWIntf.java (modified) (2 diffs)
- trunk/calendar3/caldavClientApi/src/org/bedework/caldav/client/CalintfCaldavImpl.java (modified) (1 diff)
- trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java (modified) (9 diffs)
- trunk/calendar3/config/build.xml (modified) (1 diff)
- trunk/calendar3/config/src/org/bedework/webconfig/AbstractAction.java (modified) (9 diffs)
- trunk/calendar3/config/src/org/bedework/webconfig/ActionForm.java (modified) (6 diffs)
- trunk/calendar3/davdefs/src/org/bedework/davdefs/WebdavTags.java (modified) (1 diff)
- trunk/calendar3/lib/rpiaccess-2.0.jar (modified) (previous)
- trunk/calendar3/logging/src/org/bedework/logging/BwlogFactory.java (modified) (2 diffs)
- trunk/calendar3/timers/src/org/bedework/timers/Timers.java (modified) (2 diffs)
- trunk/calendar3/webcommon/src/org/bedework/webcommon/BwAbstractAction.java (modified) (5 diffs)
- trunk/calendar3/webcommon/src/org/bedework/webcommon/BwActionFormBase.java (modified) (6 diffs)
- trunk/calendar3/webcommon/src/org/bedework/webcommon/taglib/EmitCurrentPrivsTag.java (modified) (1 diff)
- trunk/calendar3/webcommon/src/org/bedework/webcommon/taglib/EmitTextTag.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/CalintfImpl.java
r841 r843 372 372 373 373 public BwSystem getSyspars() throws CalFacadeException { 374 return getSyspars(getSystemName()); 375 } 376 377 public BwSystem getSyspars(String name) throws CalFacadeException { 374 378 if (syspars == null) { 375 379 sess.namedQuery("getSystemPars"); 376 380 377 sess.setString("name", getSystemName());381 sess.setString("name", name); 378 382 379 383 syspars = (BwSystem)sess.getUnique(); … … 381 385 if (syspars == null) { 382 386 throw new CalFacadeException("No system parameters with name " + 383 getSystemName());387 name); 384 388 } 385 389 trunk/calendar3/calEnv/build.xml
r829 r843 31 31 <pathelement location="${log4j.jar}"/> 32 32 <pathelement location="${org.bedework.rpiutil.jar}"/> 33 <pathelement location="${org.bedework.calfacadeshared.jar}"/> 33 34 </path> 34 35 trunk/calendar3/calEnv/src/org/bedework/calenv/CalEnv.java
r307 r843 29 29 package org.bedework.calenv; 30 30 31 import org.bedework.calfacade.CalEnvException; 32 import org.bedework.calfacade.env.CalEnvI; 33 31 34 import java.io.InputStream; 32 import java.io.Serializable;33 35 import java.util.Properties; 34 36 import org.apache.log4j.Logger; 37 35 38 36 39 /** An interface to the outside world - the methods here provide access to … … 51 54 * that affect the back end only and those that are client only. 52 55 */ 53 public class CalEnv implements Serializable{56 public class CalEnv implements CalEnvI { 54 57 /** Location of the properties file */ 55 58 private static final String propertiesFile = … … 66 69 private String appPrefix; 67 70 68 /** Constructor. Create a caldav object using the given prefix.71 /** Initialise a caldav object using the given prefix. 69 72 * 70 73 * @param appPrefix … … 72 75 * @throws CalEnvException 73 76 */ 74 public CalEnv(String appPrefix, boolean debug) throws CalEnvException {77 public void init(String appPrefix, boolean debug) throws CalEnvException { 75 78 this.appPrefix = appPrefix; 76 79 } … … 126 129 } 127 130 } 128 131 129 132 /** Return current app prefix 130 * 133 * 131 134 * @return String app prefix 132 135 */ … … 140 143 * @throws CalEnvException 141 144 */ 142 public staticProperties getProperties() throws CalEnvException {145 public Properties getProperties() throws CalEnvException { 143 146 return getPr(); 144 147 } … … 150 153 * @throws CalEnvException 151 154 */ 152 public staticString getProperty(String name) throws CalEnvException {155 public String getProperty(String name) throws CalEnvException { 153 156 String val = getPr().getProperty(name); 154 157 … … 166 169 * @throws CalEnvException 167 170 */ 168 public staticString getOptProperty(String name) throws CalEnvException {171 public String getOptProperty(String name) throws CalEnvException { 169 172 String val = getPr().getProperty(name); 170 173 … … 178 181 * @throws CalEnvException 179 182 */ 180 public staticboolean getBoolProperty(String name) throws CalEnvException {183 public boolean getBoolProperty(String name) throws CalEnvException { 181 184 String val = getProperty(name); 182 185 … … 192 195 * @throws CalEnvException 193 196 */ 194 public staticint getIntProperty(String name) throws CalEnvException {197 public int getIntProperty(String name) throws CalEnvException { 195 198 String val = getProperty(name); 196 199 … … 212 215 * @throws CalEnvException 213 216 */ 214 public staticString getGlobalProperty(String name) throws CalEnvException {217 public String getGlobalProperty(String name) throws CalEnvException { 215 218 return getProperty(globalPrefix + name); 216 219 } … … 222 225 * @throws CalEnvException 223 226 */ 224 public staticboolean getGlobalBoolProperty(String name) throws CalEnvException {227 public boolean getGlobalBoolProperty(String name) throws CalEnvException { 225 228 return getBoolProperty(globalPrefix + name); 226 229 } … … 232 235 * @throws CalEnvException 233 236 */ 234 public staticint getGlobalIntProperty(String name) throws CalEnvException {237 public int getGlobalIntProperty(String name) throws CalEnvException { 235 238 return getIntProperty(globalPrefix + name); 236 239 } … … 245 248 * @throws CalEnvException 246 249 */ 247 public staticObject getGlobalObject(String name, Class cl) throws CalEnvException {250 public Object getGlobalObject(String name, Class cl) throws CalEnvException { 248 251 try { 249 252 String className = getGlobalProperty(name); trunk/calendar3/calEnv/src/org/bedework/calenv/CalOptions.java
r519 r843 28 28 */ 29 29 package org.bedework.calenv; 30 31 import org.bedework.calfacade.CalEnvException; 30 32 31 33 import edu.rpi.sss.util.xml.XmlUtil; trunk/calendar3/calFacade/src/org/bedework/calfacade/ifs/Calintf.java
r841 r843 182 182 public Collection getDbStats() throws CalFacadeException; 183 183 184 /** Get the system pars 184 /** Get the system pars using name supplied at init 185 185 * 186 186 * @return BwSystem object … … 188 188 */ 189 189 public BwSystem getSyspars() throws CalFacadeException; 190 191 /** Get the system pars given name 192 * 193 * @param name 194 * @return BwSystem object 195 * @throws CalFacadeException if not admin 196 */ 197 public BwSystem getSyspars(String name) throws CalFacadeException; 190 198 191 199 /** Update the system pars trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWIntf.java
r841 r843 54 54 package edu.rpi.cct.uwcal.caldav; 55 55 56 import org.bedework.calenv.CalEnv;57 56 import org.bedework.calfacade.BwCalendar; 58 57 import org.bedework.calfacade.BwEvent; 59 58 import org.bedework.calfacade.BwFreeBusy; 59 import org.bedework.calfacade.env.CalEnvFactory; 60 import org.bedework.calfacade.env.CalEnvI; 60 61 import org.bedework.calfacade.svc.EventInfo; 61 62 import org.bedework.davdefs.CaldavDefs; … … 183 184 namespace = namespacePrefix + "/schema"; 184 185 185 CalEnv env = new CalEnv(envPrefix, debug);186 CalEnvI env = CalEnvFactory.getEnv(envPrefix, debug); 186 187 187 188 sysi = (SysIntf)env.getAppObject("sysintfimpl", SysIntf.class); trunk/calendar3/caldavClientApi/src/org/bedework/caldav/client/CalintfCaldavImpl.java
r841 r843 171 171 } 172 172 173 public BwSystem getSyspars(String name) throws CalFacadeException { 174 return null; 175 } 176 173 177 public void updateSyspars(BwSystem val) throws CalFacadeException { 174 178 } trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java
r841 r843 54 54 package org.bedework.calsvc; 55 55 56 import org.bedework.calenv.CalEnv;57 56 import org.bedework.calfacade.base.BwOwnedDbentity; 58 57 import org.bedework.calfacade.base.BwShareableDbentity; … … 80 79 import org.bedework.calfacade.CalFacadeException; 81 80 import org.bedework.calfacade.CoreEventInfo; 81 import org.bedework.calfacade.env.CalEnvFactory; 82 import org.bedework.calfacade.env.CalEnvI; 82 83 import org.bedework.calfacade.filter.BwFilter; 83 84 import org.bedework.calfacade.ifs.CalTimezones; … … 131 132 */ 132 133 public class CalSvc extends CalSvcI { 134 private String systemName; 135 133 136 private CalSvcIPars pars; 134 137 … … 269 272 private transient Logger log; 270 273 271 private CalEnv env;274 private CalEnvI env; 272 275 273 276 private Resources res = new Resources(); … … 280 283 debug = pars.getDebug(); 281 284 285 env = CalEnvFactory.getEnv(pars.getEnvPrefix(), debug); 286 systemName = env.getGlobalProperty("system.name"); 287 282 288 //if (userAuth != null) { 283 289 // userAuth.reinitialise(getUserAuthCallBack()); … … 293 299 294 300 try { 295 env = new CalEnv(pars.getEnvPrefix(), debug);296 297 301 if (pars.getPublicAdmin()) { 298 302 //adminAutoDeleteSponsors = env.getAppBoolProperty("app.autodeletesponsors"); … … 363 367 364 368 public BwSystem getSyspars() throws CalFacadeException { 365 return getCal().getSyspars( );369 return getCal().getSyspars(systemName); 366 370 } 367 371 … … 437 441 438 442 public String getEnvProperty(String name) throws CalFacadeException { 439 try { 440 return CalEnv.getProperty(name); 441 } catch (Throwable t) { 442 throw new CalFacadeException(t); 443 } 443 return env.getProperty(name); 444 444 } 445 445 … … 2408 2408 } 2409 2409 2410 String systemName; 2411 2412 try { 2413 cali = (Calintf)CalEnv.getGlobalObject("calintfclass", Calintf.class); 2414 systemName = CalEnv.getGlobalProperty("system.name"); 2415 } catch (Throwable t) { 2416 throw new CalFacadeException(t); 2417 } 2410 cali = (Calintf)env.getGlobalObject("calintfclass", Calintf.class); 2418 2411 2419 2412 try { trunk/calendar3/config/build.xml
r829 r843 92 92 <pathelement location="${org.bedework.rpiutil.jar}"/> 93 93 94 <pathelement location="${org.bedework.cal env.jar}"/>94 <pathelement location="${org.bedework.calfacadeshared.jar}"/> 95 95 <pathelement location="${org.bedework.webcommon.jar}"/> 96 96 </path> trunk/calendar3/config/src/org/bedework/webconfig/AbstractAction.java
r307 r843 55 55 package org.bedework.webconfig; 56 56 57 import org.bedework.calenv.CalEnv; 57 import org.bedework.calfacade.env.CalEnvFactory; 58 import org.bedework.calfacade.env.CalEnvI; 58 59 import org.bedework.webcommon.BwSession; 59 60 import org.bedework.webcommon.BwSessionImpl; … … 146 147 if (s != null) { 147 148 } else { 148 CalEnv env = getEnv(form);149 CalEnvI env = getEnv(form); 149 150 String appName = env.getAppProperty("name"); 150 151 String appRoot = env.getAppProperty("root"); … … 156 157 BwWebUtil.setState(request, s); 157 158 } 158 159 159 160 boolean changed = false; 160 161 161 162 if (form.getPropertyCollections().size() == 0) { 162 163 changed = true; … … 164 165 changed = modulesChanged(form); 165 166 } 166 167 167 168 if (changed) { 168 169 resetProperties(form); … … 175 176 ConfigCollection modules = new Modules(); 176 177 form.addPropertyCollection(modules); 177 178 178 179 ConfigCollection globals = new Globals(); 179 180 form.addPropertyCollection(globals); 180 181 181 182 ConfigCollection syspars = new Syspars(); 182 183 form.addPropertyCollection(syspars); 183 184 184 185 Properties pr = form.getProperties(); 185 186 186 187 /* Initialise those two as they may affect the rest. */ 187 188 if (pr != null) { … … 190 191 syspars.initialise(pr, form.getErr()); 191 192 } 192 193 193 194 /* Ensure module names and types same size */ 194 195 OrderedListProperty moduleNames = 195 196 OrderedListProperty moduleNames = 196 197 (OrderedListProperty)modules.findProperty("app.names"); 197 198 OrderedMultiListProperty moduleTypes = 198 199 OrderedMultiListProperty moduleTypes = 199 200 (OrderedMultiListProperty)modules.findProperty("app.types"); 200 201 201 202 debugMsg("sizes - names=" + moduleNames.size() + " types=" + moduleTypes.size()); 202 203 203 204 if (moduleNames.size() != moduleTypes.size()) { 204 form.getErr().emit("org.bedework.config.error.badmodulenames", 205 form.getErr().emit("org.bedework.config.error.badmodulenames", 205 206 moduleNames.getValue(), moduleTypes.getValue()); 206 207 return; 207 208 } 208 209 209 210 Iterator nmit = moduleNames.iterateValues(); 210 211 Iterator typeit = moduleTypes.iterateValues(); 211 212 212 213 while (nmit.hasNext()) { 213 214 String nm = (String)nmit.next(); 214 215 String type = (String)typeit.next(); 215 216 216 217 debugMsg("generate app properties - name=" + nm + " type=" + type); 217 218 218 219 if (type.equals(webconfigType)) { 219 220 form.addPropertyCollection(new Webconfig(nm)); … … 246 247 } 247 248 248 protected ConfigCollection findCollection(String name, 249 protected ConfigCollection findCollection(String name, 249 250 ActionForm form) throws Throwable { 250 251 Collection c = form.getPropertyCollections(); … … 265 266 protected boolean modulesChanged(ActionForm form) throws Throwable { 266 267 ConfigCollection modules = findCollection(modulesCollectionName, form); 267 268 268 269 if (modules == null) { 269 270 return false; 270 271 } 271 272 OrderedListProperty moduleNames = 272 273 OrderedListProperty moduleNames = 273 274 (OrderedListProperty)modules.findProperty("app.names"); 274 275 OrderedMultiListProperty moduleTypes = 275 276 OrderedMultiListProperty moduleTypes = 276 277 (OrderedMultiListProperty)modules.findProperty("app.types"); 277 278 278 279 boolean changed = moduleNames.getChanged() || moduleTypes.getChanged(); 279 280 280 281 moduleNames.resetChanged(); 281 282 moduleTypes.resetChanged(); 282 283 283 284 return changed; 284 285 } … … 364 365 * 365 366 * @param frm 366 * @return CalEnv object - also implanted in form.367 * @throws Throwable 368 */ 369 public CalEnv getEnv(ActionForm frm) throws Throwable {370 CalEnv env = frm.getEnv();367 * @return CalEnvI object - also implanted in form. 368 * @throws Throwable 369 */ 370 public CalEnvI getEnv(ActionForm frm) throws Throwable { 371 CalEnvI env = frm.getEnv(); 371 372 if (env != null) { 372 373 return env; 373 374 } 374 375 375 env = new CalEnv(envPrefix, debug);376 env = CalEnvFactory.getEnv(envPrefix, debug); 376 377 frm.assignEnv(env); 377 378 return env; trunk/calendar3/config/src/org/bedework/webconfig/ActionForm.java
r307 r843 55 55 package org.bedework.webconfig; 56 56 57 import org.bedework.cal env.CalEnv;57 import org.bedework.calfacade.env.CalEnvI; 58 58 import org.bedework.webconfig.collections.ConfigCollection; 59 59 … … 75 75 * e.g. admin, guest etc. 76 76 */ 77 private CalEnv env;78 77 private CalEnvI env; 78 79 79 private FormFile uploadFile; 80 80 81 81 private Collection propertyCollections; 82 private Hashtable map;82 private Hashtable map; 83 83 84 84 /* The result of all this */ … … 117 117 public Collection getPropertyCollections() { 118 118 if (propertyCollections == null) { 119 propertyCollections = new Vector();119 propertyCollections = new Vector(); 120 120 map = new Hashtable(); 121 121 } … … 138 138 if (properties == null) { 139 139 try { 140 properties = (Properties)CalEnv.getProperties().clone(); 140 if (env == null) { 141 throw new Exception("No env set"); 142 } 143 properties = (Properties)env.getProperties().clone(); 141 144 } catch (Throwable t) { 142 145 getErr().emit(t); … … 146 149 } 147 150 148 /** Add a collection149 *150 * @param val151 * @throws Throwable152 */153 public void addPropertyCollection(ConfigCollection val) throws Throwable {154 String name = val.getName();151 /** Add a collection 152 * 153 * @param val 154 * @throws Throwable 155 */ 156 public void addPropertyCollection(ConfigCollection val) throws Throwable { 157 String name = val.getName(); 155 158 156 if (findPropertyCollection(name) != null) {157 throw new Exception("Duplicate property collection " + name);158 }159 if (findPropertyCollection(name) != null) { 160 throw new Exception("Duplicate property collection " + name); 161 } 159 162 160 getPropertyCollections().add(val);161 map.put(name, val);162 }163 /** Find the collection with the given name164 *165 * @param name166 * @return ConfigCollection167 */168 public ConfigCollection findPropertyCollection(String name) {163 getPropertyCollections().add(val); 164 map.put(name, val); 165 } 166 /** Find the collection with the given name 167 * 168 * @param name 169 * @return ConfigCollection 170 */ 171 public ConfigCollection findPropertyCollection(String name) { 169 172 getPropertyCollections(); 170 return (ConfigCollection)map.get(name);171 }173 return (ConfigCollection)map.get(name); 174 } 172 175 173 176 /** 174 177 * @param val 175 178 */ 176 public void assignEnv(CalEnv val) {179 public void assignEnv(CalEnvI val) { 177 180 env = val; 178 181 } … … 181 184 * @return env object 182 185 */ 183 public CalEnv getEnv() {186 public CalEnvI getEnv() { 184 187 return env; 185 188 } trunk/calendar3/davdefs/src/org/bedework/davdefs/WebdavTags.java
r833 r843 41 41 public static final String namespace = "DAV:"; 42 42 43 /** */44 public static final QName _abstract = makeQName("abstract");45 46 /** */47 public static final QName ace = makeQName("ace");48 49 /** */50 public static final QName acl = makeQName("acl");51 52 /** */53 public static final QName aclPrincipalPropSet = makeQName("acl-principal-prop-set");54 55 /** */56 public static final QName aclRestrictions = makeQName("acl-restrictions");57 58 /** */59 public static final QName all = makeQName("all");60 61 /** */62 public static final QName allowedPrincipal = makeQName("allowed-principal");63 64 /** */65 public static final QName allprop = makeQName("allprop");66 67 /** */68 public static final QName alternateURISet = makeQName("alternate-URI-set");69 70 /** */71 public static final QName authenticated = makeQName("authenticated");72 73 /** */74 public static final QName bind = makeQName("bind");75 76 /** */77 public static final QName collection = makeQName("collection");78 79 /** */80 public static final QName creationdate = makeQName("creationdate");81 82 /** */83 public static final QName currentUserPrivilegeSet = makeQName("current-user-privilege-set");84 85 /** */86 public static final QName denyBeforeGrant = makeQName("deny-before-grant");87 88 /** */89 public static final QName deny = makeQName("deny");90 91 /** */92 public static final QName description = makeQName("description");93 94 /** */95 public static final QName displayname = makeQName("displayname");96 97 /** */98 public static final QName expandProperty = makeQName("expand-property");99 100 /** */101 public static final QName getcontentlanguage = makeQName("getcontentlanguage");102 103 /** */104 public static final QName getcontentlength = makeQName("getcontentlength");105 106 /** */107 public static final QName getcontenttype = makeQName("getcontenttype");108 109 /** */110 public static final QName getetag = makeQName("getetag");111 112 /** */113 public static final QName getlastmodified = makeQName("getlastmodified");114 115 /** */116 public static final QName grant = makeQName("grant");117 118 /** */119 public static final QName grantOnly = makeQName("grant-only");120 121 /** */122 public static final QName group = makeQName("group");123 124 /** */125 public static final QName groupMemberSet = makeQName("group-member-set");126 127 /** */128 public static final QName groupMembership = makeQName("group-membership");129 130 /** */131 public static final QName href = makeQName("href");132 133 /** */134 public static final QName inherited = makeQName("inherited");135 136 /** */137 public static final QName inheritedAclSet = makeQName("inherited-acl-set");138 139 /** */140 public static final QName invert = makeQName("invert");141 142 /** */143 public static final QName limitedNumberOfAces = makeQName("limited-number-of-aces");144 145 /** */146 public static final QName lockdiscovery = makeQName("lockdiscovery");147 148 /** */149 public static final QName lockentry = makeQName("lockentry");150 151 /** */152 public static final QName lockscope = makeQName("lockscope");153 154 /** */155 public static final QName locktype = makeQName("locktype");156 157 /** */158 public static final QName match = makeQName("match");159 160 /** */161 public static final QName missingRequiredPrincipal = makeQName("missing-required-principal");162 163 /** */164 public static final QName multistatus = makeQName("multistatus");165 166 /** */167 public static final QName needPrivileges = makeQName("need-privileges");168 169 /** */170 public static final QName noAbstract = makeQName("no-abstract");171 172 /** */173 public static final QName noAceConflict = makeQName("no-ace-conflict");174 175 /** */176 public static final QName noInheritedAceConflict = makeQName("no-inherited-ace-conflict");177 178 /** */179 public static final QName noInvert = makeQName("no-invert");180 181 /** */182 public static final QName noProtectedAceConflict = makeQName("no-protected-ace-conflict");183 184 /** */185 public static final QName notSupportedPrivilege = makeQName("not-supported-privilege");186 187 /** */188 public static final QName owner = makeQName("owner");189 190 /** */191 public static final QName principal = makeQName("principal");192 193 /** */194 public static final QName principalCollectionSet = makeQName("principal-collection-set");195 196 /** */197 public static final QName principalMatch = makeQName("principal-match");198 199 /** */200 public static final QName principalProperty = makeQName("principal-property");201 202 /** */203 public static final QName principalPropertySearch = makeQName("principal-property-search");204 205 /** */206 public static final QName principalSearchProperty = makeQName("principal-search-property");207 208 /** */209 public static final QName principalSearchPropertySet = makeQName("principal-search-property-set");210 211 /** */212 public static final QName principalURL = makeQName("principal-URL");213 214 /** */215 public static final QName privilege = makeQName("privilege");216 217 /** */218 public static final QName prop = makeQName("prop");219 220 /** */221 public static final QName property = makeQName("property");222 223 /** */224 public static final QName propertySearch = makeQName("property-search");225 226 /** */227 public static final QName propname = makeQName("propname");228 229 /** */230 public static final QName propstat = makeQName("propstat");231 232 /** */233 public static final QName _protected = makeQName("protected");234 235 /** */236 public static final QName read = makeQName("read");237 238 /** */239 public static final QName readAcl = makeQName("read-acl");240 241 /** */242 public static final QName readCurrentUserPrivilegeSet = makeQName(243 "read-current-user-privilege-set");244 245 /** */246 public static final QName recognizedPrincipal = makeQName("recognized-principal");247 248 /** */249 public static final QName remove = makeQName("remove");250 251 /** */252 public static final QName requiredPrincipal = makeQName("required-principal");253 254 /** */255 public static final QName resource = makeQName("resource");256 257 /** */258 public static final QName resourcetype = makeQName("resourcetype");259 260 /** */261 public static final QName response = makeQName("response");262 263 /** */264 public static final QName responseDescription = makeQName("responsedescription");265 266 /** */267 public static final QName self = makeQName("self");268 269 /** */270 public static final QName set = makeQName("set");271 272 /** */273 public static final QName source = makeQName("source");274 275 /** */276 public static final QName status = makeQName("status");277 278 /** */279 public static final QName supportedPrivilege = makeQName("supported-privilege");280 281 /** */282 public static final QName supportedPrivilegeSet = makeQName("supported-privilege-set");283 284 /** */285 public static final QName supportedlock = makeQName("supportedlock");286 287 /** */288 public static final QName unauthenticated = makeQName("unauthenticated");289 290 /** */291 public static final QName unbind = makeQName("unbind");292 293 /** */294 public static final QName unlock = makeQName("unlock");295 296 /** */297 public static final QName write = makeQName("write");298 299 /** */300 public static final QName writeAcl = makeQName("write-acl");301 302 /** */303 public static final QName writeContent = makeQName("write-content");304 305 /** */306 public static final QName writeProperties = makeQName("write-properties");307 308 43 /** Tables of QNames indexed by name 309 44 */ 310 45 public final static HashMap qnames = new HashMap(); 46 47 /** */ 48 public static final QName _abstract = makeQName("abstract"); 49 50 /** */ 51 public static final QName ace = makeQName("ace"); 52 53 /** */ 54 public static final QName acl = makeQName("acl"); 55 56 /** */ 57 public static final QName aclPrincipalPropSet = makeQName("acl-principal-prop-set"); 58 59 /** */ 60 public static final QName aclRestrictions = makeQName("acl-restrictions"); 61 62 /** */ 63 public static final QName all = makeQName("all"); 64 65 /** */ 66 public static final QName allowedPrincipal = makeQName("allowed-principal"); 67 68 /** */ 69 public static final QName allprop = makeQName("allprop"); 70 71 /** */ 72 public static final QName alternateURISet = makeQName("alternate-URI-set"); 73 74 /** */ 75 public static final QName authenticated = makeQName("authenticated"); 76 77 /** */ 78 public static final QName bind = makeQName("bind"); 79 80 /** */ 81 public static final QName collection = makeQName("collection"); 82 83 /** */ 84 public static final QName creationdate = makeQName("creationdate"); 85 86 /** */ 87 public static final QName currentUserPrivilegeSet = makeQName("current-user-privilege-set"); 88 89 /** */ 90 public static final QName denyBeforeGrant = makeQName("deny-before-grant"); 91 92 /** */ 93 public static final QName deny = makeQName("deny"); 94 95 /** */ 96 public static final QName description = makeQName("description"); 97 98 /** */ 99 public static final QName displayname = makeQName("displayname"); 100 101 /** */ 102 public static final QName expandProperty = makeQName("expand-property"); 103 104 /** */ 105 public static final QName getcontentlanguage = makeQName("getcontentlanguage"); 106 107 /** */ 108 public static final QName getcontentlength = makeQName("getcontentlength"); 109 110 /** */ 111 public static final QName getcontenttype = makeQName("getcontenttype"); 112 113 /** */ 114 public static final QName getetag = makeQName("getetag"); 115 116 /** */ 117 public static final QName getlastmodified = makeQName("getlastmodified"); 118 119 /** */ 120 public static final QName grant = makeQName("grant"); 121 122 /** */ 123 public static final QName grantOnly = makeQName("grant-only"); 124 125 /** */ 126 public static final QName group = makeQName("group"); 127 128 /** */ 129 public static final QName groupMemberSet = makeQName("group-member-set"); 130 131 /** */ 132 public static final QName groupMembership = makeQName("group-membership"); 133 134 /** */ 135 public static final QName href = makeQName("href"); 136 137 /** */ 138 public static final QName inherited = makeQName("inherited"); 139 140 /** */ 141 public static final QName inheritedAclSet = makeQName("inherited-acl-set"); 142 143 /** */ 144 public static final QName invert = makeQName("invert"); 145 146 /** */ 147 public static final QName limitedNumberOfAces = makeQName("limited-number-of-aces"); 148 149 /** */ 150 public static final QName lockdiscovery = makeQName("lockdiscovery"); 151 152 /** */ 153 public static final QName lockentry = makeQName("lockentry"); 154 155 /** */ 156 public static final QName lockscope = makeQName("lockscope"); 157 158 /** */ 159 public static final QName locktype = makeQName("locktype"); 160 161 /** */ 162 public static final QName match = makeQName("match"); 163 164 /** */ 165 public static final QName missingRequiredPrincipal = makeQName("missing-required-principal"); 166 167 /** */ 168 public static final QName multistatus = makeQName("multistatus"); 169 170 /** */ 171 public static final QName needPrivileges = makeQName("need-privileges"); 172 173 /** */ 174 public static final QName noAbstract = makeQName("no-abstract"); 175 176 /** */ 177 public static final QName noAceConflict = makeQName("no-ace-conflict"); 178 179 /** */ 180 public static final QName noInheritedAceConflict = makeQName("no-inherited-ace-conflict"); 181 182 /** */ 183 public static final QName noInvert = makeQName("no-invert"); 184 185 /** */ 186 public static final QName noProtectedAceConflict = makeQName("no-protected-ace-conflict"); 187 188 /** */ 189 public static final QName notSupportedPrivilege = makeQName("not-supported-privilege"); 190 191 /** */ 192 public static final QName owner = makeQName("owner"); 193 194 /** */ 195 public static final QName principal = makeQName("principal"); 196 197 /** */ 198 public static final QName principalCollectionSet = makeQName("principal-collection-set"); 199 200 /** */ 201 public static final QName principalMatch = makeQName("principal-match"); 202 203 /** */ 204 public static final QName principalProperty = makeQName("principal-property"); 205 206 /** */ 207 public static final QName principalPropertySearch = makeQName("principal-property-search"); 208 209 /** */ 210 public static final QName principalSearchProperty = makeQName("principal-search-property"); 211 212 /** */ 213 public static final QName principalSearchPropertySet = makeQName("principal-search-property-set"); 214 215 /** */ 216 public static final QName principalURL = makeQName("principal-URL"); 217 218 /** */ 219 public static final QName privilege = makeQName("privilege"); 220 221 /** */ 222 public static final QName prop = makeQName("prop"); 223 224 /** */ 225 public static final QName property = makeQName("property"); 226 227 /** */ 228 public static final QName propertySearch = makeQName("property-search"); 229 230 /** */ 231 public static final QName propname = makeQName("propname"); 232 233 /** */ 234 public static final QName propstat = makeQName("propstat"); 235 236 /** */ 237 public static final QName _protected = makeQName("protected"); 238 239 /** */ 240 public static final QName read = makeQName("read"); 241 242 /** */ 243 public static final QName readAcl = makeQName("read-acl"); 244 245 /** */ 246 public static final QName readCurrentUserPrivilegeSet = makeQName( 247 "read-current-user-privilege-set"); 248 249 /** */ 250 public static final QName recognizedPrincipal = makeQName("recognized-principal"); 251 252 /** */ 253 public static final QName remove = makeQName("remove"); 254 255 /** */ 256 public static final QName requiredPrincipal = makeQName("required-principal"); 257 258 /** */ 259 public static final QName resource = makeQName("resource"); 260 261 /** */ 262 public static final QName resourcetype = makeQName("resourcetype"); 263 264 /** */ 265 public static final QName response = makeQName("response"); 266 267 /** */ 268 public static final QName responseDescription = makeQName("responsedescription"); 269 270 /** */ 271 public static final QName self = makeQName("self"); 272 273 /** */ 274 public static final QName set = makeQName("set"); 275 276 /** */ 277 public static final QName source = makeQName("source"); 278 279 /** */ 280 public static final QName status = makeQName("status"); 281 282 /** */ 283 public static final QName supportedPrivilege = makeQName("supported-privilege"); 284 285 /** */ 286 public static final QName supportedPrivilegeSet = makeQName("c"); 287 288 /** */ 289 public static final QName supportedlock = makeQName("supportedlock"); 290 291 /** */ 292 public static final QName unauthenticated = makeQName("unauthenticated"); 293 294 /** */ 295 public static final QName unbind = makeQName("unbind"); 296 297 /** */ 298 public static final QName unlock = makeQName("unlock"); 299 300 /** */ 301 public static final QName write = makeQName("write"); 302 303 /** */ 304 public static final QName writeAcl = makeQName("write-acl"); 305 306 /** */ 307 public static final QName writeContent = makeQName("write-content"); 308 309 /** */ 310 public static final QName writeProperties = makeQName("write-properties"); 311 311 312 312 private static QName makeQName(String name) { trunk/calendar3/logging/src/org/bedework/logging/BwlogFactory.java
r2 r843 29 29 package org.bedework.logging; 30 30 31 import org.bedework.cal env.CalEnv;31 import org.bedework.calfacade.env.CalEnvFactory; 32 32 33 33 /** This package is intended for logging of activity in the bedework calendar … … 47 47 48 48 try { 49 logger = (BwLog)CalEnv .getGlobalObject("loggerclass", BwLog.class);49 logger = (BwLog)CalEnvFactory.getEnv(null, false).getGlobalObject("loggerclass", BwLog.class); 50 50 } catch (Throwable t) { 51 51 logger = new BwLogImpl(); trunk/calendar3/timers/src/org/bedework/timers/Timers.java
r415 r843 55 55 package org.bedework.timers; 56 56 57 import org.bedework.calenv.CalEnv;58 57 import org.bedework.calfacade.BwAlarm; 59 58 import org.bedework.calfacade.BwUser; 60 59 import org.bedework.calfacade.CalFacadeException; 60 import org.bedework.calfacade.env.CalEnvFactory; 61 61 import org.bedework.calsvci.CalSvcI; 62 62 import org.bedework.mail.MailerIntf; … … 119 119 120 120 try { 121 mailer = (MailerIntf)CalEnv .getGlobalObject("mailerclass",121 mailer = (MailerIntf)CalEnvFactory.getEnv(null, debug).getGlobalObject("mailerclass", 122 122 MailerIntf.class); 123 123 mailer.init(svci, debug); trunk/calendar3/webcommon/src/org/bedework/webcommon/BwAbstractAction.java
r760 r843 55 55 56 56 import org.bedework.appcommon.BedeworkDefs; 57 import org.bedework.calenv.CalEnv;58 57 import org.bedework.calenv.CalOptions; 59 58 import org.bedework.calfacade.BwCalendar; … … 67 66 import org.bedework.calfacade.CalFacadeDefs; 68 67 import org.bedework.calfacade.CalFacadeException; 68 import org.bedework.calfacade.env.CalEnvFactory; 69 import org.bedework.calfacade.env.CalEnvI; 69 70 import org.bedework.calfacade.ifs.Groups; 70 71 import org.bedework.calfacade.svc.AdminGroups; … … 142 143 String adminUserId = null; 143 144 144 CalEnv env = getEnv(request, form);145 CalEnvI env = getEnv(request, form); 145 146 146 147 setConfig(request, form); … … 1727 1728 * @throws Throwable 1728 1729 */ 1729 private CalEnv getEnv(HttpServletRequest request,1730 private CalEnvI getEnv(HttpServletRequest request, 1730 1731 BwActionFormBase frm) throws Throwable { 1731 CalEnv env = frm.getEnv();1732 CalEnvI env = frm.getEnv(); 1732 1733 if (env != null) { 1733 1734 return env; … … 1745 1746 String envPrefix = "org.bedework.app." + appName + "."; 1746 1747 1747 env = new CalEnv(envPrefix, debug);1748 env = CalEnvFactory.getEnv(envPrefix, debug); 1748 1749 frm.assignEnv(env); 1749 1750 trunk/calendar3/webcommon/src/org/bedework/webcommon/BwActionFormBase.java
r670 r843 63 63 import org.bedework.appcommon.WeekView; 64 64 import org.bedework.appcommon.YearView; 65 import org.bedework.calenv.CalEnv;66 65 import org.bedework.calfacade.BwCalendar; 67 66 import org.bedework.calfacade.BwCategory; … … 73 72 import org.bedework.calfacade.BwUser; 74 73 import org.bedework.calfacade.CalFacadeDefs; 74 import org.bedework.calfacade.env.CalEnvI; 75 75 import org.bedework.calfacade.svc.BwAdminGroup; 76 76 import org.bedework.calfacade.svc.BwAuthUserPrefs; … … 108 108 * e.g. admin, guest etc. 109 109 */ 110 private CalEnv env;110 private CalEnvI env; 111 111 112 112 private ConfigBase config; … … 707 707 * @param val 708 708 */ 709 public void assignEnv(CalEnv val) {709 public void assignEnv(CalEnvI val) { 710 710 env = val; 711 711 } … … 714 714 * @return env object 715 715 */ 716 public CalEnv getEnv() {716 public CalEnvI getEnv() { 717 717 return env; 718 718 } … … 727 727 728 728 try { 729 mailer = (MailerIntf)CalEnv.getGlobalObject("mailerclass", 729 if (env == null) { 730 throw new Exception("env not set"); 731 } 732 mailer = (MailerIntf)env.getGlobalObject("mailerclass", 730 733 MailerIntf.class); 731 734 mailer.init(fetchSvci(), debug); trunk/calendar3/webcommon/src/org/bedework/webcommon/taglib/EmitCurrentPrivsTag.java
r797 r843 110 110 out.println('>'); 111 111 } catch(Throwable t) { 112 t.printStackTrace(); 112 113 throw new JspTagException("Error: " + t.getMessage()); 113 114 } finally { trunk/calendar3/webcommon/src/org/bedework/webcommon/taglib/EmitTextTag.java
r415 r843 126 126 out.println('>'); 127 127 } catch(Throwable t) { 128 t.printStackTrace(); 128 129 throw new JspTagException("Error: " + t.getMessage()); 129 130 } finally {
