Class Export
- java.lang.Object
-
- ca.cgjennings.apps.arkham.project.TaskAction
-
- ca.cgjennings.apps.arkham.project.Export
-
- All Implemented Interfaces:
IconProvider
public class Export extends TaskAction
Task action that exports a project to an archive. This action applies to the project folder, and when performed it creates a ZIP archive of the project contents. The chosen export file name is retained in the project's settings.- Since:
- 2.1
- Author:
- Chris Jennings
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
KEY_EXPORT_FILE
-
Constructor Summary
Constructors Constructor Description Export()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
appliesTo(Project project, Task task, Member member)
Returnstrue
if this action can be performed on the specified member of a project, project or a task.boolean
appliesToSelection(Member[] members)
Returnstrue
if this action is applicable to any of the specifiedMember
s.java.lang.String
getDescription()
Returns a longer description of the action, suitable for use as a tool tip.java.lang.String
getLabel()
Returns the human-readable name of this action.boolean
perform(Project project, Task task, Member member)
Perform this action on a member of a project, a project or a task.-
Methods inherited from class ca.cgjennings.apps.arkham.project.TaskAction
applyToChildren, getActionName, getIcon, performOnSelection, resolveTarget, toString
-
-
-
-
Field Detail
-
KEY_EXPORT_FILE
public static final java.lang.String KEY_EXPORT_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Description copied from class:TaskAction
Returns the human-readable name of this action.- Specified by:
getLabel
in classTaskAction
- Returns:
- the name used to create menu items for this action, localized if possible
-
getDescription
public java.lang.String getDescription()
Description copied from class:TaskAction
Returns a longer description of the action, suitable for use as a tool tip.- Overrides:
getDescription
in classTaskAction
- Returns:
- a long description of the action, or
null
-
perform
public boolean perform(Project project, Task task, Member member)
Description copied from class:TaskAction
Perform this action on a member of a project, a project or a task. If the project itself is the target,task
andmember
will benull
. If a task is the target, thenmember
will be null. If an error occurs while executing the task, then it is the action's responsibility to inform the user. This method can returnfalse
to indicate that if the action is being applied to multiple members, it should stop immediately rather than continue to the next member.- Specified by:
perform
in classTaskAction
- Parameters:
project
- the project that is being acted upontask
- the task within the project that is being acted upon;null
if acting on a projectmember
- the specific member within the task to act upon;null
if this is a project or task
-
appliesTo
public boolean appliesTo(Project project, Task task, Member member)
Description copied from class:TaskAction
Returnstrue
if this action can be performed on the specified member of a project, project or a task. If the project itself is the target,task
andmember
will benull
. If a task is the target, thenmember
will be null. If an error occurs while executing the task, then it is the action's responsibility to inform the user. This method can returnfalse
to indicate that if the action is being applied to multiple members, it should stop immediately rather than continue to the next member.- Specified by:
appliesTo
in classTaskAction
- Parameters:
project
- the project that is being acted upontask
- the task within the project that is being acted upon;null
if acting on a projectmember
- the specific member within the task to act upon;null
if this is a project or task
-
appliesToSelection
public boolean appliesToSelection(Member[] members)
Description copied from class:TaskAction
Returnstrue
if this action is applicable to any of the specifiedMember
s. By overriding this, you can modify whether an action is listed depending on which other members are selected. For example, you could create a command that can only be applied to a singleton selection by checking the length ofmembers
and returningfalse
if it is not 1, and otherwise calling the super implementation.- Overrides:
appliesToSelection
in classTaskAction
- Parameters:
members
- a list of zero or more members- Returns:
true
is the action can be applied to at least one member
-
-