Package com.xpn.xwiki.api
Class AttachmentDiff
- java.lang.Object
-
- com.xpn.xwiki.api.AttachmentDiff
-
public class AttachmentDiff extends Object
Safe version ofAttachmentDiff
that can be used by the scripts.- Since:
- 7.0RC1
- Version:
- $Id: 2079cb05ad1fb5c79d5352b2aa1dda72fd7da176 $
-
-
Constructor Summary
Constructors Constructor Description AttachmentDiff(AttachmentDiff diff, XWikiContext context)
Wraps the given unsafe attachment difference.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getFileName()
Attachment
getNewAttachment()
String
getNewVersion()
Deprecated.Attachment
getOrigAttachment()
String
getOrigVersion()
Deprecated.String
getType()
String
toString()
-
-
-
Constructor Detail
-
AttachmentDiff
public AttachmentDiff(AttachmentDiff diff, XWikiContext context)
Wraps the given unsafe attachment difference.- Parameters:
diff
- the unsafe attachment differencecontext
- the XWiki context needed to create the safe versions ofXWikiAttachment
-
-
Method Detail
-
getFileName
public String getFileName()
- Returns:
- the name of the attachment whose versions are being compared
-
getType
public String getType()
- Returns:
- the type of difference (one of 'insert', 'delete', 'change')
-
getOrigAttachment
public Attachment getOrigAttachment()
- Returns:
- the original version of the attachment
-
getNewAttachment
public Attachment getNewAttachment()
- Returns:
- the new version of the attachment
-
getOrigVersion
@Deprecated public String getOrigVersion()
Deprecated.NOTE: We kept this method (despite being deprecated) in order to preserve backwards compatibility with existing scripts that were exposed to the unsafeAttachmentDiff
.- Returns:
- the original attachment version
-
getNewVersion
@Deprecated public String getNewVersion()
Deprecated.NOTE: We kept this method (despite being deprecated) in order to preserve backwards compatibility with existing scripts that were exposed to the unsafeAttachmentDiff
.- Returns:
- the new attachment version
-
-