public class ImageCaches extends AbstractImages
AbstractImages.CKeyCache| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_ID |
(package private) static String |
GUI_IMAGETEMPLATE |
static Parameter[] |
WAIT_PARAMETERS |
DIMENSION_PARAMETERS, FIELD_FILESIZE, FIELD_HEIGHT, FIELD_ITYPE, FIELD_WIDTH, handleCache, HEIGHT_PARAMETERS, IMAGE_HANDLE_FIELDS, WIDTH_PARAMETERSexternalUrlField, FIELD_FILENAME, FIELD_HANDLE, FIELD_MIMETYPE, FORMAT_PARAMETERS, GUI_PARAMETERS, legalizeFileName, MIMETYPE_PARAMETERS, PROPERTY_EXTERNAL_URL_FIELD, usesBridgeServletAGE_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, temporaryNodes, TMP_FIELD_EXISTS, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunctionmaxNodesFromQuery, mmb, storageConnector, tableNamefunctions| Constructor and Description |
|---|
ImageCaches() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addFileName(MMObjectNode node,
String servlet)
Adds a filename to the path to a servlet, unless this does not make sense (not filename can
be determined) or it was explicitely set not to, using the servlet context init parameter
'mmbase.servlet.<association>addfilename.
|
protected void |
appendExtension(StringBuilder buf,
String ext) |
protected Object |
executeFunction(MMObjectNode node,
String function,
List<?> args)
Every image of course has a format and a mimetype.
|
MMObjectNode |
getCachedNode(int imageNumber,
String template)
Finds a icache node in the icaches table
|
protected Dimension |
getDimensionForEmptyHandle(MMObjectNode node)
If icache does not yet have a filled handle field, neither filled width/heigh fields (can occur after a update).
|
StringBuilder |
getFileName(MMObjectNode node,
StringBuilder buf) |
protected String |
getGUIIndicatorWithAlt(MMObjectNode node,
String alt,
Parameters a)
The GUI indicator of an image can have an alt-text.
|
String |
getImageFormat(MMObjectNode node)
Returns the image format.
|
protected MMObjectNode |
getLegacyCachedNode(int imageNumber,
String template)
Finds a icache node in the icache table, supposing 'legacy' ckeys (where all +'s are removed).
|
String |
getMimeType(List<String> params) |
protected String |
getSGUIIndicatorForNode(MMObjectNode node,
Parameters a)
Returns GUI Indicator for node
|
protected boolean |
handleEmpty(MMObjectNode node)
Whether the 'handle' field of this icaches node is to be considered empty, and a conversion
must therefor still be triggered.
|
boolean |
init()
Read 'externalUrlField' property
|
int |
insert(String owner,
MMObjectNode node)
Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided).
|
protected void |
invalidate(MMObjectNode imageNode)
Invalidate the Image Cache for a specific Node
method only accessible on package level, since only Images should call it..
|
protected void |
invalidate(MMObjectNode imageNode,
boolean remove) |
void |
removeNode(MMObjectNode node)
Override the MMObjectBuilder removeNode, to invalidate the LRU ImageCache, when a node gets deleted.
|
boolean |
waitForConversion(MMObjectNode node)
If a icache node is created with empty 'handle' field, then the handle field can be filled
automaticly.
|
checkHandle, getAssociation, getBlobCache, getDefaultImageType, getDefaultPath, getDimension, getFileSize, getHandleFields, getMimeType, getSGUIIndicator, storesDimension, storesFileSize, storesImageTypecommit, getBinary, getDefaultFileName, getFileName, getGUIIndicator, getGUIIndicator, getServletPath, getServletPath, getSession, getSuperGUIIndicatoraddEventListener, addField, addLocalObserver, addRemoteObserver, broadcastChanges, checkAddTmpField, clearBlobCache, create, createAlias, createAlias, createIfNotExists, delete, equals, equals, executeFunction, fieldLocalChanged, getAncestors, getClassName, getConfigFile, getConfigResource, getDataTypeCollector, getDBState, getDBType, getDefaultTeaser, getDefaultUrl, getDescendants, getDescription, getDescription, getDescriptions, getEmptyNode, getField, getFieldNames, getFields, getFields, getFunction, getFunctionParameters, getFunctions, getGUIIndicator, getHTML, getInitParameter, getInitParameters, getInitParameters, getInternalVersion, getList, getLocaleGUIIndicator, getLocaleGUIIndicator, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNextField, getNode, getNode, getNode, getNodeFromCache, getNodeGUIIndicator, getNumber, getObjectType, getObjectValue, getParentBuilder, getPluralName, getPluralName, getPluralNames, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedInputStream, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, hasField, hashCode, hashCode, hostname_function, insert, isExtensionOf, isNodeCached, isNull, isVirtual, loadInitParameters, newFunctionInstance, nodeLocalChanged, nodeRemoteChanged, notify, notify, preCommit, process, removeEventListener, removeField, removeLocalObserver, removeRelations, removeRemoteObserver, removeSyncNodes, replace, safeCache, sendFieldChangeSignal, setDefaults, setDescription, setDescriptions, setFields, setInitParameter, setMaintainer, setPluralNames, setSearchAge, setSingularNames, setUniqueValue, setUniqueValue, setValue, setValue, setVersion, setXMLPath, shutdown, testValidData, toString, toString, update, updateFields, wrapcount, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, sizeaddFunction, createParameters, getFunction, getFunctions, getFunctionValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBinarypublic static final String FIELD_ID
public static final Parameter[] WAIT_PARAMETERS
static final String GUI_IMAGETEMPLATE
public boolean init()
AbstractServletBuilderinit in class AbstractServletBuilderMMObjectBuilder.create()protected void appendExtension(StringBuilder buf, String ext)
public StringBuilder getFileName(MMObjectNode node, StringBuilder buf)
getFileName in interface ImagesInterfacegetFileName in class AbstractServletBuilderprotected boolean addFileName(MMObjectNode node, String servlet)
AbstractServletBuilderaddFileName in class AbstractServletBuilderprotected String getGUIIndicatorWithAlt(MMObjectNode node, String alt, Parameters a)
getGUIIndicatorWithAlt in class AbstractImagesprotected String getSGUIIndicatorForNode(MMObjectNode node, Parameters a)
AbstractImagesgetSGUIIndicatorForNode in class AbstractImagesprotected boolean handleEmpty(MMObjectNode node)
handleEmpty in class AbstractImagespublic boolean waitForConversion(MMObjectNode node)
node - A icache node.public MMObjectNode getCachedNode(int imageNumber, String template)
imageNumber - The node number of the image for which it must be searchedtemplate - The image conversion templatenull if it did not exist yet.protected MMObjectNode getLegacyCachedNode(int imageNumber, String template)
imageNumber - The node number of the image for which it must be searchedtemplate - The image conversion templatenull if it did not exist.protected void invalidate(MMObjectNode imageNode)
imageNode - The image node, which is the original of the cached modificationsprotected void invalidate(MMObjectNode imageNode, boolean remove)
public void removeNode(MMObjectNode node)
removeNode in class MMObjectBuildernode - The node to remove.public String getImageFormat(MMObjectNode node)
getImageFormat in interface ImagesInterfacegetImageFormat in class AbstractImagesnode - The object to use.protected Dimension getDimensionForEmptyHandle(MMObjectNode node)
getDimensionForEmptyHandle in class AbstractImagespublic int insert(String owner, MMObjectNode node)
MMObjectBuilderMMObjectBuilder.preCommit(org.mmbase.module.core.MMObjectNode).insert in class AbstractServletBuilderowner - The administrator creating the nodenode - The object to insert. The object need be of the same type as the current builder.int value which is the new object's unique number, -1 if the insert failed.protected Object executeFunction(MMObjectNode node, String function, List<?> args)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}