Java Doc for MMObjectBuilder.java in  » Database-ORM » MMBase » org » mmbase » module » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » MMBase » org.mmbase.module.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mmbase.util.functions.FunctionProvider
      org.mmbase.module.core.MMTable
         org.mmbase.module.core.MMObjectBuilder

All known Subclasses:   org.mmbase.module.builders.MMServers,  org.mmbase.module.corebuilders.OAlias,  org.mmbase.module.corebuilders.InsRel,  org.mmbase.module.builders.Properties,  org.mmbase.module.builders.MMEvents,  org.mmbase.module.corebuilders.RelDef,  org.mmbase.module.corebuilders.TypeDef,  org.mmbase.module.core.VirtualBuilder,  org.mmbase.module.builders.Dummy,  org.mmbase.util.functions.ExampleBuilder,  org.mmbase.module.corebuilders.TypeRel,  org.mmbase.module.builders.Versions,  org.mmbase.module.builders.AbstractServletBuilder,  org.mmbase.module.builders.DayMarkers,
MMObjectBuilder
public class MMObjectBuilder extends MMTable implements NodeEventListener,RelationEventListener(Code)
This class is the base class for all builders. It offers a list of routines which are useful in maintaining the nodes in the MMBase object cloud.
Builders are the core of the MMBase system. They create, delete and search the MMObjectNodes. Most manipulations concern nodes of that builders type. However, a number of retrieval routines extend beyond a builders scope and work on the cloud in general, allowing some ease in retrieval of nodes. The basic routines in this class can be extended to handle more specific demands for nodes. Most of these 'extended builders' will be stored in mmbase.org.builders or mmbase.org.corebuilders. Examples include relation builders or builders for handling binary data such as images. The various builders are registered by the 'TypeDef' builder class (one of the core builders, itself an extension of this class).
author:
   Daniel Ockeloen
author:
   Rob Vermeulen
author:
   Pierre van Rooden
author:
   Eduard Witteveen
author:
   Johannes Verelst
author:
   Rob van Maris
author:
   Michiel Meeuwissen
author:
   Ernst Bunders
version:
   $Id: MMObjectBuilder.java,v 1.421 2007/11/16 09:47:34 michiel Exp $


Field Summary
final public static  Parameter[]AGE_PARAMETERS
    
final public static  StringDEFAULT_ALINEA
    
final public static  StringDEFAULT_EOL
    
final public static  intEVENT_TYPE_LOCAL
    
final public static  intEVENT_TYPE_REMOTE
    
final public static  StringFIELD_NUMBER
     Name of the field containing the object number, which uniquely identifies the node.
final public static  StringFIELD_OBJECT_TYPE
     Name of the field containing the object type number.
final public static  StringFIELD_OWNER
     Name of the field containing the owner.
final public static  StringGUI_INDICATOR
    
final public static  Parameter[]GUI_PARAMETERS
    
final public static  StringSYSTEM_OWNER
     Default (system) owner name for the owner field.
final public static  intTEMPNODE_DEFAULT_SIZE
    
final public static  StringTMP_FIELD_EXISTS
    
final public static  StringTMP_FIELD_NUMBER
    
final protected static  Parameter[]WRAP_PARAMETERS
     Parameters constants for the NodeFunction MMObjectBuilder.wrapFunction .
protected  booleanbroadCastChanges
     Determines whether changes to this builder need be broadcast to other known mmbase servers.
public  Stringdescription
     Description of the builder in the currently selected language Not that the first time the builder is created, this value is what is stored in the TypeDef table.
public  Hashtable<String, String>descriptions
     Descriptions of the builder per language Can be set with the <descriptions> tag in the xml builder file.
final protected  Map<String, CoreField>fields
    
protected static  BlobCachegenericBlobCache
     The cache for all blobs.
protected  Function<Collection<? extends Function>>getFunctions
     Every Function Provider provides least the 'getFunctions' function, which returns a Set of all functions which it provides.
protected  Function<String>guiFunction
     The famous GUI function as a function object.
protected  Function<Object>infoFunction
     The info-function is a node-function and a builder-function.
protected  longinternalVersion
     Internal (instance) version number of this builder.
 Stringmaintainer
    
protected static  org.mmbase.cache.NodeCachenodeCache
    
protected  intoType
     The current builder's object type Retrieved from the TypeDef builder.
 Hashtable<String, String>pluralNames
    
public  StringsearchAge
     The default search age for this builder. Used for intializing editor search forms (see HtmlBase) Default value is 31.
 Hashtable<String, String>singularNames
    
public static  Map<String, MMObjectNode>temporaryNodes
     Collection for temporary nodes, Used by the Temporarynodemanager when working with transactions The default size is 1024.
protected  booleanvirtual
     Determines whether a builder is virtual (data is not stored in the storage layer).
protected  Function<String>wrapFunction
     This function wraps the text of a node's field and returns the result as a String.
 StringxmlPath
    

Constructor Summary
public  MMObjectBuilder()
     Constructor.

Method Summary
public  voidaddEventListener(org.mmbase.core.event.EventListener listener)
     simple way to register a NodeEvent listener and a RelationEventListener at the same time.
public  voidaddField(CoreField def)
     Add a field to this builder.
public  booleanaddLocalObserver(MMBaseObserver obs)
     Adds a local observer to this builder.
public  booleanaddRemoteObserver(MMBaseObserver obs)
     Adds a remote observer to this builder.
public  booleanbroadcastChanges()
     Determines whether changes to this builder need be broadcast to other known mmbase servers. This setting also governs whether the cache for relation builders is emptied when a relation changes. Actual broadcasting (and cache emptying) is initiated in the storage layer, when changes are commited. By default, all builders broadcast their changes, with the exception of the TypeDef builder. MM: Can somebody please explain _why_ typedef node changes, like e.g.
public  booleancheckAddTmpField(String field)
     Defines a virtual field to use for temporary nodes.
public  intclearBlobCache(int nodeNumber)
    
public  booleancommit(MMObjectNode node)
     Commit changes to this node to the storage layer.
public  booleancreate()
     Creates a new builder table in the storage layer.
public  booleancreateAlias(int number, String alias, String owner)
     Creates an alias for a node, provided the OAlias builder is loaded.
public  booleancreateAlias(int number, String alias)
     Creates an alias for a node, provided the OAlias builder is loaded.
public  voiddelete()
     Removes the builder from the storage.
final public  booleanequals(Object o)
     Equals must be implemented because of the list of MMObjectBuilder which is used for ancestors Declared the method final, because the instanceof operator is used.
public  booleanequals(MMObjectNode o1, MMObjectNode o2)
    
protected  ObjectexecuteFunction(MMObjectNode node, String function, List arguments)
     Executes a function on the field of a node, and returns the result.
protected  ObjectexecuteFunction(MMObjectNode node, String function, String field)
     Executes a function on the field of a node, and returns the result.
public  booleanfieldLocalChanged(String number, String builder, String field, String value)
     Called when a local field is changed.
public  List<MMObjectBuilder>getAncestors()
     Gives the list of parent-builders.
protected  BlobCachegetBlobCache(String fieldName)
    
public  StringgetClassName()
    
public  FilegetConfigFile()
    
public  StringgetConfigResource()
    
