com.plumtree.portaluiinfrastructure.filter
Class QueryCondition

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.filter.QueryCondition

public class QueryCondition
extends java.lang.Object

Author:
sample, modified substantially by CraigS This class generates html necessary to construct a single query condition against the array of properties passed in

Field Summary
static java.lang.String HTMLHIDDEN_ROWINDEX
           
static java.lang.String HTMLHIDDEN_ROWINDEX_ID
           
static int IDX_PROPINFO_ID
           
static int IDX_PROPINFO_NAME
           
static int IDX_PROPINFO_TYPE
           
static int IDX_RELATIVEDATA_MAX
           
static int IDX_RELATIVEDATA_UNITS
           
static int IDX_RELATIVEDATA_VALUE
           
static java.lang.String JAVASCRIPT_GROUP_CHOOSER_GETVALUE
           
static java.lang.String JAVASCRIPT_OPEN_GROUP_CHOOSER
           
static long MAX_VALUE_DAY
           
static long MAX_VALUE_HOUR
           
static long MAX_VALUE_MIN
           
static long MAX_VALUE_WEEK
           
static int MS_PER_DAY
           
static int MS_PER_HOUR
           
static int MS_PER_MIN
           
static int MS_PER_WEEK
           
static java.lang.String SUBSPACE_KEY_GROUP_CHOOSER
           
 
Constructor Summary
QueryCondition(AActivitySpace owner)
          Creates a new QueryCondition object.
QueryCondition(AActivitySpace owner, IPTSession session)
          Creates a new QueryCondition object with a reference to the current user's session.
 
Method Summary
 void AddProperty(java.lang.String propName, int propID, int propType)
          Tell this QueryCondition about another property that could be selected.
 boolean ContainsProperty(int propID)
          Helper method to lookup a property given its ID
protected  HTMLAnchor GetGroupChooserOpenAnchor(java.lang.String _sGroupIndex, java.lang.String _sRowIndex, java.lang.String sCurValue)
          Returns anchor for add button
 java.lang.Object[][] GetPropInfo()
          The property IDs, Names, & Types that are in this condition.
 int GetStatementProperty()
           
 HTMLElement GetTableRow(java.lang.String strTag, java.lang.String strStatementID, boolean showError, boolean showRemovalCheckbox, JSDateTimePickerMgr jsDateTimePickerMgr, PageMgr _ptPageMgr, boolean jitDatePicker)
           
 HTMLElement GetTableRow(java.lang.String strPrefix, java.lang.String strTag, java.lang.String strStatementID, boolean showError, boolean showRemovalCheckbox, JSDateTimePickerMgr jsDateTimePickerMgr, PageMgr _ptPageMgr, boolean jitDatePicker)
           
 int GetTypeExpectedForProperty(int propID)
          Helper method to lookup a property type given its ID
 QueryCondition MakeDuplicate()
          Creates a deep copy of this QueryCondition.
 void PadCheckBox(boolean val)
           
 void SetDivID(java.lang.String divID)
          Set the dp div id.
 void SetFormName(java.lang.String formname)
          Set the form name.
 void SetIsDynamicGroupView(boolean dynGroupView)
          Is this QueryCondition part of a dynamic group view? If so, we should use the proper operators for that UI.
 void SetSelections(int propID, int iOperator, java.lang.String strValue)
          Sets this condition to be selected to the indicated property ID, operator, and String value.
 void SetStyleClass(PTStyleClass styleClass)
          Set a background style class for this row.
 void SetVisible(boolean visible)
          Make this QueryCondition visible or invisible the next time the page is rendered
 java.lang.String ValidateSelections()
          Checks that the current selections are valid and returns a localized error string if they are not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVASCRIPT_OPEN_GROUP_CHOOSER

public static final java.lang.String JAVASCRIPT_OPEN_GROUP_CHOOSER
See Also:
Constant Field Values

JAVASCRIPT_GROUP_CHOOSER_GETVALUE

public static final java.lang.String JAVASCRIPT_GROUP_CHOOSER_GETVALUE
See Also:
Constant Field Values

HTMLHIDDEN_ROWINDEX

public static final java.lang.String HTMLHIDDEN_ROWINDEX
See Also:
Constant Field Values

HTMLHIDDEN_ROWINDEX_ID

public static final java.lang.String HTMLHIDDEN_ROWINDEX_ID
See Also:
Constant Field Values

SUBSPACE_KEY_GROUP_CHOOSER

public static final java.lang.String SUBSPACE_KEY_GROUP_CHOOSER
See Also:
Constant Field Values

MS_PER_MIN

public static final int MS_PER_MIN
See Also:
Constant Field Values

MS_PER_HOUR

public static final int MS_PER_HOUR
See Also:
Constant Field Values

MS_PER_DAY

public static final int MS_PER_DAY
See Also:
Constant Field Values

MS_PER_WEEK

public static final int MS_PER_WEEK
See Also:
Constant Field Values

MAX_VALUE_MIN

