|
||||||||||
| 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.ImageCaches
public class ImageCaches
ImageCaches (aka as 'icaches') is a system-like builder used by builders with the 'Images' class. It contains the converted images.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.mmbase.module.builders.AbstractImages |
|---|
AbstractImages.CKeyCache |
| Field Summary | |
|---|---|
static String |
FIELD_ID
|
(package private) static String |
GUI_IMAGETEMPLATE
|
static Parameter[] |
WAIT_PARAMETERS
|
| Fields inherited from class org.mmbase.module.builders.AbstractImages |
|---|
DIMENSION_PARAMETERS, FIELD_FILESIZE, FIELD_HEIGHT, FIELD_ITYPE, FIELD_WIDTH, handleCache, HEIGHT_PARAMETERS, IMAGE_HANDLE_FIELDS, WIDTH_PARAMETERS |
| Fields inherited from class org.mmbase.module.builders.AbstractServletBuilder |
|---|
externalUrlField, FIELD_FILENAME, FIELD_HANDLE, FIELD_MIMETYPE, FORMAT_PARAMETERS, GUI_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 | |
|---|---|
ImageCaches()
|
|
| Method Summary | |
|---|---|
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 accessable on package level, since only Images should call it.. |
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. |
| Methods inherited from class org.mmbase.module.builders.AbstractImages |
|---|
checkHandle, getAssociation, getBlobCache, getDefaultImageType, getDefaultPath, getDimension, getFileSize, getHandleFields, getMimeType, getSGUIIndicator, storesDimension, storesFileSize, storesImageType |
| Methods inherited from class org.mmbase.module.builders.AbstractServletBuilder |
|---|
commit, getBinary, getDefaultFileName, getGUIIndicator, getGUIIndicator, getServletPath, getServletPath, getSession, getSuperGUIIndicator |
| 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 |
| Field Detail |
|---|
public static final String FIELD_ID
public static final Parameter[] WAIT_PARAMETERS
static final String GUI_IMAGETEMPLATE
| Constructor Detail |
|---|
public ImageCaches()
| Method Detail |
|---|
public boolean init()
AbstractServletBuilder
init in class AbstractServletBuilderMMObjectBuilder.create()
protected void appendExtension(StringBuilder buf,
String ext)
public StringBuilder getFileName(MMObjectNode node,
StringBuilder buf)
getFileName in interface ImagesInterfacegetFileName in class AbstractServletBuilder
protected boolean addFileName(MMObjectNode node,
String servlet)
AbstractServletBuilder
addFileName in class AbstractServletBuilder
protected String getGUIIndicatorWithAlt(MMObjectNode node,
String alt,
Parameters a)
getGUIIndicatorWithAlt in class AbstractImages
protected String getSGUIIndicatorForNode(MMObjectNode node,
Parameters a)
AbstractImages
getSGUIIndicatorForNode 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 template
null 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 template
null if it did not exist.protected void invalidate(MMObjectNode imageNode)
imageNode - The image node, which is the original of the cached modificationspublic 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 String getMimeType(List<String> params)
public 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)
executeFunction in class AbstractImagesMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List>)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||