rs.sol.soloist.server.guiconfiguration.components
Class GUISearchResultComponent

java.lang.Object
  extended by rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance
      extended by rs.sol.soloist.server.uml.commonimplementation.runtime._ClassInstance
          extended by rs.sol.soloist.server.javaimpl.runtime.SOLoistClassInstance
              extended by rs.sol.soloist.server.builtindomains.common.ObjectOfClass
                  extended by rs.sol.soloist.server.guiconfiguration.construction.GUIComponent
                      extended by rs.sol.soloist.server.guiconfiguration.components.GUISearchResultComponent
All Implemented Interfaces:
IElementPresentationProvider, IUpdatable, rs.sol.soloist.server.uml.concepts.IElement, IClassifierInstance, IClassInstance, IRTElement

public class GUISearchResultComponent
extends GUIComponent

A widget that renders a collection of tuples returned as the result of a search initiated by the user. This class is meant to be sub-classed in order to provide implementation of newQueryBuilder() method. The search is performed using the query specified by this widget's query builder.

The query's input parameters are specified by putting parameter-holding widgets (text boxes, combo boxes, suggest boxes...) into the special type of panel which must be bound to this widget.

This widget performs the query after it receives event via its search input pin (ipSearch() method).

Parameters, results, and selection of resulting tuples can be controlled dynamically using this widget's pins obtainable by using following methods: ipSelection(), opSelection(), ipSelectAll(), ipClearParameters(), ipReset(), and ipClearContents().

One or more of the resulting items (rows) can be selected by the user.

Author:
SOL Expert Group

Nested Class Summary
static class GUISearchResultComponent.ClassicSearch
          Classic search provider.
static class GUISearchResultComponent.FQPropertyNames
          Deprecated. Not for public use.
static interface GUISearchResultComponent.ISearch
          Generic search provider interface.
static class GUISearchResultComponent.OQLSearch
          Search based on OQL query.
static interface GUISearchResultComponent.OrderByAnother
           
static interface GUISearchResultComponent.Parameter
           
static class GUISearchResultComponent.PROPERTIES
          Deprecated. Not for public use.
static class GUISearchResultComponent.QueryBuilderSearch
          Search based on QueryBuilder.
static class GUISearchResultComponent.QueryDefinitionSearch
          Search based on QueryDefinition.
static class GUISearchResultComponent.QueryResultSearch
          Search based on IQueryResult.
static interface GUISearchResultComponent.Result
           
 
Field Summary
 IAttributeValue<Text> abortSearch
          Deprecated. Not for public use.
static IClass CLASSIFIER
          UML class reference
 IAttributeValue<Text> clearContents
          Deprecated. Not for public use.
 IAttributeValue<Text> clearParameters
          Deprecated. Not for public use.
 IAttributeValue<Boolean> doCountResults
          Deprecated. Not for public use.
 IAttributeValue<Boolean> doInitialSearch
          Deprecated. Not for public use.
static java.lang.String FQ_TYPE_NAME
          Fully qualified UML class name
 IAttributeValue<Boolean> isMultiselect
          Deprecated. Not for public use.
static org.apache.log4j.Logger logger
          Deprecated. Not for public use.
 IAttributeValue<Integer> pageSize
          Deprecated. Not for public use.
 IAttributeValue<Text> reset
          Deprecated. Not for public use.
 IAttributeValue<Text> search
          Deprecated. Not for public use.
 IAttributeValue<Text> searchClassName
          Deprecated. Not for public use.
 IAttributeValue<Text> selectAll
          Deprecated. Not for public use.
 IAttributeValue<Text> selection
          Deprecated. Not for public use.
 
Fields inherited from class rs.sol.soloist.server.guiconfiguration.construction.GUIComponent
addStyle, context, description, enabled, init, inputBindings, layoutData, name, outputBindings, ownerTable, parent, removeStyle, show, showInParent, styleName, tooltip, visible
 
