org.mmbase.module.tools
Class MMAdmin

Package class diagram package MMAdmin
java.lang.Object
  extended by org.mmbase.util.functions.FunctionProvider
      extended by org.mmbase.util.functions.DescribedFunctionProvider
          extended by org.mmbase.module.Module
              extended by org.mmbase.module.ProcessorModule
                  extended by org.mmbase.module.tools.MMAdmin
All Implemented Interfaces:
Descriptor, EventListener, SystemEventListener, WeightEventListener

public class MMAdmin
extends ProcessorModule
implements SystemEventListener

Version:
$Id: MMAdmin.java 45315 2011-02-18 20:23:11Z michiel $
Author:
Daniel Ockeloen, Pierre van Rooden
Application:
Admin, Application
Javadoc:

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mmbase.module.ProcessorModule
ProcessorModule.GetNodeListFunction, ProcessorModule.ProcessFunction, ProcessorModule.ReplaceFunction
 
Field Summary
 
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
MMAdmin(String name)
           
 
Method Summary
 void addBuilderField(Map<String,Object> vars)
           
 void doBuilderPosts(String command, Map<String,Object> cmds, Map<String,Object> vars)
           
 void doModulePosts(String command, Map<String,Object> cmds, Map<String,Object> vars)
           
(package private)  List<String> getApplicationsList()
           
 MMObjectBuilder getBuilder(String path)
          Retrieves a specified builder.
(package private)  String getBuilderClass(String builderName)
           
(package private)  String getBuilderDescription(String builderName)
           
(package private)  List<String> getBuildersList()
           
(package private)  int getBuilderVersion(String builderName)
           
(package private)  List<String> getDatabasesList()
           
(package private)  String getDescription(String appname)
           
(package private)  List<String> getFields(String builderName)
           
protected  Collection<String> getIgnoredAutodeployApplications()
           
 List<String> getList(PageInfo sp, StringTagger tagger, String value)
          Generate a list of values from a command to the processor
 MMObjectBuilder getListBuilder(String command, Map<String,?> params)
          Returns a virtual builder used to create node lists from the results returned by getList().
(package private)  String getModuleClass(String modname)
           
(package private)  String getModuleDescription(String modulename)
           
(package private)  List<String> getModuleProperties(String modulename)
           
(package private)  String getModuleProperty(String modname, String key)
           
(package private)  List<String> getModulesList()
           
 List<String> getMultilevelCacheEntries()
           
 List<String> getNodeCacheEntries()
           
 boolean getState()
          Wether MMAdmin module was completely initialized (applications auto-deployed and so on).
(package private)  int getVersion(String appname)
           
 int getWeight()
           
 void init()
          
 void notify(SystemEvent event)
           
protected  void probeCall()
          Called when MMBase is up.
 boolean process(PageInfo sp, Hashtable<String,Object> cmds, Hashtable<String,Object> vars)
          Execute the commands provided in the form values
 void removeBuilderField(Map<String,Object> vars)
           
 String replace(PageInfo sp, String cmds)
          Handle a $MOD command
 void setBuilderDBField(Map<String,Object> vars)
           
 void setBuilderDBKey(Map<String,Object> vars)
           
 void setBuilderDBNotNull(Map<String,Object> vars)
           
 void setBuilderDBSize(Map<String,Object> vars)
           
 void setBuilderDBState(Map<String,Object> vars)
           
 void setBuilderDescription(Map<String,Object> vars)
           
 void setBuilderEditorInput(Map<String,Object> vars)
           
 void setBuilderEditorList(Map<String,Object> vars)
           
 void setBuilderEditorSearch(Map<String,Object> vars)
           
 void setBuilderGuiName(Map<String,Object> vars)
           
 void setBuilderGuiType(Map<String,Object> vars)
           
 void setModuleProperty(Map<String,Object> vars)
           
 void syncBuilderXML(MMObjectBuilder bul, String builder)
           
 void syncModuleXML(Module mod, String modname)
           
 
Methods inherited from class org.mmbase.module.ProcessorModule
getNodeList, onload, reload, 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, shutdown, 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
 

Constructor Detail

MMAdmin

public MMAdmin(String name)
Method Detail

init

public void init()
Description copied from class: ProcessorModule

Overrides:
init in class ProcessorModule
Javadoc:

notify

public void notify(SystemEvent event)
Specified by:
notify in interface SystemEventListener

getListBuilder

public MMObjectBuilder getListBuilder(String command,
                                      Map<String,?> params)
Returns a virtual builder used to create node lists from the results returned by getList(). The default method does not associate the builder with a cloud (mmbase module), so processormodules that need this association need to override this method. Note that different lists may return different builders.

Overrides:
getListBuilder in class ProcessorModule
Parameters:
command - the LIST command for which to retrieve the builder
params - contains the attributes for the list