public  intgetDBState(String fieldName)
     Return a field's storage state.
public  intgetDBType(String fieldName)
     Return a field's storage type.
public  DataTypeCollectorgetDataTypeCollector()
     Returns the datatype collector belonging to this buidler.
public  MMObjectNodegetDefaultTeaser(MMObjectNode node, MMObjectNode tnode)
    
public  StringgetDefaultUrl(int src)
     Return the default url of this object.
public  List<MMObjectBuilder>getDescendants()
     Creates list of descendant-builders.
public  StringgetDescription()
    
public  StringgetDescription(String lang)
     Gets description of the builder, using the specified language.
public  Hashtable<String, String>getDescriptions()
    
public  MMObjectNodegetEmptyNode(String owner)
     Returns a new empty node object.
public  FieldDefsgetField(String fieldName)
    
public  Set<String>getFieldNames()
     Return a list of field names of this table.
public  Collection<CoreField>getFields()
     Return a copy of the list of field definitions of this table.
public  List<CoreField>getFields(int sortOrder)
     Gets the field definitions for the editor, sorted according to the specified order, and excluding the fields that have not been assigned a valid position (valid is >= 0).
protected  FunctiongetFunction(MMObjectNode node, String functionName)
     Instantiates a Function object for a certain function on a certain node of this type.
Parameters:
  node - The Node for on which the function must work
Parameters:
  functionName - Name of the request function.
protected  Vector<String>getFunctionParameters(String fields)
     Parses string containing function parameters. The parameters must be separated by ',' or ';' and may be functions themselves (i.e.
final  ObjectgetFunctionValue(MMObjectNode node, String functionName, List parameters)
     Executes a 'function' on a MMObjectNode.
protected  Collection<Function<?>>getFunctions(MMObjectNode node)
     Returns all Functions which are available (or at least known to be available) on a Node.
public  StringgetGUIIndicator(MMObjectNode node, Parameters pars)
     A complicated default implementation for GUI.
public  StringgetGUIIndicator(MMObjectNode node)
     What should a GUI display for this node.
public  StringgetGUIIndicator(String fieldName, MMObjectNode node)
     What should a GUI display for this node/field combo.
protected  StringgetHTML(String body)
     Returns a HTML-version of a string.
public  StringgetInitParameter(String name)
     Retrieve a specific property.
public  Map<String, String>getInitParameters()
    
public  MapgetInitParameters(String contextPath)
    
public  longgetInternalVersion()
     Returns the builder's internal version number. This number can be used to sync wrapper classes.
public  Vector<String>getList(PageInfo sp, StringTagger tagger, StringTokenizer tok)
     Obtains a list of string values by performing the provided command and parameters.
protected  StringgetLocaleGUIIndicator(Locale locale, String field, MMObjectNode node)
     The GUIIndicator can depend on the locale.
protected  StringgetLocaleGUIIndicator(Locale locale, MMObjectNode node)
     The GUIIndicator can depend on the locale.
public  StringgetMachineName()
    
public  StringgetMaintainer()
    
public  MMObjectNodegetNewNode(String owner)
     Get a new node, using this builder as its parent.
protected  MMObjectNodegetNewTmpNode(String owner, String key)
    
public  FieldDefsgetNextField(String currentfield, int sortorder)
     Returns the next field as defined by its sortorder, according to the specified order.
public  FieldDefsgetNextField(String currentfield)
     Returns the next field as defined by its sortorder, according to it's GUIPos property (as set in the builder xml file).
public  MMObjectNodegetNode(String key, boolean useCache)
     Retrieves a node based on a unique key.
public  MMObjectNodegetNode(String key)
     Retrieves a node based on a unique key.
public  MMObjectNodegetNode(int number)
     Retrieves a node based on it's number (a unique key), retrieving the node from the node cache if possible.
public  MMObjectNodegetNodeFromCache(Integer number)
     Retrieves a node from the cache, or null if it doesn't exist.
Parameters:
  number - The number of the node to retrieve.
protected  StringgetNodeGUIIndicator(MMObjectNode node, Parameters params)
     Returns a GUI-indicator for the node itself.
public  intgetNumber()
     Returns the builder object number, which also functions as the objecttype.
public  intgetObjectType()
     Returns the objecttype (otype).
protected  ObjectgetObjectValue(MMObjectNode node, String field)
     Like getValue, but without the 'old' code (short_ html_ etc).
public  MMObjectBuildergetParentBuilder()
     Returns the builder that this builder extends.
public  StringgetPluralName(String lang)
     Gets long name of the builder, using the specified language.
public  StringgetPluralName()
     Gets long name of the builder in the current default language.
public  Hashtable<String, String>getPluralNames()
    
public  Vector<MMObjectNode>getRelations_main(int src)
     Returns all relations of a node.
public  StringgetSearchAge()
    
public  StringgetShort(String str, int len)
     Support routine to return shorter strings.
protected  byte[]getShortedByte(String fieldName, MMObjectNode node)
     Get binary data of a blob field.
protected  StringgetShortedText(String fieldName, MMObjectNode node)
     Get text from a blob field.
public  StringgetSingularName(String lang)
     Gets short name of the builder, using the specified language.
public  StringgetSingularName()
     Gets short name of the builder in the current default language.
public  Hashtable<String, String>getSingularNames()
    
public  StringgetSmartPath(String documentRoot, String path, String nodeNumber, String version)
    
protected static  MMObjectNodegetTmpNode(String key)
    
protected static  StringgetURLEncode(String body)
     Returns a URLEncoded-version (MIME x-www-form-urlencoded) of a string.
public  ObjectgetValue(MMObjectNode node, String field)
     Provides additional functionality when obtaining field values. This method is called whenever a Node of the builder's type fails at evaluating a getValue() request (generally when a fieldname is supplied that doesn't exist). It allows the system to add 'functions' to be included with a field name, such as 'html(body)' or 'time(lastmodified)'. This method will parse the fieldname, determining functions and calling the MMObjectBuilder.executeFunction method to handle it. Functions in fieldnames can be given in the format 'functionname(fieldname)'.
public  intgetVersion()
    
protected static  StringgetWAP(String body)
     Returns a WAP-version of a string.
public  StringgetXMLPath()
     Retrieves the subpath of the builder's xml configuration file.
public  booleanhasField(String fieldName)
    
public  inthashCode()
    
public  inthashCode(MMObjectNode o)
    
public static  Stringhostname_function(String url)
    
public  booleaninit()
     Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called.
public  intinsert(int oType, String owner)
     Insert a new, empty, object of a certain type.
public  intinsert(String owner, MMObjectNode node)
     Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided). This method indirectly calls MMObjectBuilder.preCommit .
Parameters:
  owner - The administrator creating the node
Parameters:
  node - The object to insert.
public  booleanisExtensionOf(MMObjectBuilder o)
    
public  booleanisNodeCached(Integer number)
     Is this node cached at this moment?
Parameters:
  number - The number of the node to check.
public  booleanisVirtual()
     Determine whether this builder is virtual.
public  voidloadInitParameters()
    
protected  FunctionnewFunctionInstance(String name, Parameter[] parameters, ReturnType returnType)
    
public  booleannodeLocalChanged(String machine, String number, String builder, String ctype)
     Called when a local node is changed.
