org.mmbase.module.builders
Class Community

java.lang.Object
  |
  +--org.mmbase.module.core.MMTable
        |
        +--org.mmbase.module.core.MMObjectBuilder
              |
              +--org.mmbase.module.builders.Community

public class Community
extends MMObjectBuilder

This builder implements additional functionality and methods to handle community objects. Added functionality involve opening and closing all channels related to this community, and expanding a URL obtained form the 'maps' builder with a community number (SCAN only).

Version:
28 May 2001
Author:
Dirk-Jan Hoekstra, Pierre van Rooden

Field Summary
static java.lang.String STR_CHATBOX
          Community type : chatbox
static java.lang.String STR_FORUM
          Community type : forum
 
Fields inherited from class org.mmbase.module.core.MMObjectBuilder
broadcastChanges, className, database, debug, description, descriptions, fields, NODE_MAX_SIZE, nodeCache, obj2type, OBJ2TYPE_MAX_SIZE, oType, replaceCache, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual
 
Fields inherited from class org.mmbase.module.core.MMTable
mmb, tableName
 
Constructor Summary
Community()
          Constructor
 
Method Summary
 void closeAllChannels(MMObjectNode community)
          Closes all the channels of the community.
 java.lang.String getDefaultUrl(int src)
          Deprecated. There is no maps definition available in cvs. In addition, this method only produces SCAN-format urls.
 boolean init()
          Initializes the builder.
 void openAllChannels(MMObjectNode community)
          Opens all the channels that are connected to this community
 void openAllCommunities()
          Opens all the channels that are connected to this community
 java.lang.String replace(scanpage sp, java.util.StringTokenizer tok)
          Handles the $MOD-MMBASE-BUILDER-community-commands.
 
Methods inherited from class org.mmbase.module.core.MMObjectBuilder
addField, addLocalObserver, addRemoteObserver, buildSet, checkAddTmpField, commit, convertMMNode2SQL, count, create, createAlias, created, debug, deleteNodeCache, executeFunction, fieldLocalChanged, getAge, getAliasedNode, getCacheNumbers, getCacheSize, getCacheSize, getClassName, getDBByte, getDBKey, getDBState, getDBText, getDBType, getDefaultTeaser, getDescription, getDescriptions, getDutchSName, getEditFields, getField, getFieldNames, getFields, getFullTableName, getFunctionParameters, getGUIIndicator, getGUIIndicator, getHardNode, getHardNode, getHTML, getInitParameter, getInitParameters, getList, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNode, getNode, getNode, getNode, getNodeType, getNumberFromName, getPluralName, getPluralName, getPluralNames, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getSortedFields, getSortedListFields, getTableName, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, getXMLSetup, hostname_function, init_obj2type, insert, insert, insertDone, isNodeCached, isVirtual, isXMLConfig, nodeLocalChanged, nodeRemoteChanged, preCommit, preEdit, process, putTmpNode, readSearchResults, removeField, removeNode, removeRelations, removeTmpNode, safeCache, safeCommit, safeInsert, search, search, search, searchIn, searchIn, searchIn, searchNumbers, searchVector, searchVector, searchVector, searchVector, searchVectorIn, searchVectorIn, searchVectorIn, searchVectorIn, searchWithWhere, sendFieldChangeSignal, setClassName, setDBLayout_xml, setDBLayout, setDebug, setDefaults, setDescription, setDescriptions, setDutchSName, setInitParameter, setMaintainer, setMMBase, setPluralNames, setSearchAge, setSingularNames, setTableName, setValue, setValue, setVersion, setXmlConfig, setXMLPath, setXMLValues, signalNewObject, testValidData, toXML, waitUntilNodeChanged, wrap
 
Methods inherited from class org.mmbase.module.core.MMTable
size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_CHATBOX

public static final java.lang.String STR_CHATBOX
Community type : chatbox

STR_FORUM

public static final java.lang.String STR_FORUM
Community type : forum
Constructor Detail

Community

public Community()
Constructor
Method Detail

init

public boolean init()
Initializes the builder. Retrieves associated builders.
Overrides:
init in class MMObjectBuilder
Returns:
Always true.

openAllCommunities

public void openAllCommunities()
Opens all the channels that are connected to this community
Parameters:
community - The community node of which to open all the channels.

openAllChannels

public void openAllChannels(MMObjectNode community)
Opens all the channels that are connected to this community
Parameters:
community - The community node of which to open all the channels.

closeAllChannels

public void closeAllChannels(MMObjectNode community)
Closes all the channels of the community.
Parameters:
community - The community of which to close all the channels.

replace

public java.lang.String replace(scanpage sp,
                                java.util.StringTokenizer tok)
Handles the $MOD-MMBASE-BUILDER-community-commands. Commands handled by this command are:
Overrides:
replace in class MMObjectBuilder
Parameters:
scanpage - the current page context
tok - the tokenized command
Returns:
the empty string

getDefaultUrl

public java.lang.String getDefaultUrl(int src)
Deprecated. There is no maps definition available in cvs. In addition, this method only produces SCAN-format urls.

Retrieves a URL from a related Map object, and append the community number to the URL. This requires the presence of a 'maps' builder, which should have a functional 'getDefaultURL' method.
Overrides:
getDefaultUrl in class MMObjectBuilder
Parameters:
src - The number of the community MMObjectNode.
Returns:
the resulting URL, or null if not map-node was associated with this community.


MMBase 2002