@Name(value="nuxeoDriveActions") @Scope(value=PAGE) @Install(precedence=10) public class NuxeoDriveActions extends org.nuxeo.ecm.webapp.base.InputController implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CURRENT_SYNCHRONIZATION_ROOT |
static String |
DESKTOP_PACKAGE_PREFIX |
static String |
DESKTOP_PACKAGE_URL_LATEST_SEGMENT |
static String |
DMG_EXTENSION |
protected org.nuxeo.ecm.webapp.contentbrowser.DocumentActions |
documentActions |
protected org.nuxeo.ecm.core.api.CoreSession |
documentManager |
protected static String |
IS_UNDER_SYNCHRONIZATION_ROOT |
static String |
MSI_EXTENSION |
protected NavigationContext |
navigationContext |
static String |
NEW_DRIVE_EDIT_URL_PROP_KEY |
static String |
NXDRIVE_PROTOCOL |
static String |
OSX_PLATFORM |
static String |
PROTOCOL_COMMAND_EDIT |
static String |
SERVER_VERSION_PROP_KEY |
static String |
UPDATE_SITE_URL_PROP_KEY |
protected UserCenterViewManager |
userCenterViews |
static String |
WINDOWS_PLATFORM |
| Constructor and Description |
|---|
NuxeoDriveActions() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canEditDocument(org.nuxeo.ecm.core.api.DocumentModel doc) |
boolean |
canNavigateToCurrentSynchronizationRoot() |
boolean |
canSynchronizeCurrentDocument() |
boolean |
canUnSynchronizeCurrentDocument() |
String |
downloadClientPackage(String name,
File file) |
List<DesktopPackageDefinition> |
getClientPackages() |
org.nuxeo.ecm.core.api.DocumentModel |
getCurrentSynchronizationRoot() |
Object |
getDesktopPackageBaseURL() |
String |
getDriveEditURL()
Returns the Drive edit URL for the current document.
|
String |
getDriveEditURL(org.nuxeo.ecm.core.api.DocumentModel currentDocument)
Returns the Drive edit URL for the given document.
|
protected FileSystemItem |
getFileSystemItem(org.nuxeo.ecm.core.api.DocumentModel doc) |
org.nuxeo.ecm.core.api.DocumentModelList |
getSynchronizationRoots() |
protected String |
getUserCenterNuxeoDriveView() |
boolean |
hasOneDriveToken(Principal user) |
boolean |
isCurrentDocumentUserWorkspace() |
protected boolean |
isSyncRootCandidate(org.nuxeo.ecm.core.api.DocumentModel doc) |
String |
navigateToCurrentSynchronizationRoot() |
String |
navigateToUserCenterNuxeoDrive() |
String |
synchronizeCurrentDocument() |
void |
unsynchronizeCurrentDocument() |
void |
unsynchronizeRoot(org.nuxeo.ecm.core.api.DocumentModel syncRoot) |
String |
updateCurrentDocument()
Update document model and redirect to drive view.
|
protected static final String IS_UNDER_SYNCHRONIZATION_ROOT
protected static final String CURRENT_SYNCHRONIZATION_ROOT
public static final String NXDRIVE_PROTOCOL
public static final String PROTOCOL_COMMAND_EDIT
public static final String UPDATE_SITE_URL_PROP_KEY
public static final String SERVER_VERSION_PROP_KEY
public static final String NEW_DRIVE_EDIT_URL_PROP_KEY
public static final String DESKTOP_PACKAGE_URL_LATEST_SEGMENT
public static final String DESKTOP_PACKAGE_PREFIX
public static final String MSI_EXTENSION
public static final String DMG_EXTENSION
public static final String WINDOWS_PLATFORM
public static final String OSX_PLATFORM
@In(create=true,
required=false)
protected transient NavigationContext navigationContext
@In(create=true,
required=false)
protected transient org.nuxeo.ecm.core.api.CoreSession documentManager
@In(create=true,
required=false)
protected transient UserCenterViewManager userCenterViews
@In(create=true) protected transient org.nuxeo.ecm.webapp.contentbrowser.DocumentActions documentActions
@Factory(value="nuxeoDriveCurrentSynchronizationRoot",
scope=EVENT)
public org.nuxeo.ecm.core.api.DocumentModel getCurrentSynchronizationRoot()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean canEditDocument(org.nuxeo.ecm.core.api.DocumentModel doc)
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic boolean hasOneDriveToken(Principal user)
public String getDriveEditURL() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptiongetDriveEditURL(DocumentModel)public String getDriveEditURL(org.nuxeo.ecm.core.api.DocumentModel currentDocument) throws org.nuxeo.ecm.core.api.ClientException
NXDRIVE_PROTOCOL must be handled by a protocol handler configured on the client side (either on the
browser, or on the OS).
NXDRIVE_PROTOCOL:// PROTOCOL_COMMAND_EDIT
/protocol/server[:port]/webappName/[user/userName/]repo/repoName/nxdocid/docId/filename/fileName[/
downloadUrl/downloadUrl]"org.nuxeo.ecm.core.api.ClientExceptionpublic String navigateToUserCenterNuxeoDrive()
@Factory(value="canSynchronizeCurrentDocument")
public boolean canSynchronizeCurrentDocument()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Factory(value="canUnSynchronizeCurrentDocument")
public boolean canUnSynchronizeCurrentDocument()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Factory(value="canNavigateToCurrentSynchronizationRoot")
public boolean canNavigateToCurrentSynchronizationRoot()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Factory(value="currentDocumentUserWorkspace",
scope=PAGE)
public boolean isCurrentDocumentUserWorkspace()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String synchronizeCurrentDocument() throws org.nuxeo.ecm.core.api.ClientException, org.nuxeo.ecm.core.security.SecurityException
org.nuxeo.ecm.core.api.ClientExceptionorg.nuxeo.ecm.core.security.SecurityExceptionpublic void unsynchronizeCurrentDocument()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic String navigateToCurrentSynchronizationRoot() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic org.nuxeo.ecm.core.api.DocumentModelList getSynchronizationRoots()
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionpublic void unsynchronizeRoot(org.nuxeo.ecm.core.api.DocumentModel syncRoot)
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientException@Factory(value="nuxeoDriveClientPackages",
scope=CONVERSATION)
public List<DesktopPackageDefinition> getClientPackages()
@Factory(value="desktopPackageBaseURL",
scope=APPLICATION)
public Object getDesktopPackageBaseURL()
protected boolean isSyncRootCandidate(org.nuxeo.ecm.core.api.DocumentModel doc)
throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionprotected FileSystemItem getFileSystemItem(org.nuxeo.ecm.core.api.DocumentModel doc) throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionprotected String getUserCenterNuxeoDriveView()
public String updateCurrentDocument() throws org.nuxeo.ecm.core.api.ClientException
org.nuxeo.ecm.core.api.ClientExceptionCopyright © 2019 Nuxeo SA. All rights reserved.