public  booleannodeRemoteChanged(String machine, String number, String builder, String ctype)
     Called when a remote node is changed.
public  voidnotify(NodeEvent event)
    
public  voidnotify(RelationEvent event)
    
public  MMObjectNodepreCommit(MMObjectNode node)
     This method is called before an actual write to the storage layer is performed.
Parameters:
  node - The node to be committed.
public  booleanprocess(PageInfo sp, StringTokenizer command, Hashtable cmds, Hashtable vars)
     The hook that passes all form related pages to the correct handler. This method is SCAN related and may fail if called outside the context of the SCAN servlet. The methood is currentkly called by the MMEDIT module, whenever a 'PRC-CMD-BUILDER-...' command is encountered in the list of commands to be processed.
Parameters:
  sp - The PageInfo (containing http and user info) that calls the function
Parameters:
  command - a list of strings that describe the (sub)command to execute (the portion after ' PRC-CMD-BUILDER')
Parameters:
  cmds - the commands (PRC-CMD) that are iurrently being processed, including the current command.
Parameters:
  vars - variables (PRC-VAR) thatw ere set to be used during processing.
static  voidputTmpNode(String key, MMObjectNode node)
    
public  voidremoveEventListener(org.mmbase.core.event.EventListener listener)
    
public  voidremoveField(String fieldName)
     Remove a field from this builder.
public  booleanremoveLocalObserver(MMBaseObserver obs)
    
public  voidremoveNode(MMObjectNode node)
     Remove a node from the cloud.
public  voidremoveRelations(MMObjectNode node)
     Remove the relations of a node.
public  booleanremoveRemoteObserver(MMBaseObserver obs)
    
protected  voidremoveSyncNodes(MMObjectNode node)
     Removes the syncnodes to this node.
static  voidremoveTmpNode(String key)
    
public  Stringreplace(PageInfo sp, StringTokenizer tok)
     Obtains a string value by performing the provided command.
public  MMObjectNodesafeCache(Integer n, MMObjectNode node)
     Stores a node in the cache provided the cache is not write locked. a valid node.
 booleansafeCommit(MMObjectNode node)
     Locks the node cache during the commit of a node.
 intsafeInsert(MMObjectNode node, String userName)
     Locks the node cache during the insert of a node.
public  booleansendFieldChangeSignal(MMObjectNode node, String fieldName)
     Send a signal to other servers that a field was changed.
public  voidsetDefaults(MMObjectNode node)
     Sets defaults for a node.
public  voidsetDescription(String e)
    
public  voidsetDescriptions(Hashtable<String, String> e)
    
public  voidsetFields(List<CoreField> f)
     Stores fields information of this table. Asside from the fields supplied by the caller, a field 'otype' is added (if missing).
Parameters:
  f - A List with fields (as CoreField objects) as defined by MMBase.
public  voidsetInitParameter(String name, String value)
     Set a single builder property The propertie will not be saved.
 voidsetInitParameters(Hashtable<String, String> properties)
     Set all builder properties Changed properties will not be saved.
public  voidsetMaintainer(String m)
    
public  voidsetParentBuilder(MMObjectBuilder parent)
     Sets the builder that this builder extends, and registers it in the storage layer.
public  voidsetPluralNames(Hashtable<String, String> names)
    
public  voidsetSearchAge(String age)
     Sets search Age.
public  voidsetSingularNames(Hashtable<String, String> names)
    
protected  StringsetUniqueValue(MMObjectNode node, String field, String baseValue)
     In setDefault you could want to generate unique values for fields (if the field is 'unique').
protected  intsetUniqueValue(MMObjectNode node, String field, int offset)
     In setDefault you could want to generate unique values for fields (if the field is 'unique').
public  booleansetValue(MMObjectNode node, String fieldName, Object originalValue)
     Sets a key/value pair in the main values of this node.
public  booleansetValue(MMObjectNode node, String fieldName)
     Provides additional functionality when setting field values.
public  voidsetVersion(int i)
    
public  voidsetXMLPath(String m)
     Sets the subpath of the builder's xml configuration file.
public  voidtestValidData(MMObjectNode node)
     Tests whether the data in a node is valid (throws an exception if this is not the case).
public  StringtoString()
     Implmenting a sensible toString is usefull for debugging.
public  StringtoString(MMObjectNode n)
    
protected  voidupdate()
    
protected  voidupdateFields()
     Clears all field list caches, and recalculates the field list.
public static  Stringwrap(String text, int width)
     Wraps a string.

Field Detail
AGE_PARAMETERS
final public static Parameter[] AGE_PARAMETERS(Code)
Parameters for the age function
since:
   MMBase-1.7



DEFAULT_ALINEA
final public static String DEFAULT_ALINEA(Code)
Default replacements for method getHTML()



DEFAULT_EOL
final public static String DEFAULT_EOL(Code)



EVENT_TYPE_LOCAL
final public static int EVENT_TYPE_LOCAL(Code)



EVENT_TYPE_REMOTE
final public static int EVENT_TYPE_REMOTE(Code)



FIELD_NUMBER
final public static String FIELD_NUMBER(Code)
Name of the field containing the object number, which uniquely identifies the node.
since:
   MMBase-1.8



FIELD_OBJECT_TYPE
final public static String FIELD_OBJECT_TYPE(Code)
Name of the field containing the object type number. This refers to an entry in the 'typedef' builder table.
since:
   MMBase-1.8



FIELD_OWNER
final public static String FIELD_OWNER(Code)
Name of the field containing the owner. The owner field is used for security implementations.
since:
   MMBase-1.8



GUI_INDICATOR
final public static String GUI_INDICATOR(Code)
Default output when no data is available to determine a node's GUI description



GUI_PARAMETERS
final public static Parameter[] GUI_PARAMETERS(Code)
Parameters for the GUI function
since:
   MMBase-1.7



SYSTEM_OWNER
final public static String SYSTEM_OWNER(Code)
Default (system) owner name for the owner field.
since:
   MMBase-1.8



TEMPNODE_DEFAULT_SIZE
final public static int TEMPNODE_DEFAULT_SIZE(Code)
Default size of the temporary node cache



TMP_FIELD_EXISTS
final public static String TMP_FIELD_EXISTS(Code)



TMP_FIELD_NUMBER
final public static String TMP_FIELD_NUMBER(Code)

since:
   MMBase-1.8



WRAP_PARAMETERS
final protected static Parameter[] WRAP_PARAMETERS(Code)
Parameters constants for the NodeFunction MMObjectBuilder.wrapFunction .
since:
   MMBase-1.8



broadCastChanges
protected boolean broadCastChanges(Code)
Determines whether changes to this builder need be broadcast to other known mmbase servers.



description
public String description(Code)
Description of the builder in the currently selected language Not that the first time the builder is created, this value is what is stored in the TypeDef table.



descriptions
public Hashtable<String, String> descriptions(Code)
Descriptions of the builder per language Can be set with the <descriptions> tag in the xml builder file.



fields
final protected Map<String, CoreField> fields(Code)



genericBlobCache
protected static BlobCache genericBlobCache(Code)
The cache for all blobs.
since:
   1.8.0



