|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.Module
org.mmbase.module.ProcessorModule
org.mmbase.module.core.MMBase
The module which provides access to the MMBase database 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.
| Field Summary | |
java.lang.String |
baseName
Base name for the database to be accessed using this instance of MMBase. |
InsRel |
InsRel
Reference to the InsRel builder. |
MMBaseChangeInterface |
mmc
Builds a MultiCast Thread to receive and send changes from other MMBase Servers. |
java.util.Hashtable |
mmobjs
The table that contains all loaded builders. |
OAlias |
OAlias
Reference to the OALias builder. |
RelDef |
RelDef
Reference to the RelDef builder. |
static int |
startTime
Time in seconds, when mmbase was started. |
TypeDef |
TypeDef
Reference to the TypeDef builder. |
TypeRel |
TypeRel
Reference to the TypeRel builder. |
| Constructor Summary | |
MMBase()
Constructor to create the MMBase root module. |
|
| Method Summary | |
boolean |
addLocalObserver(java.lang.String type,
MMBaseObserver obs)
Adds a local observer to a specified builder. |
boolean |
addRemoteObserver(java.lang.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. |
void |
closeConnection(MultiConnection con,
java.sql.Statement stmt)
Safely close a database connection and/or a database statement. |
java.lang.String |
doGetAgeMarker(java.util.StringTokenizer tok)
Deprecated. SCAN related, should not be in this module. |
void |
doProbeRun()
Callback method, called from MMBaseProbe. |
java.lang.String |
getAuthType()
Retrieves the autorisation type. |
java.lang.Object |
getBaseModule(java.lang.String name)
Retrieves a (mmbase) module by name. |
java.lang.String |
getBaseName()
Retrieves the database base name |
MMObjectBuilder |
getBuilder(java.lang.String name)
Retrieves a specified builder. |
java.lang.String |
getBuilderPath(java.lang.String builder,
java.lang.String path)
Locate one specific builder within a given path, relative to the main builder config path, including sub-paths. |
ClusterBuilder |
getClusterBuilder()
Returns a reference to the cluster builder, a virtual builder used to perform multilevel searches. |
MultiConnection |
getConnection()
Get a database connection that is multiplexed and checked. |
java.lang.String |
getCookieDomain()
Retrieves the cookiedomain (whatever that is) This value is set using the configuration file. |
MMJdbc2NodeInterface |
getDatabase()
Returns a reference to the database used. |
int |
getDBKey()
Retrieves an unique key to use for a new node's number. |
java.sql.Connection |
getDirectConnection()
Get a direct database connection. |
java.lang.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 |
java.lang.String |
getEncoding()
Retrieves the encoding. |
java.lang.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. |
JDBCInterface |
getJDBC()
Get the JDBC module used by this MMBase. |
java.lang.String |
getLanguage()
Retrieves the current language. |
java.util.Locale |
getLocale()
Retrieves the current locale. |
java.lang.String |
getMachineName()
Retrieves the machine name. |
static MMBase |
getMMBase()
Retrieves the MMBase module('mmbaseroot'). |
MMBaseCop |
getMMBaseCop()
Retrieves the loaded security manager(MMBaseCop). |
MMObjectBuilder |
getMMObject(java.lang.String name)
Retrieves a specified builder. |
java.util.Enumeration |
getMMObjects()
Retrieves the loaded builders. |
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. |
java.util.Hashtable |
getSearchHash(java.util.Vector se,
java.lang.String mapper)
Converts a vector containing nodes to a hashmap, using a specified (unique) integer field as the hash key. |
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. |
TypeDef |
getTypeDef()
Returns a reference to the TypeDef builder. |
TypeRel |
getTypeRel()
Returns a reference to the TypeRel builder. |
java.lang.String |
getWhereList(java.util.Vector se,
java.lang.String mapper)
Converts a vector containing nodes to a comma seperated list of values, obtained from a specified integer field. |
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(java.lang.String builder,
java.lang.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 |
onload()
Started when the module is loaded. |
protected void |
shutdown()
Shuts down the module. |
void |
stop()
|
void |
unload()
What should this do, when is this called? (MM) |
void |
unloadBuilder(MMObjectBuilder builder)
Unloads a builders from MMBase. |
| Methods inherited from class org.mmbase.module.ProcessorModule |
cacheCheck, getList, getListBuilder, getNodeList, process, reload, replace, replace |
| Methods inherited from class org.mmbase.module.Module |
getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModuleInfo, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, setInitParameter, setMaintainer, setName, setVersion, shutdownModules, startModule, startModules, state |
| 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 MMBaseChangeInterface mmc
public java.lang.String baseName
public TypeDef TypeDef
public RelDef RelDef
public OAlias OAlias
public InsRel InsRel
public TypeRel TypeRel
public java.util.Hashtable mmobjs
| Constructor Detail |
public MMBase()
| Method Detail |
public void init()
init in class ProcessorModuleprotected void shutdown()
Module
shutdown in class Modulepublic boolean isShutdown()
public void onload()
onload in class ProcessorModulepublic void unload()
ProcessorModule
unload in class ProcessorModule
public MMObjectBuilder getBuilder(java.lang.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 MMObjectBuilder getMMObject(java.lang.String name)
name - The name of the builder to retrieve
MMObjectBuilder if found, null otherwisepublic static MMBase getMMBase()
public MMBaseCop getMMBaseCop()
public java.util.Enumeration getMMObjects()
Enumeration listing the loaded builderspublic 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()
ClusterBuilderpublic JDBCInterface getJDBC()
public void closeConnection(MultiConnection con,
java.sql.Statement stmt)
con - The connection to close. Can be null.stmt - The statement to close, prior to closing the connection. Can be null.protected void assertUp()
public MultiConnection getConnection()
MultiConnectionpublic java.sql.Connection getDirectConnection()
public java.lang.String getBaseName()
Stringpublic void doProbeRun()
maintainance() call.
public void maintainance()
doProbeRun().
The reference to the thread is cleared when it dies (scheduled every 10 minutes), prompting
the system to start a new thread.
maintainance in class ModuleMMBaseProbe
public java.util.Hashtable getSearchHash(java.util.Vector se,
java.lang.String mapper)
se - The vector containing the nodesmapper - the name of the (integer) field that determines the hash key, i.e. "number"
Hashtable
public java.lang.String getWhereList(java.util.Vector se,
java.lang.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 java.lang.String getMachineName()
Stringpublic java.lang.String getHost()
Stringpublic java.lang.String getCookieDomain()
String
public boolean addRemoteObserver(java.lang.String type,
MMBaseObserver obs)
true if adding the observer succeeded, false otherwise.
public boolean addLocalObserver(java.lang.String type,
MMBaseObserver obs)
true if adding the observer succeeded, false otherwise.public java.lang.String doGetAgeMarker(java.util.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 java.lang.Object getBaseModule(java.lang.String name)
Object if it exists, null otherwisepublic void stop()
public void initBuilder(MMObjectBuilder builder)
builder - The builder which has to be initializedpublic void unloadBuilder(MMObjectBuilder builder)
builder - the builder which has to be unloaded
public java.lang.String getBuilderPath(java.lang.String builder,
java.lang.String path)
builder - name of the builder to findpath - 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(java.lang.String builder,
java.lang.String ipath)
builder - name of the builder to initializeipath - the path to start searching. The path need be closed with a File.seperator character.
public java.lang.String getDTDBase()
Stringpublic MMJdbc2NodeInterface getDatabase()
MMJdbc2NodeInterface which holds the appropriate database classprotected void initializeStorage()
public StorageManagerFactory getStorageManagerFactory()
null if the system uses the old
support classes to access the storage.
null if not configured
public StorageManager getStorageManager()
throws StorageException
StorageException if the system uses the old
support classes to access the storage.
StorageException - if no storage manasger could be instantiatedpublic MMObjectNode castNode(MMObjectNode node)
public java.lang.String getAuthType()
String identifying the typepublic java.lang.String getLanguage()
Stringpublic java.util.Locale getLocale()
public java.lang.String getEncoding()
Stringpublic boolean getState()
true if the module has been initialized and all builders loaded, false otherwise.public void checkUserLevel()
private.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||