org.mmbase.module.builders
Class AbstractImages
java.lang.Object
|
+--org.mmbase.module.core.MMTable
|
+--org.mmbase.module.core.MMObjectBuilder
|
+--org.mmbase.module.builders.AbstractServletBuilder
|
+--org.mmbase.module.builders.AbstractImages
- Direct Known Subclasses:
- ImageCaches, Images
- public abstract class AbstractImages
- extends AbstractServletBuilder
AbstractImages holds the images and provides ways to insert, retrieve and
search them.
- Since:
- MMBase-1.6
- Version:
- $Id: AbstractImages.java,v 1.15.2.2 2003/03/06 16:46:18 michiel Exp $
- Author:
- Michiel Meeuwissen
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
broadcastChanges, database, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, fields, nodeCache, obj2type, OBJ2TYPE_MAX_SIZE, oType, REPLACE_CACHE, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual |
|
Method Summary |
protected java.lang.Object |
executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
Every image of course has a format and a mimetype. |
protected java.lang.String |
getAssociation()
This functions should return a string identifying where it is
for. |
protected java.lang.String |
getDefaultPath()
If no servlet path can be found via the association (if the
servlet did not 'associate' itself with something, like
servdb), then the getServletPath function will fall back to
this. |
protected abstract java.lang.String |
getGUIIndicatorWithAlt(MMObjectNode node,
java.lang.String title,
javax.servlet.http.HttpServletResponse res,
java.lang.String sessionName)
An image's gui-indicator is of course some <img src>, but it depends on what kind of image
(cached, original) what excactly it must be. |
abstract byte[] |
getImageBytes(java.util.List params)
Returns an image which belongs to the given parameter set. |
protected abstract java.lang.String |
getImageFormat(MMObjectNode node)
Returns the format of the image. |
java.lang.String |
getImageMimeType(MMObjectNode node)
Determine the MIME type of this image node, based on the image format. |
protected java.lang.String |
getSGUIIndicator(java.lang.String session,
javax.servlet.http.HttpServletResponse res,
MMObjectNode node)
Gui indicator of a whole node. |
protected java.lang.String |
getSGUIIndicator(java.lang.String session,
javax.servlet.http.HttpServletResponse res,
java.lang.String field,
MMObjectNode node)
|
| Methods inherited from class org.mmbase.module.core.MMObjectBuilder |
addField, addLocalObserver, addRemoteObserver, buildSet, checkAddTmpField, commit, convertMMNode2SQL, count, create, createAlias, created, deleteNodeCache, drop, equals, equals, executeFunction, fieldLocalChanged, getAge, getAliasedNode, getAncestors, getCacheNumbers, getCacheSize, getCacheSize, getClassName, getConfigFile, getDBByte, getDBKey, getDBState, getDBText, getDBType, getDefaultTeaser, getDefaultUrl, getDescendants, getDescription, getDescription, getDescriptions, getEditFields, getField, getFieldNames, getFields, getFields, getFullTableName, getFunctionParameters, getHardNode, getHardNode, getHTML, getInitParameter, getInitParameters, getList, getLocaleGUIIndicator, getLocaleGUIIndicator, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNextField, getNode, getNode, getNode, getNode, getNodes, getNodeType, getNumberFromName, getObjectType, getObjectValue, getParentBuilder, getPluralName, getPluralName, getPluralNames, getQuery, getQuery, getQuery, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getSortedFields, getSortedListFields, getTableName, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, hashCode, hostname_function, init, insert, insert, insertDone, isExtensionOf, isNodeCached, isVirtual, nodeLocalChanged, nodeRemoteChanged, preCommit, preEdit, process, putTmpNode, readSearchResults, removeField, removeNode, removeRelations, removeTmpNode, replace, safeCache, safeCommit, safeInsert, search, search, search, searchIn, searchIn, searchIn, searchList, searchList, searchNumbers, searchVector, searchVector, searchVector, searchVector, searchVectorIn, searchVectorIn, searchVectorIn, searchVectorIn, searchWithWhere, sendFieldChangeSignal, setDBLayout_xml, setDefaults, setDescription, setDescriptions, setInitParameter, setMaintainer, setMMBase, setParentBuilder, setPluralNames, setSearchAge, setSingularNames, setTableName, setValue, setValue, setVersion, setXMLPath, setXMLValues, signalNewObject, testValidData, toString, toString, toXML, updateFields, waitUntilNodeChanged, wrap |
| Methods inherited from class org.mmbase.module.core.MMTable |
size |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractImages
public AbstractImages()
getAssociation
protected java.lang.String getAssociation()
- Description copied from class:
AbstractServletBuilder
- This functions should return a string identifying where it is
for. This is used when communicating with MMBaseServlet, to
find the right servlet.
For example 'images' or 'attachments'.
- Overrides:
getAssociation in class AbstractServletBuilder
getDefaultPath
protected java.lang.String getDefaultPath()
- Description copied from class:
AbstractServletBuilder
- If no servlet path can be found via the association (if the
servlet did not 'associate' itself with something, like
servdb), then the getServletPath function will fall back to
this.
For example 'img.db' or 'attachment.db'.
- Overrides:
getDefaultPath in class AbstractServletBuilder
getGUIIndicatorWithAlt
protected abstract java.lang.String getGUIIndicatorWithAlt(MMObjectNode node,
java.lang.String title,
javax.servlet.http.HttpServletResponse res,
java.lang.String sessionName)
- An image's gui-indicator is of course some <img src>, but it depends on what kind of image
(cached, original) what excactly it must be.
getSGUIIndicator
protected java.lang.String getSGUIIndicator(java.lang.String session,
javax.servlet.http.HttpServletResponse res,
MMObjectNode node)
- Gui indicator of a whole node.
- Overrides:
getSGUIIndicator in class AbstractServletBuilder
getSGUIIndicator
protected java.lang.String getSGUIIndicator(java.lang.String session,
javax.servlet.http.HttpServletResponse res,
java.lang.String field,
MMObjectNode node)
- Overrides:
getSGUIIndicator in class AbstractServletBuilder
getImageFormat
protected abstract java.lang.String getImageFormat(MMObjectNode node)
- Returns the format of the image. Like 'jpg' or 'gif'.
getImageMimeType
public java.lang.String getImageMimeType(MMObjectNode node)
- Determine the MIME type of this image node, based on the image format.
getImageBytes
public abstract byte[] getImageBytes(java.util.List params)
- Returns an image which belongs to the given parameter set. The
parameters exist of a list of string values, staring with the
proginal image object alias or number, followed by operations
(format and transformation instructions)
This function is not used by ImageServlet. Perhaps it should be deprecated.
- Parameters:
params - A list of parameters, containign at least the id of the image, possibly followed by operations- Returns:
- the image as a byte[], or
null if something went wrong
executeFunction
protected java.lang.Object executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
- Every image of course has a format and a mimetype. Two extra functions to get them.
- Overrides:
executeFunction in class AbstractServletBuilder
MMBase build 1.6.5.20030923