org.apache.lenya.cms.publishing
Class DefaultFilePublisher
java.lang.Object
org.apache.lenya.cms.task.AbstractTask
org.apache.lenya.cms.publishing.AbstractPublisher
org.apache.lenya.cms.publishing.AbstractFilePublisher
org.apache.lenya.cms.publishing.DefaultFilePublisher
- All Implemented Interfaces:
- org.apache.avalon.framework.parameters.Parameterizable, Publisher, Task
- Direct Known Subclasses:
- ResourceFilePublisher
public class DefaultFilePublisher
- extends AbstractFilePublisher
The DefaultFilePublisher
is a task that copies XML
source files from the authoring directory to another location,
usually the live directory.
The following task parameters must be provided:
publication-id
: the publication ID
authoring-path
: the authoring path
tree-authoring-path
: the location of the tree.xml
file
live-path
: the live path
tree-live-path
: the location of the tree.xml
file
replication-path
: the replication path, where sources are waiting
for replication
sources
: a comma-separated list of files to publish
* @deprecated use the publish ant task instead.
Method Summary |
void |
execute(java.lang.String contextPath)
Default implementation of execute (to implement
the Task interface) which basically parses the parameters and
invokes the publish method. |
void |
publish(java.lang.String publicationPath,
java.lang.String authoringPath,
java.lang.String treeAuthoringPath,
java.lang.String resourcesAuthoringPath,
java.lang.String livePath,
java.lang.String treeLivePath,
java.lang.String resourcesLivePath,
java.lang.String replicationPath,
java.lang.String[] sources)
Default implementation of publish which simply
copies the files from the absoluteAuthoringPath to the
absoluteLivePath. |
protected void |
publishResources(java.lang.String publicationPath,
java.lang.String resourcesAuthoringPath,
java.lang.String resourcesLivePath,
java.lang.String[] sources)
A template method to publish the resources. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAMETER_SOURCES
public static final java.lang.String PARAMETER_SOURCES
- See Also:
- Constant Field Values
DefaultFilePublisher
public DefaultFilePublisher()
publish
public void publish(java.lang.String publicationPath,
java.lang.String authoringPath,
java.lang.String treeAuthoringPath,
java.lang.String resourcesAuthoringPath,
java.lang.String livePath,
java.lang.String treeLivePath,
java.lang.String resourcesLivePath,
java.lang.String replicationPath,
java.lang.String[] sources)
throws PublishingException
- Default implementation of
publish
which simply
copies the files from the absoluteAuthoringPath to the
absoluteLivePath.
- Parameters:
publicationPath
- DOCUMENT ME!authoringPath
- DOCUMENT ME!treeAuthoringPath
- DOCUMENT ME!resourcesAuthoringPath
- path to authoring resources base directorylivePath
- DOCUMENT ME!treeLivePath
- DOCUMENT ME!resourcesLivePath
- path to live resources base directoryreplicationPath
- DOCUMENT ME!sources
- DOCUMENT ME!
- Throws:
PublishingException
- if an error occurs
execute
public void execute(java.lang.String contextPath)
throws ExecutionException
- Default implementation of
execute
(to implement
the Task interface) which basically parses the parameters and
invokes the publish method.
- Parameters:
contextPath
- a String
value
- Throws:
ExecutionException
- if an error occurs
publishResources
protected void publishResources(java.lang.String publicationPath,
java.lang.String resourcesAuthoringPath,
java.lang.String resourcesLivePath,
java.lang.String[] sources)
throws PublishingException
- A template method to publish the resources. The default
implementation doesn't deal with resources. It simply ignores
them and assumes that they end up in the live directory be some
other means.
- Parameters:
publicationPath
- path to the publicationresourcesAuthoringPath
- authoring path for the resourcesresourcesLivePath
- live path for the resourcessources
- array of docIds
- Throws:
PublishingException
- if the publishing of resources fails
Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.