Author: sgoeschl
Date: Wed Nov  3 00:42:01 2010
New Revision: 1030306

URL: http://svn.apache.org/viewvc?rev=1030306&view=rev
Log:
Adding configuration for PDF generation - this allows to generate a PDF 
document from the xdoc stuff.

Added:
    turbine/fulcrum/trunk/quartz/src/site/pdf.xml
    turbine/fulcrum/trunk/quartz/src/site/resources/
    turbine/fulcrum/trunk/quartz/src/site/resources/pdf-config.xml
    turbine/fulcrum/trunk/quartz/src/site/xdoc/
    turbine/fulcrum/trunk/quartz/src/site/xdoc/changes.xml
    turbine/fulcrum/trunk/quartz/src/site/xdoc/configuration.xml
    turbine/fulcrum/trunk/quartz/src/site/xdoc/cronsamples.xml
    turbine/fulcrum/trunk/quartz/src/site/xdoc/index.xml
    turbine/fulcrum/trunk/quartz/src/site/xdoc/navigation.xml

Added: turbine/fulcrum/trunk/quartz/src/site/pdf.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/site/pdf.xml?rev=1030306&view=auto
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/site/pdf.xml (added)
+++ turbine/fulcrum/trunk/quartz/src/site/pdf.xml Wed Nov  3 00:42:01 2010
@@ -0,0 +1,27 @@
+<document xmlns="http://maven.apache.org/DOCUMENT/1.0.1";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/DOCUMENT/1.0.1 
http://maven.apache.org/xsd/document-1.0.1.xsd";
+  outputName="maven-pdf-plugin">
+
+  <meta>
+    <title>Maven PDF Plugin</title>
+    <author>The Apache Maven Project</author>
+  </meta>
+
+  <toc name="Table of Contents">
+    <item name="Introduction" ref="index.xml"/>
+    <item name="Configuration" ref="configuration.xml"/>
+    <item name="Cron Examples" ref="cronsamples.xml"/>
+  </toc>
+
+  <cover>
+    <coverTitle>${project.name}</coverTitle>
+    <coverSubTitle>v. ${project.version}</coverSubTitle>
+    <coverType>User Guide</coverType>
+    <projectName>${project.name}</projectName>
+    <projectLogo>http://turbine.apache.org/images/logo.gif</projectLogo>
+    <companyName>The Apache Software Foundation</companyName>
+    <companyLogo>http://www.apache.org/images/asf_logo_wide.png</companyLogo>
+  </cover>
+</document>
+

Added: turbine/fulcrum/trunk/quartz/src/site/resources/pdf-config.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/site/resources/pdf-config.xml?rev=1030306&view=auto
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/site/resources/pdf-config.xml (added)
+++ turbine/fulcrum/trunk/quartz/src/site/resources/pdf-config.xml Wed Nov  3 
00:42:01 2010
@@ -0,0 +1,11 @@
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
+
+  <xsl:attribute-set name="body.pre" use-attribute-sets="base.pre.style">
+    <xsl:attribute name="font-size">9pt</xsl:attribute>
+  </xsl:attribute-set>
+
+</xsl:stylesheet>
+

Added: turbine/fulcrum/trunk/quartz/src/site/xdoc/changes.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/site/xdoc/changes.xml?rev=1030306&view=auto
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/site/xdoc/changes.xml (added)
+++ turbine/fulcrum/trunk/quartz/src/site/xdoc/changes.xml Wed Nov  3 00:42:01 
2010
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<document>
+  <properties>
+    <title>Fulcrum Quartz</title>
+    <author email="[email protected]">Eric Pugh</author>
+  </properties>
+
+  <body>
+    <release version="1.1.0-SNAPSHOT" date="in svn">
+      <action dev="sgoeschl" type="update" date="2010-08-09">
+        Injecting Avalon logger into a job instance if "LogEnabled"
+        is implemented by this job instance.
+      </action>
+      <action dev="sgoeschl" type="update" date="2010-08-08">
+        Complete rewrite of the service thereby using quartz-1.8.3 and
+        dropping xstream.
+      </action>
+      <action dev="sgoeschl" type="update" date="2010-03-22">
+        Improved the M2 build to cut a release candidate
+      </action>
+      <action dev="seade" type="update">
+        Added a Maven 2 pom and expanded the JavaDocs.
+      </action>
+      <action dev="seade" type="update">
+        Bump to Quartz 1.5.2, update to new XStream xml format for CronTrigger.
+        It looks like this may have stabilized now.
+        Thanks to Youngho Cho for the patch.
+      </action>
+      <action dev="epugh" type="update">
+        Bump to Quartz 1.5.1.
+      </action>
+      <action dev="epugh" type="update">
+        Upgrade to Quartz 1.5, update for the new xstream xml format for 
CronTrigger.
+      </action>
+    </release>
+    <release version="1.0" date="2004-11-24">
+     <action dev="epugh" type="add">
+        If you provide a jobName and jobGroup for a trigger it will 
autoschedule
+        that component.
+      </action>
+     <action dev="epugh" type="update">
+        Removed the component Factory for loading jobdetails and triggers
+        in favor of xstream
+      </action>
+     <action dev="epugh" type="update">
+        Initial import
+      </action>
+    </release>
+  </body>
+</document>
+

Added: turbine/fulcrum/trunk/quartz/src/site/xdoc/configuration.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/site/xdoc/configuration.xml?rev=1030306&view=auto
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/site/xdoc/configuration.xml (added)
+++ turbine/fulcrum/trunk/quartz/src/site/xdoc/configuration.xml Wed Nov  3 
00:42:01 2010
@@ -0,0 +1,163 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<document>
+  <properties>
+    <title>Fulcrum Quartz Service</title>
+    <author email="[email protected]">Siegfried Goeschl</author>
+  </properties>
+  <body>
+    <section name="Configuration">
+
+      <subsection name="Role Configuration">
+        <p>
+          First you have to instantiate the Quartz service.
+        </p>          
+        <source>
+<![CDATA[<role
+  name="org.apache.fulcrum.quartz.QuartzScheduler"
+  shorthand="quartz"
+  default-class="org.apache.fulcrum.quartz.impl.QuartzSchedulerImpl"
+/>
+      ]]></source>
+      </subsection>
+
+      <subsection name="Component Configuration">      
+        <table>
+          <tr>
+            <th>Item</th>
+            <th>Datatype</th>
+            <th>Cardinality</th>
+            <th>Description</th>
+          </tr>
+          <tr>
+            <td>configuration</td>
+            <td>Complex</td>
+            <td>[0|1]</td>
+            <td>
+              Contains the Quartz configuration either as property file or
+              a set of properties.
+            </td>
+          </tr>
+          <tr>
+            <td>configuration/propertyFile</td>
+            <td>String</td>
+            <td>[0|1]</td>
+            <td>
+              Contains the location of a Quartz configuration file. The 
configuration
+              is loaded from the file system or from the classpath.
+            </td>
+          </tr>
+          <tr>
+            <td>configuration/properties</td>
+            <td>Complex</td>
+            <td>[0|1]</td>
+            <td>
+              Contains a list of properties used for configuring Quartz
+            </td>
+          </tr>
+          <tr>
+            <td>configuration/properties/parameter</td>
+            <td>String</td>
+            <td>Simple</td>
+            <td>
+              Contains a single configuration parameter consisting of 'name'
+              and 'value' attribute.
+            </td>
+          </tr>          
+        </table>
+      </subsection>
+
+      <subsection name="Component Configuration Example 1">
+        <p>
+          A simple component configuration based on the XML configuration file
+        </p>
+        <source><![CDATA[
+<quartz>
+  <configuration>
+    <properties>
+      <parameter 
+        name="org.quartz.scheduler.instanceName" 
+        value="TestScheduler"
+      />
+      <parameter 
+        name="org.quartz.scheduler.instanceId" 
+        value="AUTO"
+      />
+      <parameter 
+        name="org.quartz.threadPool.class" 
+        value="org.quartz.simpl.SimpleThreadPool"
+      />
+      <parameter 
+        name="org.quartz.threadPool.threadCount" 
+        value="3"
+      />
+      <parameter 
+        name="org.quartz.threadPool.threadPriority" 
+        value="5"
+      />
+      <parameter 
+        name="org.quartz.jobStore.misfireThreshold" 
+        value="60000"
+      />
+      <parameter 
+        name="org.quartz.jobStore.class" 
+        value="org.quartz.simpl.RAMJobStore"
+      />
+      <parameter 
+        name="org.quartz.plugin.jobInitializer.class" 
+        value="org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin"
+      />
+      <parameter 
+        name="org.quartz.plugin.jobInitializer.fileNames" 
+        value="./src/test/quartz.xml"
+      />
+      <parameter 
+        name="org.quartz.plugin.jobInitializer.failOnFileNotFound" 
+        value="true"
+      />
+      <parameter 
+        name="org.quartz.plugin.jobInitializer.scanInterval" 
+        value="120"
+      />
+      <parameter 
+        name="org.quartz.plugin.jobInitializer.wrapInUserTransaction" 
+        value="false"
+      />
+    </properties>
+  </configuration>
+</quartz>
+        ]]></source>
+      </subsection>
+
+      <subsection name="Component Configuration Example 2">
+        <p>
+          A component configuration using an external property file
+        </p>   
+        <source><![CDATA[
+<quartz>
+  <configuration>
+    <propertyFile>./src/test/quartz.properties</propertyFile>
+  </configuration>  
+</quartz>
+        ]]></source>
+      </subsection>      
+    </section>
+  </body>
+</document>

Added: turbine/fulcrum/trunk/quartz/src/site/xdoc/cronsamples.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/site/xdoc/cronsamples.xml?rev=1030306&view=auto
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/site/xdoc/cronsamples.xml (added)
+++ turbine/fulcrum/trunk/quartz/src/site/xdoc/cronsamples.xml Wed Nov  3 
00:42:01 2010
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<document>
+  <properties>
+    <title>Fulcrum Quartz Service</title>
+    <author email="[email protected]">Siegfried Goeschl</author>
+  </properties>
+  <body>
+    <section name="Cron Expression Samples">
+      <p>
+        Using cron expressions allow a great deal of flexibility but are
+        sometimes tricky to write. A detailed description about the cron
+        expression supported by Quartz can be found 
+        <a 
href="http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html";>here</a>.
 
+      </p>
+      <table>
+        <tr>
+          <th>Description</th>
+          <th>Cron Expression</th>          
+        </tr>
+        <tr>
+          <td>Fire every second</td>
+          <td>* * * * * ?</td>
+        </tr>          
+        <tr>
+          <td>Fire every minute</td>
+          <td>0 * * * * ?</td>
+        </tr>                  
+        <tr>
+          <td>Fire every five minutes</td>
+          <td>"0 0/5 * * * ?" </td>
+        </tr>                         
+        <tr>
+          <td>Fire 23:00 every weekday night</td>
+          <td>0 0 23 ? * MON-FRI</td>
+        </tr>                  
+      </table>      
+    </section>
+  </body>
+</document>

Added: turbine/fulcrum/trunk/quartz/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/site/xdoc/index.xml?rev=1030306&view=auto
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/site/xdoc/index.xml (added)
+++ turbine/fulcrum/trunk/quartz/src/site/xdoc/index.xml Wed Nov  3 00:42:01 
2010
@@ -0,0 +1,134 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<document>
+
+  <properties>
+    <title>Quartz Scheduler Component</title>
+    <author email="[email protected]">Eric Pugh</author>
+    <author email="[email protected]">Scott Eade</author>
+  </properties>
+
+  <body>
+
+  <section name="Overview">
+    <p>
+      This Service functions as a wrapper around the <a 
href="http://www.quartz-scheduler.org/";>
+      Quartz Scheduler</a>. It is written for use in any Avalon compatible 
container.
+    </p>
+
+  </section>
+
+  <section name="Usage">
+
+    <p>
+      Scheduled jobs can be either created programmatically (using the Quartz 
API) or by 
+      using an XML configuration based on the 
'XMLSchedulingDataProcessorPlugin'. A 
+      scheduled job consists of a class implementing the interface 
+      <a 
href="http://www.quartz-scheduler.org/docs/api/1.8.1/org/quartz/Job.html";>org.quartz.Job</a>
+      This requires just that one method be defined, execute(), whose
+      <a 
href="http://www.opensymphony.com/quartz/api/org/quartz/JobExecutionContext.html";>
+      org.quartz.JobExecutionContext</a> argument provides you with details of 
the
+      execution context when the task is triggered.
+    </p>
+
+    <source>
+<![CDATA[
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+
+public class SimpleJob implements Job
+{
+  public static boolean executed = false;
+
+  public SimpleJob()
+  {
+    super();
+  }
+
+  public void execute(JobExecutionContext context)
+    throws JobExecutionException
+  {
+    executed = true;
+  }
+}]]>
+    </source>
+
+  <p>
+    In order to invoke the SimpleJob we have to tell Quartz when to invoke
+    the 'execute' method. In this case we create a CRON trigger firing every
+    second to invoke SimpleJob#execute() on a newly created instance. Please
+    note that we definea set of parameters using the &lt;job-data-map&gt; 
+    which are available using 'JobExecutionContext'.   
+  </p>
+    
+    <source>
+<![CDATA[
+<schedule>
+  <job>
+    <name>simpleJob</name>
+    <group>TURBINE</group>
+    <description>A simple job</description>
+    <job-class>org.apache.fulcrum.quartz.test.SimpleJob</job-class>
+    <job-data-map>
+      <entry>
+        <key>dressing-list</key>
+        <value>ketchup,mayo</value>
+      </entry>
+      <entry>
+        <key>burger-type</key>
+        <value>hotdog</value>
+      </entry>
+    </job-data-map>
+  </job>
+  <trigger>
+    <cron>
+      <!-- define a Cron trigger firing every second -->
+      <name>cronTrigger</name>
+      <group>TURBINE</group>
+      <job-name>simpleJob</job-name>
+      <job-group>TURBINE</job-group>
+      <cron-expression>* * * * * ?</cron-expression>
+    </cron>
+  </trigger>
+</schedule> 
+]]>
+    </source>
+  </section>
+
+  <section name="Implementation Details">
+    <p>
+      The implemtation registers a JobListener which intercepts the execution 
of 
+      the job to set some Avalon infrastructure such 'Logger' and 
'ServiceManager'. 
+      This allows an simple invocation of an Avalon service within the job 
execution.
+    </p>
+    <p>
+      On shutdown the service implementation ensures that all currently 
executed jobs
+      are finished. This avoids problems if a scheduled job tries to access 
already
+      disposed services.
+    </p>
+    <p>
+      The service can be started without quartz configuration (relying on 
default 
+      settings) and preconfigered triggers.
+    </p>
+  </section>
+</body>
+</document>

Added: turbine/fulcrum/trunk/quartz/src/site/xdoc/navigation.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/quartz/src/site/xdoc/navigation.xml?rev=1030306&view=auto
==============================================================================
--- turbine/fulcrum/trunk/quartz/src/site/xdoc/navigation.xml (added)
+++ turbine/fulcrum/trunk/quartz/src/site/xdoc/navigation.xml Wed Nov  3 
00:42:01 2010
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!DOCTYPE project [
+<!ENTITY site-nav SYSTEM "../../incl_site_nav.xml">
+]>
+
+<project
+  name="Fulcrum Quartz"
+  href="http://turbine.apache.org/fulcrum/fulcrum-quartz/";>
+
+  <body>
+
+&site-nav;
+
+    <menu name="Overview">
+      <item name="Main"             href="/index.html"/>
+      <item name="Quartz"           
href="http://www.opensymphony.com/quartz/"/>
+      <item name="XStream"          href="http://xstream.codehaus.org/"/>
+    </menu>
+  </body>
+</project>


Reply via email to