|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.module.core.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.
| Field Summary |
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctions, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, nodeCache, oType, searchAge, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, temporaryNodes, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Fields inherited from class org.mmbase.module.core.MMTable |
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
functions |
| Constructor Summary | |
|
VirtualBuilder(MMBase m)
Creates an instance of a Virtual builder. |
protected |
VirtualBuilder(MMBase m,
String tableName)
Creates an instance of a Virtual builder and registers it in MMBase. |
| Method Summary | |
boolean |
create()
Creates a new builder table in the current database. |
int |
getDBState(String fieldName)
Return a field's database state. |
Map |
getFields(MMObjectNode node)
Get text from a blob field from a database. |
String |
getGUIIndicator(MMObjectNode node)
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). You may want to override MMObjectBuilder.getNodeGUIIndicator(org.mmbase.module.core.MMObjectNode, org.mmbase.util.functions.Parameters) for more flexibility.
The default behavior of a virtual node is to display the content of
the 'name' field (if present). |
MMObjectNode |
getNewNode(String owner)
Get a new node, using this builder as its parent. |
protected byte[] |
getShortedByte(String fieldName,
MMObjectNode node)
Get binary data of a blob field. This function is called to 'load' a field into the node, because it was not loaded together with the node, because it is supposed to be too big. Since virtual builders are generally not associated with a database, this method returns null. |
protected String |
getShortedText(String fieldName,
MMObjectNode node)
Get text from a blob field. This function is called to 'load' a field into the node, because it was not loaded together with the node, because it is supposed to be too big. Since virtual builders are generally not associated with a database, this method returns null. |
boolean |
init()
Initializes this builder. |
int |
insert(String owner,
MMObjectNode node)
Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided). |
| Methods inherited from class org.mmbase.module.core.MMTable |
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
addFunction, createParameters, getFunction, getFunctions, getFunctionValue |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public VirtualBuilder(MMBase m)
m - the MMbase cloud creating the node
protected VirtualBuilder(MMBase m,
String tableName)
m - the MMbase cloud creating the nodetableName - the name of the builder as known in the MMbase system| Method Detail |
public boolean init()
init in class MMObjectBuildercreate()public boolean create()
create in class MMObjectBuilder
public int insert(String owner,
MMObjectNode node)
insert in class MMObjectBuilderowner - The administrator creating the nodenode - The object to insert
public MMObjectNode getNewNode(String owner)
getNewNode in class MMObjectBuilderowner - The administrator creating the new node.
VirtualNode.public String getGUIIndicator(MMObjectNode node)
MMObjectBuilder.getNodeGUIIndicator(org.mmbase.module.core.MMObjectNode, org.mmbase.util.functions.Parameters) for more flexibility.
The default behavior of a virtual node is to display the content of
the 'name' field (if present).
XXX: should be changed to something better
getGUIIndicator in class MMObjectBuildernode - The node to display
public int getDBState(String fieldName)
DBSTATE_VIRTUAL.
getDBState in class MMObjectBuilderfieldName - the requested field's name
DBSTATE_VIRTUAL
protected String getShortedText(String fieldName,
MMObjectNode node)
getShortedText in class MMObjectBuilderfieldName - name of the fieldnode -
null
protected byte[] getShortedByte(String fieldName,
MMObjectNode node)
getShortedByte in class MMObjectBuilderfieldName - name of the fieldnode -
nullpublic Map getFields(MMObjectNode node)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||