public static final long MAX_VALUE_MIN
See Also:
Constant Field Values

MAX_VALUE_HOUR

public static final long MAX_VALUE_HOUR
See Also:
Constant Field Values

MAX_VALUE_DAY

public static final long MAX_VALUE_DAY
See Also:
Constant Field Values

MAX_VALUE_WEEK

public static final long MAX_VALUE_WEEK
See Also:
Constant Field Values

IDX_RELATIVEDATA_UNITS

public static final int IDX_RELATIVEDATA_UNITS
See Also:
Constant Field Values

IDX_RELATIVEDATA_VALUE

public static final int IDX_RELATIVEDATA_VALUE
See Also:
Constant Field Values

IDX_RELATIVEDATA_MAX

public static final int IDX_RELATIVEDATA_MAX
See Also:
Constant Field Values

IDX_PROPINFO_ID

public static final int IDX_PROPINFO_ID
See Also:
Constant Field Values

IDX_PROPINFO_NAME

public static final int IDX_PROPINFO_NAME
See Also:
Constant Field Values

IDX_PROPINFO_TYPE

public static final int IDX_PROPINFO_TYPE
See Also:
Constant Field Values
Constructor Detail

QueryCondition

public QueryCondition(AActivitySpace owner)
Creates a new QueryCondition object.

Parameters:
owner - owning activity space

QueryCondition

public QueryCondition(AActivitySpace owner,
                      IPTSession session)
Creates a new QueryCondition object with a reference to the current user's session. This constructor is necessary to allow for group id to name resolution.

Parameters:
owner - owning activity space
session - the current user's session
Method Detail

SetFormName

public void SetFormName(java.lang.String formname)
Set the form name.

Parameters:
form - name

SetDivID

public void SetDivID(java.lang.String divID)
Set the dp div id.

Parameters:
div - id

SetStyleClass

public void SetStyleClass(PTStyleClass styleClass)
Set a background style class for this row.

Parameters:
styleClass - desired style class

PadCheckBox

public void PadCheckBox(boolean val)

SetVisible

public void SetVisible(boolean visible)
Make this QueryCondition visible or invisible the next time the page is rendered

Parameters:
visible - true for visible, false for invisible

SetIsDynamicGroupView

public void SetIsDynamicGroupView(boolean dynGroupView)
Is this QueryCondition part of a dynamic group view? If so, we should use the proper operators for that UI.

Parameters:
dynGroupView - true for dgroup view, false for search & friends

SetSelections

public void SetSelections(int propID,
                          int iOperator,
                          java.lang.String strValue)
Sets this condition to be selected to the indicated property ID, operator, and String value.

Parameters:
propID - property ID to select
operator - operator to select, must be valid for given property ID
strValue - value to select

MakeDuplicate

public QueryCondition MakeDuplicate()
Creates a deep copy of this QueryCondition.

Returns:
the duplicate.

GetTableRow

public HTMLElement GetTableRow(java.lang.String strTag,
                               java.lang.String strStatementID,
                               boolean showError,
                               boolean showRemovalCheckbox,
                               JSDateTimePickerMgr jsDateTimePickerMgr,
                               PageMgr _ptPageMgr,
                               boolean jitDatePicker)
Parameters:
strTag -
strStatementID -
showError -
Returns:

GetTableRow

public HTMLElement GetTableRow(java.lang.String strPrefix,
                               java.lang.String strTag,
                               java.lang.String strStatementID,
                               boolean showError,
                               boolean showRemovalCheckbox,
                               JSDateTimePickerMgr jsDateTimePickerMgr,
                               PageMgr _ptPageMgr,
                               boolean jitDatePicker)
Parameters:
strTag -
strStatementID -
showError -
Returns:

ValidateSelections

public java.lang.String ValidateSelections()
Checks that the current selections are valid and returns a localized error string if they are not

Returns:
localized error or empty string

AddProperty

public void AddProperty(java.lang.String propName,
                        int propID,
                        int propType)
Tell this QueryCondition about another property that could be selected.

Parameters:
propName - Name of property (localized)
propID - ID of property
propType - Type of property (PT_PROPERTY_TYPES)

GetTypeExpectedForProperty

public int GetTypeExpectedForProperty(int propID)
Helper method to lookup a property type given its ID


GetStatementProperty

public int GetStatementProperty()

ContainsProperty

public boolean ContainsProperty(int propID)
Helper method to lookup a property given its ID


GetPropInfo

public java.lang.Object[][] GetPropInfo()
The property IDs, Names, & Types that are in this condition.

Returns:
array of property info

GetGroupChooserOpenAnchor

protected HTMLAnchor GetGroupChooserOpenAnchor(java.lang.String _sGroupIndex,
                                               java.lang.String _sRowIndex,
                                               java.lang.String sCurValue)
Returns anchor for add button

Parameters:
_nRowIndex - Current row index
Returns:
Anchor for add button
Throws:
java.lang.Exception



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.