org.mmbase.jumpers
Class Jumpers
java.lang.Object
org.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.jumpers.Jumpers
- All Implemented Interfaces:
- EventListener, NodeEventListener, RelationEventListener
public class Jumpers
- extends MMObjectBuilder
Maintains jumpers for redirecting urls. The data stored in this builder is
used to redirect urls based ons a specific key. The jumpers builder is called
from the JumpersFilter.
The jumpers builder can be configured using two properties:
JumperNotFoundURL Determines the default url (such as a
home page or error page) when no jumper is found. If not specified nothing
will be done if no jumper is found.
XXX:Note that this builder is called directly from a servlet, and may
therefor be bound to the cloud context rather than a cloud. This would mean
that in a multi-cloud environment, this builder will be shared.
- Version:
- $Id: Jumpers.java 41899 2010-04-13 14:13:34Z michiel $
- Author:
- Daniel Ockeloen, Pierre van Rooden (javadocs), Marcel Maatkamp, VPRO Digitaal
- Application:
- Tools, Jumpers
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctionsFunction, GUI_INDICATOR, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, nodeCache, oType, pluralNames, searchAge, singularNames, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, TMP_FIELD_EXISTS, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Methods inherited from class org.mmbase.module.core.MMObjectBuilder |
addEventListener, addField, addLocalObserver, addRemoteObserver, broadcastChanges, checkAddTmpField, clearBlobCache, commit, create, createAlias, createAlias, createIfNotExists, delete, equals, equals, executeFunction, fieldLocalChanged, getAncestors, getBlobCache, getClassName, getConfigFile, getConfigResource, getDataTypeCollector, getDBState, getDBType, getDefaultTeaser, getDefaultUrl, getDescendants, getDescription, getDescription, getDescriptions, getEmptyNode, getField, getFieldNames, getFields, getFields, getFunction, getFunctionParameters, getFunctions, getGUIIndicator, getGUIIndicator, getHTML, getInitParameter, getInitParameters, getInitParameters, getInternalVersion, getList, getLocaleGUIIndicator, getLocaleGUIIndicator, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNextField, getNode, getNode, getNode, getNodeFromCache, getNodeGUIIndicator, getNumber, getObjectType, getObjectValue, getParentBuilder, getPluralName, getPluralName, getPluralNames, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedInputStream, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, hasField, hashCode, hashCode, hostname_function, insert, insert, isExtensionOf, isNodeCached, isNull, isVirtual, loadInitParameters, newFunctionInstance, nodeLocalChanged, nodeRemoteChanged, notify, preCommit, process, removeEventListener, removeField, removeLocalObserver, removeNode, removeRelations, removeRemoteObserver, removeSyncNodes, replace, safeCache, sendFieldChangeSignal, setDefaults, setDescription, setDescriptions, setFields, setInitParameter, setMaintainer, setPluralNames, setSearchAge, setSingularNames, setUniqueValue, setUniqueValue, setValue, setValue, setVersion, setXMLPath, shutdown, testValidData, toString, toString, update, updateFields, wrap |
| Methods inherited from class org.mmbase.module.core.MMTable |
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
jumpCache
protected Cache<String,String> jumpCache
- Cache for URL jumpers.
jumperNotFoundURL
protected static String jumperNotFoundURL
- Default redirect if no jumper can be found. If this field is
null, a url will not be 'redirected' if the search for a
jumper failed. This may cause a 404 error on your server if the path
specified is unavailable. However, you may need it if other servlets rely
on specific paths that would otherwise be caught by the jumper servlet.
The value fo this field is set using the JumperNotFoundURL
property in the builder configuration file.
Jumpers
public Jumpers()
init
public boolean init()
- Initializes the builder. Determines the jumper cache size, and
initializes it. Also determines the default jumper url.
- Overrides:
init in class MMObjectBuilder
- Returns:
- always
true
getGUIIndicator
public String getGUIIndicator(MMObjectNode node,
Parameters args)
- Overrides:
getGUIIndicator in class MMObjectBuilder
- Since:
- MMBase-1.7.1
getJump
public String getJump(StringTokenizer tok)
- Retrieves a jumper for a specified key.
- Parameters:
tok - the tokenizer, in which the first token is the key to search
for.
- Returns:
- the found alternate url.
getJump
public String getJump(StringTokenizer tok,
boolean reload)
getJump
public String getJump(String key)
getIDJumper
public String getIDJumper(String key)
delJumpCache
public void delJumpCache(String key)
- Removes a specified key from the cache.
- Parameters:
key - the key to remove
delJumpCache
public void delJumpCache(String number,
boolean nodeLocalChanged)
getJump
public String getJump(String key,
boolean reload)
- Retrieves a jumper for a specified key.
- Parameters:
key - the key to search for.
- Returns:
- the found alternate url.
notify
public void notify(NodeEvent event)
- Specified by:
notify in interface NodeEventListener- Overrides:
notify in class MMObjectBuilder
executeFunction
protected Object executeFunction(MMObjectNode node,
String function,
List arguments)
- Overrides:
executeFunction in class MMObjectBuilder
MMBase Jumpers 2.0-SNAPSHOT - 2013-03-30T06:45