getFunctions
protected Function<Collection<? extends Function>> getFunctions(Code)
Every Function Provider provides least the 'getFunctions' function, which returns a Set of all functions which it provides. This is overridden from FunctionProvider, because this one needs to be (also) a NodeFunction
since:
   MMBase-1.8



guiFunction
protected Function<String> guiFunction(Code)
The famous GUI function as a function object.
since:
   MMBase-1.8



infoFunction
protected Function<Object> infoFunction(Code)
The info-function is a node-function and a builder-function. Therefore it is defined as a node-function, but also overidesd getFunctionValue(Parameters).
since:
   MMBase-1.8



internalVersion
protected long internalVersion(Code)
Internal (instance) version number of this builder.



maintainer
String maintainer(Code)
Maintainer information for builder registration Set with <builder maintainer="mmbase.org" version="0"> in the xml builder file



nodeCache
protected static org.mmbase.cache.NodeCache nodeCache(Code)
The cache that contains the X last requested nodes



oType
protected int oType(Code)
The current builder's object type Retrieved from the TypeDef builder.



pluralNames
Hashtable<String, String> pluralNames(Code)
Collections of (GUI) names (plural) for the builder's objects, divided by language



searchAge
public String searchAge(Code)
The default search age for this builder. Used for intializing editor search forms (see HtmlBase) Default value is 31. Can be changed with the <searchage> tag in the xml builder file.



singularNames
Hashtable<String, String> singularNames(Code)
Collections of (GUI) names (singular) for the builder's objects, divided by language



temporaryNodes
public static Map<String, MMObjectNode> temporaryNodes(Code)
Collection for temporary nodes, Used by the Temporarynodemanager when working with transactions The default size is 1024.



virtual
protected boolean virtual(Code)
Determines whether a builder is virtual (data is not stored in the storage layer).



wrapFunction
protected Function<String> wrapFunction(Code)
This function wraps the text of a node's field and returns the result as a String. It takes as parameters a fieldname, the line length to wrap, and the Node containing the data. This function can be called through the function framework.
since:
   MMBase-1.8



xmlPath
String xmlPath(Code)
Full filename (path + buildername + ".xml") where we loaded the builder from It is relative from the '/builders/' subdir




Constructor Detail
MMObjectBuilder
public MMObjectBuilder()(Code)
Constructor.




Method Detail
addEventListener
public void addEventListener(org.mmbase.core.event.EventListener listener)(Code)
simple way to register a NodeEvent listener and a RelationEventListener at the same time.
See Also:   MMBase.addNodeRelatedEventsListener
Parameters:
  listener -
since:
   MMBase-1.8



addField
public void addField(CoreField def)(Code)
Add a field to this builder. This does not affect the builder config file, nor the table used.
Parameters:
  def - the field definiton to add



addLocalObserver
public boolean addLocalObserver(MMBaseObserver obs)(Code)
Adds a local observer to this builder. The observer is notified whenever an object of this builder is changed, added, or removed. always true



addRemoteObserver
public boolean addRemoteObserver(MMBaseObserver obs)(Code)
Adds a remote observer to this builder. The observer is notified whenever an object of this builder is changed, added, or removed. always true



broadcastChanges
public boolean broadcastChanges()(Code)
Determines whether changes to this builder need be broadcast to other known mmbase servers. This setting also governs whether the cache for relation builders is emptied when a relation changes. Actual broadcasting (and cache emptying) is initiated in the storage layer, when changes are commited. By default, all builders broadcast their changes, with the exception of the TypeDef builder. MM: Can somebody please explain _why_ typedef node changes, like e.g. creating a new node type are _not_ broadcast.
since:
   MMBase-1.8



checkAddTmpField
public boolean checkAddTmpField(String field)(Code)
Defines a virtual field to use for temporary nodes. If the given field-name does not start with underscore ('_'), wich it usually does, then the field does also get a 'dbpos' (1000) as if it was actually present in the builder's XML as a virtual field (this is accompanied with a log message). Normally this is used to add 'tmp' fields like _number, _exists and _snumber which are system fields which are normally invisible.
Parameters:
  field - the name of the temporary field true if the field was added, false if it already existed.



clearBlobCache
public int clearBlobCache(int nodeNumber)(Code)

since:
   MMBase-1.8



commit
public boolean commit(MMObjectNode node)(Code)
Commit changes to this node to the storage layer. This method indirectly calls MMObjectBuilder.preCommit . Use only to commit changes - for adding node, use MMObjectBuilder.insert .
Parameters:
  node - The node to be committed true if commit successful



create
public boolean create()(Code)
Creates a new builder table in the storage layer.



createAlias
public boolean createAlias(int number, String alias, String owner)(Code)
Creates an alias for a node, provided the OAlias builder is loaded.
Parameters:
  number - the to-be-aliased node's unique number
Parameters:
  alias - the aliasname to associate with the object
Parameters:
  owner - the owner of the alias
since:
   MMBase-1.8 if the alias could be created



createAlias
public boolean createAlias(int number, String alias)(Code)
Creates an alias for a node, provided the OAlias builder is loaded.
Parameters:
  number - the to-be-aliased node's unique number
Parameters:
  alias - the aliasname to associate with the object if the alias could be created



delete
public void delete()(Code)
Removes the builder from the storage.
since:
   MMBase-1.7



equals
final public boolean equals(Object o)(Code)
Equals must be implemented because of the list of MMObjectBuilder which is used for ancestors Declared the method final, because the instanceof operator is used. This is the only MMObjectBuilder is frequently extended and subclasses will always break the equals contract. When subclasses require to implement the equals method then we should use getClass() == o.getClass(), but this has its own issues. For more info, search for equality in Java
since:
   MMBase-1.6.2



equals
public boolean equals(MMObjectNode o1, MMObjectNode o2)(Code)
Implements equals for nodes (this is in MMObjectBuilder because you cannot override MMObjectNode)
since:
   MMBase-1.6.2



executeFunction
protected Object executeFunction(MMObjectNode node, String function, List arguments)(Code)
Executes a function on the field of a node, and returns the result. This method is called by the builder's MMObjectBuilder.getValue method. Derived builders should override this method to provide additional functions.
since:
   MMBase-1.6
throws:
  IllegalArgumentException - if the argument List does notfit the function
See Also:   MMObjectBuilder.executeFunction



executeFunction
protected Object executeFunction(MMObjectNode node, String function, String field)(Code)
Executes a function on the field of a node, and returns the result. This method is called by the builder's MMObjectBuilder.getValue method. current functions are:
on dates: date, time, timesec, longmonth, month, monthnumber, weekday, shortday, day, yearhort year
on text: wap, html, shorted, uppercase, lowercase
on node: age()
on numbers: wrap_<int>, currency_euro

Parameters:
  node - the node whose fields are queries
Parameters:
  field - the fieldname that is requested the result of the 'function', or null if no valid functions could be determined.MMObjectBuilder.getFunction(MMObjectNode,String)



fieldLocalChanged
public boolean fieldLocalChanged(String number, String builder, String field, String value)(Code)
Called when a local field is changed.
Parameters:
  number - Number of the changed node as a String
Parameters:
  builder - type of the changed node
Parameters:
  field - name of the changed field
Parameters:
  value - value it changed to always true



getAncestors
public List<MMObjectBuilder> getAncestors()(Code)
Gives the list of parent-builders.
since:
   MMBase-1.6.2



