org.apache.lenya.cms.ant
Class ComputeRenameDocumentId

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.ComputeNewDocumentId
                  extended by org.apache.lenya.cms.ant.ComputeRenameDocumentId

public class ComputeRenameDocumentId
extends ComputeNewDocumentId

Sets the property "newdocumentid" in the project to the value of the computed unique document id (document id of the source with the latest token replaced by the new name Used by Rename


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
ComputeRenameDocumentId()
          Creates a new instance of ComputeRenameDocumentId
 
Method Summary
protected  java.lang.String compute(java.lang.String firstdocumentid, java.lang.String secdocumentid)
          Computes the document id for the destination (renamed file): new documentid = document id of the source, with the latest token replaced by the new name
 
Methods inherited from class org.apache.lenya.cms.ant.ComputeNewDocumentId
computeUniqueId, execute, getArea, getFirstdocumentid, getSecdocumentid, setArea, setFirstdocumentid, setNewProperty, setSecdocumentid
 
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

ComputeRenameDocumentId

public ComputeRenameDocumentId()
Creates a new instance of ComputeRenameDocumentId

Method Detail

compute

protected java.lang.String compute(java.lang.String firstdocumentid,
                                   java.lang.String secdocumentid)
Computes the document id for the destination (renamed file): new documentid = document id of the source, with the latest token replaced by the new name

Overrides:
compute in class ComputeNewDocumentId
Parameters:
firstdocumentid - The document id of the source.
secdocumentid - The new name.
Returns:
String The document id of the destination.


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