|
|||||||||
| 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
TypeDef, one of the meta stucture nodes it is used to define the object types (builders)
| 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 | |
TypeDef()
Constructor |
|
| Method Summary | |
boolean |
commit(MMObjectNode node)
Commit changes to this node to the database. |
protected java.lang.Object |
executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
Executes a function on the field of a node, and returns the result. |
boolean |
fieldLocalChanged(java.lang.String number,
java.lang.String builder,
java.lang.String field,
java.lang.String value)
Called when a local field is changed. |
MMObjectBuilder |
getBuilder(MMObjectNode node)
Returns the MMObjectBuilder which is represented by the node. |
java.lang.String |
getGUIIndicator(MMObjectNode node)
What should a GUI display for this node. |
java.lang.String |
getGUIIndicator(java.lang.String field,
MMObjectNode node)
What should a GUI display for this node/field combo. |
int |
getIntValue(java.lang.String builderName)
Obtain the type value of the requested builder |
java.util.Vector |
getList(scanpage sp,
StringTagger tagger,
java.util.StringTokenizer tok)
Obtains a list of string values by performing the provided command and parameters. |
protected java.lang.String |
getLocaleGUIIndicator(java.util.Locale locale,
MMObjectNode node)
The GUIIndicator can depend on the locale. |
protected java.lang.String |
getLocaleGUIIndicator(java.util.Locale locale,
java.lang.String field,
MMObjectNode node)
The GUIIndicator can depend on the locale. |
protected java.util.Map |
getNameToNumberCache()
|
protected java.util.Map |
getNumberToNameCache()
|
java.lang.String |
getSingularName(java.lang.String builderName,
java.lang.String language)
|
java.lang.String |
getValue(int type)
Obtain the buildername of the requested type |
java.lang.Object |
getValue(MMObjectNode node,
java.lang.String field)
Provides additional functionality when obtaining field values. |
java.lang.String |
getValue(java.lang.String type)
Deprecated. use getValue(int) |
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). |
boolean |
isRelationTable(java.lang.String name)
|
void |
loadTypeDef(java.lang.String name)
|
boolean |
reloadBuilder(java.lang.String objectname)
|
void |
removeNode(MMObjectNode node)
Remove a node from the cloud, when the represented builder was active it will also be unloaded |
void |
unloadTypeDef(java.lang.String name)
|
| 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 TypeDef()
| Method Detail |
protected java.util.Map getNumberToNameCache()
protected java.util.Map getNameToNumberCache()
public int insert(java.lang.String owner,
MMObjectNode node)
MMObjectBuilder.preCommit(org.mmbase.module.core.MMObjectNode).
insert in class MMObjectBuilderowner - 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 MMObjectBuildernode - The node to be committed
public void removeNode(MMObjectNode node)
removeNode in class MMObjectBuildernode - The node to remove.
java.lang.RuntimeException - When the operation could not be performedpublic int getIntValue(java.lang.String builderName)
builderName - name of the builder
public java.lang.String getValue(int type)
type - the object type
public java.lang.String getValue(java.lang.String type)
type - the object type
public java.lang.String getSingularName(java.lang.String builderName,
java.lang.String language)
public boolean isRelationTable(java.lang.String name)
public java.lang.Object getValue(MMObjectNode node,
java.lang.String field)
MMObjectBuilderMMObjectBuilder.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 MMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List) instead.
getValue in class MMObjectBuildernode - the node whos efields are queriesfield - the fieldname that is requested
public boolean fieldLocalChanged(java.lang.String number,
java.lang.String builder,
java.lang.String field,
java.lang.String value)
MMObjectBuilder
fieldLocalChanged in class MMObjectBuildernumber - Number of the changed node as a Stringbuilder - type of the changed nodefield - name of the changed fieldvalue - value it changed to
truepublic MMObjectBuilder getBuilder(MMObjectNode node)
node - The node, from which we want to know its MMObjectBuilder
null
if the builder was not loaded.public boolean reloadBuilder(java.lang.String objectname)
public java.lang.String getGUIIndicator(MMObjectNode node)
getGUIIndicator in class MMObjectBuildernode - The node to display
String
public java.lang.String getGUIIndicator(java.lang.String field,
MMObjectNode node)
getGUIIndicator in class MMObjectBuilderfield - the name field of the field to displaynode - The node to display
String, null if not specified
protected java.lang.String getLocaleGUIIndicator(java.util.Locale locale,
java.lang.String field,
MMObjectNode node)
getLocaleGUIIndicator in class MMObjectBuilder
protected java.lang.String getLocaleGUIIndicator(java.util.Locale locale,
MMObjectNode node)
MMObjectBuilder
getLocaleGUIIndicator in class MMObjectBuilderpublic void loadTypeDef(java.lang.String name)
public void unloadTypeDef(java.lang.String name)
public java.util.Vector getList(scanpage sp,
StringTagger tagger,
java.util.StringTokenizer tok)
throws ParseException
MMObjectBuilder
getList in class MMObjectBuildersp - The scanpage (containing http and user info) that calls the functiontagger - a Hashtable of parameters (name-value pairs) for the commandtok - a list of strings that describe the (sub)command to execute
Vector containing the result values as a String
ParseException
protected java.lang.Object executeFunction(MMObjectNode node,
java.lang.String function,
java.util.List args)
MMObjectBuilderMMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String) method.
Derived builders should override this method to provide additional functions.
executeFunction in class MMObjectBuilderMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||