|
||||||||||
| 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.module.Module
org.mmbase.module.ProcessorModule
org.mmbase.module.core.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 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 |
getMaintainerFunction, getVersionFunction |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
functions, getFunctions |
| Constructor Summary | |
MMBase()
Constructor to create the MMBase root module. |
|
| Method Summary | |
MMObjectBuilder |
addBuilder(String name,
MMObjectBuilder bul)
|
boolean |
addLocalObserver(String type,
MMBaseObserver obs)
Adds a local observer to a specified builder. |
void |
addNodeRelatedEventsListener(String builder,
EventListener listener)
This is a conveniance method to help you register listeners to node and relation events. |
boolean |
addRemoteObserver(String type,
MMBaseObserver obs)
Adds a remote observer to a specified builder. |
protected void |
assertUp()
Locks until init of mmbase is finished. |
MMObjectNode |
castNode(MMObjectNode node)
Deprecated. Not necessary in most cases, with the possible exception of lists obtained from InsRel. However, in the later case using this method is probably too costly. |
void |
checkUserLevel()
Checks and switches the user/grouplevel in which MMBase runs. |
String |
doGetAgeMarker(StringTokenizer tok)
Deprecated. SCAN related, should not be in this module. |
String |
getAuthType()
Retrieves the autorisation type. |
String |
getBaseName()
Retrieves the storage base name |
MMObjectBuilder |
getBuilder(String name)
Retrieves a specified builder. |
MMObjectBuilder |
getBuilderForNode(int number)
|
ResourceLoader |
getBuilderLoader()
|
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 |
getBuilders()
Retrieves a Collection of loaded builders. |
ClusterBuilder |
getClusterBuilder()
Returns a reference to the cluster builder, a virtual builder used to perform multilevel searches. |
int |
getDBKey()
Deprecated. use getStorageManager().createKey() |
String |
getDTDBase()
Deprecated. keesj: This method is not used. Document type definitions should contain a fully qualified url. I think the author was thinking of a dtdpath wich makes sence |
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. |
Enumeration |
getMMObjects()
Deprecated. use getBuilders() |
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. |
Hashtable |
getSearchHash(Vector se,
String mapper)
Converts a vector containing nodes to a hashmap, using a specified (unique) integer field as the hash key. |
SearchQueryHandler |
getSearchQueryHandler()
Returns a SearchQueryHandler to access the storage.. |
SendMailInterface |
getSendMail()
Deprecated. use getModule("sendmail") instead SendMail will become a separate application. In MMBase 1.8. this method will be removed |
boolean |
getState()
Retrieves whether this mmbase module is running. |
StorageManager |
getStorageManager()
Returns a StorageManager to access the storage.. |
StorageManagerFactory |
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. |
String |
getWhereList(Vector se,
String mapper)
Converts a vector containing nodes to a comma seperated list of values, obtained from a specified integer field. |
boolean |
inDevelopment()
Returns true when MMBase is in development mode. |
void |
init()
Initalizes the MMBase module. |
void |
initBuilder(MMObjectBuilder builder)
inits a builder |
protected void |
initializeStorage()
Loads either the storage manager factory or the appropriate support class using the configuration parameters. |
boolean |
isShutdown()
|
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 |
maintainance()
Performs periodic maintenance. |
void |
removeNodeRelatedEventsListener(String builder,
EventListener listener)
|
protected void |
shutdown()
Shuts down the module. |
void |
unloadBuilder(MMObjectBuilder builder)
Unloads a builders from MMBase. |
| Methods inherited from class org.mmbase.module.ProcessorModule |
cacheCheck, getList, getListBuilder, getNodeList, onload, process, reload, replace, replace, unload |
| Methods inherited from class org.mmbase.module.Module |
getInitParameter, getInitParameters, getMaintainer, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModules, getName, getProperties, getProperty, getVersion, hasStarted, setInitParameter, setMaintainer, setName, setVersion, shutdownModules, startModule, startModules, state |
| 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()
| Method Detail |
public void init()
init in class ProcessorModuleprotected void shutdown()
Module
shutdown in class Modulepublic 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.
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 Enumeration getMMObjects()
getBuilders()
Enumeration listing the loaded builderspublic Collection 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 void maintainance()
maintainance in class Module
public Hashtable getSearchHash(Vector se,
String mapper)
se - The vector containing the nodesmapper - the name of the (integer) field that determines the hash key, i.e. "number"
Hashtable
public String getWhereList(Vector se,
String mapper)
se - The vector containing the nodesmapper - the name of the (integer) field whose value to include in the list
Stringpublic SendMailInterface getSendMail()
SendMailInterface object if the module was loaded, null otherwise.public String getMachineName()
Stringpublic String getHost()
String
public boolean addRemoteObserver(String type,
MMBaseObserver obs)
true if adding the observer succeeded, false otherwise.
public boolean addLocalObserver(String type,
MMBaseObserver obs)
true if adding the observer succeeded, false otherwise.public String doGetAgeMarker(StringTokenizer tok)
public int getDBKey()
Sychronized so the same number cannot be dealt out to different nodes.
Does possibly not work well with multiple mmbase systems that work on the same database.
int valuepublic 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)
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
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.
public String getDTDBase()
Stringprotected void initializeStorage()
public StorageManagerFactory getStorageManagerFactory()
null if not configured
public StorageManager getStorageManager()
throws StorageException
StorageException - if no storage manager could be instantiated
public SearchQueryHandler getSearchQueryHandler()
throws StorageException
StorageException - if no storage manager could be instantiatedpublic MMObjectNode castNode(MMObjectNode node)
public String getAuthType()
String identifying the typepublic 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 checkUserLevel()
private.
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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||