|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.source.impl.BlobSource
public class BlobSource
A Source
that takes its content in a single JDBC column. Any
kind of column can be used (clob, blob, varchar, etc), but "Blob" means
that the whole content is contained in a single column.
The URL syntax is "blob:/datasource/table/column[cond]", where :
For example, "blob:/personel/people/photo[userid='foo']
"
will fetch the first column returned by the statement "SELECT photo
from people where userid='foo'
" in the datasource "personel
"
Constructor Summary | |
---|---|
BlobSource(String url)
Create a file source from a 'blob:' url and a component manager. |
Method Summary | |
---|---|
boolean |
exists()
|
long |
getContentLength()
Return the content length of the content or -1 if the length is unknown |
InputStream |
getInputStream()
Get the input stream for this source. |
long |
getLastModified()
Get the last modification date. |
String |
getMimeType()
The mime-type of the content described by this object. |
String |
getParameter(String name)
Get the value of a parameter. |
long |
getParameterAsLong(String name)
Get the value of a parameter. |
Iterator |
getParameterNames()
Get parameter names Using this it is possible to get custom information provided by the source implementation, like an expires date, HTTP headers etc. |
String |
getScheme()
Return the protocol |
String |
getURI()
Return the unique identifer for this source |
SourceValidity |
getValidity()
Get the Validity object. |
void |
refresh()
Refresh the content of this object after the underlying data content has changed. |
void |
service(ServiceManager manager)
Set the current ServiceManager instance used by this
Serviceable . |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlobSource(String url) throws MalformedURLException
The url is of the form "blob:/datasource/table/column[condition]
MalformedURLException
Method Detail |
---|
public void service(ServiceManager manager)
ServiceManager
instance used by this
Serviceable
.
service
in interface Serviceable
public String getScheme()
getScheme
in interface Source
public String getURI()
getURI
in interface Source
public InputStream getInputStream() throws IOException, SourceException
getInputStream
in interface Source
IOException
SourceException
public SourceValidity getValidity()
null
is returned.
getValidity
in interface Source
public void refresh()
refresh
in interface Source
public boolean exists()
exists
in interface Source
Source.exists()
public String getMimeType()
null
.
getMimeType
in interface Source
public long getContentLength()
getContentLength
in interface Source
public long getLastModified()
getLastModified
in interface Source
public String getParameter(String name)
public long getParameterAsLong(String name)
public Iterator getParameterNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |