public class WOPIService extends AbstractOfficeOnlineService
| Modifier and Type | Class and Description |
|---|---|
static class |
WOPIService.DocumentTypesConfig
NewDocumentTypesConfig.
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
BASE_FILE_NAME
The Constant BASE_FILE_NAME.
|
protected static String |
BRAND_NAME
The Constant BRAND_NAME.
|
protected String |
brandName
The brand name.
|
protected static String |
BREADCRUMB_BRAND_NAME
The Constant BREADCRUMB_BRAND_NAME.
|
protected static String |
BREADCRUMB_BRAND_URL
The Constant BREADCRUMB_BRAND_URL.
|
protected static String |
BREADCRUMB_CONFIGURATION_PROPERTIES
The Constant BREADCRUMB_CONFIGURATION_PROPERTIES.
|
protected static String |
BREADCRUMB_FOLDER_NAME
The Constant BREADCRUMB_FOLDER_NAME.
|
protected static String |
BREADCRUMB_FOLDER_URL
The Constant BREADCRUMB_FOLDER_URL.
|
protected static String |
CLOSE_URL
The Constant CLOSE_URL.
|
protected static String |
DEFAULT_FILENAME
The Constant DEFAULT_FILENAME.
|
protected WOPIDiscoveryPlugin |
discoveryPlugin
The discovery plugin.
|
protected DocumentTypePlugin |
documentTypePlugin
The documentTypePlugin.
|
protected static String |
DOWNLOAD_URL
The Constant DOWNLOAD_URL.
|
static String |
EDIT_ACTION
The Constant EDIT_ACTION.
|
protected static String |
EDIT_NOTIFICATION_POST_MESSAGE
The Constant EDIT_NOTIFICATION_POST_MESSAGE.
|
protected static String |
EDIT_PARAM
The Constant EDIT_PARAM.
|
static String |
EDITNEW_ACTION
The Constant EDIT_ACTION.
|
protected static String |
EDITNEW_PARAM
The Constant EDITNEW_PARAM.
|
protected static String |
FILE_URL
The Constant FILE_URL.
|
protected static String |
FILE_VERSION_POST_MESSAGE
The Constant FILE_VERSION_POST_MESSAGE.
|
protected static String |
FILE_VERSION_URL
The Constant FILE_VERSION_URL.
|
protected static String |
FILES_ENDPOINT
The Constant FILES_ENDPOINT.
|
protected static String |
HOST_EDIT_URL
The Constant HOST_EDIT_URL.
|
protected static String |
HOST_VIEW_URL
The Constant HOST_VIEW_URL.
|
protected static String |
IS_ANONYMOUS_USER
The Constant IS_ANONYMOUS_USER.
|
protected static String |
JCR_FROZEN_NODE
The Constant JCR_FROZEN_NODE.
|
protected static String |
LICENSE_CHECK_FOR_EDIT_IS_ENABLED
The Constant LICENSE_CHECK_FOR_EDIT_IS_ENABLED.
|
protected ConcurrentLinkedQueue<OfficeOnlineListener> |
listeners
The listeners.
|
protected WOPILockManagerPlugin |
lockManager
The lock manager.
|
protected static org.exoplatform.services.log.Log |
LOG
The Constant LOG.
|
protected static int |
MAX_FILENAME_LENGHT
The Constant MAX_FILENAME_LENGHT.
|
protected static String |
MSOFFICE_IS_EDITOR_VERSION
The Constant MSOFFICE_IS_EDITOR_VERSION.
|
protected static String |
MSOFFICE_VERSION_OWNER
The Constant MSOFFICE_VERSION_OWNER.
|
protected static String |
NT_FILE
The Constant NT_FILE.
|
protected static String |
NT_RESOURCE
The Constant NT_RESOURCE.
|
protected static String |
OWNER_ID
The Constant OWNER_ID.
|
protected static String |
PLACEHOLDER_DC_LLCC
The Constant PLACEHOLDER_DC_LLCC.
|
protected static String |
PLACEHOLDER_UI_LLCC
The Constant PLACEHOLDER_UI_LLCC.
|
protected static String |
PLACEHOLDER_WOPISRC
The Constant PLACEHOLDER_WOPISRC.
|
protected String |
platformHost
The platform host.
|
protected int |
platformPort
The platform port.
|
protected String |
platformScheme
The platform scheme.
|
protected static String |
POST_MESSAGE_ORIGIN
The Constant POST_MESSAGE_ORIGIN.
|
protected static String |
SHARE_URL
The Constant SHARE_URL.
|
protected static String |
SHARE_URL_READ_ONLY
The Constant SHARE_URL_READ_ONLY.
|
protected static String |
SHARE_URL_READ_WRITE
The Constant SHARE_URL_READ_WRITE.
|
protected static String |
SIGNOUT_URL
The Constant SIGNOUT_URL.
|
protected static String |
SIZE
The Constant SIZE.
|
protected static String |
SUPPORTED_SHARE_URL_TYPES
The Constant SUPPORTED_SHARE_URL_TYPES.
|
protected static String |
SUPPORTS_DELETE_FILE
The Constant SUPPORTS_DELETE_FILE.
|
protected static String |
SUPPORTS_EXTENDED_LOCK_LENGTH
The Constant SUPPORTS_EXTENDED_LOCK_LENGTH.
|
protected static String |
SUPPORTS_GET_LOCK
The Constant SUPPORTS_GET_LOCK.
|
protected static String |
SUPPORTS_LOCKS
The Constant SUPPORTS_LOCKS.
|
protected static String |
SUPPORTS_RENAME
The Constant SUPPORTS_RENAME.
|
protected static String |
SUPPORTS_UPDATE
The Constant SUPPORTS_UPDATE.
|
protected static String |
SUPPORTS_USER_INFO
The Constant SUPPORTS_USER_INFO.
|
protected static String |
TOKEN_CONFIGURATION_PROPERTIES
The Constant TOKEN_CONFIGURATION_PROPERTIES.
|
protected org.exoplatform.services.cms.documents.TrashService |
trashService
The trash service.
|
protected static String |
USER_FRIENDLY_NAME
The Constant USER_FRIENDLY_NAME.
|
protected static String |
USER_ID
The Constant USER_ID.
|
protected static String |
USER_INFO
The Constant USER_INFO.
|
static String |
USERINFO_CACHE_NAME
The Constant USERIONFO_CACHE_NAME.
|
protected org.exoplatform.services.cache.ExoCache<String,String> |
userInfoCache
The user info cache.
|
protected String |
usersPath
The user drives paths in JCR.
|
protected static String |
VERSION
The Constant VERSION.
|
protected static String |
VERSION_ACCUMULATION
The Constant VERSION_ACCUMULATION.
|
protected static String |
VERSION_ACCUMULATION_PROPERTIES
The Constant VERSION_ACCUMULATION_PROPERTIES.
|
protected static long |
VERSION_TIMEOUT
The Constant VERSION_TIMEOUT.
|
protected boolean |
versionAccumulation
The version accumulation.
|
static String |
VIEW_ACTION
The Constant VIEW_ACTION.
|
protected static String |
VIEW_PARAM
The Constant VIEW_PARAM.
|
protected static String |
WOPI_CONFIGURATION_PROPERTIES
The Constant WOPI_CONFIGURATION_PROPERTIES.
|
protected static String |
WOPI_URL
The Constant WOPI_URL.
|
protected WOPIAvailabilityCheckerPlugin |
wopiAvailabilityChecker
The wopi availability checker.
|
protected String |
wopiUrl
The wopi url.
|
ALGORITHM, authenticator, documentService, EXO_DATE_MODIFIED, EXO_LAST_MODIFIED_DATE, EXO_LAST_MODIFIER, EXO_NAME, EXO_OWNER, EXO_PRIVILEGEABLE, EXO_TITLE, identityRegistry, JCR_CONTENT, JCR_DATA, JCR_LAST_MODIFIED, JCR_MIME_TYPE, jcrService, KEY_CACHE_NAME, keyCache, MIX_VERSIONABLE, MSOFFICE_FILE, MSOFFICE_PREFERENCES, MSOFFICE_USER_PREFERENCES, nodeFinder, organization, PATH, SECRET_KEY, sessionProviders, TOKEN_DELIMITER, TOKEN_DELIMITER_PATTERN, TOKEN_EXPIRES, userACL, UTF_8, WOPITEST, WOPITESTX| Constructor and Description |
|---|
WOPIService(org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.organization.OrganizationService organization,
org.exoplatform.services.cms.documents.DocumentService documentService,
org.exoplatform.services.cache.CacheService cacheService,
org.exoplatform.portal.config.UserACL userACL,
org.exoplatform.services.cms.documents.TrashService trashService,
org.exoplatform.services.security.IdentityRegistry identityRegistry,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator,
org.exoplatform.services.security.Authenticator authenticator,
org.exoplatform.services.cms.link.NodeFinder nodeFinder,
org.exoplatform.container.xml.InitParams initParams)
Instantiates a new WOPI service.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBreadcrumbProperties(Map<String,Serializable> map,
javax.jcr.Node node,
EditorConfig config)
Adds the breadcrumb properties.
|
protected void |
addFileURLProperties(Map<String,Serializable> map,
javax.jcr.Node node,
EditorConfig config)
Adds the file URL properties.
|
protected void |
addHostCapabilitiesProperties(Map<String,Serializable> map)
Adds the host capabilities properties.
|
void |
addListener(OfficeOnlineListener listener)
Adds the listener.
|
protected void |
addRequiredProperties(Map<String,Serializable> map,
javax.jcr.Node node)
Adds the required properties.
|
void |
addTypePlugin(org.exoplatform.container.component.ComponentPlugin plugin) |
protected void |
addUserMetadataProperties(Map<String,Serializable> map)
Adds the user metadata properties.
|
protected void |
addUserPermissionsProperties(Map<String,Serializable> map,
javax.jcr.Node node)
Adds the user permissions properties.
|
boolean |
canEdit(javax.jcr.Node node)
Can edit.
|
protected boolean |
canUpdate(javax.jcr.Node node)
Checks parent node permissions.
|
boolean |
canView(javax.jcr.Node node)
Can view.
|
Map<String,Serializable> |
checkFileInfo(EditorConfig config)
Check file info.
|
protected void |
checkNodeLock(javax.jcr.Node node,
String lockId)
Check node lock.
|
protected boolean |
checkout(javax.jcr.Node node)
Checkout.
|
protected String |
createFile(javax.jcr.Node parent,
String filename,
InputStream data)
Creates the file.
|
protected void |
createVersionOfDraft(javax.jcr.Node node)
Creates a version of draft.
|
void |
delete(EditorConfig config,
String lockId)
Delete.
|
protected Key |
generateSecretKey()
Generate secret key.
|
String |
getActionUrl(RequestInfo requestInfo,
String fileId,
String workspace,
String action)
Gets the action url.
|
String |
getEditorLink(javax.jcr.Node node,
String baseUrl,
String action)
Gets the editor link.
|
String |
getEditorLink(javax.jcr.Node node,
String scheme,
String host,
int port,
String action)
Gets the editor link.
|
String |
getEditorLink(String fileId,
String workspace,
String baseUrl,
String action)
Gets the editor URL.
|
StringBuilder |
getExplorerURL(javax.jcr.Node node,
String baseUrl)
Gets the explorer URL.
|
protected String |
getFileExtension(javax.jcr.Node node)
Gets the file extension.
|
String |
getFileName(String fileId,
String workspace)
Gets the file name.
|
String |
getFileVersion(String fileId,
String workspace)
Gets the file version.
|
protected javax.jcr.Node |
getFrozen(javax.jcr.Node node)
Gets the frozen.
|
String |
getLockId(EditorConfig config)
Gets the lock.
|
String |
getMimeTypeByExtension(String extension)
Gets the mime type by extension.
|
protected String |
getUserId(String path)
Gets userId from node path.
|
protected String |
getVersioningUser(javax.jcr.Node frozen)
Gets the versioning user.
|
String |
getWOPISrc(RequestInfo requestInfo,
String fileId)
Gets the WOPI src.
|
protected String |
increaseName(String origin,
int count)
Increase name.
|
boolean |
isDocumentSupported(javax.jcr.Node node)
Checks if is document supported.
|
protected Boolean |
isEditorVersion(javax.jcr.Node frozen)
Checks if is editor version.
|
boolean |
isNewDocument(javax.jcr.Node node)
Checks if is new document.
|
boolean |
isVersionAccumulationEnabled()
Checks if is version accumulation enabled.
|
void |
lock(EditorConfig config,
String lockId)
Lock.
|
void |
onSaved(EditorConfig config)
On saved.
|
void |
putFile(EditorConfig config,
String lockId,
InputStream data)
Put file.
|
String |
putRelativeFile(EditorConfig config,
String filename,
boolean overwrite,
InputStream data)
Put relative file.
|
String |
putSuggestedFile(EditorConfig config,
String target,
InputStream data)
Put relative file in suggested mode.
|
void |
putUserInfo(String userId,
String userInfo)
Put user info.
|
void |
refreshLock(EditorConfig config,
String lockId)
Refresh lock.
|
void |
relock(EditorConfig config,
String providedLock,
String oldLock)
Relock.
|
void |
removeListener(OfficeOnlineListener listener)
Removes the listener.
|
String |
renameFile(EditorConfig config,
String newTitle,
String lockId)
Rename file.
|
void |
setVersionAccumulation(boolean versionAccumulation)
Sets the version accumulation.
|
void |
setWOPIAvailabilityCheckerPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Sets the WOPIAvailabilityCheckerPlugin.
|
void |
setWOPIDiscoveryPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Sets the plugin.
|
void |
setWOPILockManagerPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Sets the plugin.
|
void |
start()
Start.
|
void |
stop()
Stop.
|
void |
unlock(EditorConfig config,
String providedLock)
Unlock.
|
boolean |
verifyProofKey(String proofKeyHeader,
String oldProofKeyHeader,
String contextPath,
String accessToken,
String timestampHeader)
Verify proof key.
|
addFilePreferences, buildEditorConfig, createEditorConfig, explorerLink, explorerUri, generateAccessToken, getContent, getNode, getSize, getSymlink, getUser, getUserSession, nodeByUUID, nodeContent, nodeTitle, platformRestUrl, platformUrl, restoreConvoState, setUserConvoState, userIdentityprotected static final org.exoplatform.services.log.Log LOG
protected static final String MSOFFICE_VERSION_OWNER
protected static final String JCR_FROZEN_NODE
protected static final String NT_RESOURCE
protected static final String NT_FILE
protected static final String MSOFFICE_IS_EDITOR_VERSION
protected static final String BASE_FILE_NAME
protected static final String DEFAULT_FILENAME
protected static final String OWNER_ID
protected static final String FILES_ENDPOINT
protected static final String SIZE
protected static final String USER_ID
protected static final String VERSION
protected static final String BREADCRUMB_BRAND_NAME
protected static final String BREADCRUMB_BRAND_URL
protected static final String BREADCRUMB_FOLDER_NAME
protected static final String BREADCRUMB_FOLDER_URL
protected static final String CLOSE_URL
protected static final String DOWNLOAD_URL
protected static final String FILE_URL
protected static final String FILE_VERSION_URL
protected static final String HOST_EDIT_URL
protected static final String HOST_VIEW_URL
protected static final String SIGNOUT_URL
protected static final String SUPPORTS_EXTENDED_LOCK_LENGTH
protected static final String SUPPORTS_GET_LOCK
protected static final String SUPPORTS_LOCKS
protected static final String SUPPORTS_RENAME
protected static final String SUPPORTS_UPDATE
protected static final String SUPPORTS_DELETE_FILE
protected static final String SUPPORTS_USER_INFO
protected static final String SUPPORTED_SHARE_URL_TYPES
protected static final String POST_MESSAGE_ORIGIN
protected static final String FILE_VERSION_POST_MESSAGE
protected static final String EDIT_NOTIFICATION_POST_MESSAGE
protected static final String IS_ANONYMOUS_USER
protected static final String USER_INFO
protected static final String LICENSE_CHECK_FOR_EDIT_IS_ENABLED
protected static final String USER_FRIENDLY_NAME
protected static final String PLACEHOLDER_WOPISRC
protected static final String PLACEHOLDER_DC_LLCC
protected static final String PLACEHOLDER_UI_LLCC
protected static final String SHARE_URL
protected static final String SHARE_URL_READ_ONLY
protected static final String SHARE_URL_READ_WRITE
protected static final String TOKEN_CONFIGURATION_PROPERTIES
protected static final String BREADCRUMB_CONFIGURATION_PROPERTIES
protected static final String WOPI_CONFIGURATION_PROPERTIES
protected static final String VERSION_ACCUMULATION_PROPERTIES
protected static final String VERSION_ACCUMULATION
protected static final String WOPI_URL
protected static final String BRAND_NAME
protected static final int MAX_FILENAME_LENGHT
public static final String USERINFO_CACHE_NAME
public static final String EDIT_ACTION
public static final String EDITNEW_ACTION
public static final String VIEW_ACTION
protected static final String VIEW_PARAM
protected static final String EDIT_PARAM
protected static final String EDITNEW_PARAM
protected static final long VERSION_TIMEOUT
protected final String usersPath
protected final org.exoplatform.services.cms.documents.TrashService trashService
protected WOPIDiscoveryPlugin discoveryPlugin
protected WOPIAvailabilityCheckerPlugin wopiAvailabilityChecker
protected WOPILockManagerPlugin lockManager
protected String brandName
protected String wopiUrl
protected boolean versionAccumulation
protected String platformScheme
protected String platformHost
protected int platformPort
protected org.exoplatform.services.cache.ExoCache<String,String> userInfoCache
protected DocumentTypePlugin documentTypePlugin
protected final ConcurrentLinkedQueue<OfficeOnlineListener> listeners
public WOPIService(org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders,
org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.organization.OrganizationService organization,
org.exoplatform.services.cms.documents.DocumentService documentService,
org.exoplatform.services.cache.CacheService cacheService,
org.exoplatform.portal.config.UserACL userACL,
org.exoplatform.services.cms.documents.TrashService trashService,
org.exoplatform.services.security.IdentityRegistry identityRegistry,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator hierarchyCreator,
org.exoplatform.services.security.Authenticator authenticator,
org.exoplatform.services.cms.link.NodeFinder nodeFinder,
org.exoplatform.container.xml.InitParams initParams)
sessionProviders - the session providersjcrService - the jcr serviceorganization - the organizationdocumentService - the document servicecacheService - the cache serviceuserACL - the user ACLtrashService - the trash serviceidentityRegistry - the identity registryhierarchyCreator - the hierarchy creatorauthenticator - the authenticatornodeFinder - the node finderinitParams - the init paramspublic void putFile(EditorConfig config, String lockId, InputStream data) throws Exception
config - the configlockId - the lock iddata - the dataException - the exceptionprotected String getVersioningUser(javax.jcr.Node frozen) throws javax.jcr.RepositoryException
frozen - the frozenjavax.jcr.RepositoryException - the repository exceptionprotected javax.jcr.Node getFrozen(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - the nodejavax.jcr.RepositoryException - the repository exceptionprotected Boolean isEditorVersion(javax.jcr.Node frozen) throws javax.jcr.RepositoryException
frozen - the frozenjavax.jcr.RepositoryException - the repository exceptionprotected void createVersionOfDraft(javax.jcr.Node node)
throws javax.jcr.RepositoryException,
OfficeOnlineException
node - the nodejavax.jcr.RepositoryException - the repository exceptionOfficeOnlineException - the OfficeOnlineException exceptionprotected boolean checkout(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - the nodejavax.jcr.RepositoryException - the repository exceptionpublic Map<String,Serializable> checkFileInfo(EditorConfig config) throws javax.jcr.RepositoryException, FileNotFoundException
config - the configjavax.jcr.RepositoryException - the repository exceptionFileNotFoundException - the file not found exceptionpublic boolean verifyProofKey(String proofKeyHeader, String oldProofKeyHeader, String contextPath, String accessToken, String timestampHeader)
proofKeyHeader - the proof key headeroldProofKeyHeader - the old proof key headercontextPath - the contextPathaccessToken - the access tokentimestampHeader - the timestamp headerpublic void setWOPIDiscoveryPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - the pluginpublic void setWOPIAvailabilityCheckerPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - the pluginpublic void setWOPILockManagerPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - the pluginpublic String getActionUrl(RequestInfo requestInfo, String fileId, String workspace, String action) throws javax.jcr.RepositoryException, OfficeOnlineException
requestInfo - the request infofileId - the file idworkspace - the workspaceaction - the actionjavax.jcr.RepositoryException - the repository exceptionOfficeOnlineException - the office online exceptionpublic boolean isNewDocument(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - the nodejavax.jcr.RepositoryException - the repository exceptionpublic String renameFile(EditorConfig config, String newTitle, String lockId) throws javax.jcr.RepositoryException, OfficeOnlineException, LockMismatchException
config - the confignewTitle - the new titlelockId - the lock idjavax.jcr.RepositoryException - the repository exceptionOfficeOnlineException - the office online exceptionLockMismatchException - the lock mismatch exceptionprotected boolean canUpdate(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - the nodejavax.jcr.RepositoryException - the repository exceptionprotected String getFileExtension(javax.jcr.Node node) throws javax.jcr.RepositoryException, FileExtensionNotFoundException
node - the nodejavax.jcr.RepositoryException - the repository exceptionFileExtensionNotFoundException - the file extension not found exceptionpublic String getEditorLink(String fileId, String workspace, String baseUrl, String action) throws javax.jcr.RepositoryException, FileNotFoundException, EditorLinkNotFoundException
fileId - the file idworkspace - the workspacebaseUrl - the base urlaction - the actionjavax.jcr.RepositoryException - the repository exceptionFileNotFoundException - the file not found exceptionEditorLinkNotFoundException - the editor link not found exceptionpublic String getEditorLink(javax.jcr.Node node, String scheme, String host, int port, String action) throws javax.jcr.RepositoryException, EditorLinkNotFoundException
node - the nodescheme - the schemehost - the hostport - the portaction - the actionjavax.jcr.RepositoryException - the repository exceptionEditorLinkNotFoundException - the editor link not found exceptionpublic String getEditorLink(javax.jcr.Node node, String baseUrl, String action) throws javax.jcr.RepositoryException, EditorLinkNotFoundException
node - the nodebaseUrl - the base urlaction - the actionjavax.jcr.RepositoryException - the repository exceptionEditorLinkNotFoundException - the editor link not found exceptionpublic boolean isDocumentSupported(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - the nodejavax.jcr.RepositoryException - the repository exceptionpublic String getWOPISrc(RequestInfo requestInfo, String fileId)
requestInfo - the request infofileId - the file idpublic void start()
public void stop()
protected void addRequiredProperties(Map<String,Serializable> map, javax.jcr.Node node) throws javax.jcr.RepositoryException
map - the mapnode - the nodejavax.jcr.RepositoryException - the repository exceptionprotected void addHostCapabilitiesProperties(Map<String,Serializable> map)
map - the mapprotected void addUserMetadataProperties(Map<String,Serializable> map)
map - the mapprotected void addUserPermissionsProperties(Map<String,Serializable> map, javax.jcr.Node node) throws javax.jcr.RepositoryException
map - the mapnode - the nodejavax.jcr.RepositoryException - the repository exceptionpublic boolean canEdit(javax.jcr.Node node)
node - the nodepublic boolean canView(javax.jcr.Node node)
node - the nodeprotected void addFileURLProperties(Map<String,Serializable> map, javax.jcr.Node node, EditorConfig config) throws javax.jcr.RepositoryException
map - the mapnode - the nodeconfig - the configjavax.jcr.RepositoryException - the repository exceptionpublic StringBuilder getExplorerURL(javax.jcr.Node node, String baseUrl) throws javax.jcr.RepositoryException
node - the nodebaseUrl - the base urljavax.jcr.RepositoryException - the repository exceptionprotected void addBreadcrumbProperties(Map<String,Serializable> map, javax.jcr.Node node, EditorConfig config)
map - the mapnode - the nodeconfig - the configprotected Key generateSecretKey()
public void lock(EditorConfig config, String lockId) throws LockMismatchException, javax.jcr.RepositoryException, FileNotFoundException
config - the configlockId - the lock idLockMismatchException - the lock mismatch exceptionjavax.jcr.RepositoryException - the repository exceptionFileNotFoundException - the file not found exceptionpublic String getLockId(EditorConfig config) throws FileNotFoundException, javax.jcr.RepositoryException
config - the configFileNotFoundException - the file not found exceptionjavax.jcr.RepositoryException - the repository exceptionpublic void relock(EditorConfig config, String providedLock, String oldLock) throws LockMismatchException, javax.jcr.RepositoryException, FileNotFoundException
config - the configprovidedLock - the provided lockoldLock - the old lockLockMismatchException - the lock mismatch exceptionjavax.jcr.RepositoryException - the repository exceptionFileNotFoundException - the file not found exceptionpublic void unlock(EditorConfig config, String providedLock) throws LockMismatchException, javax.jcr.RepositoryException, FileNotFoundException
config - the configprovidedLock - the provided lockLockMismatchException - the lock mismatch exceptionjavax.jcr.RepositoryException - the repository exceptionFileNotFoundException - the file not found exceptionpublic void refreshLock(EditorConfig config, String lockId) throws LockMismatchException, javax.jcr.RepositoryException, FileNotFoundException
config - the configlockId - the lock idLockMismatchException - the lock mismatch exceptionjavax.jcr.RepositoryException - the repository exceptionFileNotFoundException - the file not found exceptionpublic String putSuggestedFile(EditorConfig config, String target, InputStream data) throws javax.jcr.RepositoryException, FileNotFoundException, FileExtensionNotFoundException, PermissionDeniedException
config - the configtarget - the targetdata - the datajavax.jcr.RepositoryException - the repository exceptionFileNotFoundException - the file not found exceptionFileExtensionNotFoundException - the file extension not found exceptionPermissionDeniedException - the permission denied exceptionpublic String putRelativeFile(EditorConfig config, String filename, boolean overwrite, InputStream data) throws IllegalFileNameException, FileNotFoundException, javax.jcr.RepositoryException, FileLockedException, UpdateConflictException, FileExtensionNotFoundException, PermissionDeniedException
config - the configfilename - the filenameoverwrite - the overwritedata - the dataIllegalFileNameException - the illegal file name exceptionFileNotFoundException - the file not found exceptionjavax.jcr.RepositoryException - the repository exceptionFileLockedException - the file locked exceptionUpdateConflictException - the update conflict exceptionFileExtensionNotFoundException - the file extension not found exceptionPermissionDeniedException - the permission denied exceptionprotected String createFile(javax.jcr.Node parent, String filename, InputStream data) throws javax.jcr.RepositoryException, FileExtensionNotFoundException
parent - the parentfilename - the filenamedata - the datajavax.jcr.RepositoryException - the repository exceptionFileExtensionNotFoundException - the file extension not found exceptionpublic String getMimeTypeByExtension(String extension) throws FileExtensionNotFoundException
extension - the extensionFileExtensionNotFoundException - the file extension not found exceptionpublic String getFileVersion(String fileId, String workspace) throws FileNotFoundException, javax.jcr.RepositoryException
fileId - the file idworkspace - the workspaceFileNotFoundException - the file not found exceptionjavax.jcr.RepositoryException - the repository exceptionpublic String getFileName(String fileId, String workspace) throws FileNotFoundException, javax.jcr.RepositoryException
fileId - the file idworkspace - the workspaceFileNotFoundException - the file not found exceptionjavax.jcr.RepositoryException - the repository exceptionpublic void delete(EditorConfig config, String lockId) throws javax.jcr.RepositoryException, OfficeOnlineException, LockMismatchException
config - the configlockId - the lock idjavax.jcr.RepositoryException - the repository exceptionOfficeOnlineException - the office online exceptionLockMismatchException - the lock mismatch exceptionprotected void checkNodeLock(javax.jcr.Node node,
String lockId)
throws LockMismatchException,
javax.jcr.RepositoryException
node - the nodelockId - the lock idLockMismatchException - the lock mismatch exceptionjavax.jcr.RepositoryException - the repository exceptionpublic void putUserInfo(String userId, String userInfo)
userId - the user iduserInfo - the user infopublic void addTypePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
public boolean isVersionAccumulationEnabled()
public void setVersionAccumulation(boolean versionAccumulation)
versionAccumulation - the new version accumulationprotected String getUserId(String path)
path - the node pathprotected String increaseName(String origin, int count)
origin - the origincount - the countpublic void addListener(OfficeOnlineListener listener)
listener - the listenerpublic void removeListener(OfficeOnlineListener listener)
listener - the listenerpublic void onSaved(EditorConfig config)
config - the configCopyright © 2003–2020 eXo Platform SAS. All rights reserved.