|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.util.functions.DescribedFunctionProvider
org.mmbase.module.Module
org.mmbase.module.ProcessorModule
org.mmbase.module.core.MMBase
public class MMBase
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.mmbase.module.ProcessorModule |
|---|
ProcessorModule.GetNodeListFunction, ProcessorModule.ProcessFunction, ProcessorModule.ReplaceFunction |
| Field Summary | |
|---|---|
String |
baseName
Base name for the storage to be accessed using this instance of MMBase. |
static int |
startTime
Time in seconds, when mmbase was started. |
| Fields inherited from class org.mmbase.module.ProcessorModule |
|---|
PARAM_PAGEINFO, PARAMS_PAGEINFO |
| Fields inherited from class org.mmbase.module.Module |
|---|
configurationPath, getMaintainerFunction, getVersionFunction, properties, STATE_START_TIME |
| Fields inherited from class org.mmbase.util.functions.DescribedFunctionProvider |
|---|
description, guiName, name |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
functions, getFunctions |
| Constructor Summary | |
|---|---|
MMBase(String name)
Constructor to create the MMBase root module. |
|
| Method Summary | |
|---|---|
MMObjectBuilder |
addBuilder(String name,
MMObjectBuilder bul)
|
void |
addNodeRelatedEventsListener(String builder,
EventListener listener)
This is a conveniance method to help you register listeners to node and relation events. |
protected void |
assertUp()
Locks until initialization of mmbase is finished. |
(package private) boolean |
checkMMBase()
Checks whether the storage to be used exists. |
protected void |
configureOSCache()
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). |
(package private) boolean |
createMMBase()
Create a new MMBase persistent storage instance. |
String |
getAuthType()
|
String |
getBaseName()
Retrieves the storage base name |
MMObjectBuilder |
getBuilder(String name)
Retrieves a specified builder. |
MMObjectBuilder |
getBuilderForNode(int number)
|
ResourceLoader |
getBuilderLoader()
The (base)path to the builder configuration files |
String |
getBuilderNameForNode(int number)
|
String |
getBuilderPath(String builderName,
String path)
Locate one specific builder within a given path, relative to the main builder config path, including sub-paths. |
BuilderReader |
getBuilderReader(String builderName)
|
Collection<MMObjectBuilder> |
getBuilders()
Retrieves a Collection of loaded builders. |
ClusterBuilder |
getClusterBuilder()
Returns a reference to the cluster builder, a virtual builder used to perform multilevel searches. |
File |
getDataDir()
A setting 'datadir' can be specified in mmbaseroot.xml (and hence in your context xml). |
DataSource |
getDataSource()
Returns the datasource as was configured with mmbaseroot.xml properties. |
String |
getEncoding()
Retrieves the encoding. |
String |
getHost()
Retrieves the host name or ip number This value is set using the configuration file. |
InsRel |
getInsRel()
Returns a reference to the InsRel builder. |
String |
getLanguage()
Retrieves the current language. |
Locale |
getLocale()
Retrieves the current locale. |
String |
getMachineName()
Retrieves the machine name. |
static MMBase |
getMMBase()
Retrieves the MMBase module('mmbaseroot'). |
MMBaseCop |
getMMBaseCop()
Retrieves the loaded security manager(MMBaseCop). |
MMObjectBuilder |
getMMObject(String name)
Retrieves a specified builder. |
OAlias |
getOAlias()
Returns a reference to the OAlias builder. |
RelDef |
getRelDef()
Returns a reference to the RelDef builder. |
MMObjectBuilder |
getRootBuilder()
Returns a reference to the Object builder. |
int |
getRootType()
Returns the otype of the Object builder, or -1 if it is not known. |
CoreSearchQueryHandler |
getSearchQueryHandler()
Returns a SearchQueryHandler to access the storage.. |
boolean |
getState()
Retrieves whether this mmbase module is running. |
StorageManager<?> |
getStorageManager()
Returns a StorageManager to access the storage.. |
StorageManagerFactory<? extends StorageManager> |
getStorageManagerFactory()
Returns StorageManagerFactory class used to access the storage configuration. |
TimeZone |
getTimeZone()
Retrieves the timezone asociated with this MMBase's 'DateTime' objects. |
TypeDef |
getTypeDef()
Returns a reference to the TypeDef builder. |
TypeRel |
getTypeRel()
Returns a reference to the TypeRel builder. |
boolean |
inDevelopment()
Returns true when MMBase is in development mode. |
void |
init()
Initializes the MMBase module. |
void |
initBuilder(MMObjectBuilder builder)
inits a builder |
(package private) boolean |
initBuilders()
Initializes the builders, using the builder xml files in the config directory |
protected void |
initializeStorage()
Loads either the storage manager factory or the appropriate support class using the configuration parameters. |
boolean |
isShutdown()
|
(package private) MMObjectBuilder |
loadBuilder(String builderName)
Locate one specific builder withing the main builder config path, including sub-paths. |
(package private) MMObjectBuilder |
loadBuilder(String builderName,
String ipath)
Locate one specific builder within a given path, relative to the main builder config path, including sub-paths. |
MMObjectBuilder |
loadBuilderFromXML(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. |
void |
removeNodeRelatedEventsListener(String builder,
EventListener listener)
|
boolean |
runStartupChecks()
Whether to perform sanity checks during startup. |
protected void |
setMMEntities(boolean logEnts)
|
void |
shutdown()
|
void |
unloadBuilder(MMObjectBuilder builder)
Unloads a builders from MMBase. |
| Methods inherited from class org.mmbase.module.ProcessorModule |
|---|
getList, getListBuilder, getNodeList, onload, process, reload, replace, replace, unload |
| Methods inherited from class org.mmbase.module.Module |
|---|
addInitParameters, checkModules, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getStates, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, setInitParameter, setMaintainer, setState, setVersion, shutdownModules, startModule, startModules |
| Methods inherited from class org.mmbase.util.functions.DescribedFunctionProvider |
|---|
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setName |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int startTime
public String baseName
| Constructor Detail |
|---|
public MMBase(String name)
| Method Detail |
|---|
protected void configureOSCache()
protected void setMMEntities(boolean logEnts)
public void init()
init in class ProcessorModulepublic void shutdown()
shutdown in class ModuleModule.shutdown()public boolean isShutdown()
public boolean inDevelopment()
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.
boolean checkMMBase()
true if the storage exists and is accessible, false otherwise.boolean createMMBase()
true if the storage was succesfully created, otherwise a runtime exception is thrown
(shouldn't it return false instead?)
public MMObjectBuilder getBuilder(String name)
throws CircularReferenceException
name - The name of the builder to retrieve
MMObjectBuilder for the specified builder
CircularReferenceException - when circular reference is detected
BuilderConfigurationException - if the builder config file does not existpublic String getBuilderNameForNode(int number)
public MMObjectBuilder getBuilderForNode(int number)
public MMObjectBuilder addBuilder(String name,
MMObjectBuilder bul)
public MMObjectBuilder getMMObject(String name)
name - The name of the builder to retrieve
MMObjectBuilder if found, null otherwisepublic static MMBase getMMBase()
public MMBaseCop getMMBaseCop()
public Collection<MMObjectBuilder> getBuilders()
public InsRel getInsRel()
InsRel builder if defined, null otherwisepublic RelDef getRelDef()
RelDef builder if defined, null otherwisepublic TypeDef getTypeDef()
TypeDef builder if defined, null otherwisepublic TypeRel getTypeRel()
TypeRel builder if defined, null otherwisepublic OAlias getOAlias()
OAlias builder if defined, null otherwisepublic MMObjectBuilder getRootBuilder()
Object builder.public int getRootType()
public ClusterBuilder getClusterBuilder()
ClusterBuilderprotected void assertUp()
public String getBaseName()
Stringpublic final String getMachineName()
String. Or null if not yet determined.public String getHost()
Stringboolean initBuilders()
truepublic void initBuilder(MMObjectBuilder builder)
builder - The builder which has to be initializedpublic void unloadBuilder(MMObjectBuilder builder)
builder - the builder which has to be unloadedpublic ResourceLoader getBuilderLoader()
public BuilderReader getBuilderReader(String builderName)
MMObjectBuilder loadBuilder(String builderName)
builderName - name of the builder to initialize
BuilderConfigurationException - if the builder config file does not exist
public String getBuilderPath(String builderName,
String path)
builderName - name of the builder to findpath - the path to start searching. The path need be closed with a '/ character
BuilderConfigurationException - if the builder config file does not exist
MMObjectBuilder loadBuilder(String builderName,
String ipath)
builderName - name of the builder to initializeipath - the path to start searching. The path need be closed with a File.seperator character.
BuilderConfigurationException - if the builder config file does not exist
public MMObjectBuilder loadBuilderFromXML(String builderName,
String ipath)
builderName - name of the builder to initializeipath - the path to start searching. The path need be closed with a '/' character.
protected void initializeStorage()
public StorageManagerFactory<? extends StorageManager> getStorageManagerFactory()
null if not configured
public StorageManager<?> getStorageManager()
throws StorageException
StorageException - if no storage manager could be instantiated
public CoreSearchQueryHandler getSearchQueryHandler()
throws StorageException
StorageException - if no storage manager could be instantiatedpublic String getAuthType()
public String getLanguage()
Stringpublic Locale getLocale()
public TimeZone getTimeZone()
public String getEncoding()
Stringpublic boolean getState()
true if the module has been initialized and all builders loaded, false otherwise.
public void addNodeRelatedEventsListener(String builder,
EventListener listener)
builder - should be a valid builder name, the type for which you want to
receive eventslistener - some object implementing NodeEventListener, RelationEventListener,
or bothTypedRelationEventListenerWrapper,
TypedNodeEventListenerWrapper,
NodeEventListener,
RelationEventListener
public void removeNodeRelatedEventsListener(String builder,
EventListener listener)
builder - listener - addNodeRelatedEventsListener(java.lang.String, org.mmbase.core.event.EventListener)public File getDataDir()
public DataSource getDataSource()
public boolean runStartupChecks()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||