[Bedework-commit] calendarapi r490 -
trunk/calFacade/src/org/bedework/calfacade/configs
svnadmin at bedework.org
svnadmin at bedework.org
Thu Jan 3 10:58:59 EST 2008
Author: douglm
Date: 2008-01-03 10:58:57 -0500 (Thu, 03 Jan 2008)
New Revision: 490
Added:
trunk/calFacade/src/org/bedework/calfacade/configs/ConfigCommon.java
trunk/calFacade/src/org/bedework/calfacade/configs/WebConfigCommon.java
Removed:
trunk/calFacade/src/org/bedework/calfacade/configs/ConfigBase.java
Modified:
trunk/calFacade/src/org/bedework/calfacade/configs/AdminConfig.java
trunk/calFacade/src/org/bedework/calfacade/configs/CalDAVConfig.java
trunk/calFacade/src/org/bedework/calfacade/configs/ClientConfig.java
trunk/calFacade/src/org/bedework/calfacade/configs/DumpRestoreConfig.java
Log:
More changes for config application. Now appears to swallow global settings
Modified: trunk/calFacade/src/org/bedework/calfacade/configs/AdminConfig.java
===================================================================
--- trunk/calFacade/src/org/bedework/calfacade/configs/AdminConfig.java 2008-01-02 18:56:35 UTC (rev 489)
+++ trunk/calFacade/src/org/bedework/calfacade/configs/AdminConfig.java 2008-01-03 15:58:57 UTC (rev 490)
@@ -59,7 +59,7 @@
* @author douglm
*
*/
-public class AdminConfig extends ConfigBase {
+public class AdminConfig extends WebConfigCommon {
/* True if categories are optional.
*/
private boolean categoryOptional = true;
Modified: trunk/calFacade/src/org/bedework/calfacade/configs/CalDAVConfig.java
===================================================================
--- trunk/calFacade/src/org/bedework/calfacade/configs/CalDAVConfig.java 2008-01-02 18:56:35 UTC (rev 489)
+++ trunk/calFacade/src/org/bedework/calfacade/configs/CalDAVConfig.java 2008-01-03 15:58:57 UTC (rev 490)
@@ -29,7 +29,7 @@
*
* @author Mike Douglass
*/
-public class CalDAVConfig extends DbConfig {
+public class CalDAVConfig extends ConfigCommon {
/* Real time service uri - null for no real time service */
private String realTimeServiceURI;
Modified: trunk/calFacade/src/org/bedework/calfacade/configs/ClientConfig.java
===================================================================
--- trunk/calFacade/src/org/bedework/calfacade/configs/ClientConfig.java 2008-01-02 18:56:35 UTC (rev 489)
+++ trunk/calFacade/src/org/bedework/calfacade/configs/ClientConfig.java 2008-01-03 15:58:57 UTC (rev 490)
@@ -57,7 +57,7 @@
*
* @author Mike Douglass douglm - rpi.edu
*/
-public class ClientConfig extends ConfigBase {
+public class ClientConfig extends WebConfigCommon {
public Object clone() {
ClientConfig conf = new ClientConfig();
Deleted: trunk/calFacade/src/org/bedework/calfacade/configs/ConfigBase.java
===================================================================
--- trunk/calFacade/src/org/bedework/calfacade/configs/ConfigBase.java 2008-01-02 18:56:35 UTC (rev 489)
+++ trunk/calFacade/src/org/bedework/calfacade/configs/ConfigBase.java 2008-01-03 15:58:57 UTC (rev 490)
@@ -1,353 +0,0 @@
-/* **********************************************************************
- Copyright 2007 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.calfacade.configs;
-
-/** Common configuration properties for the clients
- *
- * @author Mike Douglass
- * @version 1.0
- */
-public class ConfigBase extends DbConfig {
- /* True if we should auto-create contacts. Some sites may wish to control
- * the creation of contacts to enforce consistency in their use. If this
- * is true we create a contact as we create events. If false the contact
- * must already exist.
- */
- private boolean autoCreateContacts = true;
-
- /* True if we should auto-create locations. Some sites may wish to control
- * the creation of locations to enforce consistency in their use. If this
- * is true we create a location as we create events. If false the location
- * must already exist.
- */
- private boolean autoCreateLocations = true;
-
- /* True if we should auto-delete contacts. Some sites may wish to control
- * the deletion of contacts to enforce consistency in their use. If this
- * is true we delete a contact when it becomes unused.
- */
- private boolean autoDeleteContacts = true;
-
- /* True if we should auto-delete locations. Some sites may wish to control
- * the deletion of locations to enforce consistency in their use. If this
- * is true we delete a location when it becomes unused.
- */
- private boolean autoDeleteLocations = true;
-
- private boolean hour24;
-
- private int minIncrement;
-
- private boolean showYearData;
-
- private String logPrefix;
-
- private String appRoot;
-
- private String portalPlatform;
-
- private String refreshAction;
-
- private int refreshInterval;
-
- private String calSuite;
-
- /** */
- public static final String appTypeWebadmin = "webadmin";
- /** */
- public static final String appTypeWebsubmit = "websubmit";
- /** */
- public static final String appTypeWebpublic = "webpublic";
- /** */
- public static final String appTypeWebuser = "webuser";
-
- private String appType;
-
- private String submissionRoot;
-
- /** Constructor
- *
- */
- public ConfigBase() {
- }
-
- /** True if we should auto-create contacts. Some sites may wish to control
- * the creation of contacts to enforce consistency in their use. If this
- * is true we create a contact as we create events. If false the contact
- * must already exist.
- *
- * @param val
- */
- public void setAutoCreateContacts(boolean val) {
- autoCreateContacts = val;
- }
-
- /**
- * @return boolean
- */
- public boolean getAutoCreateContacts() {
- return autoCreateContacts;
- }
-
- /** True if we should auto-create locations. Some sites may wish to control
- * the creation of locations to enforce consistency in their use. If this
- * is true we create a location as we create events. If false the location
- * must already exist.
- *
- * @param val
- */
- public void setAutoCreateLocations(boolean val) {
- autoCreateLocations = val;
- }
-
- /**
- * @return boolean
- */
- public boolean getAutoCreateLocations() {
- return autoCreateLocations;
- }
-
- /** True if we should auto-delete contacts. Some sites may wish to control
- * the deletion of contacts to enforce consistency in their use. If this
- * is true we delete a contact when it becomes unused.
- *
- * @param val
- */
- public void setAutoDeleteContacts(boolean val) {
- autoDeleteContacts = val;
- }
-
- /**
- * @return boolean
- */
- public boolean getAutoDeleteContacts() {
- return autoDeleteContacts;
- }
-
- /** True if we should auto-delete locations. Some sites may wish to control
- * the deletion of locations to enforce consistency in their use. If this
- * is true we delete a location when it becomes unused.
- *
- * @param val
- */
- public void setAutoDeleteLocations(boolean val) {
- autoDeleteLocations = val;
- }
-
- /**
- * @return boolean
- */
- public boolean getAutoDeleteLocations() {
- return autoDeleteLocations;
- }
-
- /**
- * @param val
- */
- public void setHour24(boolean val) {
- hour24 = val;
- }
-
- /**
- * @return bool
- */
- public boolean getHour24() {
- return hour24;
- }
-
- /**
- * @param val
- */
- public void setMinIncrement(int val) {
- minIncrement = val;
- }
-
- /**
- * @return int
- */
- public int getMinIncrement() {
- return minIncrement;
- }
-
- /** True if we show data on year viewws.
- *
- * @param val
- */
- public void setShowYearData(boolean val) {
- showYearData = val;
- }
-
- /**
- * @return boolean
- */
- public boolean getShowYearData() {
- return showYearData;
- }
-
- /**
- * @param val
- */
- public void setLogPrefix(String val) {
- logPrefix = val;
- }
-
- /**
- * @return String
- */
- public String getLogPrefix() {
- return logPrefix;
- }
-
- /** Where the xslt and resources are based.
- *
- * @param val
- */
- public void setAppRoot(String val) {
- appRoot = val;
- }
-
- /**
- * @return String
- */
- public String getAppRoot() {
- return appRoot;
- }
-
- /** Define the name of the portal platform.
- *
- * @param val
- */
- public void setPortalPlatform(String val) {
- portalPlatform = val;
- }
-
- /**
- * @return String
- */
- public String getPortalPlatform() {
- return portalPlatform;
- }
-
- /**
- * @param val
- */
- public void setRefreshAction(String val) {
- refreshAction = val;
- }
-
- /**
- * @return String
- */
- public String getRefreshAction() {
- return refreshAction;
- }
-
- /**
- * @param val
- */
- public void setRefreshInterval(int val) {
- refreshInterval = val;
- }
-
- /**
- * @return int
- */
- public int getRefreshInterval() {
- return refreshInterval;
- }
-
- /**
- * @param val
- */
- public void setCalSuite(String val) {
- calSuite = val;
- }
-
- /**
- * @return String
- */
- public String getCalSuite() {
- return calSuite;
- }
-
- /**
- * @param val
- */
- public void setAppType(String val) {
- appType = val;
- }
-
- /**
- * @return String
- */
- public String getAppType() {
- return appType;
- }
-
- /** The root of the calendars used for submission of public events by users.
- *
- * @param val
- */
- public void setSubmissionRoot(String val) {
- submissionRoot = val;
- }
-
- /**
- * @return String
- */
- public String getSubmissionRoot() {
- return submissionRoot;
- }
-
- /** Copy this object to val.
- *
- * @param val
- */
- public void copyTo(ConfigBase val) {
- super.copyTo(val);
- val.setAutoCreateContacts(getAutoCreateContacts());
- val.setAutoCreateLocations(getAutoCreateLocations());
- val.setAutoDeleteContacts(getAutoDeleteContacts());
- val.setAutoDeleteLocations(getAutoDeleteLocations());
- val.setHour24(getHour24());
- val.setMinIncrement(getMinIncrement());
- val.setShowYearData(getShowYearData());
- val.setLogPrefix(getLogPrefix());
- val.setRefreshAction(getRefreshAction());
- val.setRefreshInterval(getRefreshInterval());
- val.setCalSuite(getCalSuite());
- val.setAppType(getAppType());
- val.setSubmissionRoot(getSubmissionRoot());
- }
-
- public Object clone() {
- ConfigBase conf = new ConfigBase();
-
- copyTo(conf);
-
- return conf;
- }
-}
Added: trunk/calFacade/src/org/bedework/calfacade/configs/ConfigCommon.java
===================================================================
--- trunk/calFacade/src/org/bedework/calfacade/configs/ConfigCommon.java (rev 0)
+++ trunk/calFacade/src/org/bedework/calfacade/configs/ConfigCommon.java 2008-01-03 15:58:57 UTC (rev 490)
@@ -0,0 +1,98 @@
+/* **********************************************************************
+ Copyright 2007 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.calfacade.configs;
+
+/** Common configuration properties for the clients
+ *
+ * @author Mike Douglass
+ * @version 1.0
+ */
+public class ConfigCommon extends DbConfig {
+ private String logPrefix;
+
+ /** */
+ public static final String appTypeWebadmin = "webadmin";
+ /** */
+ public static final String appTypeWebsubmit = "websubmit";
+ /** */
+ public static final String appTypeWebpublic = "webpublic";
+ /** */
+ public static final String appTypeWebuser = "webuser";
+
+ private String appType;
+
+ /** Constructor
+ *
+ */
+ public ConfigCommon() {
+ }
+
+ /**
+ * @param val
+ */
+ public void setLogPrefix(String val) {
+ logPrefix = val;
+ }
+
+ /**
+ * @return String
+ */
+ public String getLogPrefix() {
+ return logPrefix;
+ }
+
+ /**
+ * @param val
+ */
+ public void setAppType(String val) {
+ appType = val;
+ }
+
+ /**
+ * @return String
+ */
+ public String getAppType() {
+ return appType;
+ }
+
+ /** Copy this object to val.
+ *
+ * @param val
+ */
+ public void copyTo(ConfigCommon val) {
+ super.copyTo(val);
+ val.setLogPrefix(getLogPrefix());
+ val.setAppType(getAppType());
+ }
+
+ public Object clone() {
+ ConfigCommon conf = new ConfigCommon();
+
+ copyTo(conf);
+
+ return conf;
+ }
+}
Property changes on: trunk/calFacade/src/org/bedework/calfacade/configs/ConfigCommon.java
___________________________________________________________________
Name: svn:eol-style
+ LF
Modified: trunk/calFacade/src/org/bedework/calfacade/configs/DumpRestoreConfig.java
===================================================================
--- trunk/calFacade/src/org/bedework/calfacade/configs/DumpRestoreConfig.java 2008-01-02 18:56:35 UTC (rev 489)
+++ trunk/calFacade/src/org/bedework/calfacade/configs/DumpRestoreConfig.java 2008-01-03 15:58:57 UTC (rev 490)
@@ -58,7 +58,7 @@
* @author Mike Douglass douglm at rpi.edu
* @version 1.0
*/
-public class DumpRestoreConfig extends DbConfig {
+public class DumpRestoreConfig extends ConfigCommon {
private boolean debug;
private boolean debugEntity;
Copied: trunk/calFacade/src/org/bedework/calfacade/configs/WebConfigCommon.java (from rev 486, trunk/calFacade/src/org/bedework/calfacade/configs/ConfigBase.java)
===================================================================
--- trunk/calFacade/src/org/bedework/calfacade/configs/WebConfigCommon.java (rev 0)
+++ trunk/calFacade/src/org/bedework/calfacade/configs/WebConfigCommon.java 2008-01-03 15:58:57 UTC (rev 490)
@@ -0,0 +1,310 @@
+/* **********************************************************************
+ Copyright 2007 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.calfacade.configs;
+
+/** Common configuration properties for the web clients
+ *
+ * @author Mike Douglass
+ * @version 1.0
+ */
+public class WebConfigCommon extends ConfigCommon {
+ /* True if we should auto-create contacts. Some sites may wish to control
+ * the creation of contacts to enforce consistency in their use. If this
+ * is true we create a contact as we create events. If false the contact
+ * must already exist.
+ */
+ private boolean autoCreateContacts = true;
+
+ /* True if we should auto-create locations. Some sites may wish to control
+ * the creation of locations to enforce consistency in their use. If this
+ * is true we create a location as we create events. If false the location
+ * must already exist.
+ */
+ private boolean autoCreateLocations = true;
+
+ /* True if we should auto-delete contacts. Some sites may wish to control
+ * the deletion of contacts to enforce consistency in their use. If this
+ * is true we delete a contact when it becomes unused.
+ */
+ private boolean autoDeleteContacts = true;
+
+ /* True if we should auto-delete locations. Some sites may wish to control
+ * the deletion of locations to enforce consistency in their use. If this
+ * is true we delete a location when it becomes unused.
+ */
+ private boolean autoDeleteLocations = true;
+
+ private boolean hour24;
+
+ private int minIncrement;
+
+ private boolean showYearData;
+
+ private String appRoot;
+
+ private String portalPlatform;
+
+ private String refreshAction;
+
+ private int refreshInterval;
+
+ private String calSuite;
+
+ private String submissionRoot;
+
+ /** Constructor
+ *
+ */
+ public WebConfigCommon() {
+ }
+
+ /** True if we should auto-create contacts. Some sites may wish to control
+ * the creation of contacts to enforce consistency in their use. If this
+ * is true we create a contact as we create events. If false the contact
+ * must already exist.
+ *
+ * @param val
+ */
+ public void setAutoCreateContacts(boolean val) {
+ autoCreateContacts = val;
+ }
+
+ /**
+ * @return boolean
+ */
+ public boolean getAutoCreateContacts() {
+ return autoCreateContacts;
+ }
+
+ /** True if we should auto-create locations. Some sites may wish to control
+ * the creation of locations to enforce consistency in their use. If this
+ * is true we create a location as we create events. If false the location
+ * must already exist.
+ *
+ * @param val
+ */
+ public void setAutoCreateLocations(boolean val) {
+ autoCreateLocations = val;
+ }
+
+ /**
+ * @return boolean
+ */
+ public boolean getAutoCreateLocations() {
+ return autoCreateLocations;
+ }
+
+ /** True if we should auto-delete contacts. Some sites may wish to control
+ * the deletion of contacts to enforce consistency in their use. If this
+ * is true we delete a contact when it becomes unused.
+ *
+ * @param val
+ */
+ public void setAutoDeleteContacts(boolean val) {
+ autoDeleteContacts = val;
+ }
+
+ /**
+ * @return boolean
+ */
+ public boolean getAutoDeleteContacts() {
+ return autoDeleteContacts;
+ }
+
+ /** True if we should auto-delete locations. Some sites may wish to control
+ * the deletion of locations to enforce consistency in their use. If this
+ * is true we delete a location when it becomes unused.
+ *
+ * @param val
+ */
+ public void setAutoDeleteLocations(boolean val) {
+ autoDeleteLocations = val;
+ }
+
+ /**
+ * @return boolean
+ */
+ public boolean getAutoDeleteLocations() {
+ return autoDeleteLocations;
+ }
+
+ /**
+ * @param val
+ */
+ public void setHour24(boolean val) {
+ hour24 = val;
+ }
+
+ /**
+ * @return bool
+ */
+ public boolean getHour24() {
+ return hour24;
+ }
+
+ /**
+ * @param val
+ */
+ public void setMinIncrement(int val) {
+ minIncrement = val;
+ }
+
+ /**
+ * @return int
+ */
+ public int getMinIncrement() {
+ return minIncrement;
+ }
+
+ /** True if we show data on year viewws.
+ *
+ * @param val
+ */
+ public void setShowYearData(boolean val) {
+ showYearData = val;
+ }
+
+ /**
+ * @return boolean
+ */
+ public boolean getShowYearData() {
+ return showYearData;
+ }
+
+ /** Where the xslt and resources are based.
+ *
+ * @param val
+ */
+ public void setAppRoot(String val) {
+ appRoot = val;
+ }
+
+ /**
+ * @return String
+ */
+ public String getAppRoot() {
+ return appRoot;
+ }
+
+ /** Define the name of the portal platform.
+ *
+ * @param val
+ */
+ public void setPortalPlatform(String val) {
+ portalPlatform = val;
+ }
+
+ /**
+ * @return String
+ */
+ public String getPortalPlatform() {
+ return portalPlatform;
+ }
+
+ /**
+ * @param val
+ */
+ public void setRefreshAction(String val) {
+ refreshAction = val;
+ }
+
+ /**
+ * @return String
+ */
+ public String getRefreshAction() {
+ return refreshAction;
+ }
+
+ /**
+ * @param val
+ */
+ public void setRefreshInterval(int val) {
+ refreshInterval = val;
+ }
+
+ /**
+ * @return int
+ */
+ public int getRefreshInterval() {
+ return refreshInterval;
+ }
+
+ /**
+ * @param val
+ */
+ public void setCalSuite(String val) {
+ calSuite = val;
+ }
+
+ /**
+ * @return String
+ */
+ public String getCalSuite() {
+ return calSuite;
+ }
+
+ /** The root of the calendars used for submission of public events by users.
+ *
+ * @param val
+ */
+ public void setSubmissionRoot(String val) {
+ submissionRoot = val;
+ }
+
+ /**
+ * @return String
+ */
+ public String getSubmissionRoot() {
+ return submissionRoot;
+ }
+
+ /** Copy this object to val.
+ *
+ * @param val
+ */
+ public void copyTo(WebConfigCommon val) {
+ super.copyTo(val);
+ val.setAutoCreateContacts(getAutoCreateContacts());
+ val.setAutoCreateLocations(getAutoCreateLocations());
+ val.setAutoDeleteContacts(getAutoDeleteContacts());
+ val.setAutoDeleteLocations(getAutoDeleteLocations());
+ val.setHour24(getHour24());
+ val.setMinIncrement(getMinIncrement());
+ val.setShowYearData(getShowYearData());
+ val.setRefreshAction(getRefreshAction());
+ val.setRefreshInterval(getRefreshInterval());
+ val.setCalSuite(getCalSuite());
+ val.setSubmissionRoot(getSubmissionRoot());
+ }
+
+ public Object clone() {
+ WebConfigCommon conf = new WebConfigCommon();
+
+ copyTo(conf);
+
+ return conf;
+ }
+}
More information about the Bedework-commit
mailing list