getBlobCache
protected BlobCache getBlobCache(String fieldName)(Code)
Returns
since:
   MMBase-1.7.4



getClassName
public String getClassName()(Code)
Returns the classname of this builder



getConfigFile
public File getConfigFile()(Code)
Gets the file that contains the configuration of this builder the builders configuration File object



getConfigResource
public String getConfigResource()(Code)

since:
   MMBase-1.8



getDBState
public int getDBState(String fieldName)(Code)
Return a field's storage state. The returned value is one of the following values declared in Field: STATE_VIRTUAL, STATE_PERSISTENT, STATE_SYSTEM, STATE_UNKNOWN
Parameters:
  fieldName - the requested field's name the field's state.



getDBType
public int getDBType(String fieldName)(Code)
Return a field's storage type. The returned value is one of the following values declared in Field: TYPE_STRING, TYPE_INTEGER, TYPE_BINARY, TYPE_FLOAT, TYPE_DOUBLE, TYPE_LONG, TYPE_NODE, TYPE_UNKNOWN
Parameters:
  fieldName - the requested field's name the field's type.



getDataTypeCollector
public DataTypeCollector getDataTypeCollector()(Code)
Returns the datatype collector belonging to this buidler. A datatype collector contains the datatypes that are local to this builder.
since:
   MMBase-1.8



getDefaultTeaser
public MMObjectNode getDefaultTeaser(MMObjectNode node, MMObjectNode tnode)(Code)
Used to create a default teaser by any builder



getDefaultUrl
public String getDefaultUrl(int src)(Code)
Return the default url of this object. The basic value returned is null.
Parameters:
  src - the number of the node to obtain the url from the basic url as a String, or null if unknown.



getDescendants
public List<MMObjectBuilder> getDescendants()(Code)
Creates list of descendant-builders.
since:
   MMBase-1.6.2



getDescription
public String getDescription()(Code)
Get description of the builder the description text



getDescription
public String getDescription(String lang)(Code)
Gets description of the builder, using the specified language.
Parameters:
  lang - The language requested the descriptions in that language, or null if it is not avaialble



getDescriptions
public Hashtable<String, String> getDescriptions()(Code)
Get descriptions of the builder a Hashtable containing the descriptions



getEmptyNode
public MMObjectNode getEmptyNode(String owner)(Code)
Returns a new empty node object. This is used by Storage to create a non-new node object (isNew is false), which is then be filled with actual values from storage.
since:
   MMBase-1.8.



getField
public FieldDefs getField(String fieldName)(Code)
Return a field's definition
Parameters:
  fieldName - the requested field's name a FieldDefs belonging with the indicated field



getFieldNames
public Set<String> getFieldNames()(Code)
Return a list of field names of this table. a unmodifiable Set with the tables field names



getFields
public Collection<CoreField> getFields()(Code)
Return a copy of the list of field definitions of this table. An unmodifiable Collection with the tables fields



getFields
public List<CoreField> getFields(int sortOrder)(Code)
Gets the field definitions for the editor, sorted according to the specified order, and excluding the fields that have not been assigned a valid position (valid is >= 0). This method makes an explicit sort (it does not use a cached list).
Parameters:
  sortOrder - One of the sortorders defined inorg.mmbase.core.CoreField CoreField The ordered list of field definitions.



getFunction
protected Function getFunction(MMObjectNode node, String functionName)(Code)
Instantiates a Function object for a certain function on a certain node of this type.
Parameters:
  node - The Node for on which the function must work
Parameters:
  functionName - Name of the request function. a Function object or null if no such function.
since:
   MMBase-1.8



getFunctionParameters
protected Vector<String> getFunctionParameters(String fields)(Code)
Parses string containing function parameters. The parameters must be separated by ',' or ';' and may be functions themselves (i.e. a functionname, followed by a parameter list between parenthesis).
Parameters:
  fields - The string, containing function parameters. List of function parameters (may be functions themselves).



getFunctionValue
final Object getFunctionValue(MMObjectNode node, String functionName, List parameters)(Code)
Executes a 'function' on a MMObjectNode. The function is identified by a string, and its arguments are passed by a List. The function 'info' should exist, and this will return a Map with descriptions of the possible functions. Call MMObjectBuilder.addFunction in your extension if you want to add functions.
Parameters:
  node - The node on which the function must be executed
Parameters:
  functionName - The string identifying the funcion
Parameters:
  parameters - The list with function argument or null (which means 'no arguments')
See Also:   MMObjectBuilder.executeFunction
since:
   MMBase-1.6



getFunctions
protected Collection<Function<?>> getFunctions(MMObjectNode node)(Code)
Returns all Functions which are available (or at least known to be available) on a Node.
since:
   MMBase-1.8



getGUIIndicator
public String getGUIIndicator(MMObjectNode node, Parameters pars)(Code)
A complicated default implementation for GUI.
since:
   MMBase-1.8



getGUIIndicator
public String getGUIIndicator(MMObjectNode node)(Code)
What should a GUI display for this node. Default the value returned is GUI_INDICATOR ('no info'). Override this to display your own choice (see Images.java). You may want to override MMObjectBuilder.getNodeGUIIndicator for more flexibility.
Parameters:
  node - The node to display the display of the node as a String



getGUIIndicator
public String getGUIIndicator(String fieldName, MMObjectNode node)(Code)
What should a GUI display for this node/field combo. Default is null (indicating to display the field as is) Override this to display your own choice.
Parameters:
  node - The node to display
Parameters:
  fieldName - the name field of the field to display the display of the node's field as a String, null if not specified



getHTML
protected String getHTML(String body)(Code)
Returns a HTML-version of a string. This replaces a number of tokens with HTML sequences. The default output does not match well with the new xhtml standards (ugly html), nor does it replace all tokens. Default replacements can be overridden by setting the builder properties in your .xml: html.alinea html.endofline Example: <br /> <br /> <br />
Parameters:
  body - text to convert the convert text



getInitParameter
public String getInitParameter(String name)(Code)
Retrieve a specific property.
Parameters:
  name - the name of the property to get the value of the property as a String



getInitParameters
public Map<String, String> getInitParameters()(Code)
Get all builder properties a Map containing the current properties



getInitParameters
public Map getInitParameters(String contextPath)(Code)
Get all builder properties and override properties through application context
Parameters:
  contextPath - path in application context where properties are located a Map containing the current properties
since:
   MMBase 1.8.2



getInternalVersion
public long getInternalVersion()(Code)
Returns the builder's internal version number. This number can be used to sync wrapper classes. I.e. to make sure that a nodemanager's fieldlist is the same as that of the wrapped builder.



getList
public Vector<String> getList(PageInfo sp, StringTagger tagger, StringTokenizer tok)(Code)
Obtains a list of string values by performing the provided command and parameters. This method is SCAN related and may fail if called outside the context of the SCAN servlet.
Parameters:
  sp - The PageInfo (containing http and user info) that calls the function
Parameters:
  tagger - a Hashtable of parameters (name-value pairs) for the command
Parameters:
  tok - a list of strings that describe the (sub)command to execute a Vector containing the result values as a String



