org.mmbase.applications.community.builders
Class Community

java.lang.Object
  extended byorg.mmbase.module.core.MMTable
      extended byorg.mmbase.module.core.MMObjectBuilder
          extended byorg.mmbase.applications.community.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:
$Id: Community.java,v 1.15 2004/02/23 18:59:34 pierre Exp $
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
AGE_PARAMETERS, broadcastChanges, database, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, fields, GUI_PARAMETERS, listCache, nodeCache, OBJ2TYPE_MAX_SIZE, oType, REPLACE_CACHE, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual
 
Fields inherited from class org.mmbase.module.core.MMTable
mmb, tableName
 
Constructor Summary
Community()
          Constructor
 
Method Summary
 boolean activate()
          Activates the community builder for the community application by associating it with other community builders
 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 this builder The property 'mmb' needs to be set for the builder before this method can be called.
 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, count, create, createAlias, delete, deleteNodeCache, drop, equals, equals, executeFunction, executeFunction, fieldLocalChanged, getAge, getAliasedNode, getAncestors, getCacheNumbers, getCacheSize, getCacheSize, getClassName, getConfigFile, getDBByte, getDBKey, getDBState, getDBText, getDBType, getDefaultTeaser, getDescendants, getDescription, getDescription, getDescriptions, getEditFields, getField, getFieldNames, getFields, getFields, getFunctionParameters, getGUIIndicator, getGUIIndicator, getHardNode, getHardNode, getHTML, getInitParameter, getInitParameters, getList, getLocaleGUIIndicator, getLocaleGUIIndicator, getMachineName, getMaintainer, getMMBase, getNewNode, getNewTmpNode, getNextField, getNextField, getNode, getNode, getNode, getNode, getNodes, getNodes, getNodeType, getNumberFromName, getObjectType, getObjectValue, getParameterDefinition, getParentBuilder, getPluralName, getPluralName, getPluralNames, getQuery, getQuery, getQuery, getRawNodes, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getSortedFields, getSortedListFields, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, hashCode, hostname_function, insert, insert, insertDone, isExtensionOf, isNodeCached, isVirtual, nodeLocalChanged, nodeRemoteChanged, preCommit, preEdit, process, processSearchResults, putTmpNode, readSearchResults, removeField, removeNode, removeRelations, removeSyncNodes, removeTmpNode, safeCache, safeCommit, safeInsert, search, search, search, searchIn, searchIn, searchIn, searchList, searchList, searchNumbers, searchVector, searchVector, searchVector, searchVector, searchVectorIn, searchVectorIn, searchVectorIn, searchVectorIn, searchWithWhere, sendFieldChangeSignal, setDBLayout_xml, setDefaults, setDescription, setDescriptions, setInitParameter, setMaintainer, setMMBase, setParentBuilder, setPluralNames, setSearchAge, setSingularNames, setTableName, setUniqueValue, setUniqueValue, setValue, setValue, setVersion, setXMLPath, setXMLValues, signalNewObject, testValidData, toString, toString, toXML, updateFields, waitUntilNodeChanged, wrap
 
Methods inherited from class org.mmbase.module.core.MMTable
created, getFullTableName, getTableName, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STR_CHATBOX

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

See Also:
Constant Field Values

STR_FORUM

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

See Also:
Constant Field Values
Constructor Detail

Community

public Community()
Constructor

Method Detail

init

public boolean init()
Description copied from class: MMObjectBuilder
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. The method retrieves data from the TypeDef builder, or adds data to that builder if the current builder is not yet registered.

Overrides:
init in class MMObjectBuilder
Returns:
true if init was completed, false if uncompleted.
See Also:
MMObjectBuilder.create()

activate

public boolean activate()
Activates the community builder for the community application by associating it with other community builders

Returns:
true if activation worked

openAllCommunities

public void openAllCommunities()
Opens all the channels that are connected to this community


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:
tok - the tokenized command
sp - The scanpage (containing http and user info) that calls the function
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 build 1.7.1.20041002