play.modules.greenscript
Class GreenScriptPlugin

java.lang.Object
  extended by play.PlayPlugin
      extended by play.modules.greenscript.GreenScriptPlugin
All Implemented Interfaces:
Comparable<PlayPlugin>

public class GreenScriptPlugin
extends PlayPlugin

Define a Playframework plugin

Version:
1.2.8 2012-02-16 fix bug: https://github.com/greenlaw110/greenscript/issues/36 support coffeescript use google closure to compress javascript resource, 1.2.7 2012-01-31 fix bug: https://github.com/greenlaw110/greenscript/issues/30 Add tags for rythm engine, 1.2.6, 2011-09-04 support LESS, fix bug: https://github.com/greenlaw110/greenscript/issues/18 fix bug: https://github.com/greenlaw110/greenscript/issues/19 fix bug: https://github.com/greenlaw110/greenscript/issues/21 fix bug: https://github.com/greenlaw110/greenscript/issues/22 fix bug: https://github.com/greenlaw110/greenscript/issues/23 fix bug: https://github.com/greenlaw110/greenscript/issues/24 fix bug: https://github.com/greenlaw110/greenscript/issues/27, 1.2.5, 2011-08-07 support in-memory cache, 1.2.1, 2011-01-20 1. support reverse dependency declaration, e.g: * js.jquery-1.4.4-=jquery-ui.1.8.7,jquery.tmpl, 1.2, 2010-10-16
Author:
greenlaw110@gmail.com

Field Summary
static String CACHE_KEY_BUFFER
           
protected  boolean inMemoryCache
           
static String RESOURCES_PARAM
           
static String VERSION
           
 
Fields inherited from class play.PlayPlugin
index
 
Constructor Summary
GreenScriptPlugin()
           
 
Method Summary
 void afterApplicationStart()
           
 void beforeActionInvocation(Method actionMethod)
           
 String cssDebugString()
           
static com.greenscriptool.IRenderSession cssSession()
           
 void detectChange()
           
static void enableDisableCache(boolean cache)
           
static void enableDisableCompress(boolean compress)
           
static void enableDisableMinimize(boolean minimize)
           
 Properties getDependencyConfig()
           
 String getInMemoryFileContent(String key, String resourceNames)
           
static GreenScriptPlugin getInstance()
           
 Properties getMinimizerConfig()
           
 void InitializeMinimizers()
           
 String jsDebugString()
           
static com.greenscriptool.IRenderSession jsSession()
           
static String lessImport(String fns)
           
 void loadDependencies()
           
 Template loadTemplate(VirtualFile file)
           
 void onApplicationStop()
           
 void onConfigurationRead()
           
 void onLoad()
           
 void onRoutesLoaded()
          Moved initialize from onApplicationStart to onRoutersLoaded because Servlet 2.4 does not allow you to get the context path from the servletcontext...
static void reloadDependencies()
           
 boolean serveStatic(VirtualFile file, Http.Request request, Http.Response response)
           
static com.greenscriptool.IRenderSession session(String type)
           
static void updateMinimizer(boolean minimize, boolean compress, boolean cache, boolean inMemoryCache)
           
 
Methods inherited from class play.PlayPlugin
addTemplateExtensions, afterActionInvocation, afterFixtureLoad, afterInvocation, beforeDetectingChanges, beforeInvocation, bind, bind, compareTo, compileAll, enhance, getJsonStatus, getMessage, getStatus, invocationFinally, modelFactory, onActionInvocationResult, onApplicationReady, onApplicationStart, onClassesChange, onEvent, onInvocationException, onInvocationSuccess, onRequestRouting, onTemplateCompilation, overrideTemplateSource, postEvent, rawInvocation, routeRequest, runTest, unBind, willBeValidated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
See Also:
Constant Field Values

RESOURCES_PARAM

public static final String RESOURCES_PARAM
See Also:
Constant Field Values

CACHE_KEY_BUFFER

public static final String CACHE_KEY_BUFFER
See Also:
Constant Field Values

inMemoryCache

protected boolean inMemoryCache
Constructor Detail

GreenScriptPlugin

public GreenScriptPlugin()
Method Detail

onLoad

public void onLoad()
Overrides:
onLoad in class PlayPlugin

onConfigurationRead

public void onConfigurationRead()
Overrides:
onConfigurationRead in class PlayPlugin

onRoutesLoaded

public void onRoutesLoaded()
Moved initialize from onApplicationStart to onRoutersLoaded because Servlet 2.4 does not allow you to get the context path from the servletcontext...

Overrides:
onRoutesLoaded in class PlayPlugin

afterApplicationStart

public void afterApplicationStart()
Overrides:
afterApplicationStart in class PlayPlugin

loadTemplate

public Template loadTemplate(VirtualFile file)
Overrides:
loadTemplate in class PlayPlugin

onApplicationStop

public void onApplicationStop()
Overrides:
onApplicationStop in class PlayPlugin

jsDebugString

public String jsDebugString()

cssDebugString

public String cssDebugString()

session

public static com.greenscriptool.IRenderSession session(String type)

jsSession

public static com.greenscriptool.IRenderSession jsSession()

cssSession

public static com.greenscriptool.IRenderSession cssSession()

beforeActionInvocation

public void beforeActionInvocation(Method actionMethod)
Overrides:
beforeActionInvocation in class PlayPlugin

serveStatic

public boolean serveStatic(VirtualFile file,
                           Http.Request request,
                           Http.Response response)
Overrides:
serveStatic in class PlayPlugin

detectChange

public void detectChange()
Overrides:
detectChange in class PlayPlugin

loadDependencies

public void loadDependencies()

InitializeMinimizers

public void InitializeMinimizers()

getDependencyConfig

public Properties getDependencyConfig()

getMinimizerConfig

public Properties getMinimizerConfig()

getInMemoryFileContent

public String getInMemoryFileContent(String key,
                                     String resourceNames)

getInstance

public static GreenScriptPlugin getInstance()

updateMinimizer

public static void updateMinimizer(boolean minimize,
                                   boolean compress,
                                   boolean cache,
                                   boolean inMemoryCache)

enableDisableMinimize

public static void enableDisableMinimize(boolean minimize)

enableDisableCompress

public static void enableDisableCompress(boolean compress)

enableDisableCache

public static void enableDisableCache(boolean cache)

reloadDependencies

public static void reloadDependencies()

lessImport

public static String lessImport(String fns)


Copyright © 2012. All Rights Reserved.