Class GraphicsMagickCommand
java.lang.Object
org.onehippo.forge.gallerymagick.core.command.AbstractMagickCommand
org.onehippo.forge.gallerymagick.core.command.GraphicsMagickCommand
Encapsulation of Graphics Magick Command Utilities.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default Graphics Magick command executable.static final String
System property name for Graphics Magick command executable.Fields inherited from class org.onehippo.forge.gallerymagick.core.command.AbstractMagickCommand
DEFAULT_SUBCOMMAND_CONVERT, PROP_TIMEOUT
-
Constructor Summary
ConstructorDescriptionGraphicsMagickCommand
(String executable, String subCommand) Constructor with anexecutable
and asubCommand
. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.commons.exec.CommandLine
Create aCommandLine
from executable and arguments.Methods inherited from class org.onehippo.forge.gallerymagick.core.command.AbstractMagickCommand
addArgument, clearArguments, execute, execute, getArguments, getExecutable, getSubCommand, getWorkingDirectory, setWorkingDirectory
-
Field Details
-
PROP_EXECUTABLE
System property name for Graphics Magick command executable. The default value isDEFAULT_EXECUTABLE
.- See Also:
-
DEFAULT_EXECUTABLE
Default Graphics Magick command executable.- See Also:
-
-
Constructor Details
-
GraphicsMagickCommand
Constructor with anexecutable
and asubCommand
. Ifexecutable
is null, it tries to find it from a system property keyed byPROP_EXECUTABLE
. If not found from the system property, it uses the default Graphics Magick executable,DEFAULT_EXECUTABLE
.- Parameters:
executable
- executable of Graphics Magick commandsubCommand
- sub-command ofgm
command
-
-
Method Details
-
createCommandLine
protected org.apache.commons.exec.CommandLine createCommandLine()Create aCommandLine
from executable and arguments.- Specified by:
createCommandLine
in classAbstractMagickCommand
- Returns:
- a
CommandLine
from executable and arguments
-