@Name(value="documentVersioning") @Scope(value=CONVERSATION) @Install(precedence=10) public class DocumentVersioningBean extends Object implements DocumentVersioning, Serializable
Modifier and Type | Field and Description |
---|---|
protected CoreSession |
documentManager |
protected NavigationContext |
navigationContext |
protected ResourcesAccessor |
resourcesAccessor |
Constructor and Description |
---|
DocumentVersioningBean() |
Modifier and Type | Method and Description |
---|---|
VersionIncEditOptions |
getAvailableVersioningOptions(DocumentModel doc) |
VersionInfo |
getCurrentDocumentVersionInfo() |
Collection<VersionModel> |
getCurrentItemVersioningHistory()
Returns the available versioning history for the current document and state.
|
Collection<VersionModel> |
getItemVersioningHistory(DocumentModel document)
Returns the available versioning options for the document parameter and state.
|
Map<String,String> |
getVersioningOptionsMap(DocumentModel doc)
Creates a Map with versioning options (as keys) and labels (as map entry values).
|
String |
getVersionLabel(DocumentModel doc) |
void |
resetVersioningOption() |
void |
validateOptionSelection(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Object value)
Versioning increment options - select radio component validator method.
|
@In(create=true) protected transient ResourcesAccessor resourcesAccessor
@In(create=true, required=false) protected transient CoreSession documentManager
@In(create=true) protected transient NavigationContext navigationContext
public DocumentVersioningBean()
public Collection<VersionModel> getItemVersioningHistory(DocumentModel document)
DocumentVersioning
getItemVersioningHistory
in interface DocumentVersioning
document
- the document for which the versioning options will be returnedpublic Collection<VersionModel> getCurrentItemVersioningHistory()
DocumentVersioning
getCurrentItemVersioningHistory
in interface DocumentVersioning
@Factory(autoCreate=true, value="currentDocumentVersionInfo", scope=EVENT) public VersionInfo getCurrentDocumentVersionInfo()
@Observer(value={"documentSelectionChanged","documentChanged"}, create=false) @BypassInterceptors public void resetVersioningOption()
public Map<String,String> getVersioningOptionsMap(DocumentModel doc)
DocumentVersioning
getVersioningOptionsMap
in interface DocumentVersioning
public VersionIncEditOptions getAvailableVersioningOptions(DocumentModel doc)
public String getVersionLabel(DocumentModel doc)
getVersionLabel
in interface DocumentVersioning
public void validateOptionSelection(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object value)
DocumentVersioning
validateOptionSelection
in interface DocumentVersioning
Copyright © 2018 Nuxeo. All rights reserved.