| org.mmbase.module.core.MMTable org.mmbase.module.core.MMObjectBuilder org.mmbase.module.core.VirtualBuilder
All known Subclasses: org.mmbase.module.core.ClusterBuilder, org.mmbase.storage.search.ResultBuilder, org.mmbase.module.core.VirtualReferrerBuilder,
VirtualBuilder | public class VirtualBuilder extends MMObjectBuilder (Code) | | VirtualBuilder is a builder which creates 'virtual' nodes.
This class is intended to facilitate practical creation of virtual
builders by capturing events that migth otherwise lead to unexpected or
faulty behavior.
author: Pierre van Rooden version: $Id: VirtualBuilder.java,v 1.25 2008/02/03 17:33:57 nklasens Exp $ |
Method Summary | |
public boolean | create() Creates a new builder table in the current database. | public int | getDBState(String fieldName) Return a field's database state. | public Map<String, CoreField> | getFields(MMObjectNode node) Get text from a blob field from a database. | public String | getGUIIndicator(MMObjectNode node) The default behavior of a virtual node is to display the content of
the 'name' field (if present). | public MMObjectNode | getNewNode(String owner) Get a new node, using this builder as its parent.
The new node is a virtual node.
Parameters: owner - The administrator creating the new node. | protected byte[] | getShortedByte(String fieldName, MMObjectNode node) Since virtual builders are generally not associated with a database,
this method returns null. | protected String | getShortedText(String fieldName, MMObjectNode node) Since virtual builders are generally not associated with a database,
this method returns null. | public boolean | init() Initializes this builder. | public int | insert(String owner, MMObjectNode node) Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided). |
VirtualBuilder | public VirtualBuilder(MMBase m)(Code) | | Creates an instance of a Virtual builder.
A builder instantiated with this constrcutor is not registered in MMBase
and should only be used as a temporary parent for virtual nodes which
do not have a long life span.
Parameters: m - the MMbase cloud creating the node |
VirtualBuilder | protected VirtualBuilder(MMBase m, String tableName)(Code) | | Creates an instance of a Virtual builder and registers it in MMBase.
Parameters: m - the MMbase cloud creating the node Parameters: tableName - the name of the builder as known in the MMbase system |
create | public boolean create()(Code) | | Creates a new builder table in the current database.
This method does not perform any action in a virtual builder, as there is
no actual table associated with it.
|
getDBState | public int getDBState(String fieldName)(Code) | | Return a field's database state.
The default behavior for a virtual node is to return DBSTATE_VIRTUAL .
Parameters: fieldName - the requested field's name DBSTATE_VIRTUAL |
getGUIIndicator | public String getGUIIndicator(MMObjectNode node)(Code) | | The default behavior of a virtual node is to display the content of
the 'name' field (if present).
XXX: should be changed to something better
Parameters: node - The node to display either the name field of the node or "no info" |
getNewNode | public MMObjectNode getNewNode(String owner)(Code) | | Get a new node, using this builder as its parent.
The new node is a virtual node.
Parameters: owner - The administrator creating the new node. A newly initialized VirtualNode . |
getShortedByte | protected byte[] getShortedByte(String fieldName, MMObjectNode node)(Code) | | Since virtual builders are generally not associated with a database,
this method returns null.
Parameters: fieldName - name of the field Parameters: node - null |
getShortedText | protected String getShortedText(String fieldName, MMObjectNode node)(Code) | | Since virtual builders are generally not associated with a database,
this method returns null.
Parameters: fieldName - name of the field Parameters: node - null |
init | public boolean init()(Code) | | Initializes this builder.
No specifici cation is performed.
This method overrides the default emthod in MMObhjectBuilder, which
would otherwise attempt to access the database.
Always true. See Also: VirtualBuilder.create |
insert | public int insert(String owner, MMObjectNode node)(Code) | | Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided).
This method does not perform any action in a virtual builder.
Parameters: owner - The administrator creating the node Parameters: node - The object to insert -1 (the insert failed) |
Methods inherited from org.mmbase.module.core.MMObjectBuilder | public void addEventListener(org.mmbase.core.event.EventListener listener)(Code)(Java Doc) public void addField(CoreField def)(Code)(Java Doc) public boolean addLocalObserver(MMBaseObserver obs)(Code)(Java Doc) public boolean addRemoteObserver(MMBaseObserver obs)(Code)(Java Doc) public boolean broadcastChanges()(Code)(Java Doc) public boolean checkAddTmpField(String field)(Code)(Java Doc) public int clearBlobCache(int nodeNumber)(Code)(Java Doc) public boolean commit(MMObjectNode node)(Code)(Java Doc) public boolean create()(Code)(Java Doc) public boolean createAlias(int number, String alias, String owner)(Code)(Java Doc) public boolean createAlias(int number, String alias)(Code)(Java Doc) public void delete()(Code)(Java Doc) final public boolean equals(Object o)(Code)(Java Doc) public boolean equals(MMObjectNode o1, MMObjectNode o2)(Code)(Java Doc) protected Object executeFunction(MMObjectNode node, String function, List> arguments)(Code)(Java Doc) protected Object executeFunction(MMObjectNode node, String function, String field)(Code)(Java Doc) public boolean fieldLocalChanged(String number, String builder, String field, String value)(Code)(Java Doc) public List<MMObjectBuilder> getAncestors()(Code)(Java Doc) protected BlobCache getBlobCache(String fieldName)(Code)(Java Doc) public String getClassName()(Code)(Java Doc) public File getConfigFile()(Code)(Java Doc) public String getConfigResource()(Code)(Java Doc) public int getDBState(String fieldName)(Code)(Java Doc) public int getDBType(String fieldName)(Code)(Java Doc) public DataTypeCollector getDataTypeCollector()(Code)(Java Doc) public MMObjectNode getDefaultTeaser(MMObjectNode node, MMObjectNode tnode)(Code)(Java Doc) public String getDefaultUrl(int src)(Code)(Java Doc) public List<MMObjectBuilder> getDescendants()(Code)(Java Doc) public String getDescription()(Code)(Java Doc) public String getDescription(String lang)(Code)(Java Doc) public Hashtable<String, String> getDescriptions()(Code)(Java Doc) public MMObjectNode getEmptyNode(String owner)(Code)(Java Doc) public FieldDefs getField(String fieldName)(Code)(Java Doc) public Set<String> getFieldNames()(Code)(Java Doc) public Collection<CoreField> getFields()(Code)(Java Doc) public List<CoreField> getFields(int sortOrder)(Code)(Java Doc) protected Function> getFunction(MMObjectNode node, String functionName)(Code)(Java Doc) protected Vector<String> getFunctionParameters(String fields)(Code)(Java Doc) final Object getFunctionValue(MMObjectNode node, String functionName, List> parameters)(Code)(Java Doc) protected Collection<Function<?>> getFunctions(MMObjectNode node)(Code)(Java Doc) public String getGUIIndicator(MMObjectNode node, Parameters pars)(Code)(Java Doc) public String getGUIIndicator(MMObjectNode node)(Code)(Java Doc) public String getGUIIndicator(String fieldName, MMObjectNode node)(Code)(Java Doc) protected String getHTML(String body)(Code)(Java Doc) public String getInitParameter(String name)(Code)(Java Doc) public Map<String, String> getInitParameters()(Code)(Java Doc) public Map getInitParameters(String contextPath)(Code)(Java Doc) public long getInternalVersion()(Code)(Java Doc) public Vector<String> getList(PageInfo sp, StringTagger tagger, StringTokenizer tok)(Code)(Java Doc) protected String getLocaleGUIIndicator(Locale locale, String field, MMObjectNode node)(Code)(Java Doc) protected String getLocaleGUIIndicator(Locale locale, MMObjectNode node)(Code)(Java Doc) public String getMachineName()(Code)(Java Doc) public String getMaintainer()(Code)(Java Doc) public MMObjectNode getNewNode(String owner)(Code)(Java Doc) protected MMObjectNode getNewTmpNode(String owner, String key)(Code)(Java Doc) public FieldDefs getNextField(String currentfield, int sortorder)(Code)(Java Doc) public FieldDefs getNextField(String currentfield)(Code)(Java Doc) public MMObjectNode getNode(String key, boolean useCache)(Code)(Java Doc) public MMObjectNode getNode(String key)(Code)(Java Doc) public MMObjectNode getNode(int number)(Code)(Java Doc) public MMObjectNode getNodeFromCache(Integer number)(Code)(Java Doc) protected String getNodeGUIIndicator(MMObjectNode node, Parameters params)(Code)(Java Doc) public int getNumber()(Code)(Java Doc) public int getObjectType()(Code)(Java Doc) protected Object getObjectValue(MMObjectNode node, String field)(Code)(Java Doc) public MMObjectBuilder getParentBuilder()(Code)(Java Doc) public String getPluralName(String lang)(Code)(Java Doc) public String getPluralName()(Code)(Java Doc) public Hashtable<String, String> getPluralNames()(Code)(Java Doc) public Vector<MMObjectNode> getRelations_main(int src)(Code)(Java Doc) public String getSearchAge()(Code)(Java Doc) public String getShort(String str, int len)(Code)(Java Doc) protected byte[] getShortedByte(String fieldName, MMObjectNode node)(Code)(Java Doc) protected String getShortedText(String fieldName, MMObjectNode node)(Code)(Java Doc) public String getSingularName(String lang)(Code)(Java Doc) public String getSingularName()(Code)(Java Doc) public Hashtable<String, String> getSingularNames()(Code)(Java Doc) public String getSmartPath(String documentRoot, String path, String nodeNumber, String version)(Code)(Java Doc) protected static MMObjectNode getTmpNode(String key)(Code)(Java Doc) protected static String getURLEncode(String body)(Code)(Java Doc) public Object getValue(MMObjectNode node, String field)(Code)(Java Doc) public int getVersion()(Code)(Java Doc) protected static String getWAP(String body)(Code)(Java Doc) public String getXMLPath()(Code)(Java Doc) public boolean hasField(String fieldName)(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public int hashCode(MMObjectNode o)(Code)(Java Doc) public static String hostname_function(String url)(Code)(Java Doc) public boolean init()(Code)(Java Doc) public int insert(int oType, String owner)(Code)(Java Doc) public int insert(String owner, MMObjectNode node)(Code)(Java Doc) public boolean isExtensionOf(MMObjectBuilder o)(Code)(Java Doc) public boolean isNodeCached(Integer number)(Code)(Java Doc) public boolean isVirtual()(Code)(Java Doc) public void loadInitParameters()(Code)(Java Doc) protected Function newFunctionInstance(String name, Parameter[] parameters, ReturnType returnType)(Code)(Java Doc) public boolean nodeLocalChanged(String machine, String number, String builder, String ctype)(Code)(Java Doc) public boolean nodeRemoteChanged(String machine, String number, String builder, String ctype)(Code)(Java Doc) public void notify(NodeEvent event)(Code)(Java Doc) public void notify(RelationEvent event)(Code)(Java Doc) public MMObjectNode preCommit(MMObjectNode node)(Code)(Java Doc) public boolean process(PageInfo sp, StringTokenizer command, Hashtable cmds, Hashtable vars)(Code)(Java Doc) static void putTmpNode(String key, MMObjectNode node)(Code)(Java Doc) public void removeEventListener(org.mmbase.core.event.EventListener listener)(Code)(Java Doc) public void removeField(String fieldName)(Code)(Java Doc) public boolean removeLocalObserver(MMBaseObserver obs)(Code)(Java Doc) public void removeNode(MMObjectNode node)(Code)(Java Doc) public void removeRelations(MMObjectNode node)(Code)(Java Doc) public boolean removeRemoteObserver(MMBaseObserver obs)(Code)(Java Doc) protected void removeSyncNodes(MMObjectNode node)(Code)(Java Doc) static void removeTmpNode(String key)(Code)(Java Doc) public String replace(PageInfo sp, StringTokenizer tok)(Code)(Java Doc) public MMObjectNode safeCache(Integer n, MMObjectNode node)(Code)(Java Doc) boolean safeCommit(MMObjectNode node)(Code)(Java Doc) int safeInsert(MMObjectNode node, String userName)(Code)(Java Doc) public boolean sendFieldChangeSignal(MMObjectNode node, String fieldName)(Code)(Java Doc) public void setDefaults(MMObjectNode node)(Code)(Java Doc) public void setDescription(String e)(Code)(Java Doc) public void setDescriptions(Hashtable<String, String> e)(Code)(Java Doc) public void setFields(List<CoreField> f)(Code)(Java Doc) public void setInitParameter(String name, String value)(Code)(Java Doc) void setInitParameters(Hashtable<String, String> properties)(Code)(Java Doc) public void setMaintainer(String m)(Code)(Java Doc) public void setParentBuilder(MMObjectBuilder parent)(Code)(Java Doc) public void setPluralNames(Hashtable<String, String> names)(Code)(Java Doc) public void setSearchAge(String age)(Code)(Java Doc) public void setSingularNames(Hashtable<String, String> names)(Code)(Java Doc) protected String setUniqueValue(MMObjectNode node, String field, String baseValue)(Code)(Java Doc) protected int setUniqueValue(MMObjectNode node, String field, int offset)(Code)(Java Doc) public boolean setValue(MMObjectNode node, String fieldName, Object originalValue)(Code)(Java Doc) public boolean setValue(MMObjectNode node, String fieldName)(Code)(Java Doc) public void setVersion(int i)(Code)(Java Doc) public void setXMLPath(String m)(Code)(Java Doc) public void testValidData(MMObjectNode node) throws InvalidDataException(Code)(Java Doc) public String toString()(Code)(Java Doc) public String toString(MMObjectNode n)(Code)(Java Doc) protected void update()(Code)(Java Doc) protected void updateFields()(Code)(Java Doc) public static String wrap(String text, int width)(Code)(Java Doc)
|
|
|