Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.lenya.cms.publishing
Class DefaultFilePublisher  view DefaultFilePublisher download DefaultFilePublisher.java

java.lang.Object
  extended byorg.apache.lenya.cms.task.AbstractTask
      extended byorg.apache.lenya.cms.publishing.AbstractPublisher
          extended byorg.apache.lenya.cms.publishing.AbstractFilePublisher
              extended byorg.apache.lenya.cms.publishing.DefaultFilePublisher
All Implemented Interfaces:
Publisher, org.apache.lenya.cms.task.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.


Field Summary
private static org.apache.log4j.Category log
           
static java.lang.String PARAMETER_SOURCES
           
 
Fields inherited from class org.apache.lenya.cms.task.AbstractTask
 
Fields inherited from interface org.apache.lenya.cms.task.Task
DEFAULT_PREFIX, FAILURE, NAMESPACE, PARAMETER_CONTEXT_PREFIX, PARAMETER_PUBLICATION_ID, PARAMETER_SERVER_PORT, PARAMETER_SERVER_URI, PARAMETER_SERVLET_CONTEXT, SUCCESS
 
Constructor Summary
DefaultFilePublisher()
           
 
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 org.apache.lenya.cms.publishing.AbstractFilePublisher
copyFile
 
Methods inherited from class org.apache.lenya.cms.task.AbstractTask
getParameters, getResult, parameterize, setLabel, setResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.log4j.Category log

PARAMETER_SOURCES

public static final java.lang.String PARAMETER_SOURCES
See Also:
Constant Field Values
Constructor Detail

DefaultFilePublisher

public DefaultFilePublisher()
Method Detail

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.


execute

public void execute(java.lang.String contextPath)
             throws org.apache.lenya.cms.task.ExecutionException
Default implementation of execute (to implement the Task interface) which basically parses the parameters and invokes the publish method.


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.