@Name(value="documentTemplatesActions") @Scope(value=CONVERSATION) public class DocumentTemplatesActionsBean extends InputController implements DocumentTemplatesActions, Serializable
Modifier and Type | Field and Description |
---|---|
protected DocumentModel |
changeableDocument |
protected NavigationContext |
navigationContext |
static String |
TemplateRoot |
actionManager, currentDocument, currentUser, eventManager, facesMessages, resourcesAccessor, typeManager
Constructor and Description |
---|
DocumentTemplatesActionsBean() |
Modifier and Type | Method and Description |
---|---|
String |
createDocumentFromTemplate()
Creates a Document from a template using the selectedTemplateId and the changeableDocument.
|
String |
createDocumentFromTemplate(DocumentModel doc)
Creates a Document from a template using the selectedTemplateId.
|
String |
createDocumentFromTemplate(DocumentModel doc,
String templateId)
Creates a Document from a template.
|
void |
documentChildrenChanged()
Listener to children changed event.
|
void |
domainChanged()
Listener for domain changed event.
|
String |
getSelectedTemplateId()
Getter of the selected template id.
|
String |
getTargetType()
Getter for type of the document to be created.
|
DocumentModelList |
getTemplates() |
DocumentModelList |
getTemplates(String targetTypeName) |
void |
setSelectedTemplateId(String requestedId)
Setter for the template to use.
|
void |
setTargetType(String targetType)
Setter for the type of document to be created.
|
DocumentModelList |
templatesListFactory()
Factory accessor on the getter.
|
computeOutcome, extractReferences, getAdministrator, logDocumentWithName, logDocumentWithTitle, removeDocumentFromList, setFacesMessage
public static final String TemplateRoot
@In(required=false) protected DocumentModel changeableDocument
@In(required=false, create=true) protected transient NavigationContext navigationContext
public DocumentTemplatesActionsBean()
@Factory(value="availableTemplates", scope=EVENT) public DocumentModelList templatesListFactory()
DocumentTemplatesActions
templatesListFactory
in interface DocumentTemplatesActions
public DocumentModelList getTemplates(String targetTypeName)
getTemplates
in interface DocumentTemplatesActions
public DocumentModelList getTemplates()
getTemplates
in interface DocumentTemplatesActions
public String createDocumentFromTemplate(DocumentModel doc, String templateId)
DocumentTemplatesActions
createDocumentFromTemplate
in interface DocumentTemplatesActions
doc
- the DocumentModel with edited datatemplateId
- the template idpublic String createDocumentFromTemplate(DocumentModel doc)
DocumentTemplatesActions
createDocumentFromTemplate
in interface DocumentTemplatesActions
public String createDocumentFromTemplate()
DocumentTemplatesActions
createDocumentFromTemplate
in interface DocumentTemplatesActions
public String getSelectedTemplateId()
DocumentTemplatesActions
getSelectedTemplateId
in interface DocumentTemplatesActions
public void setSelectedTemplateId(String requestedId)
DocumentTemplatesActions
setSelectedTemplateId
in interface DocumentTemplatesActions
public String getTargetType()
DocumentTemplatesActions
getTargetType
in interface DocumentTemplatesActions
public void setTargetType(String targetType)
DocumentTemplatesActions
setTargetType
in interface DocumentTemplatesActions
@Observer(value="documentChildrenChanged", create=false) @BypassInterceptors public void documentChildrenChanged()
DocumentTemplatesActions
documentChildrenChanged
in interface DocumentTemplatesActions
@Observer(value="domainSelectionChanged", create=false) @BypassInterceptors public void domainChanged()
DocumentTemplatesActions
domainChanged
in interface DocumentTemplatesActions
Copyright © 2018 Nuxeo. All rights reserved.