org.apache.lenya.cms.ant
Class RenameLabelTask

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.RenameLabelTask

public class RenameLabelTask
extends PublicationTask

Ant task to rename a label in an existing node in a 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
RenameLabelTask()
          Creates a new instance of InsertLabelTask
 
Method Summary
 void execute()
          (non-Javadoc)
protected  java.lang.String getArea()
          Get the area of the site tree.
protected  java.lang.String getDocumentid()
          Return the document-id corresponding to the node to delete.
 java.lang.String getLabelName()
          Get the name of the label.
 java.lang.String getLanguage()
          Get the language.
 void renameLabel(java.lang.String documentid, java.lang.String labelName, java.lang.String language, java.lang.String area)
          Rename a label in an existing node in the tree.
 void setAbsolutetreepath(java.lang.String area)
          Set the value of the area of the tree.
 void setArea(java.lang.String area)
          Set the area.
 void setDocumentid(java.lang.String string)
          Set the value of the document-id corresponding to the node to delete.
 void setLabelName(java.lang.String labelName)
          Set the labelName.
 void setLanguage(java.lang.String language)
          Set the language.
 
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

RenameLabelTask

public RenameLabelTask()
Creates a new instance of InsertLabelTask

Method Detail

getArea

protected java.lang.String getArea()
Get the area of the site tree.

Returns:
the area of the tree.

setArea

public void setArea(java.lang.String area)
Set the area.

Parameters:
area - the area.

setAbsolutetreepath

public void setAbsolutetreepath(java.lang.String area)
Set the value of the area of the tree.

Parameters:
area - the area of the tree.

getDocumentid

protected java.lang.String getDocumentid()
Return the document-id corresponding to the node to delete.

Returns:
string The document-id.

setDocumentid

public void setDocumentid(java.lang.String string)
Set the value of the document-id corresponding to the node to delete.

Parameters:
string - The document-id.

getLabelName

public java.lang.String getLabelName()
Get the name of the label.

Returns:
the labelName

setLabelName

public void setLabelName(java.lang.String labelName)
Set the labelName.

Parameters:
labelName - the name of the label

getLanguage

public java.lang.String getLanguage()
Get the language.

Returns:
the language

setLanguage

public void setLanguage(java.lang.String language)
Set the language.

Parameters:
language - the language

renameLabel

public void renameLabel(java.lang.String documentid,
                        java.lang.String labelName,
                        java.lang.String language,
                        java.lang.String area)
                 throws SiteTreeException,
                        DocumentException
Rename a label in an existing node in the tree.

Parameters:
documentid - the document-id of the document.
labelName - the new name of the label.
language - the language of the label that is to be renamed.
area - determines in which sitetree the label is to be renamed
Throws:
SiteTreeException - if an error occurs.
DocumentException

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.