getBuilder

public MMObjectBuilder getBuilder(String path)
Retrieves a specified builder. The builder's name can be extended with the subpath of that builder's configuration file. i.e. 'core/typedef' or 'basic/images'. The subpath part is ignored.

Parameters:
path - The path of the builder to retrieve
Returns:
a MMObjectBuilder is found, null otherwise

getList

public List<String> getList(PageInfo sp,
                            StringTagger tagger,
                            String value)
Generate a list of values from a command to the processor

Overrides:
getList in class ProcessorModule
Javadoc:

process

public boolean process(PageInfo sp,
                       Hashtable<String,Object> cmds,
                       Hashtable<String,Object> vars)
Execute the commands provided in the form values

Overrides:
process in class ProcessorModule
Javadoc:

getIgnoredAutodeployApplications

protected Collection<String> getIgnoredAutodeployApplications()
Since:
MMBase-1.8.5

replace

public String replace(PageInfo sp,
                      String cmds)
Handle a $MOD command

Overrides:
replace in class ProcessorModule
Javadoc:

getVersion

int getVersion(String appname)
Javadoc:

getBuilderVersion

int getBuilderVersion(String builderName)
Javadoc:

getBuilderClass

String getBuilderClass(String builderName)
Javadoc:

getModuleClass

String getModuleClass(String modname)
Javadoc:

setModuleProperty

public void setModuleProperty(Map<String,Object> vars)
Javadoc:

getModuleProperty

String getModuleProperty(String modname,
                         String key)
To Do:
should obtain data from the configuration file
Javadoc:

getDescription

String getDescription(String appname)
Javadoc:

getBuilderDescription

String getBuilderDescription(String builderName)
Javadoc:

getModuleDescription

String getModuleDescription(String modulename)
Javadoc:

probeCall

protected void probeCall()
                  throws SearchQueryException
Called when MMBase is up. It'll install the applications marked as 'autodeploy'. It will do nothing, besides logging a warning, if the 'versions' builder could not be found.

Throws:
SearchQueryException

getState

public boolean getState()
Wether MMAdmin module was completely initialized (applications auto-deployed and so on).

Since:
MMBase-1.7

getApplicationsList

List<String> getApplicationsList()
Javadoc:

getBuildersList

List<String> getBuildersList()
Javadoc:

getModuleProperties

List<String> getModuleProperties(String modulename)
Javadoc:

getFields

List<String> getFields(String builderName)
Javadoc:

getModulesList

List<String> getModulesList()
Javadoc:

getDatabasesList

List<String> getDatabasesList()
Javadoc:

doModulePosts

public void doModulePosts(String command,
                          Map<String,Object> cmds,
                          Map<String,Object> vars)
Javadoc:

doBuilderPosts

public void doBuilderPosts(String command,
                           Map<String,Object> cmds,
                           Map<String,Object> vars)
Javadoc:

setBuilderGuiName

public void setBuilderGuiName(Map<String,Object> vars)
Javadoc:

setBuilderDescription

public void setBuilderDescription(Map<String,Object> vars)
Since:
MMBase-1.7
Javadoc:

setBuilderGuiType

public void setBuilderGuiType(Map<String,Object> vars)
Javadoc:

setBuilderEditorInput

public void setBuilderEditorInput(Map<String,Object> vars)
Javadoc:

setBuilderEditorList

public void setBuilderEditorList(Map<String,Object> vars)
Javadoc:

setBuilderEditorSearch

public void setBuilderEditorSearch(Map<String,Object> vars)
Javadoc:

setBuilderDBSize

public void setBuilderDBSize(Map<String,Object> vars)
Javadoc:

setBuilderDBField

public void setBuilderDBField(Map<String,Object> vars)
Javadoc:

setBuilderDBState

public void setBuilderDBState(Map<String,Object> vars)
Javadoc:

setBuilderDBKey

public void setBuilderDBKey(Map<String,Object> vars)
Javadoc:

setBuilderDBNotNull

public void setBuilderDBNotNull(Map<String,Object> vars)
Javadoc:

addBuilderField

public void addBuilderField(Map<String,Object> vars)
Javadoc:

removeBuilderField

public void removeBuilderField(Map<String,Object> vars)
Javadoc:

syncBuilderXML

public void syncBuilderXML(MMObjectBuilder bul,
                           String builder)
Javadoc:

syncModuleXML

public void syncModuleXML(Module mod,
                          String modname)
Javadoc:

getMultilevelCacheEntries

public List<String> getMultilevelCacheEntries()
Javadoc:

getNodeCacheEntries

public List<String> getNodeCacheEntries()
Javadoc:

getWeight

public int getWeight()
Specified by:
getWeight in interface WeightEventListener


MMBase2 Core 2.0-SNAPSHOT - 2013-03-30T06:36