public abstract class DefaultResource extends ResourceWrapper implements Externalizable
Resource
implementation, fixing broken ResourceWrapper
and implementing
Externalizable
to avoid JSF state saving trouble.Modifier and Type | Field and Description |
---|---|
static String |
RES_NOT_FOUND |
COMPONENT_RESOURCE_KEY
Constructor and Description |
---|
DefaultResource(Resource wrapped)
Constructs a new resource wrapping the given resource.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType() |
String |
getLibraryName() |
String |
getResourceName() |
Resource |
getWrapped() |
void |
readExternal(ObjectInput input) |
void |
writeExternal(ObjectOutput output) |
getInputStream, getRequestPath, getResponseHeaders, getURL, setContentType, setLibraryName, setResourceName, userAgentNeedsUpdate
public static final String RES_NOT_FOUND
public DefaultResource(Resource wrapped)
wrapped
- The resource to be wrapped.public String getResourceName()
getResourceName
in class ResourceWrapper
public String getLibraryName()
getLibraryName
in class ResourceWrapper
public String getContentType()
getContentType
in class ResourceWrapper
public Resource getWrapped()
getWrapped
in interface FacesWrapper<Resource>
getWrapped
in class ResourceWrapper
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
IOException
Copyright © 2012–2014 OmniFaces. All rights reserved.