public class StashPagesCommand extends InjectedCommand
FilePageStashWriter
with a default stash directory and the default
DocumentMarshaller
. This command is optionally able to request a stash
description from the user by displaying an input dialog. If a stash description is entered, it
will be placed in the stashed document into the user property with the key
"Additional page stash description".
Expected Context
elements:
PageSelection
(mandatory)
ThumbnailView
, but may be implemented otherwise as well.
JComponent
(optional)
true
) or not. Default:
false
.
Modifier and Type | Field and Description |
---|---|
static String |
STASH_DESCRIPTION_PARAM_KEY |
Constructor and Description |
---|
StashPagesCommand() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canExecute()
Subclasses may override this method to perform argument validation beyond the validation that
happens automatically during the injection phase.
|
protected void |
execute()
This method is called in order to execute the command.
|
String |
getEnabledDocumentLayers()
Returns the layer names to be marshalled.
|
String |
getStashDirectory() |
boolean |
isAvailable()
Returns an indicator whether the command is available and therefore integrable.
|
boolean |
isQueryForDetails() |
void |
setEnabledDocumentLayers(String enabledDocumentLayers)
This method defines the enabled layers to be marshalled.
|
void |
setPageSelection(PageSelection pageSelection)
Deprecated.
Will be used by injection exclusively.
|
void |
setParent(JComponent aComponent)
Deprecated.
Will be used by injection exclusively.
|
void |
setQueryForDetails(boolean queryForDetails)
This setting defines whether a dialog will be opened to enter stashing details or description
before marshalling.
|
void |
setStashDirectory(String stashDirectory)
Sets the stash directory
|
canExecute, execute, getKey, isSelected, isSelected, setKey
public static final String STASH_DESCRIPTION_PARAM_KEY
protected void execute()
InjectedCommand
InjectedCommand.canExecute()
has returned
true
.execute
in class InjectedCommand
protected boolean canExecute()
InjectedCommand
Argument
annotations and the
arguments have been injected.canExecute
in class InjectedCommand
true
if the command can/may be executed in the current context,
false
otherwise.public boolean isAvailable()
Command
isAvailable
in interface Command
isAvailable
in class InjectedCommand
true
- available false
- not availableCommand.isAvailable()
@Deprecated public void setPageSelection(PageSelection pageSelection)
Developers should not invoke this method in any direct way.
@Deprecated public void setParent(JComponent aComponent)
Developers should not invoke this method in any direct way.
public void setQueryForDetails(boolean queryForDetails)
public boolean isQueryForDetails()
public String getStashDirectory()
public void setStashDirectory(String stashDirectory)
stashDirectory
- path name of stash directorypublic String getEnabledDocumentLayers()
public void setEnabledDocumentLayers(String enabledDocumentLayers)
DocumentLayer.DEFAULT
is
enabled as a default setting.enabledDocumentLayers
- A string containing the names of enabled layers separated by a
whitespace or a semicolon. "*" enables all layers.DocumentLayer.getName()
Copyright © 2024 levigo holding gmbh. All rights reserved.