public abstract class AbstractOfficeOnlineService extends Object implements org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ALGORITHM
The Constant ALGORITHM.
|
protected org.exoplatform.services.security.Authenticator |
authenticator
The authenticator.
|
protected org.exoplatform.services.cms.documents.DocumentService |
documentService
The document service.
|
protected static String |
EXO_DATE_MODIFIED
The Constant EXO_DATE_MODIFIED.
|
protected static String |
EXO_LAST_MODIFIED_DATE
The Constant EXO_LAST_MODIFIED_DATE.
|
protected static String |
EXO_LAST_MODIFIER
The Constant EXO_LAST_MODIFIER.
|
protected static String |
EXO_NAME
The Constant EXO_NAME.
|
protected static String |
EXO_OWNER
The Constant EXO_OWNER.
|
protected static String |
EXO_PRIVILEGEABLE
The Constant EXO_PRIVILEGEABLE.
|
protected static String |
EXO_TITLE
The Constant EXO_TITLE.
|
protected org.exoplatform.services.security.IdentityRegistry |
identityRegistry
The identity registry.
|
protected static String |
JCR_CONTENT
The Constant JCR_CONTENT.
|
protected static String |
JCR_DATA
The Constant JCR_DATA.
|
protected static String |
JCR_LAST_MODIFIED
The Constant JCR_LAST_MODIFIED.
|
protected static String |
JCR_MIME_TYPE
The Constant JCR_MIME_TYPE.
|
protected org.exoplatform.services.jcr.RepositoryService |
jcrService
The jcr service.
|
static String |
KEY_CACHE_NAME
The Constant KEY_CACHE_NAME.
|
protected org.exoplatform.services.cache.ExoCache<String,Key> |
keyCache
Cache of Editing documents.
|
protected static org.exoplatform.services.log.Log |
LOG
The Constant LOG.
|
protected static String |
MIX_VERSIONABLE
The Constant MIX_VERSIONABLE.
|
protected static String |
MSOFFICE_FILE
The Constant MSOFFICE_FILE.
|
protected static String |
MSOFFICE_PREFERENCES
The Constant MSOFFICE_PREFERENCES.
|
protected static String |
MSOFFICE_USER_PREFERENCES
The Constant MSOFFICE_USER_PREFERENCES.
|
protected org.exoplatform.services.cms.link.NodeFinder |
nodeFinder
The node finder.
|
protected org.exoplatform.services.organization.OrganizationService |
organization
The organization.
|
protected static String |
PATH
The Constant PATH.
|
protected static String |
SECRET_KEY
The Constant SECRET_KEY.
|
protected org.exoplatform.services.jcr.ext.app.SessionProviderService |
sessionProviders
The session providers.
|
protected static String |
TOKEN_DELIMITER
The Constant TOKEN_DELIMITER.
|
protected static String |
TOKEN_DELIMITER_PATTERN
The Constant TOKEN_DELIMITER_PATTERN.
|
protected static long |
TOKEN_EXPIRES
The Constant TOKEN_EXPIRES.
|
protected org.exoplatform.portal.config.UserACL |
userACL
The user ACL.
|
protected static String |
UTF_8
The Constant UTF_8.
|
protected static String |
WOPITEST
The Constant WOPITEST.
|
protected static String |
WOPITESTX
The Constant WOPITESTX.
|
| Constructor and Description |
|---|
AbstractOfficeOnlineService(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.security.IdentityRegistry identityRegistry,
org.exoplatform.services.security.Authenticator authenticator,
org.exoplatform.services.cms.link.NodeFinder nodeFinder)
Instantiates a new abstract office online service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFilePreferences(javax.jcr.Node node,
String userId,
String path)
Addds file preferences to the node (path for opening shared doc for particular user).
|
EditorConfig |
buildEditorConfig(String token)
Builds the editor config.
|
EditorConfig |
createEditorConfig(String userId,
String fileId,
String workspace,
RequestInfo requestInfo)
Creates the editor config.
|
protected String |
explorerLink(String jcrPath)
ECMS explorer page relative URL (within the Platform).
|
protected URI |
explorerUri(String baseUrl,
String ecmsLink)
Explorer uri.
|
AccessToken |
generateAccessToken(EditorConfig.Builder configBuilder)
Generate access token.
|
DocumentContent |
getContent(EditorConfig config)
Gets the content.
|
javax.jcr.Node |
getNode(String workspace,
String path)
Gets the node.
|
protected Long |
getSize(javax.jcr.Node node)
Gets the size.
|
protected javax.jcr.Node |
getSymlink(javax.jcr.Node node,
String userId)
Gets parent folder of the file based on file preferences.
|
protected org.exoplatform.services.organization.User |
getUser(String username)
Gets the user.
|
protected javax.jcr.Session |
getUserSession(String workspace)
Gets the user session.
|
javax.jcr.Node |
nodeByUUID(String uuid,
String workspace)
Node by UUID.
|
protected javax.jcr.Node |
nodeContent(javax.jcr.Node node)
Node content.
|
String |
nodeTitle(javax.jcr.Node node)
Node title.
|
protected StringBuilder |
platformRestUrl(CharSequence platformUrl)
Platform REST URL.
|
protected StringBuilder |
platformUrl(String schema,
String host,
int port)
Platform url.
|
protected void |
restoreConvoState(org.exoplatform.services.security.ConversationState contextState,
org.exoplatform.services.jcr.ext.common.SessionProvider contextProvider)
Restores the conversation state.
|
protected boolean |
setUserConvoState(String userId)
Sets ConversationState by userId.
|
protected org.exoplatform.services.security.Identity |
userIdentity(String userId)
Find or create user identity.
|
protected static final org.exoplatform.services.log.Log LOG
protected static final String UTF_8
public static final String KEY_CACHE_NAME
protected static final String SECRET_KEY
protected static final String ALGORITHM
protected static final String TOKEN_DELIMITER
protected static final String TOKEN_DELIMITER_PATTERN
protected static final long TOKEN_EXPIRES
protected static final String JCR_CONTENT
protected static final String WOPITESTX
protected static final String WOPITEST
protected static final String JCR_DATA
protected static final String EXO_LAST_MODIFIER
protected static final String EXO_LAST_MODIFIED_DATE
protected static final String EXO_DATE_MODIFIED
protected static final String JCR_LAST_MODIFIED
protected static final String MIX_VERSIONABLE
protected static final String EXO_OWNER
protected static final String EXO_TITLE
protected static final String EXO_PRIVILEGEABLE
protected static final String JCR_MIME_TYPE
protected static final String EXO_NAME
protected static final String PATH
protected static final String MSOFFICE_USER_PREFERENCES
protected static final String MSOFFICE_FILE
protected static final String MSOFFICE_PREFERENCES
protected final org.exoplatform.services.cache.ExoCache<String,Key> keyCache
protected final org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviders
protected final org.exoplatform.portal.config.UserACL userACL
protected final org.exoplatform.services.jcr.RepositoryService jcrService
protected final org.exoplatform.services.organization.OrganizationService organization
protected final org.exoplatform.services.cms.documents.DocumentService documentService
protected final org.exoplatform.services.security.IdentityRegistry identityRegistry
protected final org.exoplatform.services.security.Authenticator authenticator
protected org.exoplatform.services.cms.link.NodeFinder nodeFinder
public AbstractOfficeOnlineService(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.security.IdentityRegistry identityRegistry,
org.exoplatform.services.security.Authenticator authenticator,
org.exoplatform.services.cms.link.NodeFinder nodeFinder)
sessionProviders - the session providersjcrService - the jcr serviceorganization - the organizationdocumentService - the document servicecacheService - the cache serviceuserACL - the user ACLidentityRegistry - the identity registryauthenticator - the authenticatornodeFinder - the node finderpublic javax.jcr.Node nodeByUUID(String uuid, String workspace) throws FileNotFoundException, javax.jcr.RepositoryException
uuid - the uuidworkspace - the workspaceFileNotFoundException - the file not found exceptionjavax.jcr.RepositoryException - the repository exceptionprotected javax.jcr.Session getUserSession(String workspace) throws javax.jcr.RepositoryException
workspace - the workspacejavax.jcr.RepositoryException - the repository exceptionprotected javax.jcr.Node nodeContent(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - the nodejavax.jcr.RepositoryException - the repository exceptionpublic DocumentContent getContent(EditorConfig config) throws OfficeOnlineException
config - the configOfficeOnlineException - the office online exceptionprotected StringBuilder platformUrl(String schema, String host, int port)
schema - the schemahost - the hostport - the portprotected StringBuilder platformRestUrl(CharSequence platformUrl)
platformUrl - the platform URLprotected org.exoplatform.services.organization.User getUser(String username)
username - the usernameprotected URI explorerUri(String baseUrl, String ecmsLink)
baseUrl - the base urlecmsLink - the ecms linkprotected String explorerLink(String jcrPath)
jcrPath - the jcr pathprotected Long getSize(javax.jcr.Node node)
node - the nodepublic EditorConfig createEditorConfig(String userId, String fileId, String workspace, RequestInfo requestInfo) throws OfficeOnlineException, javax.jcr.RepositoryException
userId - the userIdfileId - the file idworkspace - the workspacerequestInfo - the request infoOfficeOnlineException - the office online exceptionjavax.jcr.RepositoryException - the repository exceptionpublic AccessToken generateAccessToken(EditorConfig.Builder configBuilder) throws OfficeOnlineException
configBuilder - the config builderOfficeOnlineException - the office online exceptionpublic javax.jcr.Node getNode(String workspace, String path) throws javax.jcr.RepositoryException
workspace - the workspacepath - the pathjavax.jcr.RepositoryException - the repository exceptionpublic EditorConfig buildEditorConfig(String token) throws OfficeOnlineException
token - the access tokenOfficeOnlineException - the office online exceptionprotected boolean setUserConvoState(String userId)
userId - the userIdprotected void restoreConvoState(org.exoplatform.services.security.ConversationState contextState,
org.exoplatform.services.jcr.ext.common.SessionProvider contextProvider)
contextState - the contextStatecontextProvider - the contextProviderprotected org.exoplatform.services.security.Identity userIdentity(String userId)
userId - the user idpublic void addFilePreferences(javax.jcr.Node node,
String userId,
String path)
throws javax.jcr.RepositoryException
node - the nodeuserId - the userIdpath - the pathjavax.jcr.RepositoryException - the repositoryExceptionpublic String nodeTitle(javax.jcr.Node node) throws javax.jcr.RepositoryException
node - the nodejavax.jcr.RepositoryException - the repository exceptionprotected javax.jcr.Node getSymlink(javax.jcr.Node node,
String userId)
throws javax.jcr.RepositoryException
node - the nodeuserId - the userIdjavax.jcr.RepositoryException - the repository exceptionCopyright © 2003–2020 eXo Platform SAS. All rights reserved.