[Bedework-commit] calendarapi r609 - in trunk:
calCore/src/org/bedework/calcore
calCore/src/org/bedework/calcore/hibernate
calCoreI/src/org/bedework/calcorei
svnadmin at bedework.org
svnadmin at bedework.org
Fri May 2 14:31:11 EDT 2008
Author: douglm
Date: 2008-05-02 14:31:09 -0400 (Fri, 02 May 2008)
New Revision: 609
Added:
trunk/calCore/src/org/bedework/calcore/CalintfHelper.java
Removed:
trunk/calCoreI/src/org/bedework/calcorei/CalintfHelper.java
Modified:
trunk/calCore/src/org/bedework/calcore/hibernate/CalintfHelperHib.java
trunk/calCoreI/src/org/bedework/calcorei/CalintfInfo.java
trunk/calCoreI/src/org/bedework/calcorei/CoreEventsI.java
Log:
Move CalintfHelper into a more appropriate spot - movig towards splitting off corer implementations as a separate project
Copied: trunk/calCore/src/org/bedework/calcore/CalintfHelper.java (from rev 604, trunk/calCoreI/src/org/bedework/calcorei/CalintfHelper.java)
===================================================================
--- trunk/calCore/src/org/bedework/calcore/CalintfHelper.java (rev 0)
+++ trunk/calCore/src/org/bedework/calcore/CalintfHelper.java 2008-05-02 18:31:09 UTC (rev 609)
@@ -0,0 +1,166 @@
+/* **********************************************************************
+ Copyright 2006 Rensselaer Polytechnic Institute. All worldwide rights reserved.
+
+ Redistribution and use of this distribution in source and binary forms,
+ with or without modification, are permitted provided that:
+ The above copyright notice and this permission notice appear in all
+ copies and supporting documentation;
+
+ The name, identifiers, and trademarks of Rensselaer Polytechnic
+ Institute are not used in advertising or publicity without the
+ express prior written permission of Rensselaer Polytechnic Institute;
+
+ DISCLAIMER: The software is distributed" AS IS" without any express or
+ implied warranty, including but not limited to, any implied warranties
+ of merchantability or fitness for a particular purpose or any warrant)'
+ of non-infringement of any current or pending patent rights. The authors
+ of the software make no representations about the suitability of this
+ software for any particular purpose. The entire risk as to the quality
+ and performance of the software is with the user. Should the software
+ prove defective, the user assumes the cost of all necessary servicing,
+ repair or correction. In particular, neither Rensselaer Polytechnic
+ Institute, nor the authors of the software are liable for any indirect,
+ special, consequential, or incidental damages related to the software,
+ to the maximum extent the law permits.
+*/
+package org.bedework.calcore;
+
+import org.bedework.calcorei.CalintfDefs;
+import org.bedework.calcorei.Calintf.NotificationHandler;
+import org.bedework.calfacade.BwCalendar;
+import org.bedework.calfacade.BwSystem;
+import org.bedework.calfacade.BwUser;
+import org.bedework.calfacade.exc.CalFacadeException;
+import org.bedework.calfacade.util.AccessUtilI;
+import org.bedework.calfacade.wrappers.CalendarWrapper;
+
+import edu.rpi.cmt.access.PrivilegeDefs;
+
+import org.apache.log4j.Logger;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+/** Class used as basis for a number of helper classes.
+ *
+ * @author Mike Douglass douglm rpi.edu
+ */
+public class CalintfHelper implements CalintfDefs, PrivilegeDefs, Serializable {
+ /**
+ */
+ public static interface Callback extends Serializable {
+ /**
+ * @throws CalFacadeException
+ */
+ public void rollback() throws CalFacadeException;
+
+ /**
+ * @return BwSystem object
+ * @throws CalFacadeException
+ */
+ public BwSystem getSyspars() throws CalFacadeException;
+
+ /**
+ * @return BwUser object for current user
+ * @throws CalFacadeException
+ */
+ public BwUser getUser() throws CalFacadeException;
+
+ /**
+ * @return true for super user
+ * @throws CalFacadeException
+ */
+ public boolean getSuperUser() throws CalFacadeException;
+
+ /** Returns children of the given calendar to which the current user has
+ * some access.
+ *
+ * @param cal parent calendar
+ * @return Collection of BwCalendar
+ * @throws CalFacadeException
+ */
+ public Collection<BwCalendar> getCalendars(BwCalendar cal) throws CalFacadeException;
+ }
+
+ protected boolean debug;
+
+ protected Callback cb;
+
+ protected NotificationHandler notifications;
+
+ protected AccessUtilI access;
+
+ protected int currentMode = guestMode;
+
+ private transient Logger log;
+
+ /** Initialise
+ *
+ * @param cb
+ * @param notifications
+ * @param access
+ * @param currentMode
+ * @param debug
+ */
+ public void init (Callback cb,
+ NotificationHandler notifications,
+ AccessUtilI access,
+ int currentMode,
+ boolean debug) {
+ this.cb = cb;
+ this.notifications = notifications;
+ this.access = access;
+ this.currentMode = currentMode;
+ this.debug = debug;
+ }
+
+ protected BwSystem getSyspars() throws CalFacadeException {
+ return cb.getSyspars();
+ }
+
+ protected BwUser getUser() throws CalFacadeException {
+ return cb.getUser();
+ }
+
+ protected BwCalendar wrap(BwCalendar val) {
+ if (val instanceof CalendarWrapper) {
+ // CALWRAPPER get this from getEvents with an internal temp calendar
+ return val;
+ }
+ return new CalendarWrapper(val, access);
+ }
+
+ protected BwCalendar unwrap(BwCalendar val) throws CalFacadeException {
+ if (val == null) {
+ return null;
+ }
+
+ if (!(val instanceof CalendarWrapper)) {
+ // We get these at the moment - getEvents at svci level
+ return val;
+ // CALWRAPPER throw new CalFacadeException("org.bedework.not.wrapped");
+ }
+
+ return ((CalendarWrapper)val).unwrap();
+ }
+
+ /** Get a logger for messages
+ *
+ * @return Logger
+ */
+ protected Logger getLogger() {
+ if (log == null) {
+ log = Logger.getLogger(this.getClass());
+ }
+
+ return log;
+ }
+
+ protected void debugMsg(String msg) {
+ getLogger().debug(msg);
+ }
+
+ protected void trace(String msg) {
+ getLogger().debug(msg);
+ }
+}
Modified: trunk/calCore/src/org/bedework/calcore/hibernate/CalintfHelperHib.java
===================================================================
--- trunk/calCore/src/org/bedework/calcore/hibernate/CalintfHelperHib.java 2008-05-01 02:32:12 UTC (rev 608)
+++ trunk/calCore/src/org/bedework/calcore/hibernate/CalintfHelperHib.java 2008-05-02 18:31:09 UTC (rev 609)
@@ -25,8 +25,8 @@
*/
package org.bedework.calcore.hibernate;
+import org.bedework.calcore.CalintfHelper;
import org.bedework.calcorei.CalintfDefs;
-import org.bedework.calcorei.CalintfHelper;
import org.bedework.calcorei.HibSession;
import org.bedework.calfacade.exc.CalFacadeException;
Deleted: trunk/calCoreI/src/org/bedework/calcorei/CalintfHelper.java
===================================================================
--- trunk/calCoreI/src/org/bedework/calcorei/CalintfHelper.java 2008-05-01 02:32:12 UTC (rev 608)
+++ trunk/calCoreI/src/org/bedework/calcorei/CalintfHelper.java 2008-05-02 18:31:09 UTC (rev 609)
@@ -1,165 +0,0 @@
-/* **********************************************************************
- Copyright 2006 Rensselaer Polytechnic Institute. All worldwide rights reserved.
-
- Redistribution and use of this distribution in source and binary forms,
- with or without modification, are permitted provided that:
- The above copyright notice and this permission notice appear in all
- copies and supporting documentation;
-
- The name, identifiers, and trademarks of Rensselaer Polytechnic
- Institute are not used in advertising or publicity without the
- express prior written permission of Rensselaer Polytechnic Institute;
-
- DISCLAIMER: The software is distributed" AS IS" without any express or
- implied warranty, including but not limited to, any implied warranties
- of merchantability or fitness for a particular purpose or any warrant)'
- of non-infringement of any current or pending patent rights. The authors
- of the software make no representations about the suitability of this
- software for any particular purpose. The entire risk as to the quality
- and performance of the software is with the user. Should the software
- prove defective, the user assumes the cost of all necessary servicing,
- repair or correction. In particular, neither Rensselaer Polytechnic
- Institute, nor the authors of the software are liable for any indirect,
- special, consequential, or incidental damages related to the software,
- to the maximum extent the law permits.
-*/
-package org.bedework.calcorei;
-
-import org.bedework.calcorei.Calintf.NotificationHandler;
-import org.bedework.calfacade.BwCalendar;
-import org.bedework.calfacade.BwSystem;
-import org.bedework.calfacade.BwUser;
-import org.bedework.calfacade.exc.CalFacadeException;
-import org.bedework.calfacade.util.AccessUtilI;
-import org.bedework.calfacade.wrappers.CalendarWrapper;
-
-import edu.rpi.cmt.access.PrivilegeDefs;
-
-import org.apache.log4j.Logger;
-
-import java.io.Serializable;
-import java.util.Collection;
-
-/** Class used as basis for a number of helper classes.
- *
- * @author Mike Douglass douglm rpi.edu
- */
-public class CalintfHelper implements CalintfDefs, PrivilegeDefs, Serializable {
- /**
- */
- public static interface Callback extends Serializable {
- /**
- * @throws CalFacadeException
- */
- public void rollback() throws CalFacadeException;
-
- /**
- * @return BwSystem object
- * @throws CalFacadeException
- */
- public BwSystem getSyspars() throws CalFacadeException;
-
- /**
- * @return BwUser object for current user
- * @throws CalFacadeException
- */
- public BwUser getUser() throws CalFacadeException;
-
- /**
- * @return true for super user
- * @throws CalFacadeException
- */
- public boolean getSuperUser() throws CalFacadeException;
-
- /** Returns children of the given calendar to which the current user has
- * some access.
- *
- * @param cal parent calendar
- * @return Collection of BwCalendar
- * @throws CalFacadeException
- */
- public Collection<BwCalendar> getCalendars(BwCalendar cal) throws CalFacadeException;
- }
-
- protected boolean debug;
-
- protected Callback cb;
-
- protected NotificationHandler notifications;
-
- protected AccessUtilI access;
-
- protected int currentMode = guestMode;
-
- private transient Logger log;
-
- /** Initialise
- *
- * @param cb
- * @param notifications
- * @param access
- * @param currentMode
- * @param debug
- */
- public void init (Callback cb,
- NotificationHandler notifications,
- AccessUtilI access,
- int currentMode,
- boolean debug) {
- this.cb = cb;
- this.notifications = notifications;
- this.access = access;
- this.currentMode = currentMode;
- this.debug = debug;
- }
-
- protected BwSystem getSyspars() throws CalFacadeException {
- return cb.getSyspars();
- }
-
- protected BwUser getUser() throws CalFacadeException {
- return cb.getUser();
- }
-
- protected BwCalendar wrap(BwCalendar val) {
- if (val instanceof CalendarWrapper) {
- // CALWRAPPER get this from getEvents with an internal temp calendar
- return val;
- }
- return new CalendarWrapper(val, access);
- }
-
- protected BwCalendar unwrap(BwCalendar val) throws CalFacadeException {
- if (val == null) {
- return null;
- }
-
- if (!(val instanceof CalendarWrapper)) {
- // We get these at the moment - getEvents at svci level
- return val;
- // CALWRAPPER throw new CalFacadeException("org.bedework.not.wrapped");
- }
-
- return ((CalendarWrapper)val).unwrap();
- }
-
- /** Get a logger for messages
- *
- * @return Logger
- */
- protected Logger getLogger() {
- if (log == null) {
- log = Logger.getLogger(this.getClass());
- }
-
- return log;
- }
-
- protected void debugMsg(String msg) {
- getLogger().debug(msg);
- }
-
- protected void trace(String msg) {
- getLogger().debug(msg);
- }
-}
Modified: trunk/calCoreI/src/org/bedework/calcorei/CalintfInfo.java
===================================================================
--- trunk/calCoreI/src/org/bedework/calcorei/CalintfInfo.java 2008-05-01 02:32:12 UTC (rev 608)
+++ trunk/calCoreI/src/org/bedework/calcorei/CalintfInfo.java 2008-05-02 18:31:09 UTC (rev 609)
@@ -1,31 +1,28 @@
-/*
- Copyright (c) 2000-2005 University of Washington. All rights reserved.
+/* **********************************************************************
+ Copyright 2008 Rensselaer Polytechnic Institute. All worldwide rights reserved.
- Redistribution and use of this distribution in source and binary forms,
- with or without modification, are permitted provided that:
+ Redistribution and use of this distribution in source and binary forms,
+ with or without modification, are permitted provided that:
+ The above copyright notice and this permission notice appear in all
+ copies and supporting documentation;
- The above copyright notice and this permission notice appear in
- all copies and supporting documentation;
+ The name, identifiers, and trademarks of Rensselaer Polytechnic
+ Institute are not used in advertising or publicity without the
+ express prior written permission of Rensselaer Polytechnic Institute;
- The name, identifiers, and trademarks of the University of Washington
- are not used in advertising or publicity without the express prior
- written permission of the University of Washington;
-
- Recipients acknowledge that this distribution is made available as a
- research courtesy, "as is", potentially with defects, without
- any obligation on the part of the University of Washington to
- provide support, services, or repair;
-
- THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR
- IMPLIED, WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION
- ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE, AND IN NO EVENT SHALL THE UNIVERSITY OF
- WASHINGTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT (INCLUDING
- NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION WITH
- THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
+ DISCLAIMER: The software is distributed" AS IS" without any express or
+ implied warranty, including but not limited to, any implied warranties
+ of merchantability or fitness for a particular purpose or any warrant)'
+ of non-infringement of any current or pending patent rights. The authors
+ of the software make no representations about the suitability of this
+ software for any particular purpose. The entire risk as to the quality
+ and performance of the software is with the user. Should the software
+ prove defective, the user assumes the cost of all necessary servicing,
+ repair or correction. In particular, neither Rensselaer Polytechnic
+ Institute, nor the authors of the software are liable for any indirect,
+ special, consequential, or incidental damages related to the software,
+ to the maximum extent the law permits.
+*/
package org.bedework.calcorei;
import java.io.Serializable;
Modified: trunk/calCoreI/src/org/bedework/calcorei/CoreEventsI.java
===================================================================
--- trunk/calCoreI/src/org/bedework/calcorei/CoreEventsI.java 2008-05-01 02:32:12 UTC (rev 608)
+++ trunk/calCoreI/src/org/bedework/calcorei/CoreEventsI.java 2008-05-02 18:31:09 UTC (rev 609)
@@ -1,3 +1,28 @@
+/* **********************************************************************
+ Copyright 2008 Rensselaer Polytechnic Institute. All worldwide rights reserved.
+
+ Redistribution and use of this distribution in source and binary forms,
+ with or without modification, are permitted provided that:
+ The above copyright notice and this permission notice appear in all
+ copies and supporting documentation;
+
+ The name, identifiers, and trademarks of Rensselaer Polytechnic
+ Institute are not used in advertising or publicity without the
+ express prior written permission of Rensselaer Polytechnic Institute;
+
+ DISCLAIMER: The software is distributed" AS IS" without any express or
+ implied warranty, including but not limited to, any implied warranties
+ of merchantability or fitness for a particular purpose or any warrant)'
+ of non-infringement of any current or pending patent rights. The authors
+ of the software make no representations about the suitability of this
+ software for any particular purpose. The entire risk as to the quality
+ and performance of the software is with the user. Should the software
+ prove defective, the user assumes the cost of all necessary servicing,
+ repair or correction. In particular, neither Rensselaer Polytechnic
+ Institute, nor the authors of the software are liable for any indirect,
+ special, consequential, or incidental damages related to the software,
+ to the maximum extent the law permits.
+*/
package org.bedework.calcorei;
import org.bedework.calfacade.BwCalendar;
More information about the Bedework-commit
mailing list