wt.prefs
Class PrefSearch

java.lang.Object
  extended bywt.prefs.PrefSearch
All Implemented Interfaces:
Serializable

public class PrefSearch
extends Object
implements Serializable

This class is used to search the Windchill Database from a client, and return items that match the desired criteria. The PrefSearch Object itself contains all the data that was obtained from the Database for Preferences and should be sufficient to be able to search the Preferences API for matches to properly formed queries.

See Also:
PrefSearchService,

Supported API: true

Extendable: false
, Serialized Form

Field Summary
static String CONTAINER_CONTEXT
          The container context parameter string
private  String context
           
private static String FULLPATHNAME
          The full path name parameter string
static String KEY
          The key parameter string
private  String name
           
private  String node
           
static String NODE
          The node parameter string
private  String parent
           
static String PARENT
          The parent parameter string
static String POLICY
          The policy parameter string
static String PREF_CONTEXT
          The edit context parameter string
static String RETURN_HREF
          The return HREF parameter
static String RETURN_LABEL
          The return label parameter
static String SEARCH_PARAMETER
          The search string parameter
static String SESSION_CONTEXT
          The session context parameter string
private  String value
           
static String VALUE
          The value parameter string
 
Constructor Summary
PrefSearch()
           
 
Method Summary
 Object clone()
           
 String getContext()
           
static PrefSearch getEntry(String aSearchString, String[] context)
          This method will retrieve a single entry from the Preferences that matches a given Search String and a list of contexts.
 String getFullName()
          This will return the fully qualified name for the Preference Node
 String getName()
           
 String getNode()
          This will return the node.
 String getParent()
          This will return the parent of the node.
 String getValue()
           
static PrefSearch[] search(String aSearchString, String[] context)
          This method will search the preferences tree for any Preference OR Key which matches the Search String.
 void setContext(String aContext)
           
 void setName(String aName)
           
 void setNode(String aNode)
           
 void setParent(String aParent)
          This will set the parent of the node.
 void setValue(String aValue)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FULLPATHNAME

private static final String FULLPATHNAME
The full path name parameter string

See Also:
Constant Field Values

SEARCH_PARAMETER

public static final String SEARCH_PARAMETER
The search string parameter

See Also:
Constant Field Values

RETURN_LABEL

public static final String RETURN_LABEL
The return label parameter

See Also:
Constant Field Values

RETURN_HREF

public static final String RETURN_HREF
The return HREF parameter

See Also:
Constant Field Values

NODE

public static final String NODE
The node parameter string

See Also:
Constant Field Values

PARENT

public static final String PARENT
The parent parameter string

See Also:
Constant Field Values

KEY

public static final String KEY
The key parameter string

See Also:
Constant Field Values

VALUE

public static final String VALUE
The value parameter string

See Also:
Constant Field Values

POLICY

public static final String POLICY
The policy parameter string

See Also:
Constant Field Values

PREF_CONTEXT

public static final String PREF_CONTEXT
The edit context parameter string

See Also:
Constant Field Values

SESSION_CONTEXT

public static final String SESSION_CONTEXT
The session context parameter string

See Also:
Constant Field Values

CONTAINER_CONTEXT

public static final String CONTAINER_CONTEXT
The container context parameter string

See Also:
Constant Field Values

context

private String context

parent

private String parent

node

private String node

name

private String name

value

private String value
Constructor Detail

PrefSearch

public PrefSearch()
Method Detail

getEntry

public static PrefSearch getEntry(String aSearchString,
                                  String[] context)
                           throws WTException
This method will retrieve a single entry from the Preferences that matches a given Search String and a list of contexts.

Parameters:
aSearchString - The string to search for.
context - The list of contexts for the current context.
Returns:
PrefSearch The object found, or null if not in the Preferences.
Throws:
WTException

search

public static PrefSearch[] search(String aSearchString,
                                  String[] context)
                           throws WTException
This method will search the preferences tree for any Preference OR Key which matches the Search String. The search string may contain '*' wildcard characters. Any '%' will be encoded properly for the SQL query. A PrefSearch list is returned which may be interated to build the proper Preference output.

Parameters:
aSearchString - The Search String
context - The context of the search
Returns:
The array of Preferences matching the search string.
Throws:
WTException

clone

public Object clone()

setContext

public void setContext(String aContext)

getContext

public String getContext()

setName

public void setName(String aName)

getName

public String getName()

setValue

public void setValue(String aValue)

getValue

public String getValue()

setNode

public void setNode(String aNode)

getNode

public String getNode()
This will return the node.

Returns:
the node.

setParent

public void setParent(String aParent)
This will set the parent of the node.

Parameters:
aParent - the parent of the node.

getParent

public String getParent()
This will return the parent of the node.

Returns:
the parent.

getFullName

public String getFullName()
This will return the fully qualified name for the Preference Node

Returns:
the fully qualified name

toString

public String toString()