public abstract class ResourceResolver extends Object
PortletResourceResolver ResourceKey | Constructor and Description |
|---|
ResourceResolver() |
| Modifier and Type | Method and Description |
|---|---|
String |
createResourceId(String url)
Return resource id
|
ResourceKey |
createResourceKey(String url)
Return
ResourceKey objectDefault implementation will return difference ResourceKey instance if we call that method on difference ResourceResolver instances (even with the same resource url) If you create new ResourceResolver each time you need access to a resource, please overidde this method and return the same ResourceKey for the same url |
abstract InputStream |
getInputStream(String url)
Return InputStream object to resource
|
abstract List<InputStream> |
getInputStreams(String url)
Return List of InputStream object to resource
|
String |
getRealPath(String url) |
abstract URL |
getResource(String url)
Return URL object to resource
|
byte[] |
getResourceContentAsBytes(String url)
Return resource as array of bytes
|
abstract List<URL> |
getResources(String url)
Return List of URL object to resource
|
abstract String |
getResourceScheme() |
String |
getWebAccessPath(String url) |
abstract boolean |
isModified(String url,
long lastAccess)
Return if resource has been modified since specific time
|
boolean |
isResolvable(String url)
Return if this can resolve resource with specific url
|
protected String |
removeScheme(String url) |
public abstract URL getResource(String url) throws Exception
url - - String path (specific to certain context) to resourceExceptionpublic abstract InputStream getInputStream(String url) throws Exception
url - - String path (specific to certain context) to resourceExceptionpublic abstract List<URL> getResources(String url) throws Exception
url - - String path (specific to certain context) to resourceExceptionpublic abstract List<InputStream> getInputStreams(String url) throws Exception
url - - String path (specific to certain context) to resourceExceptionpublic abstract String getResourceScheme()
public ResourceKey createResourceKey(String url)
ResourceKey objecturl - - String path (specific to certain context) to resourcepublic String createResourceId(String url)
url - - String path (specific to certain context) to resourcepublic boolean isResolvable(String url)
url - String path to resourcepublic byte[] getResourceContentAsBytes(String url) throws Exception
url - - String path (specific to certain context) to resourceExceptionpublic abstract boolean isModified(String url, long lastAccess)
url- - String path (specific to certain context) to resourcelastAccess - Copyright © 2017 JBoss by Red Hat. All Rights Reserved.