public class RenamePageReplaceLinkHandler extends Object implements ReplaceLinkHandler
Constructor and Description |
---|
RenamePageReplaceLinkHandler() |
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 replaceReplaceLinkHandler.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 replacedReplaceLinkHandler.getReplacementLink(Link, Link)
Copyright © 2004–2014 XWiki. All rights reserved.