org.mmbase.module.builders
Class floppydrvs

java.lang.Object
  |
  +--org.mmbase.module.core.MMTable
        |
        +--org.mmbase.module.core.MMObjectBuilder
              |
              +--org.mmbase.module.builders.floppydrvs
All Implemented Interfaces:
MMBaseObserver

public class floppydrvs
extends MMObjectBuilder
implements MMBaseObserver

Version:
$Revision: 1.7 $ $Date: 2001/05/04 13:54:56 $
Author:
Daniel Ockeloen, David V van Zeventer

Field Summary
static java.lang.String buildername
           
 
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
floppydrvs()
           
 
Method Summary
 java.util.Vector alterEntries(java.util.Vector entries, java.lang.String cmd, java.lang.String param1, java.lang.String param2)
          alterEntries: This method contains several code to alter a vector with string entries.
 boolean commit(MMObjectNode node)
          insert a new object, normally not used (only subtables are used)
 void copy(java.lang.String srcfile, java.lang.String dstfile)
          copy : This method will copy the selected floppyfile (srcfile) to the destination (dstfile).
 java.lang.String getDefaultUrl(int src)
          Return the default url of this object.
 java.lang.String getDir(MMObjectNode fnode)
          getDir: Returns a string containing all the filepaths from the jazzdisk.
 java.lang.String getGUIIndicator(MMObjectNode node)
          What should a GUI display for this node.
 java.lang.String getGUIIndicator(java.lang.String field, MMObjectNode node)
          What should a GUI display for this node/field combo.
 java.util.Vector getHTMLDir(StringTagger tagger, java.util.StringTokenizer tok)
          getHTMLDir: This method transforms the listing sothat it looks 'nice' inside a browser.
 java.util.Vector getList(javax.servlet.http.HttpServletRequest req, StringTagger tagger, java.util.StringTokenizer tok)
           
 java.lang.Object getValue(MMObjectNode node, java.lang.String field)
          Provides additional functionality when obtaining field values.
 boolean nodeChanged(java.lang.String machine, java.lang.String number, java.lang.String builder, java.lang.String ctype)
           
 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.
 
Methods inherited from class org.mmbase.module.core.MMObjectBuilder
addField, addLocalObserver, addRemoteObserver, buildSet, checkAddTmpField, convertMMNode2SQL, count, create, createAlias, created, debug, deleteNodeCache, executeFunction, fieldLocalChanged, getAge, getAliasedNode, getCacheNumbers, getCacheSize, getCacheSize, getClassName, getDBByte, getDBKey, getDBState, getDBText, getDBType, getDefaultTeaser, getDescription, getDescriptions, getDutchSName, getEditFields, getField, getFieldNames, getFields, getFullTableName, getFunctionParameters, 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, getVersion, getWAP, getXMLPath, getXMLSetup, hostname_function, init_obj2type, init, insert, insert, insertDone, isNodeCached, isVirtual, isXMLConfig, preCommit, preEdit, process, 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, setValue, 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

buildername

public static final java.lang.String buildername
Constructor Detail

floppydrvs

public floppydrvs()
Method Detail

commit

public boolean commit(MMObjectNode node)
insert a new object, normally not used (only subtables are used)
Overrides:
commit in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
Parameters:
node - The node to be committed
Returns:
The committed node.

getGUIIndicator

public java.lang.String getGUIIndicator(MMObjectNode node)
Description copied from class: MMObjectBuilder
What should a GUI display for this node. Default is the first non system field (first field after owner). Override this to display your own choice (see Images.java).
Overrides:
getGUIIndicator in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
Parameters:
node - The node to display
Returns:
the display of the node 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

getDefaultUrl

public java.lang.String getDefaultUrl(int src)
Description copied from class: MMObjectBuilder
Return the default url of this object. The basic value returned is null.
Overrides:
getDefaultUrl in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
Parameters:
src - the number of the node to obtain the url from
Returns:
the basic url as a String, or null if unknown.

