org.apache.lenya.cms.ant
Class DocumentIdToFile

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

public class DocumentIdToFile
extends PublicationTask

Ant task to get the file from the document-id.

See Also:
DocumentIdToPathMapper.getFile(Publication publication, String area, String documentId, String language)

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
DocumentIdToFile()
          Creates a new instance of DocumentIdToPath.
 
Method Summary
 void compute(java.lang.String area, java.lang.String documentid, java.lang.String language, java.lang.String propertyname)
          Gets the 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()
          Get the area.
protected  java.lang.String getDocumentid()
          Get the document-id.
 java.lang.String getLanguage()
          Get the language
 java.lang.String getPropertyname()
          Get the property name.
 void setArea(java.lang.String area)
          Set the area.
 void setDocumentid(java.lang.String documentId)
          Set the value of the document id
 void setLanguage(java.lang.String language)
          Set the language
 void setPropertyname(java.lang.String string)
          Set the property name
 
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

DocumentIdToFile

public DocumentIdToFile()
Creates a new instance of DocumentIdToPath.

Method Detail

getArea

public java.lang.String getArea()
Get the area.

Returns:
The directory for the area in the publication.

getDocumentid

protected java.lang.String getDocumentid()
Get the document-id.

Returns:
The document id

getPropertyname

public java.lang.String getPropertyname()
Get the property name.

Returns:
The name of the property for the path.

setArea

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

Parameters:
area - The area.

setPropertyname

public void setPropertyname(java.lang.String string)
Set the property name

Parameters:
string - The name of the property.

setDocumentid

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

Parameters:
documentId - The document id.

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

compute

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

Parameters:
area - The area (e.g. "authoring")
documentid - The document id.
language - the language of the document
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.