@Name(value="diffActions") @Scope(value=CONVERSATION) public class DiffActionsBean extends Object implements Serializable
| Modifier and Type | Field and Description | 
|---|---|
protected String | 
diffSelectionType  | 
protected CoreSession | 
documentManager  | 
protected DocumentsListsManager | 
documentsListsManager  | 
protected DocumentModel | 
leftDoc  | 
protected org.jboss.seam.international.LocaleSelector | 
localeSelector  | 
protected NavigationContext | 
navigationContext  | 
protected DocumentModel | 
rightDoc  | 
protected String | 
selectedVersionId  | 
protected VersionedActions | 
versionedActions  | 
| 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. 
 | 
protected DiffDisplayService | 
getDiffDisplayService()
Gets the diff display service. 
 | 
String | 
getDiffSelectionType()  | 
protected DocumentDiffService | 
getDocumentDiffService()
Gets the document diff service. 
 | 
DocumentModel | 
getLeftDoc()  | 
DocumentModel | 
getRightDoc()  | 
protected List<DocumentModel> | 
getWorkingList(String listName)
Gets the  
listName working list. | 
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)  | 
@In(create=true,
    required=false)
protected transient CoreSession documentManager
@In(create=true,
    required=false)
protected transient NavigationContext navigationContext
@In(create=true,
    required=false)
protected transient DocumentsListsManager documentsListsManager
@In(create=true,
    required=false)
protected transient VersionedActions versionedActions
@In(create=true) protected transient org.jboss.seam.international.LocaleSelector localeSelector
protected DocumentModel leftDoc
protected DocumentModel rightDoc
protected String selectedVersionId
protected String diffSelectionType
public DiffActionsBean()
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()
public String prepareCurrentTrashSelectionDiff()
public String prepareCurrentSectionSelectionDiff()
public String prepareCurrentVersionSelectionDiff()
public String prepareCurrentDefaultSelectionDiff()
public String prepareWorkingListDiff(String listName)
listName working list.public String prepareCurrentVersionDiff(String versionLabel)
versionLabel - version label to look for, if you want the last version use org.nuxeo.ecm.diff.web
            .DiffActionsBean#LAST_VERSION_PROPERTYpublic String prepareCurrentVersionDiff()
public String refresh()
public boolean isDocumentDiffAvailable()
@Factory(value="defaultDiffDisplayBlocks",
         scope=PAGE)
public List<DiffDisplayBlock> getDefaultDiffDisplayBlocks()
public String getContentDiffFancyBoxURL(String propertyLabel, String propertyXPath)
propertyXPath.propertyLabel - the property labelpropertyXPath - the property xpathpublic String getContentDiffFancyBoxURL(String propertyLabel, String propertyXPath, String conversionType)
propertyXPath using conversionType
 .propertyLabel - the property labelpropertyXPath - the property xpathconversionType - the conversion typepublic String getContentDiffURL(String docLeftId, String docRightId, String propertyXPath, String conversionTypeParam)
docLeftId - a DocumentModel id, not a path.docRightId - a DocumentModel id, not a path.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)
protected final List<DocumentModel> getWorkingList(String listName)
listName working list.listName working listprotected final DocumentDiffService getDocumentDiffService()
protected final DiffDisplayService getDiffDisplayService()
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 © 2019 Nuxeo. All rights reserved.