|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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.Key
A (re-usable) data store for all relevant ResourceReference data |
static class |
ResourceReference.UrlAttributes
|
Constructor Summary | |
---|---|
ResourceReference(Class<?> scope,
String name)
Creates new ResourceReference instance. |
|
ResourceReference(Class<?> scope,
String name,
Locale locale,
String style,
String variation)
Creates new ResourceReference instance. |
|
ResourceReference(ResourceReference.Key key)
Creates new ResourceReference instance. |
|
ResourceReference(String name)
Construct. |
Method Summary | |
---|---|
boolean |
canBeRegistered()
Can be used to disable registering certain resource references in ResourceReferenceRegistry . |
boolean |
equals(Object obj)
|
Time |
getLastModified()
return the last modification date of the referred resource |
Locale |
getLocale()
|
String |
getName()
|
abstract IResource |
getResource()
Returns the resource. |
Class<?> |
getScope()
|
String |
getStyle()
|
ResourceReference.UrlAttributes |
getUrlAttributes()
Allows to specify which locale, style and variation values will the generated URL for this resource reference have. |
String |
getVariation()
|
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResourceReference(ResourceReference.Key key)
ResourceReference
instance.
key
- The data makeing up the resource referencepublic ResourceReference(Class<?> scope, String name, Locale locale, String style, String variation)
ResourceReference
instance.
scope
- mandatory parametername
- mandatory parameterlocale
- resource localestyle
- resource stylevariation
- resource variationpublic ResourceReference(Class<?> scope, String name)
ResourceReference
instance.
scope
- mandatory parametername
- mandatory parameterpublic ResourceReference(String name)
name
- resource nameMethod Detail |
---|
public String getName()
public Class<?> getScope()
public Locale getLocale()
public String getStyle()
public String getVariation()
public boolean canBeRegistered()
ResourceReferenceRegistry
.
true
if this reference can be registered, false
otherwise.public Time getLastModified()
null
if not supportedpublic boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public abstract IResource getResource()
public ResourceReference.UrlAttributes getUrlAttributes()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |