|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.apache.lenya.cms.ant.PublicationTask org.apache.lenya.cms.ant.ComputeNewDocumentId
public class ComputeNewDocumentId
Ant task to set the property "newdocumentid" in the project with the value of computed unique document id, needed for the destination file Overriden for copy/move/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 | |
---|---|
ComputeNewDocumentId()
Creates a new instance of ComputeNewDocumentId |
Method Summary | |
---|---|
protected java.lang.String |
compute(java.lang.String firstdocumentid,
java.lang.String secdocumentid)
Method to be overriden to compute the document id of the destination. |
protected java.lang.String |
computeUniqueId(java.lang.String documentid,
java.lang.String area)
Compute the unique document id: append a "_version number" to the id, if there is already a node in the sitetree with this id. |
void |
execute()
|
java.lang.String |
getArea()
|
protected java.lang.String |
getFirstdocumentid()
|
protected java.lang.String |
getSecdocumentid()
|
void |
setArea(java.lang.String string)
set the value of the area in which is the sitetree |
void |
setFirstdocumentid(java.lang.String string)
set the value of the document id of the source |
protected void |
setNewProperty(java.lang.String documentid)
Set the property node.newdocumentid for the project |
void |
setSecdocumentid(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 |
---|
public ComputeNewDocumentId()
Method Detail |
---|
public java.lang.String getArea()
public void setArea(java.lang.String string)
string
- The area of the sitetree.protected java.lang.String getFirstdocumentid()
public void setFirstdocumentid(java.lang.String string)
string
- The document id of the sourceprotected java.lang.String getSecdocumentid()
public void setSecdocumentid(java.lang.String string)
string
- The document id of the parent of the destination
or the new name in case of renameprotected java.lang.String compute(java.lang.String firstdocumentid, java.lang.String secdocumentid)
firstdocumentid
- The document id of the source.secdocumentid
- Some string to characterize the destination (ex
document id of parent, new name).
protected java.lang.String computeUniqueId(java.lang.String documentid, java.lang.String area)
documentid
- The document id.area
- The area in which is the sitetree.
protected void setNewProperty(java.lang.String documentid)
documentid
- The new document id.public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
Task.execute()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |