Interface IVirtualFileManager


  • public interface IVirtualFileManager
    A virtual file manager manages virtual files for bm objects.
    Restriction:
    This interface is not intended to be extended by clients.
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void connect​(IBmObject bmObject, org.eclipse.core.runtime.IPath path, boolean removeOnDisconnect, org.eclipse.core.runtime.IProgressMonitor monitor)
      Connects the virtual file for bm object at the given location to this manager.
      void disconnect​(IBmObject bmObject, org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IProgressMonitor monitor)
      Disconnects the virtual file for bm object at the given location from this manager.
      IVirtualFile getVirtualFile​(IBmObject bmObject, org.eclipse.core.runtime.IPath path)
      Returns the virtual file managed for the bm object at the given location or null if either there is no such virtual file.
    • Method Detail

      • getVirtualFile

        IVirtualFile getVirtualFile​(IBmObject bmObject,
                                    org.eclipse.core.runtime.IPath path)
        Returns the virtual file managed for the bm object at the given location or null if either there is no such virtual file.

        The provided location is a full path of a workspace resource. The virtual file manager does not resolve the location of workspace resources in the case of linked resources.

        Parameters:
        bmObject - the bm object (not null)
        location - the location (not null)
        Returns:
        the virtual file managed for that bm object and location or null
      • connect

        void connect​(IBmObject bmObject,
                     org.eclipse.core.runtime.IPath path,
                     boolean removeOnDisconnect,
                     org.eclipse.core.runtime.IProgressMonitor monitor)
              throws org.eclipse.core.runtime.CoreException,
                     IllegalArgumentException
        Connects the virtual file for bm object at the given location to this manager. After that call successfully completed it is guaranteed that each call to getFile returns the same virtual file buntil disconnect is called.

        The provided location is a full path of a workspace resource. The virtual file manager does not resolve the location of workspace resources in the case of linked resources.

        Parameters:
        bmObject - the bm object (not null)
        path - the location of the file to be connected (not null)
        removeOnDisconnect - if true, created file will be removed on disconnect
        monitor - the progress monitor, or null if progress reporting is not desired
        Throws:
        org.eclipse.core.runtime.CoreException - if the virtual file could not successfully be connected.
        IllegalArgumentException - if the virtual file was already been connected with different flag values.
        See Also:
        IBmObject
      • disconnect

        void disconnect​(IBmObject bmObject,
                        org.eclipse.core.runtime.IPath path,
                        org.eclipse.core.runtime.IProgressMonitor monitor)
                 throws org.eclipse.core.runtime.CoreException
        Disconnects the virtual file for bm object at the given location from this manager. After that call successfully completed there is no guarantee that getVirtualFile will return a valid virtual file.

        The provided location is a full path of a workspace resource. The virtual file manager does not resolve the location of workspace resources in the case of linked resources.

        Parameters:
        bmObject - the bm object (not null)
        path - the location of the file to be connected (not null)
        monitor - the progress monitor, or null if progress reporting is not desired
        Throws:
        org.eclipse.core.runtime.CoreException - if the file could not successfully be connected
        See Also:
        IBmObject