|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.content.parsers.RenamePageReplaceLinkHandler
public class RenamePageReplaceLinkHandler
A replacement link handler used for renaming documents and backlinks pointing to them.
Constructor Summary | |
---|---|
RenamePageReplaceLinkHandler()
|
Method Summary | |
---|---|
boolean |
compare(Link linkToLookFor,
Link linkToReplace)
Compare 2 links. |
Link |
getReplacementLink(Link newLink,
Link linkToReplace)
Compute the link that will be used to replace matching links in the parsed content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RenamePageReplaceLinkHandler()
Method Detail |
---|
public boolean compare(Link linkToLookFor, Link linkToReplace)
Two links are equal if they point to the same document and within the same location in that document.
compare
in interface ReplaceLinkHandler
linkToLookFor
- the link to look forlinkToReplace
- the link to replace
ReplaceLinkHandler.compare(Link, Link)
public Link getReplacementLink(Link newLink, Link linkToReplace)
Keep the query string, alias and target in the link to replace if they are not specified in the new link.
getReplacementLink
in interface ReplaceLinkHandler
newLink
- the link to use to replace the matched link. It's possible that only some
fields are set and the replacement algorithm will compute what the others fields
should belinkToReplace
- the link to be replaced
ReplaceLinkHandler.getReplacementLink(Link, Link)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |