org.apache.lenya.cms.ant
Class TreePublisher

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.lenya.cms.ant.PublicationTask
              extended by org.apache.lenya.cms.ant.TreePublisher

public class TreePublisher
extends PublicationTask

Ant task to publish the tree, adding a node for the new published document in the live tree


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
TreePublisher()
          Creates a new instance of TreePublisher
 
Method Summary
 void execute()
          Executes the task
protected  java.lang.String getDocumentid()
          Returns the document id
 java.lang.String getLanguage()
          Get the language of the document to be published
 void publish(java.lang.String documentId, java.lang.String language)
          adds a node for the published document in the live tree
 void setDocumentid(java.lang.String documentid)
          Sets the document id
 void setLanguage(java.lang.String string)
          Set the language of the document to be published
 
Methods inherited from class org.apache.lenya.cms.ant.PublicationTask
assertString, getContextPrefix, getPublication, getPublicationDirectory, getPublicationId, getServletContext
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreePublisher

public TreePublisher()
Creates a new instance of TreePublisher

Method Detail

getDocumentid

protected java.lang.String getDocumentid()
Returns the document id

Returns:
DOCUMENT ME!

setDocumentid

public void setDocumentid(java.lang.String documentid)
Sets the document id

Parameters:
documentid - DOCUMENT ME!

getLanguage

public java.lang.String getLanguage()
Get the language of the document to be published

Returns:
a String containing the ISO string for this language, e.g. "de", "en"

setLanguage

public void setLanguage(java.lang.String string)
Set the language of the document to be published

Parameters:
string - the ISO string for this language, e.g. "de", "en"

publish

public void publish(java.lang.String documentId,
                    java.lang.String language)
             throws PublishingException
adds a node for the published document in the live tree

Parameters:
documentId - The id of the published document
language - the language for which this document is to be published. Can be null if all languages are to be published.
Throws:
PublishingException - if the publication failed.

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Executes the task

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - DOCUMENT ME!


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.