org.apache.lenya.cms.ant
Class DocumentIdToPath

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

public class DocumentIdToPath
extends PublicationTask

Ant task to get the directory path of the xml files of a document with document id. The path is given from the {area} directory.


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
DocumentIdToPath()
          Creates a new instance of DocumentIdToPath
 
Method Summary
 void compute(java.lang.String area, java.lang.String documentid, java.lang.String propertyname)
          Gets the directory path from the document id and sets this value in the property of the project with the name propertyname.
 void execute()
           
 java.lang.String getArea()
           
protected  java.lang.String getDocumentid()
           
 java.lang.String getPropertyname()
           
 void setArea(java.lang.String string)
           
 void setDocumentid(java.lang.String string)
          Set the value of the document id.
 void setPropertyname(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

DocumentIdToPath

public DocumentIdToPath()
Creates a new instance of DocumentIdToPath

Method Detail

getArea

public java.lang.String getArea()
Returns:
Sting The area.

getDocumentid

protected java.lang.String getDocumentid()
Returns:
string The document id

getPropertyname

public java.lang.String getPropertyname()
Returns:
propertyname. The name of the property for the directory path.

setArea

public void setArea(java.lang.String string)
Parameters:
string - The area.

setPropertyname

public void setPropertyname(java.lang.String string)
Parameters:
string - The name of the property.

setDocumentid

public void setDocumentid(java.lang.String string)
Set the value of the document id.

Parameters:
string - The document id.

compute

public void compute(java.lang.String area,
                    java.lang.String documentid,
                    java.lang.String propertyname)
Gets the directory path from the document id and sets this value in the property of the project with the name propertyname.

Parameters:
area - The area (ex authoring)
documentid - The document id.
propertyname - The name of the property

execute

public void execute()
             throws org.apache.tools.ant.BuildException
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.