Class HopWorkflowFileType<T extends WorkflowMeta>
- java.lang.Object
-
- org.apache.hop.ui.hopgui.file.HopFileTypeBase
-
- org.apache.hop.ui.hopgui.file.workflow.HopWorkflowFileType<T>
-
- All Implemented Interfaces:
IHopFileType
@HopFileTypePlugin(id="HopFile-Workflow-Plugin", description="The workflow file information for the Hop GUI", image="ui/images/workflow.svg") public class HopWorkflowFileType<T extends WorkflowMeta> extends HopFileTypeBase implements IHopFileType
-
-
Field Summary
Fields Modifier and Type Field Description static StringACTION_ID_NEW_WORKFLOWstatic Class<?>PKGstatic StringWORKFLOW_FILE_TYPE_DESCRIPTION-
Fields inherited from interface org.apache.hop.ui.hopgui.file.IHopFileType
CAPABILITY_ALIGN_BOTTOM, CAPABILITY_ALIGN_LEFT, CAPABILITY_ALIGN_RIGHT, CAPABILITY_ALIGN_TOP, CAPABILITY_CLOSE, CAPABILITY_COPY, CAPABILITY_CUT, CAPABILITY_DEBUG, CAPABILITY_DELETE, CAPABILITY_DISTRIBUTE_HORIZONTAL, CAPABILITY_DISTRIBUTE_VERTICAL, CAPABILITY_EXPORT_TO_SVG, CAPABILITY_FILE_HISTORY, CAPABILITY_HANDLE_METADATA, CAPABILITY_NEW, CAPABILITY_PASTE, CAPABILITY_PAUSE, CAPABILITY_PREVIEW, CAPABILITY_SAVE, CAPABILITY_SAVE_AS, CAPABILITY_SELECT, CAPABILITY_SNAP_TO_GRID, CAPABILITY_START, CAPABILITY_STOP
-
-
Constructor Summary
Constructors Constructor Description HopWorkflowFileType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertiesgetCapabilities()List<IGuiContextHandler>getContextHandlers()StringgetDefaultFileExtension()Returns the default file extension in lowercase prefixed with dot (.xxx) for this file type.StringgetFileTypeImage()The icon image for this file typeString[]getFilterExtensions()String[]getFilterNames()StringgetName()booleanisHandledBy(String filename, boolean checkContent)Look at the given file and see if it's handled by this type.IHopFileTypeHandlernewFile(HopGui hopGui, IVariables parentVariableSpace)IHopFileTypeHandleropenFile(HopGui hopGui, String filename, IVariables parentVariableSpace)Load and display the filebooleansupportsFile(IHasFilename metaObject)Checks whether or not this file type supports the given metadata class-
Methods inherited from class org.apache.hop.ui.hopgui.file.HopFileTypeBase
equals, hasCapability
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hop.ui.hopgui.file.IHopFileType
hasCapability
-
-
-
-
Field Detail
-
PKG
public static final Class<?> PKG
-
WORKFLOW_FILE_TYPE_DESCRIPTION
public static final String WORKFLOW_FILE_TYPE_DESCRIPTION
- See Also:
- Constant Field Values
-
ACTION_ID_NEW_WORKFLOW
public static final String ACTION_ID_NEW_WORKFLOW
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceIHopFileType- Specified by:
getNamein classHopFileTypeBase- Returns:
- The name of this file type
-
getDefaultFileExtension
public String getDefaultFileExtension()
Description copied from interface:IHopFileTypeReturns the default file extension in lowercase prefixed with dot (.xxx) for this file type.- Specified by:
getDefaultFileExtensionin interfaceIHopFileType- Returns:
- The default file extension
-
getFilterExtensions
public String[] getFilterExtensions()
- Specified by:
getFilterExtensionsin interfaceIHopFileType- Specified by:
getFilterExtensionsin classHopFileTypeBase- Returns:
- The file type extensions.
-
getFilterNames
public String[] getFilterNames()
- Specified by:
getFilterNamesin interfaceIHopFileType- Returns:
- The file names (matching the extensions)
-
getCapabilities
public Properties getCapabilities()
- Specified by:
getCapabilitiesin interfaceIHopFileType- Specified by:
getCapabilitiesin classHopFileTypeBase- Returns:
- The capabilities of this file handler
-
openFile
public IHopFileTypeHandler openFile(HopGui hopGui, String filename, IVariables parentVariableSpace) throws HopException
Description copied from interface:IHopFileTypeLoad and display the file- Specified by:
openFilein interfaceIHopFileType- Parameters:
hopGui- The hop GUI to referencefilename- The filename to loadparentVariableSpace- The parent variablespace to inherit from- Returns:
- The hop file handler
- Throws:
HopException
-
newFile
public IHopFileTypeHandler newFile(HopGui hopGui, IVariables parentVariableSpace) throws HopException
- Specified by:
newFilein interfaceIHopFileType- Throws:
HopException
-
isHandledBy
public boolean isHandledBy(String filename, boolean checkContent) throws HopException
Description copied from interface:IHopFileTypeLook at the given file and see if it's handled by this type. Usually this is done by simply looking at the file extension. In rare cases we look at the content.- Specified by:
isHandledByin interfaceIHopFileType- Overrides:
isHandledByin classHopFileTypeBase- Parameters:
filename- The filenamecheckContent- True if we want to look inside the file content- Returns:
- true if this HopFile is handling the file
- Throws:
HopException- In case something goes wrong like: file doesn't exist, a permission problem, ...
-
supportsFile
public boolean supportsFile(IHasFilename metaObject)
Description copied from interface:IHopFileTypeChecks whether or not this file type supports the given metadata class- Specified by:
supportsFilein interfaceIHopFileType- Parameters:
metaObject- The object to verify support for- Returns:
-
getContextHandlers
public List<IGuiContextHandler> getContextHandlers()
- Specified by:
getContextHandlersin interfaceIHopFileType- Returns:
- A list of context handlers allowing you to see all the actions that can be taken with the current file type. (CRUD, ...)
-
getFileTypeImage
public String getFileTypeImage()
Description copied from interface:IHopFileTypeThe icon image for this file type- Specified by:
getFileTypeImagein interfaceIHopFileType- Returns:
- The path to the SVG file, a logo for this file type
-
-