|
|||||||||||
| 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.AbstractActionPlugin
|
+--com.usefullittlethings.saw.apps.file.AbstractFileActionPlugin
|
+--com.usefullittlethings.saw.apps.file.Copy
Copies files in the result list to the location specified by
setCopyToLocation. Has options for maintaining the
folder structure and creating missing folders in target location.
| Field Summary |
| Fields inherited from interface com.usefullittlethings.saw.model.ActionPluginIfc |
CLASS_NAME |
| Fields inherited from interface com.usefullittlethings.saw.model.PluginIfc |
BLOCK, LINEAR, SINGLE_BLOCK, UNSUPPORTED |
| Constructor Summary | |
Copy()
This is a combination controller/model class for the Copy action plug-in. |
|
Copy(java.lang.String location,
boolean preserve)
|
|
| 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. |
static void |
copyFile(java.io.File from,
java.io.File to)
|
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.. |
boolean |
getCopyFolders()
|
java.lang.String |
getCopyToLocation()
|
java.lang.String |
getName()
Returns the full name of the plug-in, such as "File date filter". |
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. |
void |
handle(int pattern,
java.lang.Object target)
This method is called by the core application to invoke the plug-in's action. |
boolean |
hasUI()
Returns true/false indicating if the plug-in has a user interface for configuring the plug-in. |
boolean |
isDangerous()
Returns true or false indicating whether or not the use of this action could be considered dangerous to the user's resources. |
void |
reset()
This method is invoked by the search engine to clear any old settings. |
void |
setCopyFolders(boolean copyFolders)
|
void |
setCopyToLocation(java.lang.String location)
|
void |
setEnabled(boolean state)
Sets the enabled flag for the plug-in. |
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.AbstractFileActionPlugin |
getResultClass |
| 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.ActionPluginIfc |
setBase |
| Methods inherited from interface com.usefullittlethings.saw.model.PluginIfc |
addObserver, deleteObserver, getAuthor, getEmail, getResultClass, getWebsite, isEnabled, supportCommandLine |
| Constructor Detail |
public Copy()
public Copy(java.lang.String location,
boolean preserve)
| Method Detail |
public java.lang.String getName()
PluginIfc
getName in interface PluginIfcgetName in class AbstractPluginpublic java.lang.String getShortName()
PluginIfc
getShortName in interface PluginIfcgetShortName in class AbstractPluginpublic java.lang.String getUnixName()
PluginIfc
getUnixName in interface PluginIfcpublic void setCopyToLocation(java.lang.String location)
public java.lang.String getCopyToLocation()
public void setCopyFolders(boolean copyFolders)
public boolean getCopyFolders()
public boolean supports(int pattern)
PluginIfcBLOCK 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 PluginIfcsupports in class AbstractPluginpattern - The pattern to test, such as LINEAR,
BLOCK, or SINGLE_BLOCK.public void reset()
PluginIfc
reset in interface PluginIfcreset in class AbstractPlugin
public void begin()
throws ActionInvocationException
ActionPluginIfc
begin in interface ActionPluginIfcActionInvocationException
public void end()
throws ActionInvocationException
ActionPluginIfc
end in interface ActionPluginIfcActionInvocationExceptionpublic void setEnabled(boolean state)
PluginIfchasUI);
such behavior is up to the plug-in author.
setEnabled in interface PluginIfcsetEnabled in class AbstractPluginstate - The new value for the enabled attribute.public boolean hasUI()
PluginIfc
hasUI in interface PluginIfchasUI in class AbstractPluginpublic java.awt.Component getUI()
PluginIfc
getUI in interface PluginIfcgetUI in class AbstractPluginpublic java.lang.String getState()
PluginIfc
getState in interface PluginIfcgetState in class AbstractPluginpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
PluginIfc
clone in interface PluginIfcclone in class AbstractPlugin
public void handle(int pattern,
java.lang.Object target)
throws ActionInvocationException
ActionPluginIfc
handle in interface ActionPluginIfcpattern - A constant from PluginIfc representing the type of search
pattern that is being performed.target - The target object to be acted upon.
ActionInvocationExceptionPluginIfc.LINEAR,
PluginIfc.BLOCK,
PluginIfc.SINGLE_BLOCK
public static void copyFile(java.io.File from,
java.io.File to)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toXMLString(int indent)
PluginIfc
toXMLString in interface PluginIfctoXMLString in class AbstractPlugin
public void configure(java.lang.String[] args)
throws ArgumentException
PluginIfc
configure in interface PluginIfcArgumentException
public void configure(java.lang.String xml)
throws java.text.ParseException
PluginIfc
configure in interface PluginIfcconfigure in class AbstractActionPluginjava.text.ParseExceptionpublic boolean isDangerous()
ActionPluginIfc
isDangerous in interface ActionPluginIfc
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||