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 Summary
 boolean addToComponent(java.lang.String componentID, java.io.File[] components)
          Modify an existing component by adding files to it.
 java.io.File[] component(java.lang.String componentID)
          Grab the current component definition.
 java.io.File componentLocation(java.lang.String id)
           
 void defineComponent(java.lang.String componentID, java.io.File[] components)
          This will define a new component using the files passed in.
 java.io.File lockFile()
           
 

Method Detail

componentLocation

java.io.File componentLocation(java.lang.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

java.io.File[] component(java.lang.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(java.lang.String componentID,
                     java.io.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(java.lang.String componentID,
                       java.io.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

java.io.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.