Constructor Summary
GUISearchResultComponent()
           
 
Method Summary
 void constructor()
          The domain-specific constructor of the Classifier.
 rs.sol.soloist.client.common.requests.QueryExecutionResult executeQuery(java.util.Map<java.lang.String,java.io.Serializable> parameterDescrs, int offset, int pageSize, java.lang.String sortBy, boolean descending, java.lang.String queryRequestId, boolean doCountResults)
           
 boolean getDoCountResults()
          Returns whether the result count will be shown by this widget.
 boolean getDoInitialSearch()
          Returns whether this widget will perform search immediately after it gets initialized.
 boolean getMultiselect()
          Returns whether this widget would allow multiple selection of search results.
 int getPageSize()
          Returns the size of the search result page.
 java.lang.String getSearchClassName()
          Returns the search class name.
 java.lang.Object handle(rs.sol.soloist.client.common.requests.Request request)
          Handles single request from the client (browser) and returns an appropriate response.
 ISlot<?> ipAbortSearch()
          Returns the abortSearch input pin; when event occurs, the currently executing search will be aborted on the server.
 ISlot<?> ipClearContents()
          Returns the clearContents input pin; when event occurs, all items in the search result page will be cleared.
 ISlot<?> ipClearParameters()
          Returns the clearParameters input pin; when event occurs, all collected parameter values will be cleared.
 ISlot<?> ipReset()
          Returns the reset input pin; when event occurs, all selected items in the search result page will be unselected.
 ISlot<?> ipSearch()
          Returns the search input pin; when event occurs, the search will be performed with the current collection of parameter values.
 ISlot<?> ipSelectAll()
          Returns the selectAll input pin; when event occurs, all items in the search result page will be selected.
 ISlot<?> ipSelection()
          Returns the selection input pin; when event occurs, the object from the binding message will be used to select it in the search results if it exist.
 ISlot<?> opSelection()
          Returns the selection output pin; each time user clicks on (selects) the item in the search result page, the binding message with the collection of selected objects will be provided on this pin.
 void setDoCountResults(boolean doCountResults)
          Sets whether the result count will be shown by this widget.
 void setDoInitialSearch(boolean diInitialSearch)
          Sets whether this widget will perform search immediately after it gets initialized.
 void setMultiselect(boolean multiselect)
          Sets whether this widget will allow multiple selection of search results.
 void setPageSize(int pageSize)
          Sets the size of the search result page.
 void setQueryBuilderClass(java.lang.Class<? extends rs.sol.soloist.server.uml.queries.builder.QueryBuilder> queryBuilderClass)
          Sets searchClassName to the name of the given class.
 void setSearchClass(java.lang.Class<? extends GUISearchResultComponent.ISearch> searchClass)
          Sets searchClassName to the name of the given class.
 void setSearchClassName(java.lang.String searchClassName)
          Sets the search class name.
 
Methods inherited from class rs.sol.soloist.server.guiconfiguration.construction.GUIComponent
addStyleNames, addValueToSlot, clearSlot, clone, createInfo, createInfoAlreadyValidated, destructor, fillElementInfo, getApplication, getCommands, getCommands, getCommonOwner, getContext, getDescription, getDescrString, getDragIcon, getEnabled, getFeature, getFeature, getInputBindings, getInputPin, getInputPins, getLabelString, getLargeIcon, getLayoutData, getName, getNameString, getOutputPin, getOutputPins, getOwner, getParts, getSetting, getSmallIcon, getStyle, getSubnodes, getTooltip, getTooltipString, getTypeString, getVisible, ipAddStyle, ipEnabled, ipInit, ipRemoveStyle, ipShow, ipShowInParent, ipVisible, isInputPin, isOutputPin, putFeatureInfo, readElement, readElements, readSlot, readSlotAsInfo, readSubnodes, removeValueFromSlot, setCellAlignment, setCellSize, setCellStyle, setCenter, setContext, setDescription, setDirectionAndSize, setEnabled, setLayoutData, setLeftRightWidth, setName, setRowColumn, setRowColumn, setSize, setSlot, setSlot, setStyle, setTooltip, setTopBottomHeight, setVisible, setXY, toTranslateDescriptors, translatePinName, updateInfo, validate, validateParts, validateParts
 
Methods inherited from class rs.sol.soloist.server.javaimpl.runtime.SOLoistClassInstance
destroy, equals, getAssociationEndInstance, getAssociationEndInstances, getAttributeValue, getAttributeValues, getMyClass, getMyID, getSlot, getSlot, getSlots, getUMLClass, hashCode, isMarkedAsDeleted, toString
 
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassInstance
accept, accept, exists, getAssociationEndInstance, getAssociationEndInstance, getAssociationEndInstance, getClassifier, hasIdentity, isClassInstance, isDataTypeInstance, isEqualTo, makeClone, markAsDeleted
 
