org.mmbase.module.builders
Class NetFileSrv

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

public class NetFileSrv
extends MMObjectBuilder

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

Version:
12 Mar 1997
Author:
Daniel Ockeloen

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
NetFileSrv()
           
 
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, 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, getHardNode, getHTML, getInitParameter, getInitParameters, getList, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNode, getNode, 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, process, putTmpNode, readSearchResults, removeField, removeNode, removeRelations, removeTmpNode, replace, safeCache, safeCommit, safeInsert, 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, 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
 

Constructor Detail

NetFileSrv

public NetFileSrv()
Method Detail

getGUIIndicator

public java.lang.String getGUIIndicator(MMObjectNode node)
What should a GUI display for this node. Returns a description of the service and subservice.
Overrides:
getGUIIndicator in class MMObjectBuilder
Parameters:
node - The node to display
Returns:
the display of the node as a String

fileChange

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.
Parameters:
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)
Returns:
true

fileChange

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).
Parameters:
service - the service to be performed
subservice - the subservice to be performed
filename - the filename to service
Returns:
true if maintenance was performed, false otherwise

getAttachedBot

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.
Parameters:
service - the service to search fro
subservice - the subservice to search for
Returns:
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 2002