Class BaseExplorerFileType<T extends IExplorerFileTypeHandler>
- java.lang.Object
-
- org.apache.hop.ui.hopgui.file.HopFileTypeBase
-
- org.apache.hop.ui.hopgui.perspective.explorer.file.types.base.BaseExplorerFileType<T>
-
- All Implemented Interfaces:
IHopFileType,IExplorerFileType<T>
- Direct Known Subclasses:
BaseTextExplorerFileType,SvgExplorerFileType
public abstract class BaseExplorerFileType<T extends IExplorerFileTypeHandler> extends HopFileTypeBase implements IExplorerFileType<T>
-
-
Field Summary
-
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 BaseExplorerFileType()BaseExplorerFileType(String name, String defaultFileExtension, String[] filterExtensions, String[] filterNames, Properties capabilities)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TcreateFileTypeHandler(HopGui hopGui, ExplorerPerspective perspective, ExplorerFile file)Create a new file type handler for the given Hop GUI instance, perspective and filePropertiesgetCapabilities()Gets capabilitiesList<IGuiContextHandler>getContextHandlers()StringgetDefaultFileExtension()Gets defaultFileExtensionStringgetFileTypeImage()The icon image for this file typeString[]getFilterExtensions()Gets filterExtensionsString[]getFilterNames()Gets filterNamesStringgetName()Gets nameTopenFile(HopGui hopGui, String filename, IVariables parentVariables)Load and display the filevoidsetCapabilities(Properties capabilities)voidsetDefaultFileExtension(String defaultFileExtension)voidsetFilterExtensions(String[] filterExtensions)voidsetFilterNames(String[] filterNames)voidsetName(String name)booleansupportsFile(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, isHandledBy
-
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, isHandledBy, newFile
-
-
-
-
Constructor Detail
-
BaseExplorerFileType
public BaseExplorerFileType()
-
BaseExplorerFileType
public BaseExplorerFileType(String name, String defaultFileExtension, String[] filterExtensions, String[] filterNames, Properties capabilities)
-
-
Method Detail
-
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, ...)
-
getName
public String getName()
Gets name- Specified by:
getNamein interfaceIHopFileType- Specified by:
getNamein classHopFileTypeBase- Returns:
- value of name
-
setName
public void setName(String name)
- Parameters:
name- The name to set
-
getDefaultFileExtension
public String getDefaultFileExtension()
Gets defaultFileExtension- Specified by:
getDefaultFileExtensionin interfaceIHopFileType- Returns:
- value of defaultFileExtension
-
setDefaultFileExtension
public void setDefaultFileExtension(String defaultFileExtension)
- Parameters:
defaultFileExtension- The defaultFileExtension to set
-
getFilterExtensions
public String[] getFilterExtensions()
Gets filterExtensions- Specified by:
getFilterExtensionsin interfaceIHopFileType- Specified by:
getFilterExtensionsin classHopFileTypeBase- Returns:
- value of filterExtensions
-
setFilterExtensions
public void setFilterExtensions(String[] filterExtensions)
- Parameters:
filterExtensions- The filterExtensions to set
-
getFilterNames
public String[] getFilterNames()
Gets filterNames- Specified by:
getFilterNamesin interfaceIHopFileType- Returns:
- value of filterNames
-
setFilterNames
public void setFilterNames(String[] filterNames)
- Parameters:
filterNames- The filterNames to set
-
getCapabilities
public Properties getCapabilities()
Gets capabilities- Specified by:
getCapabilitiesin interfaceIHopFileType- Specified by:
getCapabilitiesin classHopFileTypeBase- Returns:
- value of capabilities
-
setCapabilities
public void setCapabilities(Properties capabilities)
- Parameters:
capabilities- The capabilities to set
-
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
-
openFile
public T openFile(HopGui hopGui, String filename, IVariables parentVariables) 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 loadparentVariables- The parent variablespace to inherit from- Returns:
- The hop file handler
- Throws:
HopException
-
createFileTypeHandler
public abstract T createFileTypeHandler(HopGui hopGui, ExplorerPerspective perspective, ExplorerFile file)
Description copied from interface:IExplorerFileTypeCreate a new file type handler for the given Hop GUI instance, perspective and file- Specified by:
createFileTypeHandlerin interfaceIExplorerFileType<T extends IExplorerFileTypeHandler>- Parameters:
hopGui- The Hop GUIperspective- The perspectivefile- The file- Returns:
-
-