com.atlassian.confluence.util
Class AttachmentLinkRenamingBean
java.lang.Object
com.atlassian.confluence.util.AttachmentLinkRenamingBean
- All Implemented Interfaces:
- LinkRenamingBean
public class AttachmentLinkRenamingBean
- extends java.lang.Object
- implements LinkRenamingBean
Constructor Summary |
AttachmentLinkRenamingBean(ContentEntityObject referringContent,
ContentEntityObject oldLocation,
java.lang.String newSpaceKey,
java.lang.String newPageTitle)
Create a bean to update attachment links throughout a given ContentEntityObject's content, changing the page to
which the links refer. |
AttachmentLinkRenamingBean(ContentEntityObject referringContent,
java.lang.String oldFileName,
java.lang.String newFileName)
Create a bean to rename the attachment filename throughout a given ContentEntityObject's content. |
AttachmentLinkRenamingBean(ContentEntityObject referringContent,
java.lang.String oldFileName,
java.lang.String newFileName,
ContentEntityObject oldLocation,
ContentEntityObject newLocation)
Create a bean to update links on a given page to reflect a change to an attachment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttachmentLinkRenamingBean
public AttachmentLinkRenamingBean(ContentEntityObject referringContent,
java.lang.String oldFileName,
java.lang.String newFileName)
- Create a bean to rename the attachment filename throughout a given ContentEntityObject's content. The updated
content can be retrieved from
getRenamedContent()
.
- Parameters:
referringContent
- page in which to update links.oldFileName
- the filename as it appears in the contentnewFileName
- the filename as it should appear in the content
AttachmentLinkRenamingBean
public AttachmentLinkRenamingBean(ContentEntityObject referringContent,
ContentEntityObject oldLocation,
java.lang.String newSpaceKey,
java.lang.String newPageTitle)
- Create a bean to update attachment links throughout a given ContentEntityObject's content, changing the page to
which the links refer. The updated content can be retrieved from
getRenamedContent()
. Any possible
simplifications will be performed. EG [space:page^file]
will be simplified to [^file]
when the referringContent
and newLocation
are the same.
- Parameters:
referringContent
- page in which to update links.oldLocation
- page to which the links currently refer.newSpaceKey
- space the links should refer to.newPageTitle
- page the links should refer to.
AttachmentLinkRenamingBean
public AttachmentLinkRenamingBean(ContentEntityObject referringContent,
java.lang.String oldFileName,
java.lang.String newFileName,
ContentEntityObject oldLocation,
ContentEntityObject newLocation)
- Create a bean to update links on a given page to reflect a change to an attachment. The updated content can
be retrieved from
getRenamedContent()
. Any possible simplifications will be performed. EG
[space:page^file]
will be simplified to [^file]
when the referringContent
and newLocation
are the same.
- Parameters:
referringContent
- page in which links will be updated.oldFileName
- The name of the attachment in existing links.newFileName
- The new name of the attachment to which the links should refer.oldLocation
- The page to which the links currently point.newLocation
- The page to which the links will point.
escapeDollars
protected java.lang.String escapeDollars(java.lang.String s)
getRenamedContent
public java.lang.String getRenamedContent()
- Specified by:
getRenamedContent
in interface LinkRenamingBean
Copyright © 2003-2013 Atlassian. All Rights Reserved.