Package org.xwiki.refactoring
Interface ReferenceRenamer
-
@Role public interface ReferenceRenamer
Allow to replace references during rename/move refactoring operations.- Since:
- 13.4RC1
- Version:
- $Id: da2af9601e9f21b7e64ea7d389b0d597ecf7251a $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
renameReferences(org.xwiki.rendering.block.Block block, org.xwiki.model.reference.DocumentReference currentDocumentReference, org.xwiki.model.reference.AttachmentReference oldTarget, org.xwiki.model.reference.AttachmentReference newTarget, boolean relative)
Change references of the given block so that the references pointing to the old target points to the new target.boolean
renameReferences(org.xwiki.rendering.block.Block block, org.xwiki.model.reference.DocumentReference currentDocumentReference, org.xwiki.model.reference.DocumentReference oldTarget, org.xwiki.model.reference.DocumentReference newTarget, boolean relative)
Change references of the given block so that the references pointing to the old target points to the new target.
-
-
-
Method Detail
-
renameReferences
boolean renameReferences(org.xwiki.rendering.block.Block block, org.xwiki.model.reference.DocumentReference currentDocumentReference, org.xwiki.model.reference.DocumentReference oldTarget, org.xwiki.model.reference.DocumentReference newTarget, boolean relative)
Change references of the given block so that the references pointing to the old target points to the new target.- Parameters:
block
- theBlock
to modifycurrentDocumentReference
- the current document referenceoldTarget
- the previous reference of the renamed entity (attachment or document)newTarget
- the new reference of the renamed entity (attachment or document)relative
-true
if the link should be serialized relatively to the current document- Returns:
true
if the givenBlock
was modified
-
renameReferences
@Unstable default boolean renameReferences(org.xwiki.rendering.block.Block block, org.xwiki.model.reference.DocumentReference currentDocumentReference, org.xwiki.model.reference.AttachmentReference oldTarget, org.xwiki.model.reference.AttachmentReference newTarget, boolean relative)
Change references of the given block so that the references pointing to the old target points to the new target.- Parameters:
block
- theBlock
to modifycurrentDocumentReference
- the current document referenceoldTarget
- the previous reference of the renamed entity (attachment or document)newTarget
- the new reference of the renamed entity (attachment or document)relative
-true
if the link should be serialized relatively to the current document- Returns:
true
if the givenBlock
was modified- Since:
- 14.2RC1
-
-