public class DiffInfo
extends java.lang.Object
DiffInfo
can be used by components
to display a diff to a previous version.
A component has access to the diff information by
calling Adaptable.adaptTo(Class)
with this
class as the argument.Modifier and Type | Class and Description |
---|---|
static class |
DiffInfo.TYPE
The general information about the diff
|
Modifier and Type | Field and Description |
---|---|
static FastDateFormat |
DATE_DEFAULT |
Constructor and Description |
---|
DiffInfo(Resource c,
DiffInfo.TYPE l) |
Modifier and Type | Method and Description |
---|---|
Resource |
getContent()
Return the content to diff.
|
java.lang.String |
getDiffOutput(DiffService service,
java.lang.String current,
java.lang.String oldText,
boolean isRichText)
Helper method to generate the diff output.
|
DiffInfo.TYPE |
getType()
Return the type information.
|
static Resource |
getVersionedResource(Resource res,
java.lang.String versionLabel)
Helper method that returns the versioned counterpart of the given resource
with the specified version label.
|
public static final FastDateFormat DATE_DEFAULT
public DiffInfo(Resource c, DiffInfo.TYPE l)
public Resource getContent()
null
public DiffInfo.TYPE getType()
public java.lang.String getDiffOutput(DiffService service, java.lang.String current, java.lang.String oldText, boolean isRichText)
service
- The diff service.current
- The current text (right).oldText
- The old text (left).isRichText
- Is this rich text?public static Resource getVersionedResource(Resource res, java.lang.String versionLabel)
res
- the resourceversionLabel
- the version specifiernull
Copyright © 2010 - 2020 Adobe. All Rights Reserved