Class ExplorerFileType

    • Constructor Detail

      • ExplorerFileType

        public ExplorerFileType()
    • Method Detail

      • getDefaultFileExtension

        public String getDefaultFileExtension()
        Description copied from interface: IHopFileType
        Returns the default file extension in lowercase prefixed with dot (.xxx) for this file type.
        Specified by:
        getDefaultFileExtension in interface IHopFileType
        Returns:
        The default file extension
      • hasCapability

        public boolean hasCapability​(String capability)
        Description copied from interface: IHopFileType
        Check to see if the capability is present
        Specified by:
        hasCapability in interface IHopFileType
        Parameters:
        capability - The capability to check
        Returns:
        True if the capability is set to any non-null value
      • isHandledBy

        public boolean isHandledBy​(String filename,
                                   boolean checkContent)
                            throws HopException
        Description copied from interface: IHopFileType
        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.
        Specified by:
        isHandledBy in interface IHopFileType
        Parameters:
        filename - The filename
        checkContent - 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: IHopFileType
        Checks whether or not this file type supports the given metadata class
        Specified by:
        supportsFile in interface IHopFileType
        Parameters:
        metaObject - The object to verify support for
        Returns:
      • getContextHandlers

        public List<IGuiContextHandler> getContextHandlers()
        Specified by:
        getContextHandlers in interface IHopFileType
        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: IHopFileType
        The icon image for this file type
        Specified by:
        getFileTypeImage in interface IHopFileType
        Returns:
        The path to the SVG file, a logo for this file type