Changeset 394

Show
Ignore:
Timestamp:
04/20/06 08:54:20
Author:
douglm
Message:

Two major components to this update.

New xml options module - the intent is to move run-time options into the xml
and leave build time properties in the current properties file. An xml element
can define a class with the usual setters to hold values defined by it's child
elements. Curently only ldap properties are set.

New ldap groups module. Allow us to move forward on user client development.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/bldfiles/buildsh.xml

    r293 r394  
    106106          file="${org.bedework.config.properties}" /> 
    107107 
     108    <copy tofile="${app.dest.properties}/options.xml" 
     109          file="${org.bedework.config.options}" /> 
     110 
    108111    <!-- =============================================================== 
    109112                       Add any resource files 
  • trunk/calendar3/bldfiles/buildwar.xml

    r312 r394  
    183183          file="${org.bedework.config.properties}" /> 
    184184 
     185    <copy tofile="${app.dest.properties}/options.xml" 
     186          file="${org.bedework.config.options}" /> 
     187 
    185188    <!-- Make a modified copy of the web.xml file --> 
    186189    <copy tofile="${app.dest.web.xml}" 
  • trunk/calendar3/build.xml

    r310 r394  
    6464    <property name="org.bedework.config.properties" 
    6565              location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.properties" /> 
     66    <property name="org.bedework.config.options" 
     67              location="${org.bedework.config.base}/configs/${org.bedework.clone.name}.options.xml" /> 
    6668 
    6769    <echo message="==========================================================" /> 
  • trunk/calendar3/calCore/build.xml

    r2 r394  
    3131    <fileset id="base.java.sources" dir="${source.home}" > 
    3232<!--      <include name="edu/washington/cac/calfacade/impl/*.java"/>--> 
    33       <include name="org/bedework/calcore/hibernate/*.java"/> 
     33      <include name="org/bedework/calcore/**/*.java"/> 
    3434    </fileset> 
    3535 
    3636    <patternset id="base.class.patternset"> 
    3737<!--      <include name="edu/washington/cac/calfacade/impl/*.class"/>--> 
    38       <include name="org/bedework/calcore/hibernate/*.class"/> 
     38      <include name="org/bedework/calcore/**/*.class"/> 
    3939    </patternset> 
    4040 
  • trunk/calendar3/calEnv/build.xml

    r2 r394  
    3030    <path id="compile.classpath"> 
    3131      <pathelement location="${log4j.jar}"/> 
     32      <pathelement location="${org.bedework.common.jar}"/> 
    3233    </path> 
    3334 
  • trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java

    r377 r394  
    20042004    } 
    20052005 
    2006     calendar = getCal().getCalendar(path); 
     2006    try { 
     2007      calendar = getCal().getCalendar(path); 
     2008    } catch (CalFacadeAccessException cfae) { 
     2009      calendar = null; 
     2010    } 
     2011 
    20072012    if (calendar == null) { 
    20082013      // Assume deleted 
  • trunk/calendar3/common/src/edu/rpi/sss/util/xml/XmlUtil.java

    r2 r394  
    6060import java.io.PrintWriter; 
    6161import java.io.Serializable; 
    62 import java.util.Vector
     62import java.util.ArrayList
    6363 
    6464import org.w3c.dom.Attr; 
     
    693693   * 
    694694   * @param nd 
    695    * @return Vector   element nodes. Always non-null 
    696    * @throws SAXException 
    697    */ 
    698   public static Vector getElements(Node nd) throws SAXException { 
    699     Vector v = new Vector(); 
     695   * @return ArrayList   element nodes. Always non-null 
     696   * @throws SAXException 
     697   */ 
     698  public static ArrayList getElements(Node nd) throws SAXException { 
     699    ArrayList al = new ArrayList(); 
    700700 
    701701    NodeList children = nd.getChildNodes(); 
     
    718718        // Ignore 
    719719      } else if (curnode.getNodeType() == Node.ELEMENT_NODE) { 
    720         v.add(curnode); 
     720        al.add(curnode); 
    721721      } else { 
    722722        throw new SAXException("Unexpected child node " + curnode.getLocalName() + 
     
    725725    } 
    726726 
    727     return v
     727    return al
    728728  } 
    729729 
     
    760760  } 
    761761 
     762  /** See if this node has any children 
     763   * 
     764   * @param el 
     765   * @return boolean   true for any child elements 
     766   * @throws SAXException 
     767   */ 
     768  public static boolean hasChildren(Element el) throws SAXException { 
     769    NodeList children = el.getChildNodes(); 
     770 
     771    for (int i = 0; i < children.getLength(); i++) { 
     772      Node curnode = children.item(i); 
     773 
     774      short ntype =  curnode.getNodeType(); 
     775      if ((ntype != Node.TEXT_NODE) && 
     776          (ntype != Node.CDATA_SECTION_NODE) && 
     777          (ntype != Node.COMMENT_NODE)) { 
     778        return true; 
     779      } 
     780    } 
     781 
     782    return false; 
     783  } 
     784 
    762785  /** 
    763786   * @param nd 
     
    766789   */ 
    767790  public static Element[] getElementsArray(Node nd) throws SAXException { 
    768     Vector v = getElements(nd); 
    769  
    770     return (Element[])v.toArray(new Element[v.size()]); 
     791    ArrayList al = getElements(nd); 
     792 
     793    return (Element[])al.toArray(new Element[al.size()]); 
    771794  } 
    772795 
     
    777800   */ 
    778801  public static Element getOnlyElement(Node nd) throws SAXException { 
    779     Vector v = getElements(nd); 
    780  
    781     if (v.size() != 1) { 
     802    Element[] els = getElementsArray(nd); 
     803 
     804    if (els.length != 1) { 
    782805      throw new SAXException("Expected exactly one child node for " + 
    783806                              nd.getLocalName()); 
    784807    } 
    785808 
    786     return (Element)v.elementAt(0)
     809    return els[0]
    787810  } 
    788811 
  • trunk/calendar3/config/configs/democal.properties

    r302 r394  
    5959org.bedework.syspar.mailerclass=org.bedework.mail.DummyMailer 
    6060org.bedework.syspar.admingroupsclass=org.bedework.calcore.hibernate.AdminGroupsDbImpl 
    61 org.bedework.syspar.usergroupsclass=org.bedework.calcore.hibernate.GroupsDbImpl 
     61org.bedework.syspar.usergroupsclass=org.bedework.calcore.ldap.UserGroupsLdapImpl 
     62#org.bedework.syspar.usergroupsclass=org.bedework.calcore.hibernate.GroupsDbImpl 
    6263# 
    6364# ------------------------------------------------------------------- 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/access/AccessAction.java

    r376 r394  
    169169 
    170170    if (whoTypeStr == null) { 
     171      whoType = Ace.whoTypeUser; 
     172    } else if (whoTypeStr.equals("owner")) { 
    171173      whoType = Ace.whoTypeOwner; 
    172174    } else if (whoTypeStr.equals("user")) {