@Name(value="diffActions") @Scope(value=CONVERSATION) public class DiffActionsBean extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected String |
diffSelectionType |
protected org.nuxeo.ecm.core.api.CoreSession |
documentManager |
protected DocumentsListsManager |
documentsListsManager |
protected org.nuxeo.ecm.core.api.DocumentModel |
leftDoc |
protected org.jboss.seam.international.LocaleSelector |
localeSelector |
protected org.nuxeo.ecm.platform.ui.web.api.NavigationContext |
navigationContext |
protected org.nuxeo.ecm.core.api.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.
|
org.nuxeo.ecm.core.api.DocumentModel |
getLeftDoc() |
org.nuxeo.ecm.core.api.DocumentModel |
getRightDoc() |
protected List<org.nuxeo.ecm.core.api.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(org.nuxeo.ecm.core.api.DocumentModel leftDoc) |
void |
setRightDoc(org.nuxeo.ecm.core.api.DocumentModel rightDoc) |
@In(create=true,
required=false)
protected transient org.nuxeo.ecm.core.api.CoreSession documentManager
@In(create=true,
required=false)
protected transient org.nuxeo.ecm.platform.ui.web.api.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 org.nuxeo.ecm.core.api.DocumentModel leftDoc
protected org.nuxeo.ecm.core.api.DocumentModel rightDoc
protected String selectedVersionId
protected String diffSelectionType
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 org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic String prepareCurrentTrashSelectionDiff() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic String prepareCurrentSectionSelectionDiff() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic String prepareCurrentVersionSelectionDiff() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic String prepareCurrentDefaultSelectionDiff() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic String prepareWorkingListDiff(String listName) throws org.nuxeo.ecm.core.api.ClientException
listName working list.org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic String prepareCurrentVersionDiff(String versionLabel) throws org.nuxeo.ecm.core.api.ClientException
versionLabel - version label to look for, if you want the last
version use org.nuxeo.ecm.diff.web
.DiffActionsBean#LAST_VERSION_PROPERTYorg.nuxeo.ecm.core.api.ClientException - if current document is null or if the expected
version is missing.public String prepareCurrentVersionDiff() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic String refresh() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic boolean isDocumentDiffAvailable()
@Factory(value="defaultDiffDisplayBlocks",
scope=PAGE)
public List<DiffDisplayBlock> getDefaultDiffDisplayBlocks()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic String getContentDiffFancyBoxURL(String propertyLabel, String propertyXPath) throws org.nuxeo.ecm.core.api.ClientException
propertyXPath.propertyLabel - the property labelpropertyXPath - the property xpathorg.nuxeo.ecm.core.api.ClientException - if the content diff fancybox URL cannot be
retrievedpublic String getContentDiffFancyBoxURL(String propertyLabel, String propertyXPath, String conversionType) throws org.nuxeo.ecm.core.api.ClientException
propertyXPath using conversionType.propertyLabel - the property labelpropertyXPath - the property xpathconversionType - the conversion typeorg.nuxeo.ecm.core.api.ClientException - if the content diff fancybox URL cannot be
retrievedpublic String getContentDiffURL(String docLeftId, String docRightId, String propertyXPath, String conversionTypeParam) throws org.nuxeo.ecm.core.api.ClientException
docLeftId - a DocumentModel id, not a path.docRightId - a DocumentModel id, not a path.propertyXPath - conversionTypeParam - org.nuxeo.ecm.core.api.ClientExceptionpublic 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<org.nuxeo.ecm.core.api.DocumentModel> getWorkingList(String listName) throws org.nuxeo.ecm.core.api.ClientException
listName working list.listName working listorg.nuxeo.ecm.core.api.ClientException - the client exceptionprotected final DocumentDiffService getDocumentDiffService() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - if cannot get the document diff serviceprotected final DiffDisplayService getDiffDisplayService() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException - the client exceptionpublic org.nuxeo.ecm.core.api.DocumentModel getLeftDoc()
public void setLeftDoc(org.nuxeo.ecm.core.api.DocumentModel leftDoc)
public org.nuxeo.ecm.core.api.DocumentModel getRightDoc()
public void setRightDoc(org.nuxeo.ecm.core.api.DocumentModel rightDoc)
public String getDiffSelectionType()
public void setDiffSelectionType(String diffSelectionType)
Copyright © 2019 Nuxeo SA. All rights reserved.