|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.cadx.common.picker.PickerUtilities
This utilty provides methods to access information required by the picker
processors. To use instanciate the class, then call initialize, and then
call any of the methods. The form processor passed in initailize is
used to obtain required support objects.
The get methods associated with the search attribute list properties
use the search attribute list returned by the picker search attribute
list factory.
Supported API: false
Extendable: false
Field Summary | |
static String |
ALL_CONTAINERS_CONTEXT
|
private PickerSearchAttributeList |
attr_list
|
static String |
AUTHORING_APP
|
protected static String |
CELL_CLASS
|
private static String |
CLASSNAME
|
protected static String |
COLUMN_SORT_SERVICE_DELIM
|
static String |
DELETABLE_ONLY_FILTER
|
static String |
DO_SORT
Property which indicates if the table model is to be sorted prior to table service show. |
static long |
EXTERNALIZATION_VERSION_UID
|
static String |
FILTER
|
static String |
FIND_RESULTS
This property should be set to false if the desire is to not find results. |
protected Properties |
formData
|
static String |
IN_SHARED_CABINET_ONLY_FILTER_VALUE
|
protected static String |
LABEL_ALIGN
|
protected static String |
LABEL_CLASS
|
protected Locale |
locale
|
static String |
LOCATION
This is the location key used by the picker. |
static String |
MULTI_SELECT
This is the selection mode value for multiple selection. |
protected static long |
OLD_FORMAT_VERSION_UID
|
protected OutputStream |
os
|
protected PrintWriter |
out
|
private Vector |
output_attributes
|
static String |
PDMLINK_CONTAINERS_CONTEXT
|
static String |
PICKER_ACTION_VALUE
This is the main Picker action value. |
static String |
PICKER_BROWSER_ACTION_VALUE
This is the browser Picker action value. |
static String |
PICKER_CONTAINER_CONTEXT
|
static String |
PICKER_COOKIE_ID
PICKER_COOKIE_ID is used for the cookie id for storing and retrieving session cookie state during interaction with Picker. |
static String |
PICKER_POPUP_SUCCESS_ACTION_VALUE
|
static String |
PICKER_RADIO_SET
|
static String |
PICKER_RADIO_SET_BROWSE
|
static String |
PICKER_RADIO_SET_SEARCH
|
static String |
PICKER_REFRESH_ON_TABLE_ACTION_COOKIE_KEY
|
static String |
PICKER_SEARCHER_ACTION_VALUE
This is the searcher Picker action value. |
static String |
PICKER_WS_PROP_COOKIE_KEY
|
static String |
PICKER_WS_PROP_KEY
|
protected BasicTemplateProcessor |
pickerFormProcessor
|
static String |
POPUP
|
static String |
PROCESS_CALLBACK
|
protected Properties |
properties
|
static String |
QUERY
This is the query key required by the picker. |
protected Properties |
queryData
|
static String |
REFERER
Property which indicates the referer url. |
private static String |
RESOURCE
|
static String |
SELECTED_OBJECT_NAME
|
static String |
SELECTED_OBJECT_NUMBER
|
static String |
SELECTED_OBJECT_OID
|
static String |
SELECTION_MODE
This is the selection mode key. |
(package private) static long |
serialVersionUID
|
protected static String |
SESSION_ID
|
static String |
SINGLE_SELECT
This is the selection mode value for single selection. |
protected HTTPState |
state
|
static String |
SUBMIT_ACTION
This is the submit action key required by the picker to redirect after submit. |
static String |
SUBMIT_OID
This is the submit oid key required by the picker to redirect after submit. |
protected TemplateProcessorTableService |
tableService
|
static String |
TITLE_RESOURCE_CLASS
This is the resource class key required by the picker. |
static String |
TITLE_RESOURCE_CLASS_DEFAULT
|
static String |
TITLE_RESOURCE_KEY
This is the resource key required by the picker. |
static String |
TITLE_RESOURCE_KEY_DEFAULT
|
static String |
TYPE_LIST
This is the type list key used by the picker. |
static String |
TYPE_LIST_ID
This is the type list id key used by the picker. |
static String |
USE_LOCATION
If this property is set then the value of the LOCATION property should be used. |
Constructor Summary | |
PickerUtilities()
|
Method Summary | |
void |
addHiddenFields(Map hiddenFields)
Generates the list of hidden fields. |
void |
addHiddenFields(String[] hiddenFields)
Generates the list of hidden fields. |
void |
clearDoSort()
Removes the DO_SORT property. |
protected String |
columnNameToSortAttribute(String columnName)
Returns the attribute to be used for sorting the column of the column name. |
String |
createTagIDValuePair(String attributeName)
|
String |
createUniqueTagIDValue(String attributeName)
|
QueryResult |
filterResults(QueryResult results)
Returns subset of results. |
void |
generatePickerPageURL(String action,
Properties properties)
Generate picker page url for the action. |
void |
generateString(String string)
Supported API: false |
void |
generateStringWithOutNewLine(String string)
Supported API: false |
EPMAuthoringAppType |
getAuthoringApplication()
Returns EPMAuthoringAppType if valid value is specified for AUTHORING_APP. |
protected BasicTemplateProcessor |
getBasicTemplateProcessor()
Supported API: false |
ColumnSortService |
getColumnSortService()
Supported API: false |
String |
getContainerVisibilityMask()
|
String |
getContainerVisibilityMask(boolean searchAcrossProducts)
|
String |
getContainerVisibilityMask(Object inContextObj)
|
String |
getContainerVisibilityMask(Object inContextObj,
boolean searchAcrossProducts)
|
static String |
getEncodedOID(Persistable persistable)
Returns the encoded OID of the persistable. |
String |
getFindResults()
Gets the property value from the form processor. |
protected Properties |
getFormData()
Supported API: false |
protected TemplateProcessorTableService |
getHTMLTableService()
Supported API: false |
void |
getLabelHTML(StringBuffer output,
String labelName)
Supported API: false |
void |
getLabelHTML(StringBuffer output,
String labelName,
boolean nowrap)
|
String |
getLocation()
Gets the property value from the form processor. |
static Persistable |
getObject(String oid)
Returns persistable identified by the oid. |
static String |
getOID(Persistable persistable)
Returns the OID of the persistable. |
protected Vector |
getOutputAttributes(int query_type)
Returns the output attributes for the specified query type from the configured picker search attribute list. |
protected SearchAttributeListDelegate |
getPickerSearchAttributeList()
Returns the configured picker search attribute list. |
protected Vector |
getPickList()
Returns the type list display values for the specified query list from the configured picker search attribute list. |
protected Vector |
getPickValues()
Returns the type list query values for the specified query list from the configured picker search attribute list. |
protected PrintWriter |
getPrintWriter()
Supported API: false |
String |
getProperty(String propertyName)
Returns the property value specified for the property name. |
String |
getQuery()
Gets the query value. |
protected Vector |
getQueryClass(int query_type)
Returns the list of query classes for the specified query type from the configured picker search attribute list. |
protected String |
getQueryClassName(int query_type)
Returns the query class name for the specified query type from the configured picker search attribute list. |
protected Vector |
getQueryClassWithNoDescendents(int query_type)
Returns the list of query classes for the specified query type from the configured picker search attribute list w/o descendent entries filtered out. |
protected Properties |
getQueryData()
Supported API: false |
Properties |
getQueryProperties(String[] propertyKeys)
Return Properties object which contains key/value pairs for the keys in propertyKeys. |
protected int |
getQueryType(String query)
Returns the query type for the specified query from the configured picker search attribute list. |
protected RowDataTableModel |
getRowDataTableModel(Vector results)
|
String |
getSelectionMode()
Gets the property value from the form processor. |
long |
getSessionId()
Returns the session id property as a long. |
protected Properties |
getSortableColumns(int query_type)
Returns as Properties object which contains key value pairs wher the keys are column names and the values are Boolean.TRUE for columns which are sortable. |
protected String |
getSortByCommandString(String tableName,
String columnName)
Returns a valid ColumnSortService.SORT_BY command string. |
String |
getSortedColumnName(String tableName)
Returns the current sorted column in the table with the specified table name. |
protected SortedEnumeration |
getSortedEnumeration(QueryResult qr)
Returns a SortedEnumeration with the results sorted based on the first column attribute in accending order. |
protected SortedEnumeration |
getSortedEnumeration(QueryResult qr,
String sort_preference)
Returns a SortedEnumeration with the results sorted based on the attribute specified for sort_preference. |
protected Vector |
getSortList(int query_type)
Returns the sort list for the specified query type from the configured picker search attribute list. |
protected HTTPState |
getState()
Supported API: false |
String |
getSubmitAction()
Gets the property value from the form processor. |
String |
getSubmitOID()
Gets the property value from the form processor. |
String |
getTitleResourceClass()
Gets the property value from the form processor. |
String |
getTitleResourceKey()
Gets the property value from the form processor. |
String |
getTypeList()
Gets the property value from the form processor. |
String |
getTypeListID()
Gets the property value from the form processor. |
protected String |
getTypeListValuesString()
Returns configured picker type list value. |
static String |
getURL(Persistable contextObject,
String action,
Properties queryProperties,
URLFactory factory)
Return url for the action. |
String |
getUseLocation()
Gets the property value from the form processor. |
void |
initialize(BasicTemplateProcessor processor,
Properties parameters,
Locale locale,
OutputStream os)
Supported API: false |
protected boolean |
isChangeablesOnly()
|
boolean |
isCollapse()
Returns true if ColumnCollapseService.COLLAPSE is configured in the form data. |
boolean |
isDeletableOnlyFilter()
Returns true if filter property is set to DELETABLE_ONLY_FILTER. |
boolean |
isDoSort()
Returns false if the DO_SORT property is set to "false"; true is returned otherwise. |
boolean |
isExpandCollapse()
Returns true if ExpandCollapseSectionProcessor.EXPAND_COLLAPSE_FORM_DATA_KEY is configured in the form data. |
boolean |
isInSharedCabinetOnlyFilter()
Returns true if filter property is set to IN_SHARED_CABINET_ONLY_FILTER_VALUE. |
boolean |
isPopup()
|
boolean |
isSortBy()
Returns true if ColumnSortService.SORT_BY is configured in the form data. |
boolean |
isTableAction()
Returns true if a table action like ColumnSortService.SORT_BY or ColumnCollapseService.COLLAPSE is configured in the form data. |
boolean |
isValidType(Object object)
Returns true if the object specified is one of the obejct types supported by the configured search attribute list. |
void |
listTypes()
Generates list of available types if the key TYPE_LIST_ID is specified. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(PickerUtilities thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
setDoSort(boolean enabled)
Set the property which determines if the results are to be sorted in showResults. |
void |
setSessionId(long sessionId)
Sets the session id property. |
void |
setSortBy(String tableName,
String columnName)
Sets in form data a valid value based on tableName and columnName for the ColumnSortService.SORT_BY property. |
void |
showResults(String tableName,
QueryResult results)
Generates an HTMLTable with the rows corresponding to the QueryResult. |
void |
showResults(String tableName,
QueryResult results,
ColumnSortService columnSortService)
Generates an HTMLTable with the rows corresponding to the QueryResult. |
void |
showResults(String tableName,
SortedEnumeration results)
Generates an HTMLTable with the rows corresponding to the results enumeration. |
void |
showResults(String tableName,
SortedEnumeration results,
ColumnSortService columnSortService)
Generates an HTMLTable with the rows corresponding to the results enumeration. |
void |
showResults(String tableName,
Vector results)
Generates an HTMLTable with the rows corresponding to the results vector. |
void |
showResults(String tableName,
Vector results,
ColumnSortService columnSortService)
Generates an HTMLTable with the rows corresponding to the results vector. |
protected String |
sortAttributeToColumnName(String sortAttribute)
Returns the column name which sorts based on the sort attribute. |
QueryResult |
toQueryResult(Object[] results)
If results is null then an empty QueryResult is returned. |
QueryResult |
toQueryResult(SortedEnumeration results)
If results is null then an empty QueryResult is returned. |
QueryResult |
toQueryResult(Vector resultsVector)
|
Vector |
toResultsVector(PagingQueryResult results)
If results is null then an empty Vector is returned. |
Vector |
toResultsVector(QueryResult results)
If results is null then an empty Vector is returned. |
Vector |
toResultsVector(SortedEnumeration results)
If results is null then an empty Vector is returned. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String QUERY
public static final String TITLE_RESOURCE_KEY
public static final String TITLE_RESOURCE_CLASS
public static final String SUBMIT_ACTION
public static final String SUBMIT_OID
public static final String TYPE_LIST_ID
public static final String TYPE_LIST
public static final String USE_LOCATION
public static final String SELECTION_MODE
public static final String SINGLE_SELECT
public static final String MULTI_SELECT
public static final String LOCATION
public static final String FIND_RESULTS
public static final String PICKER_ACTION_VALUE
public static final String PICKER_BROWSER_ACTION_VALUE
public static final String PICKER_SEARCHER_ACTION_VALUE
public static final String PICKER_COOKIE_ID
public static final String DO_SORT
public static final String REFERER
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
public static final String PICKER_CONTAINER_CONTEXT
public static final String PDMLINK_CONTAINERS_CONTEXT
public static final String ALL_CONTAINERS_CONTEXT
public static final String PICKER_REFRESH_ON_TABLE_ACTION_COOKIE_KEY
public static final String PICKER_WS_PROP_COOKIE_KEY
public static final String PICKER_WS_PROP_KEY
public static final String POPUP
public static final String PROCESS_CALLBACK
public static final String SELECTED_OBJECT_OID
public static final String SELECTED_OBJECT_NAME
public static final String SELECTED_OBJECT_NUMBER
public static final String PICKER_POPUP_SUCCESS_ACTION_VALUE
public static final String FILTER
public static final String IN_SHARED_CABINET_ONLY_FILTER_VALUE
public static final String DELETABLE_ONLY_FILTER
public static final String AUTHORING_APP
public static final String TITLE_RESOURCE_CLASS_DEFAULT
public static final String TITLE_RESOURCE_KEY_DEFAULT
public static final String PICKER_RADIO_SET
public static final String PICKER_RADIO_SET_SEARCH
public static final String PICKER_RADIO_SET_BROWSE
protected static final String CELL_CLASS
protected static final String LABEL_ALIGN
protected static final String LABEL_CLASS
protected static String SESSION_ID
protected static String COLUMN_SORT_SERVICE_DELIM
protected BasicTemplateProcessor pickerFormProcessor
private PickerSearchAttributeList attr_list
private Vector output_attributes
protected Locale locale
protected OutputStream os
protected PrintWriter out
protected TemplateProcessorTableService tableService
protected HTTPState state
protected Properties formData
protected Properties queryData
protected Properties properties
Constructor Detail |
public PickerUtilities()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(PickerUtilities thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public String getQuery()
public String getTitleResourceKey()
public String getTitleResourceClass()
public String getSubmitAction()
public void initialize(BasicTemplateProcessor processor, Properties parameters, Locale locale, OutputStream os)
processor
- parameters
- locale
- os
- public String getProperty(String propertyName)
propertyName
-
public void showResults(String tableName, SortedEnumeration results) throws WTException
tableName
- results
-
WTException
public void showResults(String tableName, Vector results) throws WTException
tableName
- results
-
WTException
public Vector toResultsVector(QueryResult results)
results
-
public void listTypes() throws WTException
WTException
public void generateString(String string)
string
- public void addHiddenFields(String[] hiddenFields)
hiddenFields
- protected Properties getFormData()
protected Properties getQueryData()
protected HTTPState getState()
protected PrintWriter getPrintWriter()
protected TemplateProcessorTableService getHTMLTableService()
protected int getQueryType(String query) throws WTException
query
-
WTException
protected String getQueryClassName(int query_type) throws WTException
query_type
-
WTException
protected Vector getOutputAttributes(int query_type) throws WTException
query_type
-
WTException
protected SearchAttributeListDelegate getPickerSearchAttributeList() throws WTException
WTException
protected Vector getQueryClass(int query_type) throws WTException
query_type
-
WTException
protected SortedEnumeration getSortedEnumeration(QueryResult qr)
qr
-
protected SortedEnumeration getSortedEnumeration(QueryResult qr, String sort_preference)
qr
- sort_preference
-
protected BasicTemplateProcessor getBasicTemplateProcessor()
public String getSubmitOID()
public static String getURL(Persistable contextObject, String action, Properties queryProperties, URLFactory factory) throws WTException
contextObject
- action
- queryProperties
- factory
-
WTException
public Properties getQueryProperties(String[] propertyKeys)
propertyKeys
-
public void generatePickerPageURL(String action, Properties properties) throws WTException
action
- properties
-
WTException
public String getTypeListID()
public String getTypeList()
protected Vector getPickValues() throws WTException
WTException
protected Vector getPickList() throws WTException
WTException
public void getLabelHTML(StringBuffer output, String labelName)
output
- labelName
- public static Persistable getObject(String oid) throws WTException
oid
-
WTException
public static String getOID(Persistable persistable) throws WTException
persistable
-
WTException
protected String getTypeListValuesString() throws WTException
WTException
public String getUseLocation()
public static String getEncodedOID(Persistable persistable) throws WTException
persistable
-
WTException
public String getSelectionMode()
public void addHiddenFields(Map hiddenFields)
hiddenFields
- public boolean isValidType(Object object) throws WTException
object
-
WTException
public String getLocation()
public String getFindResults()
protected Vector getQueryClassWithNoDescendents(int query_type) throws WTException
query_type
-
WTException
public void setSessionId(long sessionId)
sessionId
- public long getSessionId()
public void showResults(String tableName, Vector results, ColumnSortService columnSortService) throws WTException
tableName
- results
- columnSortService
-
WTException
public void showResults(String tableName, QueryResult results, ColumnSortService columnSortService) throws WTException
tableName
- results
- columnSortService
-
WTException
public void showResults(String tableName, SortedEnumeration results, ColumnSortService columnSortService) throws WTException
tableName
- results
- columnSortService
-
WTException
public void showResults(String tableName, QueryResult results) throws WTException
tableName
- results
-
WTException
public Vector toResultsVector(PagingQueryResult results)
results
-
public Vector toResultsVector(SortedEnumeration results)
results
-
protected String getSortByCommandString(String tableName, String columnName)
tableName
- columnName
-
public QueryResult toQueryResult(SortedEnumeration results)
results
-
public boolean isTableAction()
public boolean isSortBy()
public boolean isCollapse()
public void setSortBy(String tableName, String columnName)
tableName
- columnName
- protected Vector getSortList(int query_type) throws WTException
query_type
-
WTException
protected Properties getSortableColumns(int query_type) throws WTException
query_type
-
WTException
public String getSortedColumnName(String tableName)
tableName
-
protected String columnNameToSortAttribute(String columnName)
columnName
-
protected String sortAttributeToColumnName(String sortAttribute)
sortAttribute
-
public boolean isDoSort()
public void setDoSort(boolean enabled)
enabled
- public void clearDoSort()
public ColumnSortService getColumnSortService()
public QueryResult toQueryResult(Object[] results)
results
-
public void generateStringWithOutNewLine(String string)
string
- public boolean isExpandCollapse()
public String createTagIDValuePair(String attributeName)
public String createUniqueTagIDValue(String attributeName)
protected RowDataTableModel getRowDataTableModel(Vector results) throws WTException
WTException
public boolean isPopup()
protected boolean isChangeablesOnly()
public String getContainerVisibilityMask()
public String getContainerVisibilityMask(boolean searchAcrossProducts)
public String getContainerVisibilityMask(Object inContextObj)
public String getContainerVisibilityMask(Object inContextObj, boolean searchAcrossProducts)
public QueryResult filterResults(QueryResult results)
public QueryResult toQueryResult(Vector resultsVector)
public boolean isInSharedCabinetOnlyFilter()
public boolean isDeletableOnlyFilter()
public void getLabelHTML(StringBuffer output, String labelName, boolean nowrap)
public EPMAuthoringAppType getAuthoringApplication()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |