org.broadleafcommerce.common.resource
Class GeneratedResource
java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.security.util.InMemoryResource
org.broadleafcommerce.common.resource.GeneratedResource
- All Implemented Interfaces:
- org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource
public class GeneratedResource
- extends org.springframework.security.util.InMemoryResource
An in memory generated resource. This class also overrides some parent Spring AbstractResource methods to ensure
compatibility with the ResourceHttpRequestHandler.
- Author:
- Andre Azzolini (apazzolini)
|
Constructor Summary |
GeneratedResource()
Note: This constructor should not be explicitly used
To properly allow for serialization, we must provide this no-arg constructor that will
create a "dummy" GeneratedResource. |
GeneratedResource(byte[] source,
String description)
|
| Methods inherited from class org.springframework.security.util.InMemoryResource |
equals, getDescription, getInputStream, hashCode |
| Methods inherited from class org.springframework.core.io.AbstractResource |
contentLength, createRelative, exists, getFile, getFileForLastModifiedCheck, getURI, getURL, isOpen, isReadable, toString |
timeGenerated
protected long timeGenerated
hashRepresentation
protected String hashRepresentation
GeneratedResource
public GeneratedResource()
- Note: This constructor should not be explicitly used
To properly allow for serialization, we must provide this no-arg constructor that will
create a "dummy" GeneratedResource. The appropriate fields will be set during deserialization.
GeneratedResource
public GeneratedResource(byte[] source,
String description)
getFilename
public String getFilename()
- Specified by:
getFilename in interface org.springframework.core.io.Resource- Overrides:
getFilename in class org.springframework.core.io.AbstractResource
lastModified
public long lastModified()
throws IOException
- Specified by:
lastModified in interface org.springframework.core.io.Resource- Overrides:
lastModified in class org.springframework.core.io.AbstractResource
- Throws:
IOException
getHashRepresentation
public String getHashRepresentation()
setHashRepresentation
public void setHashRepresentation(String hashRepresentation)
Copyright © 2013. All Rights Reserved.