org.apache.wicket.request.resource
Class ContextRelativeResource
java.lang.Object
org.apache.wicket.request.resource.AbstractResource
org.apache.wicket.request.resource.ContextRelativeResource
- All Implemented Interfaces:
- Serializable, IClusterable, IStaticCacheableResource, IResource
public class ContextRelativeResource
- extends AbstractResource
- implements IStaticCacheableResource
Resource served from a file relative to the context root.
- Author:
- almaw
- See Also:
- Serialized Form
Methods inherited from interface org.apache.wicket.request.resource.IResource |
respond |
ContextRelativeResource
public ContextRelativeResource(String pathRelativeToContextRoot)
- Construct.
- Parameters:
pathRelativeToContextRoot
-
getCacheKey
public Serializable getCacheKey()
- Description copied from interface:
IStaticCacheableResource
- get unique caching key for the resource stream produced by
IStaticCacheableResource.getCacheableResourceStream()
- Specified by:
getCacheKey
in interface IStaticCacheableResource
- Returns:
- serializable key with properly supports
#equals(Object)
and
#hashCode()
getCacheableResourceStream
public IResourceStream getCacheableResourceStream()
- Description copied from interface:
IStaticCacheableResource
- get static resource stream which will be unique to the related caching key
IStaticCacheableResource.getCacheKey()
- Specified by:
getCacheableResourceStream
in interface IStaticCacheableResource
- Returns:
- stream or
null
if no stream could be found
newResourceResponse
protected AbstractResource.ResourceResponse newResourceResponse(IResource.Attributes attributes)
- Description copied from class:
AbstractResource
- Override this method to return a
AbstractResource.ResourceResponse
for the request.
- Specified by:
newResourceResponse
in class AbstractResource
- Parameters:
attributes
- request attributes
- Returns:
- resource data instance
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2006–2016 Apache Software Foundation. All rights reserved.