|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLogEnabled
|
+--org.apache.cocoon.xml.AbstractXMLProducer
|
+--org.apache.cocoon.xml.AbstractXMLPipe
|
+--org.apache.cocoon.serialization.AbstractSerializer
|
+--com.xmlmill.connector.cocoon.XMLMillSerializer_214
The XMLMillSerializer represents an instance to be
used when generating .pdf documents in a Cocoon environment (version
2.1.4).
*** This class can only be used with Cocoon 2.1.4. If you want to use this class into an earlier version you need to modify the source code. The source code of this class can be found in the download. Do not hesitate to contact us (support@xmlmill.com) if you need any help. ***
The needed .jar files (located in cocoon/WEBINF/lib) are:
Add to your sitemap.xmap of your web-application following:
When Cocoon is started these parameters are passed to the XMLMillSerializer instance using the<map:serializer logger="xmlmill.serializer.ml2pdf-webpages" mime-type="application/pdf" name="ml2pdf-webpages" src="com.xmlmill.connector.cocoon.XMLMillSerializer"><!-- The XMLMill configuration to use (if any) --><config-file/><!-- The log-file --><log-file>logs/xmlmill.log</log-file><!-- The log-level --><log-level>debug</log-level><!-- Should serializer set content length header or not? --><set-content-length>true</set-content-length><!-- Should WARNings lead to abortion of the generation ? --><abort-on-warning>true</abort-on-warning><!-- Should ERRORs lead to abortion of the generation ? --><abort-on-error>true</abort-on-error><!-- he systemid (needed to define relative URLs (should point to the resources used to generate the document. --><systemid>context://xmlmill</systemid> </map:serializer>
Configure method.
And also a matcher:
<map:match pattern="*.topdf">
<!-- Generate xml document -->
<map:generate type="file" src="documents/{1}.xml"/>
<!-- Transform main document to the .mill format -->
<map:transform src="stylesheets/topdf/rnotes.xsl"/>
<!-- Serialize using the 'ml2pdf' serializer -->
<map:serialize type="ml2pdf"/>
</map:match>
| Fields inherited from interface org.apache.cocoon.serialization.Serializer |
ROLE |
| Constructor Summary | |
XMLMillSerializer_214()
|
|
| Method Summary | |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
Set the configurations for this serializer. |
java.io.Serializable |
getKey()
Generate the unique key. |
java.lang.String |
getMimeType()
Return the MIME type. |
org.apache.excalibur.source.SourceValidity |
getValidity()
Generate the validity object. |
void |
recycle()
Recycle serializer by removing references. |
void |
service(org.apache.avalon.framework.service.ServiceManager manager)
Set the component manager for this serializer. |
void |
setOutputStream(java.io.OutputStream out)
Create the XMLMill driver Set the OutputStream where the XML should be serialized.
|
boolean |
shouldSetContentLength()
Test if the component wants to set the content length. |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
setConsumer, setContentHandler, setLexicalHandler |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xml.sax.ContentHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
| Methods inherited from interface org.xml.sax.ext.LexicalHandler |
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
| Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
setConsumer |
| Constructor Detail |
public XMLMillSerializer_214()
| Method Detail |
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
This method is used by Cocoon to pass the configuration options so a
JAXPTtransform instance (created when a document needs to be
generated) knows these options.
configure in interface org.apache.avalon.framework.configuration.Configurableconf - Configuration instance representing the configuration
options defined in the sitemap.org.apache.avalon.framework.configuration.ConfigurationException - thrown when an error occurs during initial configuration.public java.lang.String getMimeType()
This method is used by Cocoon.
getMimeType in class org.apache.cocoon.serialization.AbstractSerializerpublic void setOutputStream(java.io.OutputStream out)
OutputStream where the XML should be serialized.
This method is used by Cocoon.
setOutputStream in class org.apache.cocoon.serialization.AbstractSerializerout - Set the OutputStream where the XML should be serialized.public java.io.Serializable getKey()
This method is used by Cocoon. This key must be unique inside the space of this component. This method must be invoked before the generateValidity() method.
getKey in interface org.apache.cocoon.caching.CacheableProcessingComponent0 if the component
is currently not cacheable.public org.apache.excalibur.source.SourceValidity getValidity()
This method is used by Cocoon.
Before this method can be invoked the generateKey() method must be invoked.getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponentnull if the
component is currently not cacheable.public void recycle()
This method is used by Cocoon.
recycle in class org.apache.cocoon.serialization.AbstractSerializerpublic boolean shouldSetContentLength()
This method is used by Cocoon.
shouldSetContentLength in class org.apache.cocoon.serialization.AbstractSerializer
public void service(org.apache.avalon.framework.service.ServiceManager manager)
throws org.apache.avalon.framework.service.ServiceException
This method is used by Cocoon.
service in interface org.apache.avalon.framework.service.Serviceablemanager - The component manager to use.org.apache.avalon.framework.service.ServiceException - The exception thrown.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||