org.mmbase.module.core
Class VirtualReferrerBuilder

java.lang.Object
  extended byorg.mmbase.module.core.MMTable
      extended byorg.mmbase.module.core.MMObjectBuilder
          extended byorg.mmbase.module.core.VirtualBuilder
              extended byorg.mmbase.module.core.VirtualReferrerBuilder

public class VirtualReferrerBuilder
extends VirtualBuilder

VirtualBuilder is a builder which creates 'virtual' nodes. This class is intended to facilitate practical creation of virtual builders by capturing events that migth otherwise lead to unexpected or faulty behavior.

Version:
$Id: VirtualReferrerBuilder.java,v 1.1 2004/01/08 11:08:06 pierre Exp $
Author:
Pierre van Rooden

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
VirtualReferrerBuilder(MMObjectBuilder originalBuilder)
          Creates an instance of a Virtual builder.
 
Method Summary
 java.lang.String getGUIIndicator(MMObjectNode node)
          What should a GUI display for this node.
 java.lang.Object getOriginalBuilder()
          Returns the original builder
 java.lang.Object getValue(MMObjectNode node, java.lang.String field)
          Provides additional functionality when obtaining field values.
 
Methods inherited from class org.mmbase.module.core.VirtualBuilder
create, getDBState, getGUIInicator, getNewNode, getShortedByte, getShortedText, init, insert, processSearchResults
 
Methods inherited from class org.mmbase.module.core.MMObjectBuilder
addField, addLocalObserver, addRemoteObserver, buildSet, checkAddTmpField, commit, convertMMNode2SQL, count, count, createAlias, delete, deleteNodeCache, drop, equals, equals, executeFunction, executeFunction, fieldLocalChanged, getAge, getAliasedNode, getAncestors, getCacheNumbers, getCacheSize, getCacheSize, getClassName, getConfigFile, getDBByte, getDBKey, 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, 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, getSingularName, getSingularName, getSingularNames, getSmartPath, getSortedFields, getSortedListFields, getTmpNode, getURLEncode, getVersion, getWAP, getXMLPath, hashCode, hostname_function, insert, insertDone, isExtensionOf, isNodeCached, isVirtual, nodeLocalChanged, nodeRemoteChanged, preCommit, preEdit, process, 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

VirtualReferrerBuilder

public VirtualReferrerBuilder(MMObjectBuilder originalBuilder)
Creates an instance of a Virtual builder. A builder instantiated with this constrcutor is not registered in MMBase and should only be used as a temporary parent for virtual nodes which do not have a long life span.

Method Detail

getGUIIndicator

public java.lang.String getGUIIndicator(MMObjectNode node)
What should a GUI display for this node.

Overrides:
getGUIIndicator in class MMObjectBuilder
Parameters:
node - The node to display
Returns:
either the name field of the node or "no info"

getValue

public java.lang.Object getValue(MMObjectNode node,
                                 java.lang.String field)
Provides additional functionality when obtaining field values.

Overrides:
getValue in class MMObjectBuilder
Parameters:
node - the node who setfields are queried
field - the fieldname that is requested
Returns:
the result of the 'function', or null if no valid functions could be determined.

getOriginalBuilder

public java.lang.Object getOriginalBuilder()
Returns the original builder

Returns:
the result of the 'function', or null if no valid functions could be determined.


MMBase build 1.7.1.20041002