org.mmbase.module.builders
Class Attachments

java.lang.Object
  |
  +--org.mmbase.module.core.MMTable
        |
        +--org.mmbase.module.core.MMObjectBuilder
              |
              +--org.mmbase.module.builders.Attachments

public class Attachments
extends MMObjectBuilder

This builder can be used to maintain files

Author:
cjr@dds.nl

Field Summary
protected  java.lang.String defaultMimeType
           
 
Fields inherited from class org.mmbase.module.core.MMObjectBuilder
broadcastChanges, className, database, debug, description, descriptions, fields, NODE_MAX_SIZE, nodeCache, obj2type, OBJ2TYPE_MAX_SIZE, oType, replaceCache, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual
 
Fields inherited from class org.mmbase.module.core.MMTable
mmb, tableName
 
Constructor Summary
Attachments()
           
 
Method Summary
 java.lang.String getGUIIndicator(java.lang.String field, MMObjectNode node)
          What should a GUI display for this node/field combo.
 boolean process(scanpage sp, java.util.StringTokenizer command, java.util.Hashtable cmds, java.util.Hashtable vars)
          this method will be invoked while uploading the file.
protected  boolean setEditFileField(EditState ed, java.lang.String fieldname, java.util.Hashtable cmds, scanpage sp)
           
 boolean setValue(MMObjectNode node, java.lang.String field)
          Provides additional functionality when setting field values.
 
Methods inherited from class org.mmbase.module.core.MMObjectBuilder
addField, addLocalObserver, addRemoteObserver, buildSet, checkAddTmpField, commit, convertMMNode2SQL, count, create, createAlias, created, debug, deleteNodeCache, executeFunction, fieldLocalChanged, getAge, getAliasedNode, getCacheNumbers, getCacheSize, getCacheSize, getClassName, getDBByte, getDBKey, getDBState, getDBText, getDBType, getDefaultTeaser, getDefaultUrl, getDescription, getDescriptions, getDutchSName, getEditFields, getField, getFieldNames, getFields, getFullTableName, getFunctionParameters, getGUIIndicator, getHardNode, getHTML, getInitParameter, getInitParameters, getList, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNode, getNode, getNodeType, getNumberFromName, getPluralName, getPluralName, getPluralNames, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getSortedFields, getSortedListFields, getTableName, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, getXMLSetup, hostname_function, init_obj2type, init, insert, insert, insertDone, isNodeCached, isVirtual, isXMLConfig, nodeLocalChanged, nodeRemoteChanged, preCommit, preEdit, putTmpNode, readSearchResults, removeField, removeNode, removeRelations, removeTmpNode, replace, search, search, search, searchIn, searchIn, searchIn, searchNumbers, searchVector, searchVector, searchVector, searchVector, searchVectorIn, searchVectorIn, searchVectorIn, searchVectorIn, searchWithWhere, sendFieldChangeSignal, setClassName, setDBLayout_xml, setDBLayout, setDebug, setDefaults, setDescription, setDescriptions, setDutchSName, setInitParameter, setMaintainer, setMMBase, setPluralNames, setSearchAge, setSingularNames, setTableName, setVersion, setXmlConfig, setXMLPath, setXMLValues, signalNewObject, testValidData, toXML, waitUntilNodeChanged, wrap
 
Methods inherited from class org.mmbase.module.core.MMTable
size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultMimeType

protected java.lang.String defaultMimeType
Constructor Detail

Attachments

public Attachments()
Method Detail

process

public boolean process(scanpage sp,
                       java.util.StringTokenizer command,
                       java.util.Hashtable cmds,
                       java.util.Hashtable vars)
this method will be invoked while uploading the file.
Overrides:
process in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
Parameters:
sp - The scanpage (containing http and user info) that calls the function
command - a list of strings that describe the (sub)command to execute (the portion after ' PRC-CMD-BUILDER')
cmds - the commands (PRC-CMD) that are iurrently being processed, including the current command.
vars - variables (PRC-VAR) thatw ere set to be used during processing. the variable 'EDITSTATE' accesses the EditState object (if applicable).
Returns:
the result value as a String

getGUIIndicator

public java.lang.String getGUIIndicator(java.lang.String field,
                                        MMObjectNode node)
Description copied from class: MMObjectBuilder
What should a GUI display for this node/field combo. Default is null (indicating to display the field as is) Override this to display your own choice.
Overrides:
getGUIIndicator in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
Parameters:
node - The node to display
field - the name field of the field to display
Returns:
the display of the node's field as a String, null if not specified

setEditFileField

protected boolean setEditFileField(EditState ed,
                                   java.lang.String fieldname,
                                   java.util.Hashtable cmds,
                                   scanpage sp)

setValue

public boolean setValue(MMObjectNode node,
                        java.lang.String field)
Description copied from class: MMObjectBuilder
Provides additional functionality when setting field values. This method is called whenever a Node of the builder's type tries to change a value. It allows the system to add functionality such as checking valid data. Derived builders should override this method if they want to add functionality.
Overrides:
setValue in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
Parameters:
node - the node whose fields are changed
field - the fieldname that is changed
Returns:
true if the call was handled.


MMBase 2001