|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.module.corebuilders.TypeDef
org.mmbase.module.corebuilders.ObjectTypes
This builder is the same as TypeDef, only it has an adittion field, which is the config field. This field contains the xml-Document of the builder wich is represented by a Node inside this Builder. The filename which shall be used depends on the fields 'name' of the Node. Also, a new node, means a new builder removal of node is removal of builder (also of the xml). Changes to the config will also be active on commit of the node. TODO: update/merging code, and futher testing..
| 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 | |
ObjectTypes()
|
|
| Method Summary | |
boolean |
commit(MMObjectNode node)
Commit changes to this node to the database. |
protected boolean |
deleteBuilderFile(MMObjectNode node)
|
protected java.lang.String |
getBuilderFilePath(MMObjectNode node)
Returns the path, where the builderfile can be found, for not exising builders, a path will be generated. |
protected java.lang.String |
getBuilderPath(MMObjectNode node)
Returns the path, where the builderfile can be found, for not exising builders, a path will be generated. |
java.lang.String |
getGUIIndicator(MMObjectNode node)
What should a GUI display for this node. |
java.lang.Object |
getValue(MMObjectNode node,
java.lang.String field)
Provides additional functionality when obtaining field values. |
boolean |
init()
Sets the default deploy directory for the builders. |
int |
insert(java.lang.String owner,
MMObjectNode node)
Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided). |
protected MMObjectBuilder |
loadBuilder(MMObjectNode node)
|
void |
removeNode(MMObjectNode node)
Remove a node from the cloud, when the represented builder was active it will also be unloaded |
boolean |
setValue(MMObjectNode node,
java.lang.String fieldName,
java.lang.Object originalValue)
Sets a key/value pair in the main values of this node. |
protected java.io.File |
storeBuilderFile(MMObjectNode node)
|
protected MMObjectBuilder |
unloadBuilder(MMObjectNode node)
|
| Methods inherited from class org.mmbase.module.corebuilders.TypeDef |
executeFunction, fieldLocalChanged, getBuilder, getGUIIndicator, getIntValue, getList, getLocaleGUIIndicator, getLocaleGUIIndicator, getNameToNumberCache, getNumberToNameCache, getSingularName, getValue, getValue, isRelationTable, loadTypeDef, reloadBuilder, unloadTypeDef |
| 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 ObjectTypes()
| Method Detail |
public boolean init()
init in class MMObjectBuilderMMObjectBuilder.create()
public java.lang.Object getValue(MMObjectNode node,
java.lang.String field)
TypeDef.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List) method to handle it.
Functions in fieldnames can be given in the format 'functionname(fieldname)'. An old format allows 'functionname_fieldname' instead,
though this only applies to the text functions 'short', 'html', and 'wap'.
Functions can be nested, i.e. 'html(shorted(body))'.
Derived builders should override this method only if they want to provide virtual fieldnames. To provide addiitonal functions,
override TypeDef.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List) instead.
getValue in class TypeDefnode - the node whos efields are queriesfield - the fieldname that is requested
public int insert(java.lang.String owner,
MMObjectNode node)
MMObjectBuilder.preCommit(org.mmbase.module.core.MMObjectNode).
insert in class TypeDefowner - The administrator creating the nodenode - The object to insert. The object need be of the same type as the current builder.
int value which is the new object's unique number, -1 if the insert failed.public boolean commit(MMObjectNode node)
MMObjectBuilder.preCommit(org.mmbase.module.core.MMObjectNode).
Use only to commit changes - for adding node, use insert(java.lang.String, org.mmbase.module.core.MMObjectNode).
commit in class TypeDefnode - The node to be committed
public void removeNode(MMObjectNode node)
removeNode in class TypeDefnode - The node to remove.
java.lang.RuntimeException - When the operation could not be performed
public boolean setValue(MMObjectNode node,
java.lang.String fieldName,
java.lang.Object originalValue)
setValue in class MMObjectBuilderoriginalValue - the value which was original in the field
true When an update is required(when changed),
false if original value was set back into the field.protected java.lang.String getBuilderFilePath(MMObjectNode node)
node - The node, from which we want to know it;s MMObjectBuilder
null in case of strange failures
When the builder was not loaded.protected java.lang.String getBuilderPath(MMObjectNode node)
node - The node, from which we want to know it;s MMObjectBuilder
null in case of strange failures
When the builder was not loaded.protected MMObjectBuilder loadBuilder(MMObjectNode node)
protected java.io.File storeBuilderFile(MMObjectNode node)
protected MMObjectBuilder unloadBuilder(MMObjectNode node)
protected boolean deleteBuilderFile(MMObjectNode node)
public java.lang.String getGUIIndicator(MMObjectNode node)
getGUIIndicator in class TypeDefnode - The node to display
String
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||