org.mmbase.module.gui.html
Class ObjectSelector

java.lang.Object
  extended by org.mmbase.module.gui.html.ObjectSelector
All Implemented Interfaces:
CommandHandlerInterface

public class ObjectSelector
extends Object
implements CommandHandlerInterface

The ObjectSelector class offers the functionality to search for objects and select found objects to be edited by the FieldSelector and FieldEditor classes (hitlisted).

Version:
$Id: ObjectSelector.java 35335 2009-05-21 08:14:41Z michiel $
Author:
Daniel Ockeloen, Hans Speijer
Application:
SCAN

Field Summary
(package private)  StateManager stateMngr
           
 
Constructor Summary
ObjectSelector(StateManager manager)
          Constructor to setup reference to the StateManager.
 
Method Summary
(package private)  void clearSearchFields(String user)
          Clears the search fields for the searchfields
(package private)  Vector<String> getAllowedBuilders(String user)
           
 List<String> getList(PageInfo sp, StringTagger args, StringTokenizer commands)
          General List pages coming from MMEdit.
(package private)  Vector getObjectFields(EditState ed)
           
(package private)  Vector getObjectRelations(EditState ed)
           
(package private)  Vector getObjectRelations2(EditState ed)
           
(package private)  Vector getObjectRelations3(EditState ed, StringTagger args)
          Retrieves a list of existing relations and allowed relation types to a specific node.
(package private)  Vector getObjectSelectionList(EditState state)
          Builds a list of HTML Table rows to display a table of found values.
(package private)  Vector getObjectSelectionTitles(EditState state)
          Builds a list of title strings containing the fields to be displayed Item1 = Name of the field (GUI Name)
 boolean process(PageInfo sp, StringTokenizer command, Hashtable cmds, Hashtable vars)
          General proces pages coming from MMEdit.
 String replace(PageInfo sp, StringTokenizer cmds)
          Handle a $MOD command.
(package private)  boolean setObjectSelectionConditions(String user, Hashtable vars)
          Sets the selection query for this user in this editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stateMngr

StateManager stateMngr
Constructor Detail

ObjectSelector

public ObjectSelector(StateManager manager)
Constructor to setup reference to the StateManager.

Method Detail

getList

public List<String> getList(PageInfo sp,
                            StringTagger args,
                            StringTokenizer commands)
                     throws ParseException
General List pages coming from MMEdit.

Specified by:
getList in interface CommandHandlerInterface
Throws:
ParseException
Javadoc:

getObjectFields

Vector getObjectFields(EditState ed)
Javadoc:

getObjectRelations2

Vector getObjectRelations2(EditState ed)
Javadoc:

getAllowedBuilders

Vector<String> getAllowedBuilders(String user)
Javadoc:

getObjectRelations3

Vector getObjectRelations3(EditState ed,
                           StringTagger args)
Retrieves a list of existing relations and allowed relation types to a specific node. Represented by a vector of strings, in which each set of 8 consequetive strings Represents either an existing relation or a relationtype to be used for creating a new one.
The strings represent, in order:
1 - The builder name of the type linked to (i.e. people)
2 - The builder name of the relation (i.e. insrel) if an existing relation, otherwise the builder name of the typed linked to
3 - The number of the relation node if an existing relation, otehrwise the number of the current (edited) node
4 - Empty when an existing realtion. Otherwise it is either the name of the relation defintiton for a typed relation, or, when more than one relationtype exists for this node type, the value "multiple"
5 - GUI name for the node linked to. (empty when a relation type)
6 - "insEditor" if this is an existing node, "addeditor" if this is a rel;ation type.
7 - GUI name of the linked-to node's builder (language dependent)
8 - The gui name of the relation definition for this relation (appropriate for direction, empty when a relation type).

Parameters:
ed - the EditState object that governs this edit
Returns:
a Vector of String

getObjectRelations

Vector getObjectRelations(EditState ed)
Javadoc:

getObjectSelectionList

Vector getObjectSelectionList(EditState state)
Builds a list of HTML Table rows to display a table of found values. It gets the values out of the database using the selectionQuery of the current EditState Item1 = Object ID for selectable object Item2 = HTML String met record waardes


getObjectSelectionTitles

Vector getObjectSelectionTitles(EditState state)
Builds a list of title strings containing the fields to be displayed Item1 = Name of the field (GUI Name)


process

public boolean process(PageInfo sp,
                       StringTokenizer command,
                       Hashtable cmds,
                       Hashtable vars)
General proces pages coming from MMEdit.

Specified by:
process in interface CommandHandlerInterface

setObjectSelectionConditions

boolean setObjectSelectionConditions(String user,
                                     Hashtable vars)
Sets the selection query for this user in this editor.


replace

public String replace(PageInfo sp,
                      StringTokenizer cmds)
Handle a $MOD command. ObjectSelector does not offer any commands.

Specified by:
replace in interface CommandHandlerInterface

clearSearchFields

void clearSearchFields(String user)
Clears the search fields for the searchfields

Deprecated-now:
removed per 1.7, does not do anything, and is never called


MMBase 2.0-SNAPSHOT - null