Methods inherited from class rs.sol.soloist.server.uml.commonimplementation.runtime._ClassifierInstance
conformsTo, copySlots, copySlots, getAttributeValue, getAttributeValue, getAttributeValue, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getMElement, getSlot, getSlot, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf, isKindOf, isModelElement, isRTElement
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IClassifierInstance
conformsTo, copySlots, copySlots, getAttributeValue, getAttributeValue, getClassifierFQName, getClassifierUQName, getFirstCommonGeneralizer, getFirstCommonGeneralizerFQName, getFirstCommonGeneralizerUQName, getSlot, getSlot, isDirectInstanceOf, isDirectInstanceOf, isInstanceOf, isInstanceOf
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.runtime.IRTElement
getMElement
 
Methods inherited from interface rs.sol.soloist.server.uml.concepts.IElement
isKindOf, isModelElement, isRTElement
 

Field Detail

pageSize

@Deprecated
public final IAttributeValue<Integer> pageSize
Deprecated. Not for public use.
The number of tuples on each page.


doInitialSearch

@Deprecated
public final IAttributeValue<Boolean> doInitialSearch
Deprecated. Not for public use.
Should we perform the search when the component is initialized, or not?


doCountResults

@Deprecated
public final IAttributeValue<Boolean> doCountResults
Deprecated. Not for public use.
Should we count results of the query or not?

If this is false it is expected that the search will perform faster since COUNT queries can take considerable time in case of a complex query.


isMultiselect

@Deprecated
public final IAttributeValue<Boolean> isMultiselect
Deprecated. Not for public use.
Is multi-selection allowed or not?


selection

@Deprecated
public final IAttributeValue<Text> selection
Deprecated. Not for public use.

selectAll

@Deprecated
public final IAttributeValue<Text> selectAll
Deprecated. Not for public use.

reset

@Deprecated
public final IAttributeValue<Text> reset
Deprecated. Not for public use.

search

@Deprecated
public final IAttributeValue<Text> search
Deprecated. Not for public use.

clearParameters

@Deprecated
public final IAttributeValue<Text> clearParameters
Deprecated. Not for public use.

clearContents

@Deprecated
public final IAttributeValue<Text> clearContents
Deprecated. Not for public use.

abortSearch

@Deprecated
public final IAttributeValue<Text> abortSearch
Deprecated. Not for public use.

searchClassName

@Deprecated
public final IAttributeValue<Text> searchClassName
Deprecated. Not for public use.

FQ_TYPE_NAME

public static final java.lang.String FQ_TYPE_NAME
Fully qualified UML class name

See Also:
Constant Field Values

CLASSIFIER

public static final IClass CLASSIFIER
UML class reference


logger

@Deprecated
public static final org.apache.log4j.Logger logger
Deprecated. Not for public use.
Constructor Detail

GUISearchResultComponent

public GUISearchResultComponent()
Method Detail

setSearchClass

public void setSearchClass(java.lang.Class<? extends GUISearchResultComponent.ISearch> searchClass)
Sets searchClassName to the name of the given class.

Parameters:
searchClass -

setQueryBuilderClass

public void setQueryBuilderClass(java.lang.Class<? extends rs.sol.soloist.server.uml.queries.builder.QueryBuilder> queryBuilderClass)
Sets searchClassName to the name of the given class.

Parameters:
queryBuilderClass -

constructor

public void constructor()
Description copied from interface: IClassifierInstance
The domain-specific constructor of the Classifier.

Specified by:
constructor in interface IClassifierInstance
Overrides:
constructor in class GUIComponent

handle

public java.lang.Object handle(rs.sol.soloist.client.common.requests.Request request)
Description copied from class: GUIComponent
Handles single request from the client (browser) and returns an appropriate response. It is meant to be overriden in sub-classes.

Overrides:
handle in class GUIComponent
Parameters:
request - a Request from client deserialized and ready to be handeled
Returns:
an Object representing the server's response to a request

executeQuery

