|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.odlabs.wiquery.core.WiQuerySettings
public class WiQuerySettings
$Id: WiQuerySettings.java 1050 2011-06-22 11:18:55Z hielke.hoeve@gmail.com $
Bean to get the wiQuery settings
Constructor Summary | |
---|---|
WiQuerySettings()
|
Method Summary | |
---|---|
boolean |
addInitializer(IWiQueryInitializer initializer)
|
boolean |
addListener(WiQueryPluginRenderingListener listener)
|
String |
findResourceGroupingKey(String packageName)
Looks for the package name in the list of preferred packages. |
static WiQuerySettings |
get()
Get WiQuerySettings for current thread. |
List<IWiQueryInitializer> |
getInitializers()
|
List<WiQueryPluginRenderingListener> |
getListeners()
|
List<String> |
getResourceGroupingKeys()
|
boolean |
isAutoImportJQueryResource()
|
boolean |
isAutoImportJQueryUIJavaScriptResource()
|
boolean |
isAutoImportJQueryUIStyleSheetResource()
|
boolean |
isEnableWiqueryResourceManagement()
|
boolean |
isMinifiedJavaScriptResources()
When true wiquery delivers minimized versions js files, when false wiquery delivers normal (non-minimized) versions. |
boolean |
isMinifiedStyleSheetResources()
When true wiquery delivers minimized versions css files, when false wiquery delivers normal (non-minimized) versions. |
void |
setAutoImportJQueryResource(boolean autoImportJQueryResource)
|
void |
setAutoImportJQueryUIJavaScriptResource(boolean autoImportJQueryUIJavaScriptResource)
If set to false , no jQueryUI JavaScript resources are contributed by
the framework, which means the user is responsible to add required resources
(javascript files) for jQueryUI to work. |
void |
setAutoImportJQueryUIStyleSheetResource(boolean autoImportJQueryUIStyleSheetResource)
|
void |
setEnableWiqueryResourceManagement(boolean enableWiqueryResourceManagement)
If set to false , all resource contributions by Wiquery are
disabled. |
void |
setMinifiedJavaScriptResources(boolean minifiedJavaScriptResources)
Sets the minifiedJavaScriptResources option |
void |
setMinifiedStyleSheetResources(boolean minifiedStyleSheetResources)
Sets the minifiedStyleSheetResources option |
void |
setResourceGroupingKeys(List<String> resourceGroupingKeys)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WiQuerySettings()
Method Detail |
---|
public static WiQuerySettings get()
WiQuerySettings
for current thread.
public boolean addInitializer(IWiQueryInitializer initializer)
initializer
-
public boolean addListener(WiQueryPluginRenderingListener listener)
listener
-
public List<IWiQueryInitializer> getInitializers()
public List<WiQueryPluginRenderingListener> getListeners()
public boolean isAutoImportJQueryResource()
public boolean isAutoImportJQueryUIJavaScriptResource()
public boolean isAutoImportJQueryUIStyleSheetResource()
public boolean isEnableWiqueryResourceManagement()
public boolean isMinifiedJavaScriptResources()
When true wiquery delivers minimized versions js files, when false wiquery delivers
normal (non-minimized) versions. The default value depends on whether an
IJavaScriptCompressor
is used or not.
This setting WILL NOT enable the YUICompressor, you can set this yourself using
Application.getResourceSettings().setJavaScriptCompressor(new
YUIJavaScriptCompressor()); in a IWiQueryInitializer
..
Always provide the normal (non-minimized) version, wiquery will reference to the
minimized version when isMinifiedJavaScriptResources()
is
true.
The filename format for the 2 versions is:
public boolean isMinifiedStyleSheetResources()
When true wiquery delivers minimized versions css files, when false wiquery
delivers normal (non-minimized) versions. The default value depends on whether an
ICssCompressor
is used or not.
This setting WILL NOT enable the YUICompressor, you can set this yourself using
Application.getResourceSettings().setCssCompressor(new YUIStyleSheetCompressor());
in a IWiQueryInitializer
.
Always provide the normal (non-minimized) version, wiquery will reference to the
minimized version when isMinifiedStyleSheetResources()
is
true.
The filename format for the 2 versions is:
public void setAutoImportJQueryResource(boolean autoImportJQueryResource)
public void setAutoImportJQueryUIJavaScriptResource(boolean autoImportJQueryUIJavaScriptResource)
false
, no jQueryUI JavaScript resources are contributed by
the framework, which means the user is responsible to add required resources
(javascript files) for jQueryUI to work. Useful if one wants to
manage resources globally or use a CDN network to load resources.
Warning: If version does not match to the version contributed by the
framework, functionality may be harmed!
autoImportJQueryUIJavaScriptResource
- true
to let the framework import required resources.
false
to disable automatic resources contribution by the
framework.setEnableWiqueryResourceManagement(boolean)
public void setAutoImportJQueryUIStyleSheetResource(boolean autoImportJQueryUIStyleSheetResource)
public void setEnableWiqueryResourceManagement(boolean enableWiqueryResourceManagement)
false
, all resource contributions by Wiquery are
disabled. No jQuery or jQueryUI resource are contributed by the framework, nor any
resources from plugins. Useful if one wants to manage resources globally or use a
CDN network to load resources.
Warning: By setting this to false
the frameworks functionality
(or parts of it) is not guaranteed anymore! Activate only if you know what you do
and import required resources manually.
public void setMinifiedJavaScriptResources(boolean minifiedJavaScriptResources)
minifiedJavaScriptResources
- isMinifiedJavaScriptResources()
public void setMinifiedStyleSheetResources(boolean minifiedStyleSheetResources)
minifiedStyleSheetResources
- isMinifiedStyleSheetResources()
public List<String> getResourceGroupingKeys()
public void setResourceGroupingKeys(List<String> resourceGroupingKeys)
public String findResourceGroupingKey(String packageName)
Looks for the package name in the list of preferred packages.
When the full package name is not found we keep trying by removing a subpackage at a time and check if this is found.
For example: org.apache.wicket
is listed and we have a package called
org.apache.wicket.ajax
.
org.apache.wicket.ajax
is listed, if so return
org.apache.wicket.ajax
else continueorg.apache.wicket
is listed, if so return
org.apache.wicket
else continueorg.apache
is listed, if so return
org.apache
else continueorg
is listed, if so return org
else
continueIf no match is found null is returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |