|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.servlet.EmptyDownloadableResource
public class EmptyDownloadableResource
A DownloadableResource with no content
| Field Summary | |
|---|---|
protected String |
extraPath
|
protected Plugin |
plugin
|
protected ResourceLocation |
resourceLocation
|
| Constructor Summary | |
|---|---|
EmptyDownloadableResource(Plugin plugin,
ResourceLocation resourceLocation)
|
|
| Method Summary | |
|---|---|
String |
getContentType()
Returns the content type for the resource. |
protected String |
getLocation()
This is called to return the location of the resource that this object represents. |
protected InputStream |
getResourceAsStream(String resourceLocation)
Returns an InputStream to stream the resource from based on
resource name. |
boolean |
isResourceModified(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Checks any "If-Modified-Since" header from the request against the plugin's loading time, since plugins can't be modified after they've been loaded this is a good way to determine if a plugin resource has been modified or not. |
void |
serveResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Writes the resource content out into the response. |
void |
streamResource(OutputStream out)
Write the resource to the supplied OutputStream. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Plugin plugin
protected final String extraPath
protected final ResourceLocation resourceLocation
| Constructor Detail |
|---|
public EmptyDownloadableResource(Plugin plugin,
ResourceLocation resourceLocation)
plugin - used to find last modified date and plugin keyresourceLocation - used to get content type for the resource| Method Detail |
|---|
protected InputStream getResourceAsStream(String resourceLocation)
InputStream to stream the resource from based on
resource name.
resourceLocation - the location of the resource to try and load
public void serveResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws DownloadException
DownloadableResource
serveResource in interface DownloadableResourceDownloadException - if there were errors writing to the response.
public void streamResource(OutputStream out)
throws DownloadException
DownloadableResource
streamResource in interface DownloadableResourceout - the stream to write to
DownloadException - if there were errors writing to the response. Since 2.3.
public boolean isResourceModified(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
isResourceModified in interface DownloadableResourcepublic String getContentType()
DownloadableResource
getContentType in interface DownloadableResourceprotected String getLocation()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||