getLocaleGUIIndicator
protected String getLocaleGUIIndicator(Locale locale, String field, MMObjectNode node)(Code)
The GUIIndicator can depend on the locale. Override this function
since:
   MMBase-1.6



getLocaleGUIIndicator
protected String getLocaleGUIIndicator(Locale locale, MMObjectNode node)(Code)
The GUIIndicator can depend on the locale. Override this function You may want to override MMObjectBuilder.getNodeGUIIndicator for more flexibility.
since:
   MMBase-1.6



getMachineName
public String getMachineName()(Code)
Get the name of this mmserver from the MMBase Root a String which is the server's name



getMaintainer
public String getMaintainer()(Code)
Retrieves the maintainer of this builder the name of the maintainer



getNewNode
public MMObjectNode getNewNode(String owner)(Code)
Get a new node, using this builder as its parent. The new node is not a part of the cloud yet, and thus has the value -1 as a number. (Call MMObjectBuilder.insert to add the node to the cloud).
Parameters:
  owner - The administrator creating the new node. A newly initialized MMObjectNode.



getNewTmpNode
protected MMObjectNode getNewTmpNode(String owner, String key)(Code)
Create a new temporary node and put it in the temporary _exist node space



getNextField
public FieldDefs getNextField(String currentfield, int sortorder)(Code)
Returns the next field as defined by its sortorder, according to the specified order.



getNextField
public FieldDefs getNextField(String currentfield)(Code)
Returns the next field as defined by its sortorder, according to it's GUIPos property (as set in the builder xml file). Used for moving between fields in an edit-form.



getNode
public MMObjectNode getNode(String key, boolean useCache)(Code)
Retrieves a node based on a unique key. The key is either an entry from the OAlias table or the string-form of an integer value (the number field of an object node). Note that the OAlias builder needs to be active for the alias to be used (otherwise using an alias is concidered invalid).
Parameters:
  key - The value to search for
Parameters:
  useCache - If true, the node is retrieved from the node cache if possible. null if the node does not exist or the key is invalid, or aMMObjectNode containing the contents of the requested node.



getNode
public MMObjectNode getNode(String key)(Code)
Retrieves a node based on a unique key. The key is either an entry from the OAlias table or the string-form of an integer value (the number field of an object node). Retrieves a node from the node cache if possible.
Parameters:
  key - The value to search for null if the node does not exist or the key is invalid, or aMMObjectNode containing the contents of the requested node.



getNode
public MMObjectNode getNode(int number)(Code)
Retrieves a node based on it's number (a unique key), retrieving the node from the node cache if possible.
Parameters:
  number - The number of the node to search for null if the node does not exist or the key is invalid, or aMMObjectNode containign the contents of the requested node.



getNodeFromCache
public MMObjectNode getNodeFromCache(Integer number)(Code)
Retrieves a node from the cache, or null if it doesn't exist.
Parameters:
  number - The number of the node to retrieve. an MMObjectNode or null if the node is not in the cache
since:
   MMBase-1.8



getNodeGUIIndicator
protected String getNodeGUIIndicator(MMObjectNode node, Parameters params)(Code)
Returns a GUI-indicator for the node itself.
since:
   MMBase-1.8.2



getNumber
public int getNumber()(Code)
Returns the builder object number, which also functions as the objecttype. This is the same value as the value of the 'otype' field of objects created by this builder (rather than created by its descendants). the builder number
since:
   MMBase-1.8



getObjectType
public int getObjectType()(Code)
Returns the objecttype (otype). By preference, use MMObjectBuilder.getNumber() for future compatibility with the bridge NodeManager methods. the objecttype



getObjectValue
protected Object getObjectValue(MMObjectNode node, String field)(Code)
Like getValue, but without the 'old' code (short_ html_ etc). This is for protected use, when you are sure this is not used, and you can avoid the overhead.
since:
   MMBase-1.6
See Also:   MMObjectBuilder.getValue



getParentBuilder
public MMObjectBuilder getParentBuilder()(Code)
Returns the builder that this builder extends.
since:
   MMBase-1.6 the extended (parent) builder, or null if not available



getPluralName
public String getPluralName(String lang)(Code)
Gets long name of the builder, using the specified language.
Parameters:
  lang - The language requested the long name in that language, or null if it is not available



getPluralName
public String getPluralName()(Code)
Gets long name of the builder in the current default language. If the current language is not available, the "en" version is returned instead. If that name is not available, the singular name is returned. the long name in either the default language or in "en"



getPluralNames
public Hashtable<String, String> getPluralNames()(Code)
Gets a list of plural names (language - value pairs)



getRelations_main
public Vector<MMObjectNode> getRelations_main(int src)(Code)
Returns all relations of a node. This returns the relation objects, not the objects related to. Note that the relations returned are always of builder type 'InsRel', even if they are really from a derived builser such as AuthRel.
Parameters:
  src - the number of the node to obtain the relations from a Vector with InsRel nodes



getSearchAge
public String getSearchAge()(Code)
Gets search Age the search age as a String



getShort
public String getShort(String str, int len)(Code)
Support routine to return shorter strings. Cuts a string to a amximum length if it exceeds the length specified.
Parameters:
  str - the string to shorten
Parameters:
  len - the maximum length the (possibly shortened) string



getShortedByte
protected byte[] getShortedByte(String fieldName, MMObjectNode node)(Code)
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.
Parameters:
  fieldName - name of the field
Parameters:
  node - an array of byte containing the complete contents of the field.
since:
   MMBase-1.8



getShortedText
protected String getShortedText(String fieldName, MMObjectNode node)(Code)
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.
Parameters:
  fieldName - name of the field
Parameters:
  node - a String containing the complate contents of a field as text.
since:
   MMBase-1.8



getSingularName
public String getSingularName(String lang)(Code)
Gets short name of the builder, using the specified language.
Parameters:
  lang - The language requested the short name in that language, or null if it is not available



getSingularName
public String getSingularName()(Code)
Gets short name of the builder in the current default language. If the current language is not available, the "en" version is returned instead. If that name is not available, the internal builder name (table name) is returned. the short name in either the default language or in "en"



getSingularNames
public Hashtable<String, String> getSingularNames()(Code)
Gets a list of singular names (language - value pairs)



getSmartPath
public String getSmartPath(String documentRoot, String path, String nodeNumber, String version)(Code)
org.mmbase.module.core.SmartPathFunction



getTmpNode
protected static MMObjectNode getTmpNode(String key)(Code)
Get nodes from the temporary node space
Parameters:
  key - The (temporary) key to use under which the node is stored



getURLEncode
protected static String getURLEncode(String body)(Code)
Returns a URLEncoded-version (MIME x-www-form-urlencoded) of a string. This version uses the java.net.URLEncoder class to encode it.
Parameters:
  body - text to convert the URLEncoded text



getValue
public Object getValue(MMObjectNode node, String field)(Code)
Provides additional functionality when obtaining field values. This method is called whenever a Node of the builder's type fails at evaluating a getValue() request (generally when a fieldname is supplied that doesn't exist). It allows the system to add 'functions' to be included with a field name, such as 'html(body)' or 'time(lastmodified)'. This method will parse the fieldname, determining functions and calling the MMObjectBuilder.executeFunction 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 additonal functions, call MMObjectBuilder.addFunction instead. See also the source code for org.mmbase.util.functions.ExampleBuilder .
Parameters:
  node - the node whos efields are queries
