|
||||||||||
| 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.INFO
public class INFO
The INFO module provides access to the environment on which the mmbase system resides. It can retrieve information on the file system, system memory, time, current user or browser, and miscellaneous information that is not directly related to the object cloud. Most functions in this module are specific for SCAN - other scripting languages generally have their own ways of obtaining this data.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.mmbase.module.ProcessorModule |
|---|
ProcessorModule.GetNodeListFunction, ProcessorModule.ProcessFunction, ProcessorModule.ReplaceFunction |
| Field Summary | |
|---|---|
(package private) Hashtable<String,SortedVector> |
DirCache
|
(package private) String |
documentroot
|
static int |
Dutch
|
static int |
English
|
static int |
Not
|
(package private) Random |
rnd
|
| 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 | |
|---|---|
INFO()
Constructor for |
|
| Method Summary | |
|---|---|
(package private) String |
doBrowser(PageInfo sp,
StringTokenizer tok)
Returns data about the user's browser. Valid options are: OS : returns the operating system. |
(package private) Vector |
doColor(StringTokenizer tok)
Returns a list of color names and their RGB values. |
(package private) Vector |
doColor16()
Returns a list of the 16 windows color names and their RGB values. |
(package private) Vector |
doColorBasic()
Returns a list of basic color names and their RGB values. |
(package private) Vector |
doColorSpectrum()
Returns a list of primary and secondary color names and their RGB values. |
(package private) String |
doEscape(PageInfo sp,
StringTokenizer tok)
Converts a string into a string with 'escaped' quotes. The argument for this command is the string to 'escape'. |
protected String |
doExists(PageInfo sp,
StringTokenizer tok)
Tests whether a given filename exists either as a directory, as a file, or as a path (depending on the subcommand given). |
(package private) String |
doMemory(StringTokenizer tok)
This method is used to retrieve the amount of FREE MEMORY in either the JVM or the SYSTEM. Valid options are: GETJVM (default) : returns free memory of the Java Virtual Machine GETSYS : return the free memory on the system B(default) :return memory in bytes KB: :return memory in kilo bytes MB: :return memory in mega bytes |
(package private) String |
doOs(PageInfo sp,
StringTokenizer tok)
Retrieve the name of the user's operating system. |
(package private) String |
doParamDecode(PageInfo sp,
StringTokenizer tok)
Converts an URL-encoded string into a ASCII string. The argument for this command is the string to decode. |
(package private) String |
doParamEncode(PageInfo sp,
StringTokenizer tok)
Converts an ASCII string into a URL-encoded string. The argument for this command is the string to encode. |
(package private) String |
doParseTime(StringTokenizer tok)
takes a time in several formats and creates a time from it |
(package private) String |
doRandom(PageInfo sp,
StringTokenizer tok)
Returns a random number in a specified range. |
(package private) Vector |
doRange(StringTokenizer tok)
Returns a continues range of values with two set numerical boundaries and a step-increase, or the range of characters of the alphabet. |
(package private) String |
doRelTime(StringTokenizer tok)
This method is used to retrieve time related info from a relative time value. |
(package private) Vector |
doScanDate(PageInfo sp,
StringTagger tagger)
Deprecated. hereditary code. Should be dropped or adapted. |
(package private) String |
doString(StringTokenizer tok)
Performs tests on strings. |
(package private) String |
doTime(StringTokenizer tok)
Formats either the current or a given timevalue according to a specified format. |
(package private) String |
doTimeFormat(StringTokenizer tok,
boolean inSec)
Formats either the current or a given timevalue according to a specified format. |
(package private) String |
doUser(PageInfo sp,
StringTokenizer tok)
Returns information on the user Valid options are: NAME, which returns the username in SCAN HOSTNAME, which returns the name of the remote host (visiting) in SCAN IPNUMBER, which returns the ipnumber of the remote host(visiting) in SCAN SECLEVEL, which returns current security level in SCAN REQUEST_URI, which returns the path of the file requested in SCAN BACK, which returns the name of the page visted befote the current page, notice not supported by all browsers COUNTRY, which returns the country name of the remote host ( mmbase.nl -> nl; mmbase.org-> org ) DOMAIN, which returns the domain name of the remote host INDOMAIN, which returns YES when remote host has the same domain as us otherwise it returns NO in SCAN |
(package private) SortedVector |
getDirTimes(File scanfile)
Retrieves the creation times of all directories under a specific path whose names are 10 characters long. |
List<String> |
getList(PageInfo sp,
StringTagger tagger,
String value)
Generate a list of values from a command to the processor. |
String |
getModuleInfo()
Returns a description of the module. |
protected Map |
getProperties(String propertytable)
Returns the properties to the subclass. |
protected String |
getProperty(String name,
String var)
Returns one propertyvalue to the subclass (original in Module). |
void |
init()
Initializes the module. |
boolean |
process(PageInfo sp,
Hashtable cmds,
Hashtable vars)
Execute the commands provided in the form values. |
String |
replace(PageInfo sp,
String cmds)
Handle a $MOD command. |
(package private) SortedVector |
revertVector(SortedVector src)
Reverse the order of a list of values |
| Methods inherited from class org.mmbase.module.ProcessorModule |
|---|
getListBuilder, 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, 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 |
| Field Detail |
|---|
public static final int Not
public static final int Dutch
public static final int English
Random rnd
String documentroot
Hashtable<String,SortedVector> DirCache
| Constructor Detail |
|---|
public INFO()
| Method Detail |
|---|
public void init()
init in class ProcessorModule
protected String getProperty(String name,
String var)
public List<String> getList(PageInfo sp,
StringTagger tagger,
String value)
getList in class ProcessorModulesp - the current page contexttagger - the parameters (name-value pairs) belonging to the command to processvalue - the command to process
Vector containing the requested values.
ParseException
public boolean process(PageInfo sp,
Hashtable cmds,
Hashtable vars)
process in class ProcessorModulesp - the current page contextcmds - the command to processvars - the variables to process
false
public String replace(PageInfo sp,
String cmds)
replace in class ProcessorModulesp - the current page contextcmds - the command to process
String with the command's result valueString doParseTime(StringTokenizer tok)
tok - the processing command's arguments
String doTimeFormat(StringTokenizer tok,
boolean inSec)
tok - the processing command's argumentsinSec - if true, the timevalue is in seconds instead of milliseconds
String containing the time in the specified formatString doString(StringTokenizer tok)
tok - StringTokenizer with the rest of the cmd.
true if the test succeeds
String doEscape(PageInfo sp,
StringTokenizer tok)
sp - the current page contexttok - the StringTokenizer containing the subsequent cmd argument tokens.
String which is the converted value
String doParamEncode(PageInfo sp,
StringTokenizer tok)
sp - the current page contexttok - the StringTokenizer containing the subsequent cmd argument tokens.
String which is the converted value
String doParamDecode(PageInfo sp,
StringTokenizer tok)
sp - the current page contexttok - the StringTokenizer containing the subsequent cmd argument tokens.
String which is the converted value
String doOs(PageInfo sp,
StringTokenizer tok)
sp - the current page contexttok - the StringTokenizer containing the subsequent cmd argument tokens.
String which is the converted value
String doRandom(PageInfo sp,
StringTokenizer tok)
sp - the current page context
param tok the StringTokenizer containing the subsequent cmd argument tokens.
String containing a random number
String doBrowser(PageInfo sp,
StringTokenizer tok)
sp - the current page contexttok - The StringTokenizer containing the subsequent cmd argument tokens.
String containing the result
String doUser(PageInfo sp,
StringTokenizer tok)
tok - StringTokenizer with the rest of the cmd.sp - the scanpage
protected Map getProperties(String propertytable)
Vector doRange(StringTokenizer tok)
tok - The StringTokenizer containing the subsequent cmd argument tokens.
String containing the resultVector doColor(StringTokenizer tok)
tok - The commands to be executed
Vector containing color names and RGB valuesVector doColorBasic()
Vector containing color names and RGB valuesVector doColorSpectrum()
Vector containing color names and RGB valuesVector doColor16()
Vector containing color names and RGB valuesString doTime(StringTokenizer tok)
tok - the processing command's argumentsinSec - if true, the timevalue is in seconds instead of milliseconds
String containing the time in the specified formatpublic String getModuleInfo()
getModuleInfo in class ModuleString describing the module's function.String doRelTime(StringTokenizer tok)
tok - The StringTokenizer containing the subsequent cmd argument tokens.
String doMemory(StringTokenizer tok)
tok - The StringTokenizer containing the subsequent cmd argument tokens.
Vector doScanDate(PageInfo sp,
StringTagger tagger)
sp - the current page contexttok - the commands to be executed
Vector containing color names and RGB valuesSortedVector revertVector(SortedVector src)
src - the source of values to reverse
Vector containing the reverse ordered listSortedVector getDirTimes(File scanfile)
scanfile - the path to search
Vector containing the times
protected String doExists(PageInfo sp,
StringTokenizer tok)
sp - the current page contexttok - the commands to be executed
String withe the value 'YES' if the check succeeded, 'NO' if it failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||