|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.module.builders.AbstractServletBuilder
org.mmbase.module.builders.AbstractImages
org.mmbase.module.builders.Images
public class Images
If this class is used as the class for your builder, then an 'handle' byte field is assumed to contain an image. You builder will work together with 'icaches', and with imagemagick (or jai). This means that is has the following properties: ImageConvertClass, ImageConvert.ConverterCommand, ImageConvert.ConverterRoot and MaxConcurrentRequests
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.mmbase.module.builders.AbstractImages |
|---|
AbstractImages.CKeyCache |
| Field Summary | |
|---|---|
static Parameter[] |
CACHE_PARAMETERS
|
static Parameter[] |
CACHEDNODE_PARAMETERS
|
protected String |
defaultImageType
Supposed image type if not could be determined (configurable) |
(package private) static Timer |
deleter
|
static Parameter[] |
DIMENSION_PARAMETERS
|
(package private) static Map<File,Dimension> |
dimensions
|
static Parameter[] |
GUI_PARAMETERS
|
static Parameter[] |
HEIGHT_PARAMETERS
|
static Parameter[] |
WIDTH_PARAMETERS
|
| Fields inherited from class org.mmbase.module.builders.AbstractImages |
|---|
FIELD_FILESIZE, FIELD_HEIGHT, FIELD_ITYPE, FIELD_WIDTH, handleCache, IMAGE_HANDLE_FIELDS |
| Fields inherited from class org.mmbase.module.builders.AbstractServletBuilder |
|---|
externalUrlField, FIELD_FILENAME, FIELD_HANDLE, FIELD_MIMETYPE, FORMAT_PARAMETERS, legalizeFileName, MIMETYPE_PARAMETERS, PROPERTY_EXTERNAL_URL_FIELD, usesBridgeServlet |
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
|---|
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctions, GUI_INDICATOR, guiFunction, infoFunction, internalVersion, nodeCache, oType, pluralNames, searchAge, singularNames, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, TMP_FIELD_EXISTS, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Fields inherited from class org.mmbase.module.core.MMTable |
|---|
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
functions |
| Constructor Summary | |
|---|---|
Images()
|
|
| Method Summary | |
|---|---|
boolean |
commit(MMObjectNode node)
Commit changes to this node to the storage layer. |
static File |
createTemporaryFile(SerializableInputStream in,
String template)
|
protected Object |
executeFunction(MMObjectNode node,
String function,
List<?> args)
The executeFunction of this builder adds the 'cache' function. |
protected void |
fillImageCacheNode(MMObjectNode image,
MMObjectNode icacheNode,
String template)
|
MMObjectNode |
getCachedNode(MMObjectNode node,
String template)
Returns a icache node for given image node and conversion template. |
String |
getDefaultImageType()
The default image type is used when magic could not determin the type |
protected Dimension |
getDimension(MMObjectNode node,
String template)
|
protected String |
getGuiForNewImage(MMObjectNode node,
String alt,
Parameters args)
|
protected String |
getGUIIndicatorWithAlt(MMObjectNode node,
String alt,
Parameters args)
The GUI-indicator of an image-node also needs a res/req object. |
protected String |
getSGUIIndicatorForNode(MMObjectNode node,
Parameters args)
Returns GUI Indicator for node |
boolean |
init()
Read configurations (imageConvertClass, maxConcurrentRequest), checks for 'icaches', inits the request-processor-pool. |
(package private) void |
invalidateTemplateCacheNumberCache(int number)
|
(package private) void |
invalidateTemplateCacheNumberCache(String ckey)
|
void |
notify(NodeEvent event)
|
void |
removeNode(MMObjectNode node)
Override the MMObjectBuilder removeNode, to invalidate the Image Cache AFTER a deletion of the image node. |
void |
shutdown()
clean all acquired resources, because system is shutting down |
| Methods inherited from class org.mmbase.module.builders.AbstractImages |
|---|
checkHandle, getAssociation, getBlobCache, getDefaultPath, getDimension, getDimensionForEmptyHandle, getFileSize, getHandleFields, getImageFormat, getMimeType, getSGUIIndicator, handleEmpty, storesDimension, storesFileSize, storesImageType |
| Methods inherited from class org.mmbase.module.builders.AbstractServletBuilder |
|---|
addFileName, getBinary, getDefaultFileName, getFileName, getGUIIndicator, getGUIIndicator, getServletPath, getServletPath, getSession, getSuperGUIIndicator, insert |
| Methods inherited from class org.mmbase.module.core.MMTable |
|---|
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
addFunction, createParameters, getFunction, getFunctions, getFunctionValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mmbase.module.builders.ImagesInterface |
|---|
getBinary, getFileName |
| Field Detail |
|---|
public static final Parameter[] CACHE_PARAMETERS
public static final Parameter[] CACHEDNODE_PARAMETERS
public static final Parameter[] HEIGHT_PARAMETERS
public static final Parameter[] WIDTH_PARAMETERS
public static final Parameter[] DIMENSION_PARAMETERS
public static final Parameter[] GUI_PARAMETERS
protected String defaultImageType
static Map<File,Dimension> dimensions
static Timer deleter
| Constructor Detail |
|---|
public Images()
| Method Detail |
|---|
public boolean init()
init in class AbstractServletBuilderMMObjectBuilder.create()public void shutdown()
MMObjectBuilder
shutdown in class MMObjectBuilder
protected Object executeFunction(MMObjectNode node,
String function,
List<?> args)
executeFunction in class AbstractImagesMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List>)
protected Dimension getDimension(MMObjectNode node,
String template)
protected void fillImageCacheNode(MMObjectNode image,
MMObjectNode icacheNode,
String template)
public MMObjectNode getCachedNode(MMObjectNode node,
String template)
public static File createTemporaryFile(SerializableInputStream in,
String template)
throws IOException
IOException
protected String getGuiForNewImage(MMObjectNode node,
String alt,
Parameters args)
throws IOException
IOException
protected String getGUIIndicatorWithAlt(MMObjectNode node,
String alt,
Parameters args)
getGUIIndicatorWithAlt in class AbstractImages
protected String getSGUIIndicatorForNode(MMObjectNode node,
Parameters args)
AbstractImages
getSGUIIndicatorForNode in class AbstractImagespublic String getDefaultImageType()
AbstractImages
getDefaultImageType in class AbstractImagespublic boolean commit(MMObjectNode node)
MMObjectBuilderMMObjectBuilder.preCommit(org.mmbase.module.core.MMObjectNode).
Use only to commit changes - for adding node, use MMObjectBuilder.insert(int, java.lang.String).
commit in class AbstractServletBuildernode - The node to be committed
public void removeNode(MMObjectNode node)
removeNode in class MMObjectBuildernode - The node to remove.public void notify(NodeEvent event)
notify in interface NodeEventListenernotify in class MMObjectBuilderhere we handle all the backward compatibility stuff.
this method covers for both node and relation events.void invalidateTemplateCacheNumberCache(int number)
void invalidateTemplateCacheNumberCache(String ckey)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||