org.exoplatform.services.wcm.javascript
Class XJavascriptService

java.lang.Object
  extended by org.exoplatform.services.wcm.javascript.XJavascriptService
All Implemented Interfaces:
org.picocontainer.Startable

public class XJavascriptService
extends java.lang.Object
implements org.picocontainer.Startable

Created by The eXo Platform SAS Author : Hoa.Pham hoa.pham@exoplatform.com Apr 9, 2008


Constructor Summary
XJavascriptService()
          Instantiates a new x javascript service.
 
Method Summary
 java.lang.String getActiveJavaScript(javax.jcr.Node webcontent)
          Get active java script.
 void start()
           
 void stop()
           
 void updatePortalJSOnModify(javax.jcr.Node portalNode, javax.jcr.Node jsFile)
          Update and merged all Java Script in all portal when content of js file is modified.
 void updatePortalJSOnRemove(javax.jcr.Node portalNode, javax.jcr.Node jsFile)
          Update and merged all Java Script in all portal when content of js file is modified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XJavascriptService

public XJavascriptService()
                   throws java.lang.Exception
Instantiates a new x javascript service.

Parameters:
repositoryService - the repository service
jsConfigService - the js config service
servletContext - the servlet context
configurationService - the configuration service
contentInitializerService - the content initializer service
Throws:
java.lang.Exception - the exception
Method Detail

getActiveJavaScript

public java.lang.String getActiveJavaScript(javax.jcr.Node webcontent)
                                     throws java.lang.Exception
Get active java script.

Parameters:
home - the home
Returns:
Code of all js file in home node.
Throws:
java.lang.Exception - the exception

updatePortalJSOnModify

public void updatePortalJSOnModify(javax.jcr.Node portalNode,
                                   javax.jcr.Node jsFile)
                            throws java.lang.Exception
Update and merged all Java Script in all portal when content of js file is modified.

Parameters:
jsFile - the js file
sessionProvider - the session provider
Throws:
java.lang.Exception - the exception

updatePortalJSOnRemove

public void updatePortalJSOnRemove(javax.jcr.Node portalNode,
                                   javax.jcr.Node jsFile)
                            throws java.lang.Exception
Update and merged all Java Script in all portal when content of js file is modified.

Parameters:
jsFile - the js file
sessionProvider - the session provider
Throws:
java.lang.Exception - the exception

start

public void start()
Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()
Specified by:
stop in interface org.picocontainer.Startable


Copyright © 2011 eXo Platform SAS. All Rights Reserved.