org.eclipse.jet.transform
Interface IJETBundleManager


public interface IJETBundleManager

Define the interface to the manager for loading/unloading and describing JET transform bundles.


Method Summary
 void connect(java.lang.String id, IProgressMonitor monitor)
          Record a connection to the specified JET transform bundle.
 void disconnect(java.lang.String id)
          Record a disconnection fromt he specified JET transform bundle.
 IJETBundleDescriptor[] getAllJETBundleDescriptors()
          Return descriptions of all available JET transforms.
 java.lang.String[] getAllTransformIds()
          Return an array of transform available ids.
 IJETBundleDescriptor getDescriptor(java.lang.String id)
          Return the descriptor for a given JET transform.
 IJETBundleDescriptor getDescriptorForProject(java.lang.String name)
          Return the descriptor for the give JET project
 java.lang.String getProjectForId(java.lang.String id)
          Return the Workspace project name for the given JET transform id.
 JET2TemplateLoader getTemplateLoader(java.lang.String id)
          Return the JET2TemplateLoader instance for the specified JET Transform.
 void run(java.lang.String id, IJETRunnable runnable, IProgressMonitor monitor)
          Load the specified JET transform, execute an IJETRunnable, and then ensure the transform is unloaded again.
 

Method Detail

getAllJETBundleDescriptors

public IJETBundleDescriptor[] getAllJETBundleDescriptors()
Return descriptions of all available JET transforms.

Returns:
an possibily empty array.

getDescriptor

public IJETBundleDescriptor getDescriptor(java.lang.String id)
Return the descriptor for a given JET transform.

Parameters:
id - the transform (plug-in) id.
Returns:
the descriptor or null.

getDescriptorForProject

public IJETBundleDescriptor getDescriptorForProject(java.lang.String name)
Return the descriptor for the give JET project

Parameters:
name - the project name.
Returns:
the descriptor or null.

getProjectForId

public java.lang.String getProjectForId(java.lang.String id)
Return the Workspace project name for the given JET transform id. If the transform does not reside in a Workspace project, then null is returned.

Parameters:
id - the transform id
Returns:
the project name or null.

run

public void run(java.lang.String id,
                IJETRunnable runnable,
                IProgressMonitor monitor)
         throws CoreJETException
Load the specified JET transform, execute an IJETRunnable, and then ensure the transform is unloaded again.

Parameters:
id - the transform id
runnable - a runnable
monitor - a progress monitor
Throws:
CoreJETException - if an error occurs loading the transform bundle.

connect

public void connect(java.lang.String id,
                    IProgressMonitor monitor)
             throws CoreJETException
Record a connection to the specified JET transform bundle. If this is the first connection, the bundle is loaded.

Parameters:
id - the transform id
monitor - a progress monitor
Throws:
CoreJETException - if an error occurs loading the transform bundle.

disconnect

public void disconnect(java.lang.String id)
Record a disconnection fromt he specified JET transform bundle. If this is the last connection, the bundle is unloaded.

Parameters:
id - the transform id

getTemplateLoader

public JET2TemplateLoader getTemplateLoader(java.lang.String id)
                                     throws CoreJETException
Return the JET2TemplateLoader instance for the specified JET Transform. A call to this method must be bracketed by calls to IJETBundleManager.connect(String, IProgressMonitor) and IJETBundleManager.disconnect(String).

Parameters:
id - the JET transform
Returns:
the template loader instance
Throws:
CoreJETException - if the loader could not be found or loaded.

getAllTransformIds

public java.lang.String[] getAllTransformIds()
Return an array of transform available ids.

Returns:
a possibly empty array of strings.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.