|
||||||||||
| 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
public class 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, getFunctionsFunction, GUI_INDICATOR, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, maintainer, nodeCache, oType, pluralNames, searchAge, singularNames, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, temporaryNodes, TMP_FIELD_EXISTS, TMP_FIELD_NUMBER, TMP_FIELD_RESOLVED, virtual, WRAP_PARAMETERS, wrapFunction, xmlPath |
| Fields inherited from class org.mmbase.module.core.MMTable |
|---|
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
functions, getFunctions |
| 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<String,CoreField> |
getFields(MMObjectNode node)
Get text from a blob field from a database. |
String |
getGUIIndicator(MMObjectNode node)
What should a GUI display for this node. |
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. |
protected String |
getShortedText(String fieldName,
MMObjectNode node)
Get text from a blob field. |
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(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<String,CoreField> getFields(MMObjectNode node)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||