Parameters:
  field - the fieldname that is requested the result of the 'function', or null if no valid functions could be determined.



getVersion
public int getVersion()(Code)
Retrieves the version of this builder the version number



getWAP
protected static String getWAP(String body)(Code)
Returns a WAP-version of a string. This replaces a number of tokens with WAP sequences.
Parameters:
  body - text to convert the convert text



getXMLPath
public String getXMLPath()(Code)
Retrieves the subpath of the builder's xml configuration file. Needed for builders that reside in subdirectories in the builder configuration file directory.



hasField
public boolean hasField(String fieldName)(Code)

since:
   MMBase-1.8



hashCode
public int hashCode()(Code)

See Also:   java.lang.Object.hashCode



hashCode
public int hashCode(MMObjectNode o)(Code)
Implements for MMObjectNode
since:
   MMBase-1.6.2



hostname_function
public static String hostname_function(String url)(Code)
hostname, parses the hostname from a url, so http://www.mmbase.org/bug becomed www.mmbase.org



init
public boolean init()(Code)
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. The method retrieves data from the TypeDef builder, or adds data to that builder if the current builder is not yet registered. true if init was completed, false if uncompleted.
See Also:   MMObjectBuilder.create



insert
public int insert(int oType, String owner)(Code)
Insert a new, empty, object of a certain type.
Parameters:
  oType - The type of object to create
Parameters:
  owner - The administrator creating the node An int value which is the new object's unique number, -1 if the insert failed.The basic routine does not create any nodes this way and always fails.



insert
public int insert(String owner, MMObjectNode node)(Code)
Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided). This method indirectly calls MMObjectBuilder.preCommit .
Parameters:
  owner - The administrator creating the node
Parameters:
  node - The object to insert. The object need be of the same type as the current builder. An int value which is the new object's unique number, -1 if the insert failed.



isExtensionOf
public boolean isExtensionOf(MMObjectBuilder o)(Code)
Checks wether this builder is an extension of the argument builder
since:
   MMBase-1.6.2



isNodeCached
public boolean isNodeCached(Integer number)(Code)
Is this node cached at this moment?
Parameters:
  number - The number of the node to check. true if the node is in the cache, false otherwise



isVirtual
public boolean isVirtual()(Code)
Determine whether this builder is virtual. A virtual builder represents nodes that are not stored or retrieved directly from storage, but are created as needed. true if the builder is virtual.



loadInitParameters
public void loadInitParameters()(Code)
Override properties through application context
Parameters:
  contextPath - path in application context where properties are located
since:
   MMBase 1.8.5



newFunctionInstance
protected Function newFunctionInstance(String name, Parameter[] parameters, ReturnType returnType)(Code)

since:
   MMBase-1.8



nodeLocalChanged
public boolean nodeLocalChanged(String machine, String number, String builder, String ctype)(Code)
Called when a local node is changed. Should be called by subclasses if they override it.
Parameters:
  machine - Name of the machine that changed the node.
Parameters:
  number - Number of the changed node as a String
Parameters:
  builder - type of the changed node
Parameters:
  ctype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=new always true



nodeRemoteChanged
public boolean nodeRemoteChanged(String machine, String number, String builder, String ctype)(Code)
Called when a remote node is changed. Should be called by subclasses if they override it.
Parameters:
  machine - Name of the machine that changed the node.
Parameters:
  number - Number of the changed node as a String
Parameters:
  builder - type of the changed node
Parameters:
  ctype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=new always true



notify
public void notify(NodeEvent event)(Code)

See Also:   org.mmbase.core.event.NodeEventListener.notify(org.mmbase.core.event.NodeEvent)
See Also:   here we handle all the backward compatibility stuff.
See Also:   this method covers for both node and relation events.
since:
   MMBase-1.8



notify
public void notify(RelationEvent event)(Code)

since:
   MMBase-1.8



preCommit
public MMObjectNode preCommit(MMObjectNode node)(Code)
This method is called before an actual write to the storage layer is performed.
Parameters:
  node - The node to be committed. the node to be committed (possibly after changes have been made).



process
public boolean process(PageInfo sp, StringTokenizer command, Hashtable cmds, Hashtable vars)(Code)
The hook that passes all form related pages to the correct handler. This method is SCAN related and may fail if called outside the context of the SCAN servlet. The methood is currentkly called by the MMEDIT module, whenever a 'PRC-CMD-BUILDER-...' command is encountered in the list of commands to be processed.
Parameters:
  sp - The PageInfo (containing http and user info) that calls the function
Parameters:
  command - a list of strings that describe the (sub)command to execute (the portion after ' PRC-CMD-BUILDER')
Parameters:
  cmds - the commands (PRC-CMD) that are iurrently being processed, including the current command.
Parameters:
  vars - variables (PRC-VAR) thatw ere set to be used during processing. the result value as a String



putTmpNode
static void putTmpNode(String key, MMObjectNode node)(Code)
Put a Node in the temporary node list
Parameters:
  key - The (temporary) key under which to store the node
Parameters:
  node - The node to store



removeEventListener
public void removeEventListener(org.mmbase.core.event.EventListener listener)(Code)

Parameters:
  listener -
since:
   MMBase-1.8



removeField
public void removeField(String fieldName)(Code)
Remove a field from this builder. This does not affect the builder config file, nor the table used.
Parameters:
  fieldName - the name of the field to remove



removeLocalObserver
public boolean removeLocalObserver(MMBaseObserver obs)(Code)

since:
   MMBase-1.8



removeNode
public void removeNode(MMObjectNode node)(Code)
Remove a node from the cloud.
Parameters:
  node - The node to remove.



removeRelations
public void removeRelations(MMObjectNode node)(Code)
Remove the relations of a node.
Parameters:
  node - The node whose relations to remove.



removeRemoteObserver
public boolean removeRemoteObserver(MMBaseObserver obs)(Code)

since:
   MMBase-1.8



removeSyncNodes
protected void removeSyncNodes(MMObjectNode node)(Code)
Removes the syncnodes to this node. This is logical, but also needed to maintain storage integrety.
since:
   MMBase-1.7



removeTmpNode
static void removeTmpNode(String key)(Code)
Remove a node from the temporary node space
Parameters:
  key - The (temporary) key under which the node is stored



replace
public String replace(PageInfo sp, StringTokenizer tok)(Code)
Obtains a string value by performing the provided command. The command can be called:
  • by SCAN : $MOD-MMBASE-BUILDER-[buildername]-[command]
  • in jsp : cloud.getNodeManager(buildername).getInfo(command);
  • This method is SCAN related and some commands may fail if called outside the context of the SCAN servlet.
    Parameters:
      sp - The PageInfo (containing http and user info) that calls the function
    Parameters:
      tok - a list of strings that describe the (sub)command to execute the result value as a String



safeCache
public MMObjectNode safeCache(Integer n, MMObjectNode node)(Code)
Stores a node in the cache provided the cache is not write locked. a valid node. If the node already was in the cache, the cached node is returned.In that case the node given as parameter should become invalid



