public class MockSimpleResource
extends javax.faces.application.Resource
Mock simple implementation of Resource.
It is used by MockSimpleResourceHandler to wrap resource instances.
| Constructor and Description |
|---|
MockSimpleResource(String prefix,
String libraryName,
String libraryVersion,
String resourceName,
String resourceVersion,
File documentRoot)
Creates new resource object
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream() |
String |
getLibraryName() |
String |
getRequestPath() |
String |
getResourceName() |
Map<String,String> |
getResponseHeaders() |
URL |
getURL() |
void |
setLibraryName(String libraryName) |
void |
setResourceName(String resourceName) |
boolean |
userAgentNeedsUpdate(javax.faces.context.FacesContext context) |
public MockSimpleResource(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion, File documentRoot)
prefix - locale prefix if anylibraryName - resource library namelibraryVersion - resource library version if anyresourceName - resource file nameresourceVersion - resource version if anydocumentRoot - parent folder of resource directories. Must not be nullpublic String getResourceName()
getResourceName in class javax.faces.application.Resourcepublic void setResourceName(String resourceName)
setResourceName in class javax.faces.application.Resourcepublic String getLibraryName()
getLibraryName in class javax.faces.application.Resourcepublic void setLibraryName(String libraryName)
setLibraryName in class javax.faces.application.Resourcepublic InputStream getInputStream() throws IOException
getInputStream in class javax.faces.application.ResourceIOExceptionpublic String getRequestPath()
getRequestPath in class javax.faces.application.Resourcepublic Map<String,String> getResponseHeaders()
getResponseHeaders in class javax.faces.application.Resourcepublic URL getURL()
getURL in class javax.faces.application.Resourcepublic boolean userAgentNeedsUpdate(javax.faces.context.FacesContext context)
userAgentNeedsUpdate in class javax.faces.application.ResourceCopyright © 2017 The Apache Software Foundation. All rights reserved.