nodeRemoteChanged

public boolean nodeRemoteChanged(java.lang.String machine,
                                 java.lang.String number,
                                 java.lang.String builder,
                                 java.lang.String ctype)
Description copied from class: MMObjectBuilder
Called when a remote node is changed. Should be called by subclasses if they override it.
Specified by:
nodeRemoteChanged in interface MMBaseObserver
Overrides:
nodeRemoteChanged in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
Parameters:
machine - Name of the machine that changed the node.
number - Number of the changed node as a String
builder - type of the changed node
ctype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=new
Returns:
always true

nodeLocalChanged

public boolean nodeLocalChanged(java.lang.String machine,
                                java.lang.String number,
                                java.lang.String builder,
                                java.lang.String ctype)
Description copied from class: MMObjectBuilder
Called when a local node is changed. Should be called by subclasses if they override it.
Specified by:
nodeLocalChanged in interface MMBaseObserver
Overrides:
nodeLocalChanged in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
Parameters:
machine - Name of the machine that changed the node.
number - Number of the changed node as a String
builder - type of the changed node
ctype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=new
Returns:
always true

nodeChanged

public boolean nodeChanged(java.lang.String machine,
                           java.lang.String number,
                           java.lang.String builder,
                           java.lang.String ctype)

getList

public java.util.Vector getList(javax.servlet.http.HttpServletRequest req,
                                StringTagger tagger,
                                java.util.StringTokenizer tok)
                         throws ParseException

getHTMLDir

public java.util.Vector getHTMLDir(StringTagger tagger,
                                   java.util.StringTokenizer tok)
getHTMLDir: This method transforms the listing sothat it looks 'nice' inside a browser.

getDir

public java.lang.String getDir(MMObjectNode fnode)
                        throws GetDirFailedException
getDir: Returns a string containing all the filepaths from the jazzdisk. eg. /FLOPPY-1/data/songs/primus/hitme.wav /FLOPPY-1/data/jingles/welcome.wav Note 26 jan 1999: See note in same method in jazzdrives.java

copy

public void copy(java.lang.String srcfile,
                 java.lang.String dstfile)
          throws CopyFailedException
copy : This method will copy the selected floppyfile (srcfile) to the destination (dstfile). Only Files WITHOUT Spaces In Filename OR Directory Can be Copied. srcfile eg. = /FLOPPY-1/audio/file.wav dstfile eg. = /data/audio/wav/123456.wav Note 26 jan 1999: See note in same method in jazzdrives.java

alterEntries

public java.util.Vector alterEntries(java.util.Vector entries,
                                     java.lang.String cmd,
                                     java.lang.String param1,
                                     java.lang.String param2)
alterEntries: This method contains several code to alter a vector with string entries.

getValue

public java.lang.Object getValue(MMObjectNode node,
                                 java.lang.String field)
Description copied from class: MMObjectBuilder
Provides additional functionality when obtaining field values. This method is called whenever a Node of the builder's type fails at evaluating a getValue() request (generally when a fieldname is supplied that doesn't exist). It allows the system to add 'functions' to be included with a field name, such as 'html(body)' or 'time(lastmodified)'. This method will parse the fieldname, determining functions and calling the MMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.lang.String) method to handle it. Functions in fieldnames can be given in the format 'functionname(fieldname)'. An old format allows 'functionname_fieldname' instead, though this only applies to the text functions 'short', 'html', and 'wap'. Functions can be nested, i.e. 'html(shorted(body))'. Derived builders should override this method only if they want to provide virtual fieldnames. To provide addiitonal functions, override MMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.lang.String) instead.
Overrides:
getValue in class MMObjectBuilder
Following copied from class: org.mmbase.module.core.MMObjectBuilder
Parameters:
node - the node whos efields are queries
field - the fieldname that is requested
Returns:
the result of the 'function', or null if no valid functions could be determined.


MMBase 2001