Java Doc for MMBase.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) 


org.mmbase.module.ProcessorModule
   org.mmbase.module.core.MMBase

MMBase
public class MMBase extends ProcessorModule (Code)
The module which provides access to the MMBase storage defined by the provided name/setup. It holds the overal object cloud made up of builders, objects and relations and all the needed tools to use them.
author:
   Daniel Ockeloen
author:
   Pierre van Rooden
author:
   Johannes Verelst
author:
   Ernst Bunders
version:
   $Id: MMBase.java,v 1.236 2008/03/11 16:48:02 michiel Exp $


Field Summary
public  StringbaseName
     Base name for the storage to be accessed using this instance of MMBase.
final public static  intstartTime
     Time in seconds, when mmbase was started.

Constructor Summary
public  MMBase(String name)
     Constructor to create the MMBase root module.

Method Summary
public  MMObjectBuilderaddBuilder(String name, MMObjectBuilder bul)
    
public  voidaddNodeRelatedEventsListener(String builder, org.mmbase.core.event.EventListener listener)
     This is a conveniance method to help you register listeners to node and relation events.
protected  voidassertUp()
     Locks until init of mmbase is finished.
 booleancheckMMBase()
     Checks whether the storage to be used exists.
protected  voidconfigureOSCache()
     This method tries to configure the persistence directory of OSCache, if possible (OSCache is available, and necessary (no 'cache.path' property is configured for OSCache).
 booleancreateMMBase()
     Create a new MMBase persistent storage instance.
public  StringgetAuthType()
    
public  StringgetBaseName()
    
public  MMObjectBuildergetBuilder(String name)
     Retrieves a specified builder. If the builder is not loaded, but the system is in the 'startup' state (i.e.
public  MMObjectBuildergetBuilderForNode(int number)
    
public  ResourceLoadergetBuilderLoader()
    
public  StringgetBuilderNameForNode(int number)
    
public  StringgetBuilderPath(String builderName, String path)
     Locate one specific builder within a given path, relative to the main builder config path, including sub-paths. Return the actual path.
Parameters:
  builderName - name of the builder to find
Parameters:
  path - the path to start searching.
public  BuilderReadergetBuilderReader(String builderName)
    
public  Collection<MMObjectBuilder>getBuilders()
     Retrieves a Collection of loaded builders.
public  ClusterBuildergetClusterBuilder()
     Returns a reference to the cluster builder, a virtual builder used to perform multilevel searches.
public  StringgetEncoding()
     Retrieves the encoding.
public  StringgetHost()
     Retrieves the host name or ip number This value is set using the configuration file.
public  InsRelgetInsRel()
     Returns a reference to the InsRel builder.
public  StringgetLanguage()
     Retrieves the current language.
public  LocalegetLocale()
     Retrieves the current locale.
public static  MMBasegetMMBase()
     Retrieves the MMBase module('mmbaseroot').
public  MMBaseCopgetMMBaseCop()
     Retrieves the loaded security manager(MMBaseCop).
public  MMObjectBuildergetMMObject(String name)
     Retrieves a specified builder.
public  StringgetMachineName()
     Retrieves the machine name.
public  OAliasgetOAlias()
     Returns a reference to the OAlias builder.
public  RelDefgetRelDef()
     Returns a reference to the RelDef builder.
public  MMObjectBuildergetRootBuilder()
     Returns a reference to the Object builder.
public  intgetRootType()
     Returns the otype of the Object builder, or -1 if it is not known.
public  SearchQueryHandlergetSearchQueryHandler()
     Returns a SearchQueryHandler to access the storage..
public  booleangetState()
     Retrieves whether this mmbase module is running.
public  StorageManagergetStorageManager()
     Returns a StorageManager to access the storage..
public  StorageManagerFactorygetStorageManagerFactory()
     Returns StorageManagerFactory class used to access the storage configuration.
public  TimeZonegetTimeZone()
     Retrieves the timezone asociated with this MMBase's 'DateTime' objects.
public  TypeDefgetTypeDef()
     Returns a reference to the TypeDef builder.
public  TypeRelgetTypeRel()
     Returns a reference to the TypeRel builder.
public  booleaninDevelopment()
     Returns true when MMBase is in development mode.
public  voidinit()
     Initalizes the MMBase module.
public  voidinitBuilder(MMObjectBuilder builder)
    
 booleaninitBuilders()
    
protected  voidinitializeStorage()
     Loads either the storage manager factory or the appropriate support class using the configuration parameters.
public  booleanisShutdown()
    
synchronized  MMObjectBuilderloadBuilder(String builderName)
     Locate one specific builder withing the main builder config path, including sub-paths. If the builder already exists, the existing object is returned instead. If the builder cannot be found in this path, a BuilderConfigurationException is thrown.
since:
   MMBase-1.6
Parameters:
  builderName - name of the builder to initialize the initialized builder object, or null if the builder could not be created (i.e.
 MMObjectBuilderloadBuilder(String builderName, String ipath)
     Locate one specific builder within a given path, relative to the main builder config path, including sub-paths. If the builder already exists, the existing object is returned instead.
Parameters:
  builderName - name of the builder to initialize
Parameters:
  ipath - the path to start searching.
public  MMObjectBuilderloadBuilderFromXML(String builderName, String ipath)
     Create a new builder object using a xml configfile located in a given path relative to the main builder config path, and return the builder object. If the builder already exists, the existing object is returned instead. Note that the builder's init() method is NOT called (since some builders need other builders in memory when their init() is called, this method is called seperately after all builders are loaded).
Parameters:
  builderName - name of the builder to initialize
Parameters:
  ipath - the path to start searching.
public  voidmaintainance()
     Performs periodic maintenance.
public  voidremoveNodeRelatedEventsListener(String builder, org.mmbase.core.event.EventListener listener)
    
public  voidshutdown()
    
public  voidunloadBuilder(MMObjectBuilder builder)
     Unloads a builders from MMBase.

Field Detail
baseName
public String baseName(Code)
Base name for the storage to be accessed using this instance of MMBase. Retrieved from the mmbaseroot module configuration. If not specified the default is "def1". Should be made private and accessed instead using getBaseName()



startTime
final public static int startTime(Code)
Time in seconds, when mmbase was started.
since:
   MMBase-1.7




Constructor Detail
MMBase
public MMBase(String name)(Code)
Constructor to create the MMBase root module.




Method Detail
addBuilder
public MMObjectBuilder addBuilder(String name, MMObjectBuilder bul)(Code)

since:
   MMBase-1.8



addNodeRelatedEventsListener
public void addNodeRelatedEventsListener(String builder, org.mmbase.core.event.EventListener listener)(Code)
This is a conveniance method to help you register listeners to node and relation events. Becouse they are now separate listeners the method accepts an object that may have implemented either NodeEvent or RelationEvent. This method checks and registers accordingly.
the purpose of this method is that a straight node or relation event listeren will listen to any node or relation event. This method will wrap your event listener to make shure only the requested event types are forwarded.
See Also:   TypedRelationEventListenerWrapper
See Also:   TypedNodeEventListenerWrapper
See Also:   NodeEventListener
See Also:   RelationEventListener
Parameters:
  builder - should be a valid builder name, the type for which you want toreceive events
Parameters:
  listener - some object implementing NodeEventListener, RelationEventListener,or both
since:
   MMBase-1.8



assertUp
protected void assertUp()(Code)
Locks until init of mmbase is finished.
since:
   MMBase-1.7



checkMMBase
boolean checkMMBase()(Code)
Checks whether the storage to be used exists. The system determines whether the object table exists for the baseName provided in the configuration file. true if the storage exists and is accessible, false otherwise.



configureOSCache
protected void configureOSCache()(Code)
This method tries to configure the persistence directory of OSCache, if possible (OSCache is available, and necessary (no 'cache.path' property is configured for OSCache). Then, a directory named 'oscache' in the mmbase data directory is used to set the 'cache.path' property of the ServletCacheAdminidstrator class of OSCache.
since:
   MMBase-1.9



createMMBase
boolean createMMBase()(Code)
Create a new MMBase persistent storage instance. The storage instance created is based on the baseName provided in the configuration file. This call automatically creates an object table. The fields in the table are either specified in an object builder xml, or from a default setup existing of a number field and a owner field. Note: If specified, the object builder is instantiated and its table created, but the builder is not registered in the TypeDef builder, as this builder does not exist yet. Registration happens when the other builders are registered. true if the storage was succesfully created, otherwise a runtime exception is thrown(shouldn't it return false instead?)



getAuthType
public String getAuthType()(Code)



getBaseName
public String getBaseName()(Code)
Retrieves the storage base name the base name as a String



getBuilder
public MMObjectBuilder getBuilder(String name) throws CircularReferenceException(Code)
Retrieves a specified builder. If the builder is not loaded, but the system is in the 'startup' state (i.e. it is in the process of loading builders), an attempt is made to directly load the builder. This allows for dependencies between builders to exist (i.e. inheritance). When circular reference occurs between two loading buidlers, an exception is thrown.
since:
   MMBase-1.6
Parameters:
  name - The name of the builder to retrieve a MMObjectBuilder for the specified builder
throws:
  CircularReferenceException - when circular reference is detected
throws:
  BuilderConfigurationException - if the builder config file does not exist



getBuilderForNode
public MMObjectBuilder getBuilderForNode(int number)(Code)



getBuilderLoader
public ResourceLoader getBuilderLoader()(Code)
The (base)path to the builder configuration files
since:
   MMBase-1.8



getBuilderNameForNode
public String getBuilderNameForNode(int number)(Code)



getBuilderPath
public String getBuilderPath(String builderName, String path)(Code)
Locate one specific builder within a given path, relative to the main builder config path, including sub-paths. Return the actual path.
Parameters:
  builderName - name of the builder to find
Parameters:
  path - the path to start searching. The path need be closed with a '/ character the file path to the builder xml, or null if the builder could not be created (i.e. is inactive).
throws:
  BuilderConfigurationException - if the builder config file does not exist



getBuilderReader
public BuilderReader getBuilderReader(String builderName)(Code)

since:
   MMBase-1.8



getBuilders
public Collection<MMObjectBuilder> getBuilders()(Code)
Retrieves a Collection of loaded builders.



getClusterBuilder
public ClusterBuilder getClusterBuilder()(Code)
Returns a reference to the cluster builder, a virtual builder used to perform multilevel searches. The cluster builder.
See Also:   ClusterBuilder



getEncoding
public String getEncoding()(Code)
Retrieves the encoding. This value is set using the configuration file. Examples are 'UTF-8' (default) or 'ISO-8859-1'. the coding as a String
since:
   MMBase-1.6



getHost
public String getHost()(Code)
Retrieves the host name or ip number This value is set using the configuration file. the host name as a String



getInsRel
public InsRel getInsRel()(Code)
Returns a reference to the InsRel builder. the InsRel builder if defined, null otherwise



getLanguage
public String getLanguage()(Code)
Retrieves the current language. This value is set using the configuration file. Examples are 'en' or 'nl'. the language as a String



getLocale
public Locale getLocale()(Code)
Retrieves the current locale.
since:
   MMBase-1.8



getMMBase
public static MMBase getMMBase()(Code)
Retrieves the MMBase module('mmbaseroot'). the active MMBase module



getMMBaseCop
public MMBaseCop getMMBaseCop()(Code)
Retrieves the loaded security manager(MMBaseCop). the loaded security manager(MMBaseCop)



getMMObject
public MMObjectBuilder getMMObject(String name)(Code)
Retrieves a specified builder.
Parameters:
  name - The name of the builder to retrieve a MMObjectBuilder if found, null otherwise



getMachineName
public String getMachineName()(Code)
Retrieves the machine name. This value is set using the configuration file. the machine name as a String



getOAlias
public OAlias getOAlias()(Code)
Returns a reference to the OAlias builder. the OAlias builder if defined, null otherwise



getRelDef
public RelDef getRelDef()(Code)
Returns a reference to the RelDef builder. the RelDef builder if defined, null otherwise



getRootBuilder
public MMObjectBuilder getRootBuilder()(Code)
Returns a reference to the Object builder. The Object builder is the builder from which all other builders eventually extend. the Object builder.
since:
   MMBase-1.6



getRootType
public int getRootType()(Code)
Returns the otype of the Object builder, or -1 if it is not known. The Object builder is the builder from which all other builders eventually extend.
since:
   MMBase-1.6



getSearchQueryHandler
public SearchQueryHandler getSearchQueryHandler() throws StorageException(Code)
Returns a SearchQueryHandler to access the storage.. Equal to getStorageManagerFactory().getSearchQueryHandler().
since:
   MMBase-1.8 a StorageManager class
throws:
  StorageException - if no storage manager could be instantiated



getState
public boolean getState()(Code)
Retrieves whether this mmbase module is running. true if the module has been initialized and all builders loaded, false otherwise.



getStorageManager
public StorageManager getStorageManager() throws StorageException(Code)
Returns a StorageManager to access the storage.. Equal to getStorageManagerFactory().getStorageManager().
since:
   MMBase-1.7 a StorageManager class
throws:
  StorageException - if no storage manager could be instantiated



getStorageManagerFactory
public StorageManagerFactory getStorageManagerFactory()(Code)
Returns StorageManagerFactory class used to access the storage configuration.
since:
   MMBase-1.7 a StorageManagerFactory class, or null if not configured



getTimeZone
public TimeZone getTimeZone()(Code)
Retrieves the timezone asociated with this MMBase's 'DateTime' objects. MMBase stores dates in storage as 'Date' but without time-zone information, and therefore to a certain degree open to interpretation. Together with this timezone the times can be defined absoletely (that is, of course, relative to the time frame of out planet). (
since:
   MMBase-1.8



getTypeDef
public TypeDef getTypeDef()(Code)
Returns a reference to the TypeDef builder. the TypeDef builder if defined, null otherwise



getTypeRel
public TypeRel getTypeRel()(Code)
Returns a reference to the TypeRel builder. the TypeRel builder if defined, null otherwise



inDevelopment
public boolean inDevelopment()(Code)
Returns true when MMBase is in development mode. This can be used to determine behavior with regards to common errors, such as whether or not to throw an exception when a non-existing field in a buidler is referenced. The value for this property ('true' or 'false') can be set in the "development" property in the mmbaseroot.xml configuration file. The default value is false.
since:
   MMBase-1.8.1



init
public void init()(Code)
Initalizes the MMBase module. Evaluates the parameters loaded from the configuration file. Sets parameters (authorisation, language), loads the builders, and starts MultiCasting.



initBuilder
public void initBuilder(MMObjectBuilder builder)(Code)
inits a builder
Parameters:
  builder - The builder which has to be initialized



initBuilders
boolean initBuilders()(Code)
Initializes the builders, using the builder xml files in the config directory Always true



initializeStorage
protected void initializeStorage()(Code)
Loads either the storage manager factory or the appropriate support class using the configuration parameters.
since:
   MMBase-1.7



isShutdown
public boolean isShutdown()(Code)

since:
   MMBase-1.7



loadBuilder
synchronized MMObjectBuilder loadBuilder(String builderName)(Code)
Locate one specific builder withing the main builder config path, including sub-paths. If the builder already exists, the existing object is returned instead. If the builder cannot be found in this path, a BuilderConfigurationException is thrown.
since:
   MMBase-1.6
Parameters:
  builderName - name of the builder to initialize the initialized builder object, or null if the builder could not be created (i.e. is inactive).
throws:
  BuilderConfigurationException - if the builder config file does not exist



loadBuilder
MMObjectBuilder loadBuilder(String builderName, String ipath)(Code)
Locate one specific builder within a given path, relative to the main builder config path, including sub-paths. If the builder already exists, the existing object is returned instead.
Parameters:
  builderName - name of the builder to initialize
Parameters:
  ipath - the path to start searching. The path need be closed with a File.seperator character. the initialized builder object, or null if the builder could not be created (i.e. is inactive).
throws:
  BuilderConfigurationException - if the builder config file does not exist



loadBuilderFromXML
public MMObjectBuilder loadBuilderFromXML(String builderName, String ipath)(Code)
Create a new builder object using a xml configfile located in a given path relative to the main builder config path, and return the builder object. If the builder already exists, the existing object is returned instead. Note that the builder's init() method is NOT called (since some builders need other builders in memory when their init() is called, this method is called seperately after all builders are loaded).
Parameters:
  builderName - name of the builder to initialize
Parameters:
  ipath - the path to start searching. The path need be closed with a '/' character. the loaded builder object.



maintainance
public void maintainance()(Code)
Performs periodic maintenance.



removeNodeRelatedEventsListener
public void removeNodeRelatedEventsListener(String builder, org.mmbase.core.event.EventListener listener)(Code)

See Also:   MMBase.addNodeRelatedEventsListener
Parameters:
  builder -
Parameters:
  listener -
since:
   MMBase-1.8



shutdown
public void shutdown()(Code)



unloadBuilder
public void unloadBuilder(MMObjectBuilder builder)(Code)
Unloads a builders from MMBase. After this, the builder is gone
Parameters:
  builder - the builder which has to be unloaded



Fields inherited from org.mmbase.module.ProcessorModule
final protected static Parameter[] PARAMS_PAGEINFO(Code)(Java Doc)
final protected static Parameter.Wrapper PARAM_PAGEINFO(Code)(Java Doc)

Methods inherited from org.mmbase.module.ProcessorModule
public boolean cacheCheck(PageInfo sp, String cmd)(Code)(Java Doc)
public Vector<String> getList(PageInfo sp, StringTagger params, String command)(Code)(Java Doc)
public MMObjectBuilder getListBuilder(String command, Map<String, Object> params)(Code)(Java Doc)
public Vector<MMObjectNode> getNodeList(Object context, String command, Map<String, Object> params)(Code)(Java Doc)
public void init()(Code)(Java Doc)
public void onload()(Code)(Java Doc)
public boolean process(PageInfo sp, Hashtable<String, Object> cmds, Hashtable<String, Object> vars)(Code)(Java Doc)
public void reload()(Code)(Java Doc)
public String replace(PageInfo sp, String command)(Code)(Java Doc)
public String replace(PageInfo sp, StringTagger command)(Code)(Java Doc)
public void unload()(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.