|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.module.builders.AbstractServletBuilder
org.mmbase.module.builders.AbstractImages
org.mmbase.module.builders.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 inherited from class org.mmbase.module.builders.AbstractImages |
AbstractImages.CKeyCache |
| Field Summary | |
static Parameter[] |
CACHE_PARAMETERS
|
protected static java.lang.Class |
DEFAULT_IMAGECONVERTCLASS
The ImageConvertInterface implementation to be used (defaults to ConvertImageMagic) |
protected java.lang.String |
defaultImageType
Supposed image type if not could be determined (configurable) |
static Parameter[] |
GUI_PARAMETERS
|
protected java.util.Map |
imageConvertParams
|
protected Queue |
imageRequestQueue
|
protected java.util.Hashtable |
imageRequestTable
|
protected ImageRequestProcessor[] |
ireqprocessors
|
protected int |
maxConcurrentRequests
|
protected static int |
maxRequests
|
protected static char |
NOQUOTING
Parses the 'image conversion template' to a List. |
| Fields inherited from class org.mmbase.module.builders.AbstractServletBuilder |
FORMAT_PARAMETERS, MIMETYPE_PARAMETERS, SERVLETPATH_PARAMETERS, usesBridgeServlet |
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
AGE_PARAMETERS, broadcastChanges, database, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, fields, listCache, nodeCache, OBJ2TYPE_MAX_SIZE, oType, REPLACE_CACHE, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual |
| Fields inherited from class org.mmbase.module.core.MMTable |
mmb, tableName |
| Constructor Summary | |
Images()
|
|
| Method Summary | |
int |
cacheImage(java.util.List params)
Explicity cache this image with params and return the cached node number. |
boolean |
commit(MMObjectNode node)
Override the MMObjectBuilder commit, to invalidate the Image Cache AFTER a modifation to the image node. |
protected int |
convertAlias(java.lang.String num)
Deprecated. This is hackery, and un-mmbase-like. |
protected ByteFieldContainer |
createCachedImageContainer(java.util.List params)
This function should be called when an image/template does not have a cached version yet. |
protected void |
determineImageType(MMObjectNode node)
Determines the image type of an object and stores the content in the itype field. |
protected java.lang.Object |
executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
The executeFunction of this builder adds the 'cache' function. |
protected ByteFieldContainer |
getCachedImageContainer(java.util.List params)
Determines the ckey, and asks the bytes from icaches. |
protected java.lang.String |
getGUIIndicatorWithAlt(MMObjectNode node,
java.lang.String title,
Parameters args)
The GUI-indicator of an image-node also needs a res/req object. |
byte[] |
getImageBytes(java.util.List params)
Deprecated. Use getImageNode(params); |
byte[] |
getImageBytes(scanpage sp,
java.util.List params)
Deprecated. Use getImageNode(params); |
byte[] |
getImageBytes5(scanpage sp,
java.util.List params)
Deprecated. Use getImageNode(params); |
ByteFieldContainer |
getImageContainer(java.util.List params)
Returns a picture wich belongs to the given param line, with caching. |
protected java.lang.String |
getImageFormat(MMObjectNode node)
Returns the image format. |
java.lang.String |
getImageMimeType(java.util.List params)
Will return defaultImageType as default type, or one of the strings in params, must contain the following "f(type)" where type will be returned |
java.util.Vector |
getList(scanpage sp,
StringTagger tagger,
java.util.StringTokenizer tok)
Obtains a list of string values by performing the provided command and parameters. |
protected java.lang.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. |
int |
insert(java.lang.String owner,
MMObjectNode node)
Insert a new object (content provided) in the cloud. |
boolean |
nodeLocalChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
Called when a local node is changed. |
boolean |
nodeRemoteChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
Called when a remote node is changed. |
protected java.util.List |
parseTemplate(MMObjectNode node,
java.lang.String template)
|
void |
removeNode(MMObjectNode node)
Override the MMObjectBuilder removeNode, to invalidate the Image Cache AFTER a delete-ion of the image node. |
protected void |
removeSurroundingQuotes(java.lang.StringBuffer buf)
Just a utitility function, used by the function above. |
void |
setDefaults(MMObjectNode node)
Sets defaults for a node. |
| Methods inherited from class org.mmbase.module.builders.AbstractImages |
getAssociation, getDefaultPath, getImageMimeType, getSGUIIndicator |
| Methods inherited from class org.mmbase.module.builders.AbstractServletBuilder |
getGUIIndicator, getGUIIndicator, getParameterDefinition, getServletPath, getServletPath, getSuperGUIIndicator |
| Methods inherited from class org.mmbase.module.core.MMTable |
created, getFullTableName, getTableName, size |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Parameter[] CACHE_PARAMETERS
public static final Parameter[] GUI_PARAMETERS
protected java.util.Map imageConvertParams
protected static final java.lang.Class DEFAULT_IMAGECONVERTCLASS
protected int maxConcurrentRequests
protected java.lang.String defaultImageType
protected static final int maxRequests
protected Queue imageRequestQueue
protected java.util.Hashtable imageRequestTable
protected ImageRequestProcessor[] ireqprocessors
protected static final char NOQUOTING
| Constructor Detail |
public Images()
| Method Detail |
public boolean init()
init in class MMObjectBuilderMMObjectBuilder.create()
protected java.lang.Object executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
executeFunction in class AbstractImagespublic void setDefaults(MMObjectNode node)
MMObjectBuilder
setDefaults in class MMObjectBuildernode - The node to set the defaults of.
protected java.lang.String getGUIIndicatorWithAlt(MMObjectNode node,
java.lang.String title,
Parameters args)
getGUIIndicatorWithAlt in class AbstractImages
protected java.lang.String getSGUIIndicatorForNode(MMObjectNode node,
Parameters args)
AbstractImages
getSGUIIndicatorForNode in class AbstractImagespublic java.lang.String getImageMimeType(java.util.List params)
defaultImageType as default type, or one of the strings in params, must contain the following "f(type)" where type will be returned
params - a List of Strings, which could contain the "f(type)" string
defaultImageType by default, or the first occurence of "f(type)"protected java.lang.String getImageFormat(MMObjectNode node)
defaultImageType.
getImageFormat in class AbstractImages
protected java.util.List parseTemplate(MMObjectNode node,
java.lang.String template)
protected void removeSurroundingQuotes(java.lang.StringBuffer buf)
public int cacheImage(java.util.List params)
public byte[] getImageBytes5(scanpage sp,
java.util.List params)
public byte[] getImageBytes(scanpage sp,
java.util.List params)
public byte[] getImageBytes(java.util.List params)
getImageBytes in class AbstractImagesparams - The name/id of the picture, followed by operations, which can be performed on the picture..
public ByteFieldContainer getImageContainer(java.util.List params)
params - The name/id of the picture, followed by operations, which can be performed on the picture..
protected ByteFieldContainer getCachedImageContainer(java.util.List params)
params - a List of Strings, containing the name/id of the picture, followed by operations, which can be performed on the picture..
protected ByteFieldContainer createCachedImageContainer(java.util.List params)
params - a List of Strings,
containing the name/id of the picture, followed by operations,
which can be performed on the picture..
protected int convertAlias(java.lang.String num)
public java.util.Vector getList(scanpage sp,
StringTagger tagger,
java.util.StringTokenizer tok)
throws ParseException
MMObjectBuilder
getList in class MMObjectBuildersp - The scanpage (containing http and user info) that calls the functiontagger - a Hashtable of parameters (name-value pairs) for the commandtok - a list of strings that describe the (sub)command to execute
Vector containing the result values as a String
ParseExceptionprotected void determineImageType(MMObjectNode node)
node - The object to change
public int insert(java.lang.String owner,
MMObjectNode node)
insert in class MMObjectBuilderowner - 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.public boolean commit(MMObjectNode node)
commit in class MMObjectBuildernode - The node to be committed
public void removeNode(MMObjectNode node)
removeNode in class MMObjectBuildernode - The node to remove.
public boolean nodeLocalChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
MMObjectBuilder
nodeLocalChanged in class MMObjectBuildermachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=new
true
public boolean nodeRemoteChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
MMObjectBuilder
nodeRemoteChanged in class MMObjectBuildermachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=new
true
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||