public class ScriptServiceImpl extends BaseResourceLoaderService implements ScriptService, javax.jcr.observation.EventListener
cservice_, nodeHierarchyCreator_, repositoryService_, resourceCache_| Constructor and Description |
|---|
ScriptServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
org.exoplatform.container.configuration.ConfigurationManager cservice,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.services.cache.CacheService cacheService,
DMSConfiguration dmsConfiguration)
Constructor method
Init repositoryService, configurationManager, nodeHierarchyCreator, caService, dmsConfiguration
|
| Modifier and Type | Method and Description |
|---|---|
void |
addScript(String name,
String text,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
This method will add script by giving the following params: name, text, provider
|
void |
addScript(String name,
String description,
String text,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
This method will add script by giving the following params: name, text, description, provider
|
void |
addScriptPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
add ScriptPlugin
|
Set<String> |
getAllConfiguredScripts()
gets all configured scripts
|
protected String |
getBasePath()
get Base Script Path
|
String |
getBaseScriptPath()
This method will get base path of script
|
List<javax.jcr.Node> |
getECMActionScripts(org.exoplatform.services.jcr.ext.common.SessionProvider provider)
This method will get all node for ECM Action Scripts by giving the following params: provider
|
List<javax.jcr.Node> |
getECMInterceptorScripts(org.exoplatform.services.jcr.ext.common.SessionProvider provider)
This method will get all node for ECM Interceptor Scripts by giving the following params: provider
|
javax.jcr.Node |
getECMScriptHome(org.exoplatform.services.jcr.ext.common.SessionProvider provider)
This method will get node for ECM Explorer Scripts by giving the following params: provider
|
List<javax.jcr.Node> |
getECMWidgetScripts(org.exoplatform.services.jcr.ext.common.SessionProvider provider)
This method will get all node for ECM Widget Scripts by giving the following params: provider
|
CmsScript |
getScript(String scriptName)
This method will get script by giving the following params: scriptPath
|
String |
getScriptAsText(javax.jcr.Node script)
This method will return the script as Text based on the script node.
|
javax.jcr.Node |
getScriptNode(String scriptName,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
This method will get script node by giving the following params: scriptName, provider
|
void |
initRepo()
This method will init the current repository
|
void |
onEvent(javax.jcr.observation.EventIterator events)
onEvent
|
protected void |
removeFromCache(String scriptName)
remove From Cache
|
void |
removeScript(String scriptName,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
This method will remove script by giving the following params: name, text, provider
|
void |
start() |
addResource, addResource, addResource, addScripts, getNodeTypeByResourceName, getResourceAsStream, getResourceAsText, getResourceByName, getResourceDescription, getResourceNameByNodeType, getResources, getResourcesHome, hasResources, init, removeResource, stoppublic ScriptServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
org.exoplatform.container.configuration.ConfigurationManager cservice,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.services.cache.CacheService cacheService,
DMSConfiguration dmsConfiguration)
throws Exception
repositoryService - RepositoryServicecservice - ConfigurationManagernodeHierarchyCreator - NodeHierarchyCreatorcacheService - CacheServicedmsConfiguration - DMSConfigurationExceptionpublic void start()
start in interface org.picocontainer.Startablestart in class BaseResourceLoaderServicepublic void addScriptPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - ComponentPluginScriptPlugin,
ComponentPluginprotected String getBasePath()
getBasePath in class BaseResourceLoaderServiceNodeHierarchyCreatorpublic void initRepo()
throws Exception
initRepo in interface ScriptServiceExceptionManageableRepository,
ObservationManager,
Sessionpublic javax.jcr.Node getECMScriptHome(org.exoplatform.services.jcr.ext.common.SessionProvider provider)
throws Exception
getECMScriptHome in interface ScriptServiceprovider - SessionProviderExceptionNode,
NodeHierarchyCreator,
SessionProviderpublic List<javax.jcr.Node> getECMActionScripts(org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getECMActionScripts in interface ScriptServiceExceptionNode,
NodeHierarchyCreator,
SessionProviderpublic List<javax.jcr.Node> getECMInterceptorScripts(org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getECMInterceptorScripts in interface ScriptServiceExceptionNode,
NodeHierarchyCreator,
SessionProviderpublic List<javax.jcr.Node> getECMWidgetScripts(org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getECMWidgetScripts in interface ScriptServiceExceptionNode,
NodeHierarchyCreator,
SessionProviderpublic String getBaseScriptPath() throws Exception
getBaseScriptPath in interface ScriptServiceExceptionNodeHierarchyCreatorpublic String getScriptAsText(javax.jcr.Node script) throws Exception
getScriptAsText in interface ScriptServicescript - Node
The script nodeExceptionNodepublic CmsScript getScript(String scriptName) throws Exception
getScript in interface ScriptServicescriptName - String
The path of scriptExceptionCmsScriptpublic void addScript(String name, String text, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
addScript in interface ScriptServicename - String
The name of scripttext - Stringprovider - SessionProviderExceptionSessionProviderpublic void addScript(String name, String description, String text, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
addScript in interface ScriptServicename - String
The name of scriptdescription - Stringtext - Stringprovider - SessionProviderExceptionSessionProviderpublic void removeScript(String scriptName, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
removeScript in interface ScriptServicescriptName - String
The path of scriptprovider - SessionProviderExceptionNode,
SessionProviderprotected void removeFromCache(String scriptName)
removeFromCache in class BaseResourceLoaderServicescriptName - String
The name of scriptExoContainer,
ExoContainerContextpublic void onEvent(javax.jcr.observation.EventIterator events)
onEvent in interface javax.jcr.observation.EventListenerevents - EventIteratorSession,
DMSRepositoryConfiguration,
ManageableRepositorypublic javax.jcr.Node getScriptNode(String scriptName, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getScriptNode in interface ScriptServicescriptName - String
The name of scriptprovider - SessionProviderExceptionNode,
SessionProviderpublic Set<String> getAllConfiguredScripts()
getAllConfiguredScripts in interface ScriptServiceCopyright © 2003–2019 eXo Platform SAS. All rights reserved.