|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.request.resource.ResourceReference
public abstract class ResourceReference
Reference to a resource. Can be used to reference global resources.
Even though resource reference is just a factory for resources, it still needs to be identified
by a globally unique identifier, combination of scope
and name
. Those
are used to generate URLs for resource references. locale
, style
and
variation
are optional fields to allow having specific references for individual
locales, styles and variations.
Nested Class Summary | |
---|---|
static class |
ResourceReference.UrlAttributes
|
Constructor Summary | |
---|---|
ResourceReference(java.lang.Class<?> scope,
java.lang.String name)
Creates new ResourceReference instance. |
|
ResourceReference(java.lang.Class<?> scope,
java.lang.String name,
java.util.Locale locale,
java.lang.String style,
java.lang.String variation)
Creates new ResourceReference instance. |
|
ResourceReference(java.lang.String name)
Construct. |
Method Summary | |
---|---|
boolean |
canBeRegistered()
Can be used to disable registering certain resource references in ResourceReferenceRegistry . |
boolean |
equals(java.lang.Object obj)
|
java.util.Locale |
getLocale()
|
java.lang.String |
getName()
|
abstract IResource |
getResource()
Returns the resource. |
java.lang.Class<?> |
getScope()
|
java.lang.String |
getStyle()
|
ResourceReference.UrlAttributes |
getUrlAttributes()
Allows to specify which locale, style and variation values will the generated URL for this resource reference have. |
java.lang.String |
getVariation()
|
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceReference(java.lang.Class<?> scope, java.lang.String name, java.util.Locale locale, java.lang.String style, java.lang.String variation)
ResourceReference
instance.
scope
- mandatory parametername
- mandatory parameterlocale
- style
- variation
- public ResourceReference(java.lang.Class<?> scope, java.lang.String name)
ResourceReference
instance.
scope
- mandatory parametername
- mandatory parameterlocale
- style
- variation
- public ResourceReference(java.lang.String name)
name
- Method Detail |
---|
public java.lang.String getName()
public java.lang.Class<?> getScope()
public java.util.Locale getLocale()
public java.lang.String getStyle()
public java.lang.String getVariation()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public abstract IResource getResource()
public ResourceReference.UrlAttributes getUrlAttributes()
public boolean canBeRegistered()
ResourceReferenceRegistry
.
true
if this reference can be registered, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |