|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.publication.util.LinkRewriter
public class LinkRewriter
Rewrite the links in a publication. This is used after renaming / moving a document.
| Constructor Summary | |
|---|---|
LinkRewriter()
Ctor. |
|
| Method Summary | |
|---|---|
protected java.util.List |
getDocumentFiles(java.io.File directory)
Returns all XML files in a specific directory. |
protected java.io.File[] |
getDocumentFiles(Publication publication,
java.lang.String area)
Returns all XML files in a specific area. |
protected java.lang.String |
getNewTargetURL(Document targetDocument,
Document originalTargetDocument,
Document newTargetDocument)
Rewrites a document. |
protected boolean |
matches(Document targetDocument,
Document originalTargetDocument)
Checks if targetDocument refers to originalTargetDocument, to one of its language versions, to one of its descendants, or to a language version of one of the descendants. |
void |
rewriteLinks(Document originalTargetDocument,
Document newTargetDocument,
java.lang.String contextPath)
Rewrites the links to a document and all its descendants, including all language versions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LinkRewriter()
| Method Detail |
|---|
public void rewriteLinks(Document originalTargetDocument,
Document newTargetDocument,
java.lang.String contextPath)
originalTargetDocument - The original target document.newTargetDocument - The new target document.contextPath - The servlet context path.
protected boolean matches(Document targetDocument,
Document originalTargetDocument)
targetDocument - The target document.originalTargetDocument - The original target document.
protected java.lang.String getNewTargetURL(Document targetDocument,
Document originalTargetDocument,
Document newTargetDocument)
targetDocument - The target document to rewrite.originalTargetDocument - The original target document.newTargetDocument - The new target document.
protected java.io.File[] getDocumentFiles(Publication publication,
java.lang.String area)
publication - The publication.area - The area.
protected java.util.List getDocumentFiles(java.io.File directory)
directory - The directory.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||