syntheticoperation
Class SearchCommand
java.lang.Object
syntheticoperation.SearchCommand
public class SearchCommand
- extends java.lang.Object
Implement guts of Bobcat system search command.
This class implements a single static method which examines
the value of an attribute and rewrites it to perform the type
of search desired.
Field Summary |
private static java.util.regex.Pattern |
commandPattern
Pattern used to separate search command from search argument. |
Method Summary |
static void |
rewrite(com.wrq.vhi.script.api.ScriptHostSession hs,
java.lang.String command,
java.lang.String attrName)
Rewrite a search command to use the given command string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
commandPattern
private static final java.util.regex.Pattern commandPattern
- Pattern used to separate search command from search argument.
The command consists of optional leading spaces, one or more letters
followed by an "=" character, the search term itself, followed by
trailing spaces.
SearchCommand
public SearchCommand()
rewrite
public static void rewrite(com.wrq.vhi.script.api.ScriptHostSession hs,
java.lang.String command,
java.lang.String attrName)
throws com.wrq.apptrieve.agent.ApptrieveException
- Rewrite a search command to use the given command string.
Insert or replace the value of the command
- Reading the attribute value.
- Determining if the attribute already contains the desired command.
- Rewriting the attribute with the proper command if needed.
- Executing the search.
- Parameters:
hs
- the host session to interact withcommand
- the desired command ("a", "w", and so on)attrName
- the name of the attribute holding the command text
- Throws:
com.wrq.apptrieve.agent.ApptrieveException