|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.SharedResources
public class SharedResources
Class which holds shared resources. Resources can be shared by name. An optional scope can be given to prevent naming conflicts and a locale and/or style can be given as well.
Method Summary | |
---|---|
void |
add(java.lang.Class scope,
java.lang.String name,
java.util.Locale locale,
java.lang.String style,
Resource resource)
Adds a resource. |
void |
add(java.lang.String name,
java.util.Locale locale,
Resource resource)
Adds a resource. |
void |
add(java.lang.String name,
Resource resource)
Adds a resource. |
Resource |
get(java.lang.Class scope,
java.lang.String name,
java.util.Locale locale,
java.lang.String style,
boolean exact)
|
Resource |
get(java.lang.String key)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
java.lang.Class |
getAliasClass(java.lang.String alias)
Gets the class for a given resource alias. |
void |
putClassAlias(java.lang.Class clz,
java.lang.String alias)
Sets an alias for a class so that a resource url can look like: resources/images/Image.jpg instead of resources/org.apache.wicket.resources.ResourceClass/Image.jpg |
void |
remove(java.lang.String key)
Removes a shared resource. |
java.lang.String |
resourceKey(java.lang.Class scope,
java.lang.String path,
java.util.Locale locale,
java.lang.String style)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
static java.lang.String |
resourceKey(java.lang.String path,
java.util.Locale locale,
java.lang.String style)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String resourceKey(java.lang.String path, java.util.Locale locale, java.lang.String style)
path
- The resource pathlocale
- The localestyle
- The style (see Session
)
public final void add(java.lang.Class scope, java.lang.String name, java.util.Locale locale, java.lang.String style, Resource resource)
scope
- Scope of resourcename
- Logical name of resourcelocale
- The locale of the resourcestyle
- The resource style (see Session
)resource
- Resource to storepublic final void add(java.lang.String name, java.util.Locale locale, Resource resource)
name
- Logical name of resourcelocale
- The locale of the resourceresource
- Resource to storepublic final void add(java.lang.String name, Resource resource)
name
- Logical name of resourceresource
- Resource to storepublic final Resource get(java.lang.Class scope, java.lang.String name, java.util.Locale locale, java.lang.String style, boolean exact)
scope
- The resource's scopename
- Name of resource to getlocale
- The locale of the resourcestyle
- The resource style (see Session
)exact
- If true then only return the resource that is registered for the given locale and
style.
public final Resource get(java.lang.String key)
key
- Shared resource key
public final void putClassAlias(java.lang.Class clz, java.lang.String alias)
clz
- The class that has to be aliased.alias
- The alias string.public final java.lang.Class getAliasClass(java.lang.String alias)
alias
-
putClassAlias(Class, String)
public final void remove(java.lang.String key)
key
- Shared resource keypublic java.lang.String resourceKey(java.lang.Class scope, java.lang.String path, java.util.Locale locale, java.lang.String style)
scope
- The scope of the resourcepath
- The resource pathlocale
- The localestyle
- The style (see Session
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |