|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--com.usefullittlethings.saw.apps.shared.AbstractPlugin | +--com.usefullittlethings.saw.apps.shared.AbstractFilterPlugin | +--com.usefullittlethings.saw.apps.file.AbstractFileFilterPlugin | +--com.usefullittlethings.saw.apps.file.Mask
Filters files in result list on whether or not the file name matches a particular mask pattern or string.
Field Summary |
Fields inherited from interface com.usefullittlethings.saw.model.FilterPluginIfc |
CLASS_NAME, EXCLUDE, INCLUDE |
Fields inherited from interface com.usefullittlethings.saw.model.PluginIfc |
BLOCK, LINEAR, SINGLE_BLOCK, UNSUPPORTED |
Constructor Summary | |
Mask()
|
|
Mask(java.lang.String pattern,
boolean caseSensitive)
|
Method Summary | |
void |
begin()
This method of the plug-in will be invoked immediately before a search is performed, allowing the plug-in the "prepare" itself to perform a search. |
java.lang.Object |
clone()
Returns a copy of the plug-in. |
void |
configure(java.lang.String xml)
Used by the load process to configure the plug-in's state so that its state may be restored. |
void |
configure(java.lang.String[] args)
Used by the command-line invocation process to configure the plug-in's state so that it may perform its task without displaying a user interface. |
java.lang.Object |
doExclude(java.lang.Object target)
|
java.lang.Object |
doInclude(java.lang.Object target)
|
void |
end()
This method of the plug-in will be invoked immediately after a search has completed, allowing the plug-in the perform any post-search clean-up activities.. |
java.lang.Object |
exclude(int pattern,
java.lang.Object target)
Given a search pattern and a target, the plug-in must decide whether or not to exclude the target or the target contents. |
boolean |
getCaseSensitive()
|
java.lang.String |
getName()
Returns the full name of the plug-in, such as "File date filter". |
java.lang.String |
getPattern()
|
java.lang.String |
getShortName()
Returns the short name of the plug-in, such as "Date". |
java.lang.String |
getState()
Returns a text description of the plug-in's current state. |
java.awt.Component |
getUI()
Returns the plug-in's user interface component. |
java.lang.String |
getUnixName()
Returns the unique unix names assigned to the plug-in. |
boolean |
hasUI()
Returns true/false indicating if the plug-in has a user interface for configuring the plug-in. |
java.lang.Object |
include(int pattern,
java.lang.Object target)
Given a search pattern and a target, the plug-in must decide whether or not to include the target or the target contents. |
void |
reset()
This method is invoked by the search engine to clear any old settings. |
void |
setCaseSensitive(boolean sensitive)
|
void |
setEnabled(boolean state)
Sets the enabled flag for the plug-in. |
void |
setPattern(java.lang.String pattern)
|
boolean |
supports(int pattern)
Returns a flag indicating whether or not the specified search pattern is supported by the plug-in. |
java.lang.String |
toString()
|
java.lang.String |
toXMLString(int indent)
Renders the state of the plug-in in XML format. |
Methods inherited from class com.usefullittlethings.saw.apps.file.AbstractFileFilterPlugin |
getResultClass |
Methods inherited from class com.usefullittlethings.saw.apps.shared.AbstractFilterPlugin |
getOperation, setOperation |
Methods inherited from class com.usefullittlethings.saw.apps.shared.AbstractPlugin |
decodeXML, decodeXMLBoolean, encodeXML, getAuthor, getEmail, getWebsite, isEnabled, setBase, supportCommandLine |
Methods inherited from class java.util.Observable |
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.usefullittlethings.saw.model.FilterPluginIfc |
getOperation, setBase, setOperation |
Methods inherited from interface com.usefullittlethings.saw.model.PluginIfc |
addObserver, deleteObserver, getAuthor, getEmail, getResultClass, getWebsite, isEnabled, supportCommandLine |
Constructor Detail |
public Mask()
public Mask(java.lang.String pattern, boolean caseSensitive)
Method Detail |
public void setPattern(java.lang.String pattern)
public java.lang.String getPattern()
public void setCaseSensitive(boolean sensitive)
public boolean getCaseSensitive()
public java.lang.String getName()
PluginIfc
getName
in interface PluginIfc
getName
in class AbstractPlugin
public java.lang.String getShortName()
PluginIfc
getShortName
in interface PluginIfc
getShortName
in class AbstractPlugin
public java.lang.String getUnixName()
PluginIfc
getUnixName
in interface PluginIfc
public boolean hasUI()
PluginIfc
hasUI
in interface PluginIfc
hasUI
in class AbstractPlugin
public java.awt.Component getUI()
PluginIfc
getUI
in interface PluginIfc
getUI
in class AbstractPlugin
public void reset()
PluginIfc
reset
in interface PluginIfc
reset
in class AbstractPlugin
public void begin()
FilterPluginIfc
begin
in interface FilterPluginIfc
public void end()
FilterPluginIfc
end
in interface FilterPluginIfc
public void setEnabled(boolean state)
PluginIfc
hasUI
);
such behavior is up to the plug-in author.
setEnabled
in interface PluginIfc
setEnabled
in class AbstractPlugin
state
- The new value for the enabled
attribute.public java.lang.Object clone()
PluginIfc
clone
in interface PluginIfc
clone
in class AbstractPlugin
public boolean supports(int pattern)
PluginIfc
BLOCK
and
SINGLE_BLOCK
search patterns.
All search controllers will have a preferred heirarchy by which filters and actions are applied to the search results.
A search pattern should not be arbitrarily unsupported! This may create a condition where there is no commonly supported search pattern for both the search plug-in and the filter/action plug-ins. Under such conditions, the search operation will be cancelled and the user notified of the problem.
supports
in interface PluginIfc
supports
in class AbstractPlugin
pattern
- The pattern to test, such as LINEAR
,
BLOCK
, or SINGLE_BLOCK
.public java.lang.String getState()
PluginIfc
getState
in interface PluginIfc
getState
in class AbstractPlugin
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object include(int pattern, java.lang.Object target) throws FilterInvocationException
FilterPluginIfc
include
in interface FilterPluginIfc
pattern
- The search pattern that is being applied to this search
operation (LINEAR, BLOCK, SINGLE_BLOCK, etc.)target
- The object or object set that is to be filtered
FilterInvocationException
public java.lang.Object exclude(int pattern, java.lang.Object target) throws FilterInvocationException
FilterPluginIfc
exclude
in interface FilterPluginIfc
pattern
- The search pattern that is being applied to this search
operation (LINEAR, BLOCK, SINGLE_BLOCK, etc.)target
- The object or object set that is to be filtered
FilterInvocationException
public java.lang.Object doInclude(java.lang.Object target) throws FilterInvocationException
FilterInvocationException
public java.lang.Object doExclude(java.lang.Object target) throws FilterInvocationException
FilterInvocationException
public java.lang.String toXMLString(int indent)
PluginIfc
toXMLString
in interface PluginIfc
toXMLString
in class AbstractFilterPlugin
public void configure(java.lang.String[] args) throws ArgumentException
PluginIfc
configure
in interface PluginIfc
ArgumentException
public void configure(java.lang.String xml) throws java.text.ParseException
PluginIfc
configure
in interface PluginIfc
configure
in class AbstractFilterPlugin
java.text.ParseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |