| org.apache.cocoon.components.source.impl.BlobSource
BlobSource | public class BlobSource extends AbstractLogEnabled implements Source,Serviceable(Code) | | 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 :
- "datasource" is the jdbc datasource to use (defined in cocoon.xonf)
- "table" is the database table,
- "column" is (you can guess, now :) the column in "table",
- "cond" is the boolean condition used to select a particular record in
the table.
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 "
author: Sylvain Wallez author: Stephan Michels version: CVS $Id: BlobSource.java 452425 2006-10-03 11:18:47Z vgritsenko $ |
Inner Class :static class EmptyIterator implements Iterator | |
Constructor Summary | |
public | BlobSource(String url) Create a file source from a 'blob:' url and a component manager. |
BlobSource | public BlobSource(String url) throws MalformedURLException(Code) | | Create a file source from a 'blob:' url and a component manager.
The url is of the form "blob:/datasource/table/column[condition]
|
exists | public boolean exists()(Code) | | See Also: org.apache.excalibur.source.Source.exists |
getContentLength | public long getContentLength()(Code) | | Return the content length of the content or -1 if the length is
unknown
|
getLastModified | public long getLastModified()(Code) | | Get the last modification date.
The last modification in milliseconds since January 1, 1970 GMTor 0 if it is unknown |
getMimeType | public String getMimeType()(Code) | | The mime-type of the content described by this object.
If the source is not able to determine the mime-type by itself
this can be null .
|
getParameter | public String getParameter(String name)(Code) | | Get the value of a parameter.
Using this it is possible to get custom information provided by the
source implementation, like an expires date, HTTP headers etc.
|
getParameterAsLong | public long getParameterAsLong(String name)(Code) | | Get the value of a parameter.
Using this it is possible to get custom information provided by the
source implementation, like an expires date, HTTP headers etc.
|
getParameterNames | public Iterator getParameterNames()(Code) | | Get parameter names
Using this it is possible to get custom information provided by the
source implementation, like an expires date, HTTP headers etc.
|
getScheme | public String getScheme()(Code) | | Return the protocol
|
getURI | public String getURI()(Code) | | Return the unique identifer for this source
|
getValidity | public SourceValidity getValidity()(Code) | | Get the Validity object. This can either wrap the last modification
date or the expires information or...
If it is currently not possible to calculate such an information
null is returned.
|
refresh | public void refresh()(Code) | | Refresh the content of this object after the underlying data
content has changed.
|
service | public void service(ServiceManager manager)(Code) | | Set the current ServiceManager instance used by this
Serviceable .
|
|
|