Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.liveedit
Class LiveEditBootstrapHelper

java.lang.Object
  extended by org.nuxeo.ecm.webapp.liveedit.LiveEditBootstrapHelper
All Implemented Interfaces:
Serializable, LiveEditConstants

@Scope(value=EVENT)
@Name(value="liveEditHelper")
public class LiveEditBootstrapHelper
extends Object
implements Serializable, LiveEditConstants

The LiveEdit bootstrap procedure works as follows:

Please refer to the nuxeo book chapter on desktop integration for details on the format of the nxedit URLs and the XML bootstrap file.

Author:
Thierry Delprat NXP-1959 the bootstrap file is managing the 'create new document [from template]' case too. The URL is containing an action identifier., Rux rdarlea@nuxeo.com, Olivier Grisel ogrisel@nuxeo.com (split url functions into JSF DocumentModelFunctions module)
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.nuxeo.ecm.platform.ui.web.tag.fn.LiveEditConstants
ACTION, ACTION_CREATE_DOCUMENT, ACTION_CREATE_DOCUMENT_FROM_TEMPLATE, ACTION_EDIT_DOCUMENT, actionSelectorTag, BLOB_FIELD, BLOB_PROPERTY_NAME, DEFAULT_BLOB_FIELD, DEFAULT_DOCTYPE, DEFAULT_FILENAME_FIELD, DEFAULT_SCHEMA, DEFAULT_SUB_BLOB_FIELD, DOC_REF, DOC_TYPE, docBlobFieldNameTag, docBlobFieldPathTag, docFieldNameTag, docfieldPathTag, docFileAuthorizedExtensionsTag, docFileAuthorizedExtensionTag, docFileExtensionTag, docFilenameFieldNameTag, docFilenameFieldPathTag, docfileNameTag, docIsLockedTag, docIsVersionTag, docMimetypeTag, docPathTag, docRefTag, docRepositoryTag, docSchemaNameTag, docTitleTag, docTypeTag, documentTag, editIdTag, FILENAME_FIELD, FILENAME_PROPERTY_NAME, liveEditTag, MIMETYPE, REPO_ID, requestBaseURLTag, requestCookiesTag, requestCookieTag, requestHeadersTag, requestHeaderTag, requestInfoTag, SCHEMA, serverInfoTag, serverVersionTag, TEMPLATE_BLOB_FIELD, TEMPLATE_DOC_REF, TEMPLATE_REPO_ID, TEMPLATE_SCHEMA, templateDocumentTag, URL_ENCODE_CHARSET, userInfoTag, userLocaleTag, userNameTag, userPasswordTag, userTokenTag, wsdlAccessWebServiceTag, wsdlLEWebServiceTag, wsdlLocationsTag, XML_LE_NAMESPACE
 
Constructor Summary
LiveEditBootstrapHelper()
           
 
Method Summary
 void getBootstrap()
          Creates the bootstrap file.
 boolean isCurrentDocumentLiveEditable()
           
 boolean isCurrentDocumentLiveEditable(String propertyName)
           
 boolean isCurrentDocumentLiveEditable(String schemaName, String fieldName)
           
 boolean isDocumentLiveEditable(DocumentModel documentModel, String propertyName)
           
 boolean isDocumentLiveEditable(DocumentModel documentModel, String schemaName, String fieldName)
           
 boolean isLiveEditable(Blob blob)
          Deprecated. use #isLiveEditable(DocumentModel doc, String blobXpath)
 boolean isLiveEditable(DocumentModel document, Blob blob)
           
 boolean isMimeTypeLiveEditable(Blob blob)
           
 boolean isMimeTypeLiveEditable(String mimetype)
           
 boolean isMSExcelLiveEdititable()
           
 boolean isMSPowerpointLiveEdititable()
           
 boolean isMSWordLiveEdititable()
           
 boolean isOOCalcLiveEdititable()
           
 boolean isOOPresentationLiveEdititable()
           
 boolean isOOTextLiveEdititable()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiveEditBootstrapHelper

public LiveEditBootstrapHelper()
Method Detail

getBootstrap

public void getBootstrap()
                  throws Exception
Creates the bootstrap file. It is called from the browser's addon. The URL composition tells the case and what to create. The structure is depicted in the NXP-1881. Rux NXP-1959: add new tag on root level describing the action: actionEdit, actionNew or actionFromTemplate.

Throws:
Exception

isLiveEditable

@Deprecated
public boolean isLiveEditable(Blob blob)
                       throws ClientException
Deprecated. use #isLiveEditable(DocumentModel doc, String blobXpath)

Throws:
ClientException

isLiveEditable

public boolean isLiveEditable(DocumentModel document,
                              Blob blob)
                       throws ClientException
Parameters:
document - the document to edit.
blobXPath - XPath to the blob property
Returns:
true if the document is immutable and the blob's mime type is supported, false otherwise.
Throws:
ClientException
Since:
5.4

isMimeTypeLiveEditable

public boolean isMimeTypeLiveEditable(Blob blob)
                               throws ClientException
Throws:
ClientException

isMimeTypeLiveEditable

public boolean isMimeTypeLiveEditable(String mimetype)
                               throws ClientException
Throws:
ClientException

isMSWordLiveEdititable

@Factory(value="msword_liveeditable",
         scope=SESSION)
public boolean isMSWordLiveEdititable()
                               throws ClientException
Throws:
ClientException

isMSExcelLiveEdititable

@Factory(value="msexcel_liveeditable",
         scope=SESSION)
public boolean isMSExcelLiveEdititable()
                                throws ClientException
Throws:
ClientException

isMSPowerpointLiveEdititable

@Factory(value="mspowerpoint_liveeditable",
         scope=SESSION)
public boolean isMSPowerpointLiveEdititable()
                                     throws ClientException
Throws:
ClientException

isOOTextLiveEdititable

@Factory(value="ootext_liveeditable",
         scope=SESSION)
public boolean isOOTextLiveEdititable()
                               throws ClientException
Throws:
ClientException

isOOCalcLiveEdititable

@Factory(value="oocalc_liveeditable",
         scope=SESSION)
public boolean isOOCalcLiveEdititable()
                               throws ClientException
Throws:
ClientException

isOOPresentationLiveEdititable

@Factory(value="oopresentation_liveeditable",
         scope=SESSION)
public boolean isOOPresentationLiveEdititable()
                                       throws ClientException
Throws:
ClientException

isCurrentDocumentLiveEditable

public boolean isCurrentDocumentLiveEditable()
                                      throws ClientException
Throws:
ClientException

isCurrentDocumentLiveEditable

public boolean isCurrentDocumentLiveEditable(String schemaName,
                                             String fieldName)
                                      throws ClientException
Throws:
ClientException

isCurrentDocumentLiveEditable

public boolean isCurrentDocumentLiveEditable(String propertyName)
                                      throws ClientException
Throws:
ClientException

isDocumentLiveEditable

public boolean isDocumentLiveEditable(DocumentModel documentModel,
                                      String schemaName,
                                      String fieldName)
                               throws ClientException
Throws:
ClientException

isDocumentLiveEditable

public boolean isDocumentLiveEditable(DocumentModel documentModel,
                                      String propertyName)
                               throws ClientException
Throws:
ClientException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.