@Name(value="diffActions") @Scope(value=CONVERSATION) public class DiffActionsBean extends Object implements Serializable
Constructor and Description |
---|
DiffActionsBean() |
Modifier and Type | Method and Description |
---|---|
boolean |
getCanDiffCurrentDefaultSelection()
Checks if the diff action is available for the
DocumentsListsManager.DEFAULT_WORKING_LIST working list. |
boolean |
getCanDiffCurrentDocumentSelection()
Checks if the diff action is available for the
DocumentsListsManager.CURRENT_DOCUMENT_SELECTION working
list. |
boolean |
getCanDiffCurrentSectionSelection()
Checks if the diff action is available for the
DocumentsListsManager.CURRENT_DOCUMENT_SECTION_SELECTION
working list. |
boolean |
getCanDiffCurrentTrashSelection()
Checks if the diff action is available for the
DocumentsListsManager.CURRENT_DOCUMENT_TRASH_SELECTION
working list. |
boolean |
getCanDiffCurrentVersionSelection()
Checks if the diff action is available for the
VersionDocumentsListsConstants#CURRENT_VERSION_SELECTION
working list. |
boolean |
getCanDiffWorkingList(String listName)
Checks if the diff action is available for the
listName working list. |
String |
getContentDiffDifferenceTypeMsgKey(DifferenceType differenceType)
Gets the content diff difference type message key.
|
String |
getContentDiffFancyBoxURL(String propertyLabel,
String propertyXPath)
Gets the content diff fancybox URL for the property with xpath
propertyXPath . |
String |
getContentDiffFancyBoxURL(String propertyLabel,
String propertyXPath,
String conversionType)
Gets the content diff fancybox URL for the property with xpath
propertyXPath using conversionType
. |
String |
getContentDiffURL(String propertyXPath,
String conversionTypeParam)
Gets the content diff URL.
|
String |
getContentDiffURL(String docLeftId,
String docRightId,
String propertyXPath,
String conversionTypeParam)
Gets the content diff URL of two documents independently of the current document
|
String |
getContentDiffWithBlobPostProcessingURL(String propertyXPath,
String conversionTypeParam)
Gets the content diff with blob post processing URL.
|
List<DiffDisplayBlock> |
getDefaultDiffDisplayBlocks()
Gets the document diff.
|
String |
getDiffSelectionType() |
DocumentModel |
getLeftDoc() |
DocumentModel |
getRightDoc() |
boolean |
isDifferentFilename(DifferenceType differenceType)
Checks if is different filename.
|
boolean |
isDocumentDiffAvailable()
Checks if document diff is available.
|
String |
prepareCurrentDefaultSelectionDiff()
Prepares a diff of the current default selection.
|
String |
prepareCurrentDocumentSelectionDiff()
Prepares a diff of the current document selection.
|
String |
prepareCurrentSectionSelectionDiff()
Prepares a diff of the current section selection.
|
String |
prepareCurrentTrashSelectionDiff()
Prepares a diff of the current document trash selection.
|
String |
prepareCurrentVersionDiff()
Prepares a diff of the selected version with the live doc.
|
String |
prepareCurrentVersionDiff(String versionLabel)
Prepare a diff of the current document with a specific version
|
String |
prepareCurrentVersionSelectionDiff()
Prepares a diff of the current version selection.
|
String |
prepareWorkingListDiff(String listName)
Prepares a diff of the
listName working list. |
String |
refresh()
Refreshes the diff between leftDoc and rightDoc.
|
void |
setDiffSelectionType(String diffSelectionType) |
void |
setLeftDoc(DocumentModel leftDoc) |
void |
setRightDoc(DocumentModel rightDoc) |
public boolean getCanDiffCurrentDocumentSelection()
DocumentsListsManager.CURRENT_DOCUMENT_SELECTION
working
list.public boolean getCanDiffCurrentTrashSelection()
DocumentsListsManager.CURRENT_DOCUMENT_TRASH_SELECTION
working list.public boolean getCanDiffCurrentSectionSelection()
DocumentsListsManager.CURRENT_DOCUMENT_SECTION_SELECTION
working list.public boolean getCanDiffCurrentVersionSelection()
VersionDocumentsListsConstants#CURRENT_VERSION_SELECTION
working list.public boolean getCanDiffCurrentDefaultSelection()
DocumentsListsManager.DEFAULT_WORKING_LIST
working list.public boolean getCanDiffWorkingList(String listName)
listName
working list.
Condition: the working list has exactly 2 documents.
listName
- the list namelistName
working listpublic String prepareCurrentDocumentSelectionDiff() throws ClientException
ClientException
- the client exceptionpublic String prepareCurrentTrashSelectionDiff() throws ClientException
ClientException
- the client exceptionpublic String prepareCurrentSectionSelectionDiff() throws ClientException
ClientException
- the client exceptionpublic String prepareCurrentVersionSelectionDiff() throws ClientException
ClientException
- the client exceptionpublic String prepareCurrentDefaultSelectionDiff() throws ClientException
ClientException
- the client exceptionpublic String prepareWorkingListDiff(String listName) throws ClientException
listName
working list.ClientException
- the client exceptionpublic String prepareCurrentVersionDiff(String versionLabel) throws ClientException
versionLabel
- version label to look for, if you want the last version use org.nuxeo.ecm.diff.web
.DiffActionsBean#LAST_VERSION_PROPERTYClientException
- if current document is null or if the expected version is missing.public String prepareCurrentVersionDiff() throws ClientException
ClientException
- the client exceptionpublic String refresh() throws ClientException
ClientException
- the client exceptionpublic boolean isDocumentDiffAvailable()
@Factory(value="defaultDiffDisplayBlocks", scope=PAGE) public List<DiffDisplayBlock> getDefaultDiffDisplayBlocks() throws ClientException
ClientException
- the client exceptionpublic String getContentDiffFancyBoxURL(String propertyLabel, String propertyXPath) throws ClientException
propertyXPath
.propertyLabel
- the property labelpropertyXPath
- the property xpathClientException
- if the content diff fancybox URL cannot be retrievedpublic String getContentDiffFancyBoxURL(String propertyLabel, String propertyXPath, String conversionType) throws ClientException
propertyXPath
using conversionType
.propertyLabel
- the property labelpropertyXPath
- the property xpathconversionType
- the conversion typeClientException
- if the content diff fancybox URL cannot be retrievedpublic String getContentDiffURL(String docLeftId, String docRightId, String propertyXPath, String conversionTypeParam) throws ClientException
docLeftId
- a DocumentModel id, not a path.docRightId
- a DocumentModel id, not a path.propertyXPath
- conversionTypeParam
- ClientException
public String getContentDiffURL(String propertyXPath, String conversionTypeParam)
propertyXPath
- the property xpathconversionTypeParam
- the conversion type parampublic String getContentDiffWithBlobPostProcessingURL(String propertyXPath, String conversionTypeParam)
propertyXPath
- the property xpathconversionTypeParam
- the conversion type parampublic boolean isDifferentFilename(DifferenceType differenceType)
public String getContentDiffDifferenceTypeMsgKey(DifferenceType differenceType)
public DocumentModel getLeftDoc()
public void setLeftDoc(DocumentModel leftDoc)
public DocumentModel getRightDoc()
public void setRightDoc(DocumentModel rightDoc)
public String getDiffSelectionType()
public void setDiffSelectionType(String diffSelectionType)
Copyright © 2015 Nuxeo SA. All rights reserved.