Changeset 667

Show
Ignore:
Timestamp:
06/30/06 00:41:14
Author:
douglm
Message:

Changes to support free/busy aggregator builds

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/bldfiles/defjars.properties

    r597 r667  
    7474commons-fileupload.jar=${commons.dir}/commons-fileupload.jar 
    7575 
     76commons-httclient.jar=${commons.dir}/commons-httpclient-3.0.jar 
     77 
    7678#      commons-logging.jar    Used for struts. 
    7779commons-logging.jar=${commons.dir}/commons-logging.jar 
     
    200202org.bedework.webcommon.jar=${org.bedework.temp.jars}/${org.bedework.webcommon.jar.name} 
    201203 
     204# ------------------------------------------------------------------------------ 
     205#    Free/busy aggregator 
     206# ------------------------------------------------------------------------------ 
     207 
     208org.bedework.fbclient.jar.name=bwfbclient-${product.version}.jar 
     209org.bedework.fbclient.jar=${org.bedework.temp.jars}/${org.bedework.fbclient.jar.name} 
     210 
     211org.bedework.fbaggregator.jar.name=bwaggregator-${product.version}.jar 
     212org.bedework.fbaggregator.jar=${org.bedework.temp.jars}/${org.bedework.fbaggregator.jar.name} 
     213 
    202214# ------- various tools ---------- 
    203215org.bedework.tools.jar=${org.bedework.temp.jars}/bwtools-${product.version}.jar 
  • trunk/calendar3/bldfiles/globalDefs.xml

    r663 r667  
    1 <?xml version="1.0"?> 
    2  
    31<!-- =================================================================== 
    42     bedework calendar global definitions. 
     
    3735    <property name="xalan.in.tomcat.common.endorsed" value="yes" /> 
    3836 
    39     <!-- comment out to disable build of caldav components.--> 
    40     <property name="org.bedework.build.caldav" value="yes" /> 
    41  
    4237    <!-- Overriding this when invoking ant allows different user property 
    4338         files to be included e.g. 
     
    6257              Properties derived from org.bedework.calendar.dir 
    6358         =============================================================== --> 
    64  
    65     <property name="uwcal.home" location="${org.bedework.calendar.dir}" /> 
    6659 
    6760    <!-- This is the default location for the canoo files. 
     
    107100    <property name="org.bedework.webcommon.base" location="${org.bedework.calendar.dir}/webcommon" /> 
    108101    <property name="org.bedework.webtest.base" location="${org.bedework.calendar.dir}/webtest" /> 
    109  
    110     <!-- =============================================================== 
    111               Properties derived from org.bedework.appserver.dir 
    112          =============================================================== --> 
    113  
    114     <property name="org.bedework.appserver.deploy.dir" 
    115               location="${org.bedework.appserver.dir}/webapps" /> 
    116102 
    117103    <!-- ======================= Directory Names ======================= 
     
    190176              location="${org.bedework.bld.home}/application.xml" /> 
    191177 
    192     <!-- define location of default property files --> 
     178    <!-- define location of jar files --> 
    193179    <property name="org.bedework.defjars" 
    194180              location="${org.bedework.bld.home}/defjars.properties" /> 
     
    202188    <property name="uwcal.test.env.properties.root" 
    203189              location="${org.bedework.testsuite.base}/resources" /> 
    204  
    205     <!-- Enable/disable replacement of log4j config during deployment 
    206          Set this to yes in your home bedework.build.properties file if you 
    207          want the log4j file overwritten if it already exists. 
    208       --> 
    209     <property name="org.bedework.deploy.log4j.config" value="no" /> 
    210190  </target> 
    211191</project> 
  • trunk/calendar3/bldfiles/quickstart-build.xml

    r663 r667  
    1414  <property name="org.bedework.calendar.dir" 
    1515            location="${basedir}/calendar3" /> 
     16 
     17  <property name="org.bedework.freebusy.dir" 
     18            location="${basedir}/freebusy" /> 
    1619 
    1720    <!-- =============================================================== 
     
    7679    <property name="calendar.build.file" 
    7780              location="${org.bedework.calendar.dir}/build.xml" /> 
     81 
     82    <property name="org.bedework.freebusy.build.file" 
     83              location="${org.bedework.freebusy.dir}/build.xml" /> 
    7884 
    7985    <!-- Overriding this when invoking ant allows different user property 
     
    115121 
    116122  <!-- ================================================================= 
     123       The "build.freebusy" target builds the freebusy jar files 
     124       ================================================================= --> 
     125 
     126  <target name="build.freebusy" depends="init" 
     127          description="builds the jars" if="org.bedework.build.freebusy" > 
     128    <ant antfile="${org.bedework.freebusy.build.file}" inheritrefs="true" 
     129           target="bld.all" /> 
     130  </target> 
     131 
     132  <!-- ================================================================= 
    117133       The "deploy" target builds and deploys the applications 
    118134       ================================================================= --> 
    119135 
    120   <target name="deploy" depends="init
     136  <target name="deploy" depends="build,build.freebusy
    121137          description="builds and deploys the applications"> 
    122138    <ant antfile="${calendar.build.file}" inheritrefs="true" 
    123            target="deploy" /> 
    124   </target> 
    125  
    126   <target name="deploy.debug" depends="init
     139           target="deploy.nobuild" /> 
     140  </target> 
     141 
     142  <target name="deploy.debug" depends="build,build.freebusy
    127143          description="builds and deploys the applications"> 
    128144    <ant antfile="${calendar.build.file}" inheritrefs="true" 
    129            target="deploy.debug" /> 
     145           target="deploy.debug.nobuild" /> 
    130146  </target> 
    131147 
     
    176192       ================================================================= --> 
    177193 
    178   <target name="dumpdb" depends="build,dumpdb.nobuild" 
    179           description="run dump "/> 
    180  
    181   <target name="dumpdb.nobuild" depends="init" 
    182           description="run dump without a rebuild"> 
    183     <ant antfile="${calendar.build.file}" inheritrefs="true" 
    184            target="dumpdb" /> 
    185   </target> 
    186  
    187   <target name="restoredb" depends="build,restoredb.nobuild" 
    188           description="run restore "/> 
    189  
    190   <target name="restoredb-nousers" depends="build" 
    191           description="run restore but strip out most user stuff. Useful for demo data"> 
    192     <input message="Restoring will destroy this calendar db. Proceed with restore" 
    193            validargs="y,n" 
    194            addproperty="do.restore" /> 
    195     <condition property="do.abort"> 
    196       <equals arg1="n" arg2="${do.restore}"/> 
    197     </condition> 
    198     <fail if="do.abort">restore aborted by user.</fail> 
    199  
    200     <ant antfile="${calendar.build.file}" inheritrefs="true" 
    201          target="restoredb-nousers" /> 
    202   </target> 
    203  
    204   <target name="restoredb.nobuild" depends="init" 
    205           description="run restore without a rebuild"> 
    206     <input message="Restoring will destroy this calendar db. Proceed with restore" 
    207            validargs="y,n" 
    208            addproperty="do.restore" /> 
    209     <condition property="do.abort"> 
    210       <equals arg1="n" arg2="${do.restore}"/> 
    211     </condition> 
    212     <fail if="do.abort">restore aborted by user.</fail> 
    213  
    214     <ant antfile="${calendar.build.file}" inheritrefs="true" 
    215          target="restoredb" /> 
    216   </target> 
    217  
    218   <target name="initdb" depends="build,initdb.nobuild" 
    219           description="run restore to initialise db"/> 
    220  
    221   <target name="initdb.nobuild" depends="init" 
    222           description="run restore to initialise db"> 
    223     <input message="Restoring will destroy this calendar db. Proceed with restore" 
    224            validargs="y,n" 
    225            addproperty="do.restore" /> 
    226     <condition property="do.abort"> 
    227       <equals arg1="n" arg2="${do.restore}"/> 
    228     </condition> 
    229     <fail if="do.abort">restore aborted by user.</fail> 
    230  
    231     <ant antfile="${calendar.build.file}" inheritrefs="true" 
    232          target="initdb" /> 
    233   </target> 
     194  <target name="dumpdb" > 
     195    <echo message="===============================================================" /> 
     196    <echo message=" use the zipped dump/restore utility to dump, restore or initialise" /> 
     197    <echo message=" the system The default build places it in the dist directory," /> 
     198    <echo message=" instructions for use are in the quickstart documentation" /> 
     199    <echo message="===============================================================" /> 
     200  </target> 
     201 
     202  <target name="restoredb" depends="dumpdb"/> 
     203 
     204  <target name="initdb" depends="dumpdb"/> 
    234205 
    235206  <target name="tzconvert" depends="build" 
  • trunk/calendar3/build.xml

    r663 r667  
    1616     modify the application specific properties and html/jsp pages to create 
    1717     a customized application. 
    18  
    19      This file will only need modification to add a specific target for your 
    20      new application. These targets should be added in the appsuite 
    21      section of the file. 
    22  
    23      apps.root.dir  (Optional - defaults to apps) 
    24                     We expect to find a file 
    25                          ${apps.root.dir}/${app-name}.properties 
    26                     which defines build time properties for the application. 
    27                     Note this file does not get built in to the application. 
    2818 
    2919     Authors: Mike Douglass   douglm@rpi.edu 
     
    152142 
    153143  <target name="deploy" depends="bld.all,deploy.log4j.xml" 
     144          description="Deploy applications to servlet container" > 
     145    <ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true" 
     146           target="deploy"  > 
     147      <property name="org.bedework.clone.name" value="${org.bedework.clone.default}" /> 
     148    </ant> 
     149  </target> 
     150 
     151  <!-- nobuild targets for quickstart so bld isn't executed twice --> 
     152  <target name="deploy.debug.nobuild" depends="init,deploy.log4j.xml" 
     153          description="Deploy applications to servlet container" > 
     154    <ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true" 
     155           target="deploy"  > 
     156      <property name="app.debug.val" value="9" /> 
     157    </ant> 
     158  </target> 
     159 
     160  <target name="deploy.nobuild" depends="init,deploy.log4j.xml" 
    154161          description="Deploy applications to servlet container" > 
    155162    <ant antfile="${org.bedework.deployment.base}/build.xml" inheritrefs="true" 
     
    266273                         org.bedework.*, 
    267274                         edu.rpi.cct.uwcal.access.*, 
    268                          edu.rpi.*, 
    269                          edu.washington.*" 
     275                         edu.rpi.*" 
    270276                 access="public" 
    271277                 author="true" 
     
    522528 
    523529  <!-- ======================== caldav Targets ======================== 
    524        * 
    525        *  NOTE: Incomplete and under development 
    526        ================================================================= --> 
    527  
    528   <target name="bld.caldav" if="org.bedework.build.caldav" 
     530       ================================================================= --> 
     531 
     532  <target name="bld.caldav" 
    529533          depends="init,bld.davdefs,bld.appcommon" 
    530534          description="Build calendar caldav suite"> 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/util/Granulator.java

    r657 r667  
    192192    private int type;  // from BwFreeBusyComponent 
    193193 
     194    /* Number of busy entries this period - for the free/busy aggregator */ 
     195    private int numBusy; 
     196 
     197    /* Number of tentative entries this period - for the free/busy aggregator */ 
     198    private int numTentative; 
     199 
    194200    /** Constructor 
    195201     * 
     
    219225 
    220226    /** 
     227     * @param val int 
     228     */ 
     229    public void setType(int val) { 
     230      type = val; 
     231    } 
     232 
     233    /** 
    221234     * @return int 
    222235     */ 
     
    247260 
    248261      return end.compareTo(that.end); 
     262    } 
     263 
     264    /** 
     265     * @param val 
     266     */ 
     267    public void setNumBusy(int val) { 
     268      numBusy = val; 
     269    } 
     270 
     271    /** 
     272     * @return int 
     273     */ 
     274    public int getNumBusy() { 
     275      return numBusy; 
     276    } 
     277 
     278    /** 
     279     * @param val 
     280     */ 
     281    public void setNumTentative(int val) { 
     282      numTentative = val; 
     283    } 
     284 
     285    /** 
     286     * @return int 
     287     */ 
     288    public int getNumTentative() { 
     289      return numTentative; 
    249290    } 
    250291 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/BwWebUtil.java

    r587 r667  
    8484  /** Name of the session attribute holding our session state 
    8585   */ 
    86   static final String sessStateAttr = "edu.washington.cac.uwcal.sessstate"; 
     86  static final String sessStateAttr = "org.bedework.sessstate"; 
    8787 
    8888  /** Name of the session attribute holding our calendar interface 
    8989   */ 
    90   static final String sessCalSvcIAttr = "edu.washington.cac.uwcal.calsvci"; 
     90  static final String sessCalSvcIAttr = "org.bedework.calsvci"; 
    9191 
    9292  /** Try to get the session state object  embedded in 
     
    9494   * 
    9595   * @param request  Needed to locate session 
    96    * @return UWCalSession null on failure 
     96   * @return BwSession null on failure 
    9797   */ 
    9898  public static BwSession getState(HttpServletRequest request) { 
     
    114114   * 
    115115   * @param request  HttpServletRequest Needed to locate session 
    116    * @param s        UWCalSession session object 
     116   * @param s        BwSession session object 
    117117   */ 
    118118  public static void setState(HttpServletRequest request, 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/ForwardDefs.java

    r520 r667  
    6262  // ENUM 
    6363  /** */ 
    64   public int forwardSuccess = 0; 
     64  public static final int forwardSuccess = 0; 
    6565  /** */ 
    66   public int forwardContinue = 1; 
     66  public static final int forwardContinue = 1; 
    6767  /** */ 
    68   public int forwardRetry = 2; 
     68  public static final int forwardRetry = 2; 
    6969 
    7070  /** */ 
    71   public int forwardError = 3; 
     71  public static final int forwardError = 3; 
    7272  /** */ 
    73   public int forwardNoAccess = 4; 
     73  public static final int forwardNoAccess = 4; 
    7474 
    7575  /** */ 
    76   public int forwardNotFound = 5; 
     76  public static final int forwardNotFound = 5; 
    7777 
    7878  /** */ 
    79   public int forwardNoSuchView = 6; 
     79  public static final int forwardNoSuchView = 6; 
    8080 
    8181  /** Set when an optional parameter is not found */ 
    82   public int forwardNoParameter = 7; 
     82  public static final int forwardNoParameter = 7; 
    8383 
    8484  /** Set when no action was taken */ 
    85   public int forwardNoAction = 8; 
     85  public static final int forwardNoAction = 8; 
    8686 
    8787  /** Something is referenced and cannot be removed */ 
    88   public int forwardReffed = 9; 
     88  public static final int forwardReffed = 9; 
    8989 
    9090  /** an object was added/updated */ 
    91   public int forwardAdded = 10; 
     91  public static final int forwardAdded = 10; 
    9292  /** */ 
    93   public int forwardUpdated = 11; 
     93  public static final int forwardUpdated = 11; 
    9494 
    9595  /** */ 
    96   public int forwardChooseGroup = 12; 
     96  public static final int forwardChooseGroup = 12; 
    9797  /** */ 
    98   public int forwardNoGroupAssigned = 13; 
     98  public static final int forwardNoGroupAssigned = 13; 
    9999 
    100100  /** */ 
    101   public final String[] forwards = { 
     101  public static final String[] forwards = { 
    102102    "success", 
    103103    "continue",