> The other drawback is that every project would need to include Castor.

Why would it have to be cross project?

> I don't really see the advantage here.  It would have to be smart enough
> to know what these missing properties are.  That and if they aren't used
> they will get garbage collected.

I'm basing this from the reactions I've seen from people trying to set up the
system: the properties file is already a big headache for the average person
trying to install the program.  Once we have calendaring and messaging....

The missing properties would be defined in the schema.  The stylesheet which
creates the admin screen would simply add a button for each undefined set of
properties to create an empty (or default) structure for the given package and
reload the screen with the new parameter fields.

> Don't bother with the parsing.  Use Castor :)  That is what it is there
> for.  I have already defined a Properties XML Schema that might be
> useful.  I experimented with marking up properties in feeds.xml.

I was thinking Xerces.  All I would have to do is set up SAXEventListeners
which would set the appropriate properties during initialization.

I guess a lot of it depends on how much support Xerces has for schemas.

Basically, I think a well organized properties file would make the final
product a lot more user-friendly---and the project in general easier to jump
in and lend a hand with.  That could just mean organizing the file we have (eg,
what is the difference between defaultportletcontrol.instance and
portletcontrol.defaultinstance?).  Either way, I did complete a sample file, so
I'll add it to this mail, everyone can take a look, and we'll go from there....

-ed


<?xml version="1.0"?>
<config>
  <core>
    <global>
      <home>/projects/jetspeed</home>
      <config-root>
        <directory>src/config</directory>
      </config-root>
      <content-root>
        <!-- Appended to value-of home above where applicable -->
        <!-- From here on out, a / at the start of a content file parameter means 
start at filesystem root -->
        <!-- No / means construct path from home + content-root/directory -->
        <directory>src/content</directory>
        <url>/content</url>
      </content-root>
    </global>
    <portlets>
      <all>
        <set>xml/portlets.xml</set>
      </all>
      <default>
        <set>xml/defaultPortlets.xml</set>
        <portlet>
          <control>
            <instance>org.apache.jetspeed.portal.DefaultPortletControl</instance>
            <width>340</width>
          </control>
          <controller>
            <instance>org.apache.jetspeed.portal.DefaultPortletController</instance>
            <html>
              <columns>3</columns>
              <width>100%</width>
            </html>
            <xml>
              <width>700</width>
              <stylesheet>xml/defaultstyle.xsl</stylesheet>
            </xml>
          </controller>
        </portlet>
      </default>
      <third-party>
        <renderer>
          
<url>http://avantgo.com/mydevice/autoadd.html?max=300&amp;depth=5&amp;images=0&amp;links=0&amp;refresh=always&amp;hours=2&amp;dflags=127&amp;hour=0&amp;quarter=00&amp;s=00</url>
          <caption>Add to Avantgo</caption>
        </renderer>
      </third-party>
    </portlets>
    <cache>
      <private>
        <directory>/tmp/JetspeedDocumentCache</directory>
      </private>
      <public>
        <directory>/usr/home/httpd/wwwroot/jetspeed-cache</directory>
        <url>http://relativity.yi.org/jetspeed-cache</url>
      </public>
      <refresh>
        <portlet>3600</portlet>
        <persistentDocument>3600</persistentDocument>
      </refresh>
    </cache>
    <feeds>
      <default>
        <set>xml/feeds/feeds.xml</set>
      </default>
      <stylesheet>xml/ocs/ocs.xsl</stylesheet>
      <max>
        <threads>5</threads>
        <browser>
          <portlet>
            <preview>15</preview>
            <overview>15</overview>
          </portlet>
        </browser>
      </max>
      <daemon>off</daemon>
    </feeds>
    <admin>
      <!-- Port to CocoonPortlet -->
      <portlet>
        
<instance>org.apache.jetspeed.portal.portlets.admin.JetspeedPropertiesPortlet</instance>
      </portlet>
      <portlet>
        
<instance>org.apache.jetspeed.portal.portlets.admin.MemoryStorePortlet</instance>
      </portlet>
      <portlet>
        
<instance>org.apache.jetspeed.portal.portlets.admin.JavaRuntimePortlet</instance>
      </portlet>
      <portlet>
        <instance>org.apache.jetspeed.portal.portlets.admin.FeedAdminPortlet</instance>
      </portlet>
    </admin>
    <cocoon>
      <properties>cocoon.properties</properties>
    </cocoon>
  </core>
  <optional>
    <authentication/>
  </optional>
</config>


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to