org.apache.lenya.cms.ant
Class ComputeCopyDocumentId

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

public class ComputeCopyDocumentId
extends ComputeNewDocumentId

Sets the property "newdocumentid" in the project to the value of the computed unique document id (document id of the parent + last token of the id of the source) Used by Copy and Move


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
ComputeCopyDocumentId()
          Creates a new instance of ComputeCopyDocumentId
 
Method Summary
protected  java.lang.String compute(java.lang.String firstdocumentid, java.lang.String secdocumentid)
          Computes the document id for the destination: new documentid = document id of the parent + last token of the id of the source
 
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

ComputeCopyDocumentId

public ComputeCopyDocumentId()
Creates a new instance of ComputeCopyDocumentId

Method Detail

compute

protected java.lang.String compute(java.lang.String firstdocumentid,
                                   java.lang.String secdocumentid)
Computes the document id for the destination: new documentid = document id of the parent + last token of the id of the source

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


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