org.nuxeo.ecm.webapp.liveedit
Class LiveEditBootstrapHelper
java.lang.Object
   org.nuxeo.ecm.webapp.liveedit.LiveEditBootstrapHelper
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:
 
 - browsed page calls a JSF function from the DocumentModelFunctions class
 (edit a document, create new document, etc.) to generate;
- composing a specifc URL as result, triggering the bootstrap addon to
 popup;
- the addon come back with the URL composed allowing the present seam
 component to create the bootstrap file. The file contains various data as
 requested in the URL;
- the XML file is now available to addon which presents it to the client
 plugin.
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
 
| 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 | 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
MODIFIED_FIELD
protected static final String MODIFIED_FIELD
- See Also:
- Constant Field Values
DUBLINCORE_SCHEMA
protected static final String DUBLINCORE_SCHEMA
- See Also:
- Constant Field Values
navigationContext
@In(create=true)
protected transient NavigationContext navigationContext
documentManager
@In(create=true,
    required=false)
protected transient CoreSession documentManager
action
@RequestParameter
protected String action
repoID
@RequestParameter
protected String repoID
templateRepoID
@RequestParameter
protected String templateRepoID
docRef
@RequestParameter
protected String docRef
templateDocRef
@RequestParameter
protected String templateDocRef
liveEditClientConfig
@In(create=true)
protected LiveEditClientConfig liveEditClientConfig
schema
@Deprecated
@RequestParameter
protected String schema
- Deprecated. use blobPropertyField and filenamePropertyField instead
 
templateSchema
@RequestParameter
protected String templateSchema
blobField
@Deprecated
@RequestParameter
protected String blobField
- Deprecated. use blobPropertyField instead
 
blobPropertyName
@RequestParameter
protected String blobPropertyName
templateBlobField
@RequestParameter
protected String templateBlobField
filenameField
@Deprecated
@RequestParameter
protected String filenameField
- Deprecated. use filenamePropertyField instead
 
filenamePropertyName
@RequestParameter
protected String filenamePropertyName
mimetype
@RequestParameter
protected String mimetype
docType
@RequestParameter
protected String docType
mimetypeRegistry
protected MimetypeRegistry mimetypeRegistry
cachedEditableStates
protected final Map<String,Boolean> cachedEditableStates
cachedEditableBlobs
protected final Map<String,Boolean> cachedEditableBlobs
LiveEditBootstrapHelper
public LiveEditBootstrapHelper()
getSession
protected CoreSession getSession(String repositoryName)
                          throws ClientException
- 
 
- 
- Throws:
- ClientException
 
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
 
getFileExtension
protected String getFileExtension(String mimetype)
                           throws Exception
- 
 
- 
- Throws:
- Exception
 
getFileExtensions
protected List<String> getFileExtensions(String mimetype)
                                  throws Exception
- 
 
- 
- Throws:
- Exception
 
addTextElement
protected static org.dom4j.Element addTextElement(org.dom4j.Element parent,
                                                  org.dom4j.QName newElementName,
                                                  String value)
- 
 
- 
 
getEditId
protected static String getEditId(DocumentModel doc,
                                  CoreSession session,
                                  String userName)
- 
 
- 
 
isLiveEditable
public boolean isLiveEditable(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
 
cacheBlobToFalse
protected boolean cacheBlobToFalse(String cacheKey)
- 
 
- 
 
getMimetypeRegistry
protected MimetypeRegistry getMimetypeRegistry()
                                        throws Exception
- 
 
- 
- Throws:
- Exception
 
Copyright © 2010 Nuxeo SAS. All Rights Reserved.