public rs.sol.soloist.client.common.requests.QueryExecutionResult executeQuery(java.util.Map<java.lang.String,java.io.Serializable> parameterDescrs,
                                                                               int offset,
                                                                               int pageSize,
                                                                               java.lang.String sortBy,
                                                                               boolean descending,
                                                                               java.lang.String queryRequestId,
                                                                               boolean doCountResults)

ipSelection

public ISlot<?> ipSelection()
Returns the selection input pin; when event occurs, the object from the binding message will be used to select it in the search results if it exist.

Returns:
the selection input pin
See Also:
GUIComponentBinding

ipSelectAll

public ISlot<?> ipSelectAll()
Returns the selectAll input pin; when event occurs, all items in the search result page will be selected.

The content of the binding message accepted on this pin is of no importance. Only event is what matters.

Returns:
the selectAll input pin
See Also:
GUIComponentBinding

ipReset

public ISlot<?> ipReset()
Returns the reset input pin; when event occurs, all selected items in the search result page will be unselected.

The content of the binding message accepted on this pin is of no importance. Only event is what matters.

Returns:
the reset input pin
See Also:
GUIComponentBinding

ipSearch

public ISlot<?> ipSearch()
Returns the search input pin; when event occurs, the search will be performed with the current collection of parameter values.

The content of the binding message accepted on this pin is of no importance. Only event is what matters.

Returns:
the search input pin
See Also:
GUIComponentBinding

ipClearParameters

public ISlot<?> ipClearParameters()
Returns the clearParameters input pin; when event occurs, all collected parameter values will be cleared.

The content of the binding message accepted on this pin is of no importance. Only event is what matters.

Returns:
the clearParameters input pin
See Also:
GUIComponentBinding

ipClearContents

public ISlot<?> ipClearContents()
Returns the clearContents input pin; when event occurs, all items in the search result page will be cleared.

The content of the binding message accepted on this pin is of no importance. Only event is what matters.

Returns:
the clearContents input pin
See Also:
GUIComponentBinding

ipAbortSearch

public ISlot<?> ipAbortSearch()
Returns the abortSearch input pin; when event occurs, the currently executing search will be aborted on the server.

The content of the binding message accepted on this pin is of no importance. Only event is what matters.

Returns:
the abortSearch input pin
See Also:
GUIComponentBinding

opSelection

public ISlot<?> opSelection()
Returns the selection output pin; each time user clicks on (selects) the item in the search result page, the binding message with the collection of selected objects will be provided on this pin.

Returns:
the selection output pin
See Also:
GUIComponentBinding

getSearchClassName

public java.lang.String getSearchClassName()
Returns the search class name.

Returns:
the search class name
See Also:
setSearchClassName(String)

setSearchClassName

public void setSearchClassName(java.lang.String searchClassName)
Sets the search class name.

Parameters:
searchClassName -

getDoInitialSearch

public boolean getDoInitialSearch()
Returns whether this widget will perform search immediately after it gets initialized.

Returns:
whether this widget will perform search immediately after it gets initialized
See Also:
setDoInitialSearch(boolean)

setDoInitialSearch

public void setDoInitialSearch(boolean diInitialSearch)
Sets whether this widget will perform search immediately after it gets initialized.

Parameters:
diInitialSearch - whether this widget will perform search immediately after it gets initialized

getDoCountResults

public boolean getDoCountResults()
Returns whether the result count will be shown by this widget.

Returns:
whether the result count will be shown by this widget
See Also:
setDoCountResults(boolean)

setDoCountResults

public void setDoCountResults(boolean doCountResults)
Sets whether the result count will be shown by this widget.

Parameters:
doCountResults - whether the result count will be shown by this widget

getMultiselect

public boolean getMultiselect()
Returns whether this widget would allow multiple selection of search results.

Returns:
whether this widget would allow multiple selection of search results
See Also:
setMultiselect(boolean)

setMultiselect

public void setMultiselect(boolean multiselect)
Sets whether this widget will allow multiple selection of search results.

Parameters:
multiselect - whether this widget will allow multiple selection of search results

getPageSize

public int getPageSize()
Returns the size of the search result page.

Returns:
the size of the search result page
See Also:
setPageSize(int)

setPageSize

public void setPageSize(int pageSize)
Sets the size of the search result page.

Parameters:
pageSize - the size of the search result page