Class NetFileSrv

  extended byorg.mmbase.module.core.MMTable
      extended byorg.mmbase.module.core.MMObjectBuilder

public class NetFileSrv
extends MMObjectBuilder

The NetFileServ builder contains information on services available to NetFile objects. It contains a list of possible service/subservice tasks. These tasks are then attached to entries in the VWMs builder, so it is possible to search for a VWM to handle a service/subservice request. The fields of NetFileServ are:

$Id:,v 1.13 2003/03/10 11:50:20 pierre Exp $
Daniel Ockeloen

Field Summary
Fields inherited from class org.mmbase.module.core.MMObjectBuilder
AGE_PARAMETERS, broadcastChanges, database, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, fields, GUI_PARAMETERS, 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
Method Summary
 boolean fileChange(java.lang.String number, java.lang.String ctype)
          Handles a change of a netfiles node.
 boolean fileChange(java.lang.String service, java.lang.String subservice, java.lang.String filename)
          Handles a service request on a file.
 java.lang.Object getAttachedBot(java.lang.String service, java.lang.String subservice)
          Retrieve a vwm (a 'bot') for the service/subservice combination.
 java.lang.String getGUIIndicator(MMObjectNode node)
          What should a GUI display for this node.
Methods inherited from class org.mmbase.module.core.MMObjectBuilder
addField, addLocalObserver, addRemoteObserver, buildSet, checkAddTmpField, commit, convertMMNode2SQL, count, count, create, createAlias, delete, deleteNodeCache, drop, equals, equals, executeFunction, executeFunction, fieldLocalChanged, getAge, getAliasedNode, getAncestors, getCacheNumbers, getCacheSize, getCacheSize, getClassName, getConfigFile, getDBByte, getDBKey, getDBState, getDBText, getDBType, getDefaultTeaser, getDefaultUrl, getDescendants, getDescription, getDescription, getDescriptions, getEditFields, getField, getFieldNames, getFields, getFields, getFunctionParameters, getGUIIndicator, getHardNode, getHardNode, getHTML, getInitParameter, getInitParameters, getList, getLocaleGUIIndicator, getLocaleGUIIndicator, getMachineName, getMaintainer, getMMBase, getNewNode, getNewTmpNode, getNextField, getNextField, getNode, getNode, getNode, getNode, getNodes, getNodes, getNodeType, getNumberFromName, getObjectType, getObjectValue, getParameterDefinition, getParentBuilder, getPluralName, getPluralName, getPluralNames, getQuery, getQuery, getQuery, getRawNodes, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getSortedFields, getSortedListFields, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, hashCode, hostname_function, init, insert, insert, insertDone, isExtensionOf, isNodeCached, isVirtual, nodeLocalChanged, nodeRemoteChanged, preCommit, preEdit, process, processSearchResults, putTmpNode, readSearchResults, removeField, removeNode, removeRelations, removeSyncNodes, removeTmpNode, replace, safeCache, safeCommit, safeInsert, search, search, search, searchIn, searchIn, searchIn, searchList, searchList, searchNumbers, searchVector, searchVector, searchVector, searchVector, searchVectorIn, searchVectorIn, searchVectorIn, searchVectorIn, searchWithWhere, sendFieldChangeSignal, setDBLayout_xml, setDefaults, setDescription, setDescriptions, setInitParameter, setMaintainer, setMMBase, setParentBuilder, setPluralNames, setSearchAge, setSingularNames, setTableName, setUniqueValue, setUniqueValue, setValue, setValue, setVersion, setXMLPath, setXMLValues, signalNewObject, testValidData, toString, toString, toXML, updateFields, waitUntilNodeChanged, wrap
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

Constructor Detail


public NetFileSrv()
Method Detail


public java.lang.String getGUIIndicator(MMObjectNode node)
What should a GUI display for this node. Returns a description of the service and subservice.

getGUIIndicator in class MMObjectBuilder
node - The node to display
the display of the node as a String


public boolean fileChange(java.lang.String number,
                          java.lang.String ctype)
Handles a change of a netfiles node. Depending on the service/subservice of that node, a VWM (such as PageMaster) is invoked. This method is called from the Netfiles builder whenever a local or remote node change occurs.

number - Number of the node in the netfiles buidler than contain service request information.
ctype - the type of change on that node ("c" : node was changed)


public boolean fileChange(java.lang.String service,
                          java.lang.String subservice,
                          java.lang.String filename)
Handles a service request on a file. Depending on the service/subservice, a VWM (such as PageMaster) is invoked. This method is called from the scancache module to handle page caching. The VWM invoked is responsible for creating NetFile entries (if needed).

service - the service to be performed
subservice - the subservice to be performed
filename - the filename to service
true if maintenance was performed, false otherwise


public java.lang.Object getAttachedBot(java.lang.String service,
                                       java.lang.String subservice)
Retrieve a vwm (a 'bot') for the service/subservice combination. This is achieved by following the relations of NetFileServ entries to entries in the VWMs builder. Note that while, theoretically, more vwms could be related, only one (the first) is returned.

service - the service to search for
subservice - the subservice to search for
an object that implements VWMInterface if successful, a dummy object otherwise. This system is a bit odd as getAttachedBot would ideally have VwmServiceInterface as a return type. Possibly change this later, though this also means changing the caching system.

MMBase build