safeCommit
boolean safeCommit(MMObjectNode node)(Code)
Locks the node cache during the commit of a node. This prevents the cache from gaining an invalid state during the commit. Basicly the goals is to ensure that nothing is put into the cache during a commit of a node, because that may be the wrong node then.



safeInsert
int safeInsert(MMObjectNode node, String userName)(Code)
Locks the node cache during the insert of a node. This prevents the cache from adding the node, which means that the next time the node is read it is 'refreshed' from the storage



sendFieldChangeSignal
public boolean sendFieldChangeSignal(MMObjectNode node, String fieldName)(Code)
Send a signal to other servers that a field was changed.
Parameters:
  node - the node the field was changed in
Parameters:
  fieldName - the name of the field that was changed always true



setDefaults
public void setDefaults(MMObjectNode node)(Code)
Sets defaults for a node. Fields "number", "owner" and "otype" are not set by this method.
Parameters:
  node - The node to set the defaults of.



setDescription
public void setDescription(String e)(Code)
Set description of the builder
Parameters:
  e - the description text



setDescriptions
public void setDescriptions(Hashtable<String, String> e)(Code)
Set descriptions of the builder
Parameters:
  e - a Hashtable containing the descriptions



setFields
public void setFields(List<CoreField> f)(Code)
Stores fields information of this table. Asside from the fields supplied by the caller, a field 'otype' is added (if missing).
Parameters:
  f - A List with fields (as CoreField objects) as defined by MMBase. This may not be in sync with the actual database table, about which Storage will report then.



setInitParameter
public void setInitParameter(String name, String value)(Code)
Set a single builder property The propertie will not be saved.
Parameters:
  name - name of the property
Parameters:
  value - value of the property



setInitParameters
void setInitParameters(Hashtable<String, String> properties)(Code)
Set all builder properties Changed properties will not be saved.
Parameters:
  properties - the properties to set



setMaintainer
public void setMaintainer(String m)(Code)
Sets the maintainer of this builder
Parameters:
  m - the name of the maintainer



setParentBuilder
public void setParentBuilder(MMObjectBuilder parent)(Code)
Sets the builder that this builder extends, and registers it in the storage layer.
Parameters:
  parent - the extended (parent) builder, or null if not available
since:
   MMBase-1.6



setPluralNames
public void setPluralNames(Hashtable<String, String> names)(Code)
Sets a list of plural names (language - value pairs)



setSearchAge
public void setSearchAge(String age)(Code)
Sets search Age.
Parameters:
  age - the search age as a String



setSingularNames
public void setSingularNames(Hashtable<String, String> names)(Code)
Sets a list of singular names (language - value pairs)



setUniqueValue
protected String setUniqueValue(MMObjectNode node, String field, String baseValue)(Code)
In setDefault you could want to generate unique values for fields (if the field is 'unique').
since:
   MMBase-1.7



setUniqueValue
protected int setUniqueValue(MMObjectNode node, String field, int offset)(Code)
In setDefault you could want to generate unique values for fields (if the field is 'unique').
since:
   MMBase-1.7



setValue
public boolean setValue(MMObjectNode node, String fieldName, Object originalValue)(Code)
Sets a key/value pair in the main values of this node. Note that if this node is a node in cache, the changes are immediately visible to everyone, even if the changes are not committed. The fieldname is added to the (public) 'changed' vector to track changes.
Parameters:
  fieldName - the name of the field to change
Parameters:
  node - The node on which to change the field (the new value is in this node)
Parameters:
  originalValue - 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.



setValue
public boolean setValue(MMObjectNode node, String fieldName)(Code)
Provides additional functionality when setting field values. This method is called whenever a Node of the builder's type tries to change a value. It allows the system to add functionality such as checking valid data. Derived builders should override this method if they want to add functionality.
Parameters:
  node - the node whose fields are changed
Parameters:
  fieldName - the fieldname that is changed true if the call was handled.



setVersion
public void setVersion(int i)(Code)
Sets the version of this builder
Parameters:
  i - the version number



setXMLPath
public void setXMLPath(String m)(Code)
Sets the subpath of the builder's xml configuration file.



testValidData
public void testValidData(MMObjectNode node) throws InvalidDataException(Code)
Tests whether the data in a node is valid (throws an exception if this is not the case).
Parameters:
  node - The node whose data to check
throws:
  org.mmbase.module.core.InvalidDataException - If the data was unrecoverably invalid (the references did not point to existing objects)



toString
public String toString()(Code)
Implmenting a sensible toString is usefull for debugging.
since:
   MMBase-1.6.2



toString
public String toString(MMObjectNode n)(Code)
Implements for MMObjectNode
since:
   MMBase-1.6.2



update
protected void update()(Code)
Updates the internal version number of this buidler;



updateFields
protected void updateFields()(Code)
Clears all field list caches, and recalculates the field list.



wrap
public static String wrap(String text, int width)(Code)
Wraps a string. Inserts newlines (\n) into a string at periodic intervals, to simulate wrapping. This also removes whitespace to the start of a line.
Parameters:
  text - the text to wrap
Parameters:
  width - the maximum width to wrap at the wrapped tekst



Fields inherited from org.mmbase.module.core.MMTable
protected int maxNodesFromQuery(Code)(Java Doc)
protected MMBase mmb(Code)(Java Doc)
protected StorageConnector storageConnector(Code)(Java Doc)
protected String tableName(Code)(Java Doc)

Methods inherited from org.mmbase.module.core.MMTable
public int count(String where)(Code)(Java Doc)
public int count(NodeSearchQuery query) throws SearchQueryException(Code)(Java Doc)
public boolean created()(Code)(Java Doc)
public String getFullTableName()(Code)(Java Doc)
public MMBase getMMBase()(Code)(Java Doc)
public MMObjectNode getNode(int number, boolean useCache)(Code)(Java Doc)
public int getNodeType(int number)(Code)(Java Doc)
protected List<MMObjectNode> getNodes(Collection<MMObjectNode> virtuals)(Code)(Java Doc)
public List<MMObjectNode> getNodes(NodeSearchQuery query) throws SearchQueryException(Code)(Java Doc)
public List<MMObjectNode> getNodes()(Code)(Java Doc)
public StorageConnector getStorageConnector()(Code)(Java Doc)
public String getTableName()(Code)(Java Doc)
public Enumeration<MMObjectNode> search(String where)(Code)(Java Doc)
public Vector<MMObjectNode> searchVector(String where)(Code)(Java Doc)
public void setMMBase(MMBase m)(Code)(Java Doc)
public void setTableName(String tableName)(Code)(Java Doc)
public int size()(Code)(Java Doc)

Fields inherited from org.mmbase.util.functions.FunctionProvider
protected Map<String, Function<?>> functions(Code)(Java Doc)
protected Function<Collection<Function<?>>> getFunctions(Code)(Java Doc)

Methods inherited from org.mmbase.util.functions.FunctionProvider
public Function addFunction(Function function)(Code)(Java Doc)
public Parameters createParameters(String functionName)(Code)(Java Doc)
public Function getFunction(String functionName)(Code)(Java Doc)
public Object getFunctionValue(String functionName, List parameters)(Code)(Java Doc)
public Collection<Function<?>> getFunctions()(Code)(Java Doc)
protected Function newFunctionInstance(String name, Parameter[] parameters, ReturnType returnType)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.