Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.documenttemplates
Class DocumentTemplatesActionsBean

java.lang.Object
  extended by org.nuxeo.ecm.webapp.base.InputController
      extended by org.nuxeo.ecm.webapp.documenttemplates.DocumentTemplatesActionsBean
All Implemented Interfaces:
Serializable, DocumentTemplatesActions

@Name(value="documentTemplatesActions")
@Scope(value=CONVERSATION)
public class DocumentTemplatesActionsBean
extends InputController
implements DocumentTemplatesActions, Serializable

Implementation for the documentTemplatesBean component available on the session.

See Also:
Serialized Form

Field Summary
static String TemplateRoot
           
 
Constructor Summary
DocumentTemplatesActionsBean()
           
 
Method Summary
 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(DocumentModel targetDoc)
          Listener to children changed event.
 void domainChanged(DocumentModel targetDoc)
          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.
 
Methods inherited from class org.nuxeo.ecm.webapp.base.InputController
computeOutcome, getAdministrator, logDocumentWithName, logDocumentWithTitle, removeDocumentFromList
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TemplateRoot

public static final String TemplateRoot
See Also:
Constant Field Values
Constructor Detail

DocumentTemplatesActionsBean

public DocumentTemplatesActionsBean()
Method Detail

templatesListFactory

@Factory(value="availableTemplates",
         scope=EVENT)
public DocumentModelList templatesListFactory()
Description copied from interface: DocumentTemplatesActions
Factory accessor on the getter.

Specified by:
templatesListFactory in interface DocumentTemplatesActions

getTemplates

public DocumentModelList getTemplates(String targetTypeName)
                               throws ClientException
Specified by:
getTemplates in interface DocumentTemplatesActions
Throws:
ClientException

getTemplates

public DocumentModelList getTemplates()
                               throws ClientException
Specified by:
getTemplates in interface DocumentTemplatesActions
Returns:
list of DocumentModels of available templates of currently selected type.
Throws:
ClientException

createDocumentFromTemplate

public String createDocumentFromTemplate(DocumentModel doc,
                                         String templateId)
                                  throws ClientException
Description copied from interface: DocumentTemplatesActions
Creates a Document from a template.

Specified by:
createDocumentFromTemplate in interface DocumentTemplatesActions
Parameters:
doc - the DocumentModel with edited data
templateId - the template id
Throws:
ClientException

createDocumentFromTemplate

public String createDocumentFromTemplate(DocumentModel doc)
                                  throws ClientException
Description copied from interface: DocumentTemplatesActions
Creates a Document from a template using the selectedTemplateId.

Specified by:
createDocumentFromTemplate in interface DocumentTemplatesActions
Throws:
ClientException

createDocumentFromTemplate

public String createDocumentFromTemplate()
                                  throws ClientException
Description copied from interface: DocumentTemplatesActions
Creates a Document from a template using the selectedTemplateId and the changeableDocument.

Specified by:
createDocumentFromTemplate in interface DocumentTemplatesActions
Throws:
ClientException

getSelectedTemplateId

public String getSelectedTemplateId()
Description copied from interface: DocumentTemplatesActions
Getter of the selected template id.

Specified by:
getSelectedTemplateId in interface DocumentTemplatesActions

setSelectedTemplateId

public void setSelectedTemplateId(String requestedId)
Description copied from interface: DocumentTemplatesActions
Setter for the template to use.

Specified by:
setSelectedTemplateId in interface DocumentTemplatesActions

getTargetType

public String getTargetType()
Description copied from interface: DocumentTemplatesActions
Getter for type of the document to be created.

Specified by:
getTargetType in interface DocumentTemplatesActions

setTargetType

public void setTargetType(String targetType)
Description copied from interface: DocumentTemplatesActions
Setter for the type of document to be created.

Specified by:
setTargetType in interface DocumentTemplatesActions

documentChildrenChanged

@Observer(value="documentChildrenChanged",
          create=false)
@BypassInterceptors
public void documentChildrenChanged(DocumentModel targetDoc)
Description copied from interface: DocumentTemplatesActions
Listener to children changed event.

Specified by:
documentChildrenChanged in interface DocumentTemplatesActions

domainChanged

@Observer(value="domainSelectionChanged",
          create=false)
@BypassInterceptors
public void domainChanged(DocumentModel targetDoc)
Description copied from interface: DocumentTemplatesActions
Listener for domain changed event.

Specified by:
domainChanged in interface DocumentTemplatesActions

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.