Package org.apache.hop.ui.hopgui.file
Interface IHopFileType
-
- All Known Subinterfaces:
IExplorerFileType<T>
- All Known Implementing Classes:
BaseExplorerFileType,BaseTextExplorerFileType,EmptyFileType,ExplorerFileType,FolderFileType,GenericFileType,HopFileTypeBase,HopPipelineFileType,HopWorkflowFileType,LogExplorerFileType,MetadataFileType,NoExtensionExplorerFileType,SvgExplorerFileType
public interface IHopFileType
-
-
Field Summary
Fields Modifier and Type Field Description static StringCAPABILITY_ALIGN_BOTTOMstatic StringCAPABILITY_ALIGN_LEFTstatic StringCAPABILITY_ALIGN_RIGHTstatic StringCAPABILITY_ALIGN_TOPstatic StringCAPABILITY_CLOSEstatic StringCAPABILITY_COPYstatic StringCAPABILITY_CUTstatic StringCAPABILITY_DEBUGstatic StringCAPABILITY_DELETEstatic StringCAPABILITY_DISTRIBUTE_HORIZONTALstatic StringCAPABILITY_DISTRIBUTE_VERTICALstatic StringCAPABILITY_EXPORT_TO_SVGstatic StringCAPABILITY_FILE_HISTORYstatic StringCAPABILITY_HANDLE_METADATAstatic StringCAPABILITY_NEWstatic StringCAPABILITY_PASTEstatic StringCAPABILITY_PAUSEstatic StringCAPABILITY_PREVIEWstatic StringCAPABILITY_SAVEstatic StringCAPABILITY_SAVE_ASstatic StringCAPABILITY_SELECTstatic StringCAPABILITY_SNAP_TO_GRIDstatic StringCAPABILITY_STARTstatic StringCAPABILITY_STOP
-
Method Summary
All Methods Instance Methods Abstract 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()booleanhasCapability(String capability)Check to see if the capability is presentbooleanisHandledBy(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
-
-
-
Field Detail
-
CAPABILITY_NEW
static final String CAPABILITY_NEW
- See Also:
- Constant Field Values
-
CAPABILITY_SAVE
static final String CAPABILITY_SAVE
- See Also:
- Constant Field Values
-
CAPABILITY_SAVE_AS
static final String CAPABILITY_SAVE_AS
- See Also:
- Constant Field Values
-
CAPABILITY_EXPORT_TO_SVG
static final String CAPABILITY_EXPORT_TO_SVG
- See Also:
- Constant Field Values
-
CAPABILITY_START
static final String CAPABILITY_START
- See Also:
- Constant Field Values
-
CAPABILITY_CLOSE
static final String CAPABILITY_CLOSE
- See Also:
- Constant Field Values
-
CAPABILITY_STOP
static final String CAPABILITY_STOP
- See Also:
- Constant Field Values
-
CAPABILITY_PAUSE
static final String CAPABILITY_PAUSE
- See Also:
- Constant Field Values
-
CAPABILITY_PREVIEW
static final String CAPABILITY_PREVIEW
- See Also:
- Constant Field Values
-
CAPABILITY_DEBUG
static final String CAPABILITY_DEBUG
- See Also:
- Constant Field Values
-
CAPABILITY_SELECT
static final String CAPABILITY_SELECT
- See Also:
- Constant Field Values
-
CAPABILITY_COPY
static final String CAPABILITY_COPY
- See Also:
- Constant Field Values
-
CAPABILITY_PASTE
static final String CAPABILITY_PASTE
- See Also:
- Constant Field Values
-
CAPABILITY_CUT
static final String CAPABILITY_CUT
- See Also:
- Constant Field Values
-
CAPABILITY_DELETE
static final String CAPABILITY_DELETE
- See Also:
- Constant Field Values
-
CAPABILITY_SNAP_TO_GRID
static final String CAPABILITY_SNAP_TO_GRID
- See Also:
- Constant Field Values
-
CAPABILITY_ALIGN_LEFT
static final String CAPABILITY_ALIGN_LEFT
- See Also:
- Constant Field Values
-
CAPABILITY_ALIGN_RIGHT
static final String CAPABILITY_ALIGN_RIGHT
- See Also:
- Constant Field Values
-
CAPABILITY_ALIGN_TOP
static final String CAPABILITY_ALIGN_TOP
- See Also:
- Constant Field Values
-
CAPABILITY_ALIGN_BOTTOM
static final String CAPABILITY_ALIGN_BOTTOM
- See Also:
- Constant Field Values
-
CAPABILITY_DISTRIBUTE_HORIZONTAL
static final String CAPABILITY_DISTRIBUTE_HORIZONTAL
- See Also:
- Constant Field Values
-
CAPABILITY_DISTRIBUTE_VERTICAL
static final String CAPABILITY_DISTRIBUTE_VERTICAL
- See Also:
- Constant Field Values
-
CAPABILITY_FILE_HISTORY
static final String CAPABILITY_FILE_HISTORY
- See Also:
- Constant Field Values
-
CAPABILITY_HANDLE_METADATA
static final String CAPABILITY_HANDLE_METADATA
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
- Returns:
- The name of this file type
-
getDefaultFileExtension
String getDefaultFileExtension()
Returns the default file extension in lowercase prefixed with dot (.xxx) for this file type.- Returns:
- The default file extension
-
getFilterExtensions
String[] getFilterExtensions()
- Returns:
- The file type extensions.
-
getFilterNames
String[] getFilterNames()
- Returns:
- The file names (matching the extensions)
-
getCapabilities
Properties getCapabilities()
- Returns:
- The capabilities of this file handler
-
hasCapability
boolean hasCapability(String capability)
Check to see if the capability is present- Parameters:
capability- The capability to check- Returns:
- True if the capability is set to any non-null value
-
openFile
IHopFileTypeHandler openFile(HopGui hopGui, String filename, IVariables parentVariableSpace) throws HopException
Load and display the file- 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
IHopFileTypeHandler newFile(HopGui hopGui, IVariables parentVariableSpace) throws HopException
- Throws:
HopException
-
isHandledBy
boolean isHandledBy(String filename, boolean checkContent) throws HopException
Look 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.- 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
boolean supportsFile(IHasFilename metaObject)
Checks whether or not this file type supports the given metadata class- Parameters:
metaObject- The object to verify support for- Returns:
-
getContextHandlers
List<IGuiContextHandler> getContextHandlers()
- Returns:
- A list of context handlers allowing you to see all the actions that can be taken with the current file type. (CRUD, ...)
-
getFileTypeImage
String getFileTypeImage()
The icon image for this file type- Returns:
- The path to the SVG file, a logo for this file type
-
-