org.apache.lenya.cms.ant
Class TwoNodesTask

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.TwoNodesTask
Direct Known Subclasses:
InsertCopyNode, MoveNode

public abstract class TwoNodesTask
extends PublicationTask

Abstract base class for Ant tasks, which manipulates two nodes. The first node corresponds to the document with id firstdocumentid and the area firstarea. The 2nd node corresponds to the document with id secdocumentid and the area secarea.


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
TwoNodesTask()
          Creates a new instance of TwoNodesTask
 
Method Summary
 void execute()
          (non-Javadoc)
 java.lang.String getFirstarea()
           
 java.lang.String getFirstdocumentid()
           
 java.lang.String getSecarea()
           
 java.lang.String getSecdocumentid()
           
abstract  void manipulateTree(java.lang.String firstdocumentid, java.lang.String secdocumentid, java.lang.String firstarea, java.lang.String secarea)
          To be overriden.
 void setFirstarea(java.lang.String string)
           
 void setFirstdocumentid(java.lang.String string)
           
 void setSecarea(java.lang.String string)
           
 void setSecdocumentid(java.lang.String string)
           
 
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

TwoNodesTask

public TwoNodesTask()
Creates a new instance of TwoNodesTask

Method Detail

getFirstarea

public java.lang.String getFirstarea()
Returns:
String The area of the document of the first node.

getFirstdocumentid

public java.lang.String getFirstdocumentid()
Returns:
String The document-id corresponding to the first node.

getSecarea

public java.lang.String getSecarea()
Returns:
String The area of the document of the second node.

getSecdocumentid

public java.lang.String getSecdocumentid()
Returns:
String The document-id corresponding to the second node.

setFirstarea

public void setFirstarea(java.lang.String string)
Parameters:
string - The area of the document of the first node.

setFirstdocumentid

public void setFirstdocumentid(java.lang.String string)
Parameters:
string - The document-id corresponding to the first node.

setSecarea

public void setSecarea(java.lang.String string)
Parameters:
string - The area of the document of the second node.

setSecdocumentid

public void setSecdocumentid(java.lang.String string)
Parameters:
string - The document-id corresponding to the second node.

manipulateTree

public abstract void manipulateTree(java.lang.String firstdocumentid,
                                    java.lang.String secdocumentid,
                                    java.lang.String firstarea,
                                    java.lang.String secarea)
                             throws SiteTreeException
To be overriden. Manipulation of two nodes .

Parameters:
firstdocumentid - : id of the first document
secdocumentid - : id of the second document
firstarea - : area of the tree of the first node
secarea - : area of the tree of the 2nd node
Throws:
SiteTreeException - if an error occurs

execute

public void execute()
             throws org.apache.tools.ant.BuildException
(non-Javadoc)

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException
See Also:
Task.execute()


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