Package xsbti

Interface ComponentProvider


public interface ComponentProvider
A service to locate, install and modify "Components". A component is essentially a directory and a set of files attached to a unique string id.
  • Method Details

    • componentLocation

      File componentLocation(String id)
      Parameters:
      id - The component's id string.
      Returns:
      The "working directory" or base directory for the component. You should perform temporary work here for the component.
    • component

      File[] component(String componentID)
      Grab the current component definition.
      Parameters:
      componentID - The component's id string.
      Returns:
      The set of files attached to this component.
    • defineComponent

      void defineComponent(String componentID, File[] components)
      This will define a new component using the files passed in. Note: The component will copy/move the files into a cache location. You should not use them directly, but look them up using the `component` method.
      Parameters:
      componentID - The component's id string
      components - The set of files which defines the component.
      Throws:
      BootException - if the component is already defined.
    • addToComponent

      boolean addToComponent(String componentID, File[] components)
      Modify an existing component by adding files to it.
      Parameters:
      componentID - The component's id string
      components - The set of new files to add to the component.
      Returns:
      true if any files were copied and false otherwise.
    • lockFile

      File lockFile()
      Returns:
      The lockfile you should use to ensure your component cache does not become corrupted. May return null if there is no lockfile for this provider.